[7505] | 1 | ## $Id: interfaces.py 8072 2012-04-09 07:53:53Z henrik $ |
---|
| 2 | ## |
---|
| 3 | ## Copyright (C) 2012 Uli Fouquet & Henrik Bettermann |
---|
| 4 | ## This program is free software; you can redistribute it and/or modify |
---|
| 5 | ## it under the terms of the GNU General Public License as published by |
---|
| 6 | ## the Free Software Foundation; either version 2 of the License, or |
---|
| 7 | ## (at your option) any later version. |
---|
| 8 | ## |
---|
| 9 | ## This program is distributed in the hope that it will be useful, |
---|
| 10 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 11 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 12 | ## GNU General Public License for more details. |
---|
| 13 | ## |
---|
| 14 | ## You should have received a copy of the GNU General Public License |
---|
| 15 | ## along with this program; if not, write to the Free Software |
---|
| 16 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
| 17 | ## |
---|
| 18 | from zope import schema |
---|
[7822] | 19 | from waeup.kofa.schema import TextLineChoice |
---|
| 20 | from waeup.kofa.interfaces import SimpleKofaVocabulary |
---|
[8072] | 21 | from waeup.kofa.students.vocabularies import nats_vocab |
---|
[7822] | 22 | from waeup.kofa.students.interfaces import ( |
---|
[7995] | 23 | IStudentBase,IUGStudentClearance,IPGStudentClearance, |
---|
| 24 | IStudentPersonal,IStudentNavigation, |
---|
[7505] | 25 | ) |
---|
[7822] | 26 | from waeup.kofa.students.vocabularies import ( |
---|
[8072] | 27 | nats_vocab, contextual_reg_num_source) |
---|
| 28 | from waeup.custom.interfaces import lgas_vocab |
---|
| 29 | from waeup.custom.interfaces import MessageFactory as _ |
---|
[7505] | 30 | |
---|
[7618] | 31 | class IStudentBase(IStudentBase): |
---|
| 32 | """Representation of student base data. |
---|
[7505] | 33 | |
---|
| 34 | """ |
---|
[7618] | 35 | |
---|
| 36 | reg_number = TextLineChoice( |
---|
[8072] | 37 | title = _(u'Registration Number'), |
---|
[7505] | 38 | required = False, |
---|
[7618] | 39 | readonly = False, |
---|
| 40 | source = contextual_reg_num_source, |
---|
[7505] | 41 | ) |
---|
| 42 | |
---|
[7618] | 43 | class IStudentPersonal(IStudentPersonal): |
---|
| 44 | """Student personal data. |
---|
| 45 | |
---|
| 46 | """ |
---|
| 47 | |
---|
[7505] | 48 | marit_stat = schema.Choice( |
---|
| 49 | title = u'Maritual Status', |
---|
| 50 | default = 'unmarried', |
---|
| 51 | required = False, |
---|
[7822] | 52 | vocabulary = SimpleKofaVocabulary( |
---|
[8072] | 53 | (_('Unmarried'), 'unmarried'), |
---|
| 54 | (_('Married'), 'married'),) |
---|
[7505] | 55 | ) |
---|
| 56 | |
---|
[7995] | 57 | class IUGStudentClearance(IUGStudentClearance): |
---|
| 58 | """Representation of ug student clearance data. |
---|
[7505] | 59 | |
---|
| 60 | """ |
---|
| 61 | date_of_birth = schema.Date( |
---|
[8072] | 62 | title = _(u'Date of Birth'), |
---|
[7525] | 63 | required = False, |
---|
[7505] | 64 | ) |
---|
| 65 | |
---|
[7525] | 66 | nationality = schema.Choice( |
---|
| 67 | source = nats_vocab, |
---|
[8072] | 68 | title = _(u'Nationality'), |
---|
[7525] | 69 | required = False, |
---|
| 70 | ) |
---|
| 71 | |
---|
| 72 | lga = schema.Choice( |
---|
| 73 | source = lgas_vocab, |
---|
[8072] | 74 | title = _(u'State/LGA (Nigerians only)'), |
---|
[7525] | 75 | required = False, |
---|
| 76 | ) |
---|
| 77 | |
---|
[7995] | 78 | class IPGStudentClearance(IUGStudentClearance): |
---|
| 79 | """Representation of pg student clearance data. |
---|
[7505] | 80 | |
---|
| 81 | """ |
---|
| 82 | |
---|
[7995] | 83 | class IStudent(IStudentBase,IUGStudentClearance,IPGStudentClearance,IStudentPersonal): |
---|
| 84 | """Representation of a student. |
---|
[7505] | 85 | |
---|
| 86 | """ |
---|