source: main/waeup.uniben/trunk/src/waeup/uniben/students/interfaces.py @ 8107

Last change on this file since 8107 was 8101, checked in by Henrik Bettermann, 13 years ago

Add more fields to application and clearance forms (work in progress).

  • Property svn:keywords set to Id
File size: 8.0 KB
Line 
1## $Id: interfaces.py 8101 2012-04-11 07:54:10Z 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##
18from zope import schema
19from waeup.kofa.schema import TextLineChoice
20from waeup.kofa.interfaces import SimpleKofaVocabulary
21from waeup.kofa.schoolgrades import ResultEntryField
22from waeup.kofa.students.vocabularies import nats_vocab
23from waeup.kofa.students.interfaces import (
24    IStudentBase,IUGStudentClearance,IPGStudentClearance,
25    IStudentPersonal,IStudentNavigation,
26    )
27from waeup.kofa.students.vocabularies import (
28    nats_vocab, contextual_reg_num_source)
29from waeup.uniben.interfaces import (
30    lgas_vocab, high_qual, high_grade, exam_types)
31from waeup.uniben.interfaces import MessageFactory as _
32
33class IStudentBase(IStudentBase):
34    """Representation of student base data.
35
36    """
37
38    reg_number = TextLineChoice(
39        title = _(u'Registration Number'),
40        required = False,
41        readonly = False,
42        source = contextual_reg_num_source,
43        )
44
45class IStudentPersonal(IStudentPersonal):
46    """Student personal data.
47
48    """
49
50    marit_stat = schema.Choice(
51        title = u'Maritual Status',
52        default = 'unmarried',
53        required = False,
54        vocabulary = SimpleKofaVocabulary(
55            (_('Unmarried'), 'unmarried'),
56            (_('Married'), 'married'),)
57        )
58
59class IUGStudentClearance(IUGStudentClearance):
60    """Representation of ug student clearance data.
61
62    """
63    date_of_birth = schema.Date(
64        title = _(u'Date of Birth'),
65        required = False,
66        )
67
68    nationality = schema.Choice(
69        source = nats_vocab,
70        title = _(u'Nationality'),
71        required = False,
72        )
73
74    lga = schema.Choice(
75        source = lgas_vocab,
76        title = _(u'State/LGA (Nigerians only)'),
77        required = False,
78        )
79
80    fst_sit_fname = schema.TextLine(
81        title = _(u'Full Name'),
82        required = False,
83        readonly = False,
84        )
85    fst_sit_no = schema.TextLine(
86        title = _(u'Exam Number'),
87        required = False,
88        readonly = False,
89        )
90
91    fst_sit_date = schema.Date(
92        title = _(u'Exam Date'),
93        required = False,
94        readonly = False,
95        )
96
97    fst_sit_type = schema.Choice(
98        title = _(u'Exam Type'),
99        required = False,
100        readonly = False,
101        vocabulary = exam_types,
102        )
103
104    fst_sit_results = schema.List(
105        title = _(u'Exam Results'),
106        value_type = ResultEntryField(),
107        required = False,
108        readonly = False,
109        default = [],
110        )
111
112    scd_sit_fname = schema.TextLine(
113        title = _(u'Full Name'),
114        required = False,
115        readonly = False,
116        )
117    scd_sit_no = schema.TextLine(
118        title = _(u'Exam Number'),
119        required = False,
120        readonly = False,
121        )
122
123    scd_sit_date = schema.Date(
124        title = _(u'Exam Date'),
125        required = False,
126        readonly = False,
127        )
128
129    scd_sit_type = schema.Choice(
130        title = _(u'Exam Type'),
131        required = False,
132        readonly = False,
133        vocabulary = exam_types,
134        )
135
136    scd_sit_results = schema.List(
137        title = _(u'Exam Results'),
138        value_type = ResultEntryField(),
139        required = False,
140        readonly = False,
141        default = [],
142        )
143
144    alr_fname = schema.TextLine(
145        title = _(u'Full Name'),
146        required = False,
147        readonly = False,
148        )
149    alr_no = schema.TextLine(
150        title = _(u'Exam Number'),
151        required = False,
152        readonly = False,
153        )
154
155    alr_date = schema.Date(
156        title = _(u'Exam Date'),
157        required = False,
158        readonly = False,
159        )
160
161    alr_results = schema.List(
162        title = _(u'Exam Results'),
163        value_type = ResultEntryField(),
164        required = False,
165        readonly = False,
166        default = [],
167        )
168
169    hq_type = schema.Choice(
170        title = _(u'Qualification Obtained'),
171        required = False,
172        readonly = False,
173        vocabulary = high_qual,
174        )
175
176    hq_matric_no = schema.TextLine(
177        title = _(u'Former Matric Number'),
178        required = False,
179        readonly = False,
180        )
181
182    hq_degree = schema.Choice(
183        title = _(u'Class of Degree'),
184        required = False,
185        readonly = False,
186        vocabulary = high_grade,
187        )
188
189    hq_school = schema.TextLine(
190        title = _(u'Institution Attended'),
191        required = False,
192        readonly = False,
193        )
194
195    hq_session = schema.TextLine(
196        title = _(u'Years Attended'),
197        required = False,
198        readonly = False,
199        )
200
201    hq_disc = schema.TextLine(
202        title = _(u'Discipline'),
203        required = False,
204        readonly = False,
205        )
206
207
208class IPGStudentClearance(IUGStudentClearance):
209    """Representation of pg student clearance data.
210
211    """
212
213    hq2_type = schema.Choice(
214        title = _(u'Qualification Obtained'),
215        required = False,
216        readonly = False,
217        vocabulary = high_qual,
218        )
219
220    hq2_matric_no = schema.TextLine(
221        title = _(u'Former Matric Number'),
222        required = False,
223        readonly = False,
224        )
225
226    hq2_degree = schema.Choice(
227        title = _(u'Class of Degree'),
228        required = False,
229        readonly = False,
230        vocabulary = high_grade,
231        )
232
233    hq2_school = schema.TextLine(
234        title = _(u'Institution Attended'),
235        required = False,
236        readonly = False,
237        )
238
239    hq2_session = schema.TextLine(
240        title = _(u'Years Attended'),
241        required = False,
242        readonly = False,
243        )
244
245    hq2_disc = schema.TextLine(
246        title = _(u'Discipline'),
247        required = False,
248        readonly = False,
249        )
250
251    nysc_year = schema.Int(
252        title = _(u'Nysc Year'),
253        required = False,
254        readonly = False,
255        )
256
257    nysc_lga = schema.Choice(
258        source = lgas_vocab,
259        title = _(u'Nysc Location'),
260        required = False,
261        )
262
263    employer = schema.TextLine(
264        title = _(u'Employer'),
265        required = False,
266        readonly = False,
267        )
268
269    emp_position = schema.TextLine(
270        title = _(u'Employer Position'),
271        required = False,
272        readonly = False,
273        )
274
275    emp_start = schema.Date(
276        title = _(u'Start Date'),
277        required = False,
278        readonly = False,
279        )
280
281    emp_end = schema.Date(
282        title = _(u'End Date'),
283        required = False,
284        readonly = False,
285        )
286
287    emp_reason = schema.TextLine(
288        title = _(u'Reason for Leaving'),
289        required = False,
290        readonly = False,
291        )
292
293    employer2 = schema.TextLine(
294        title = _(u'2nd Employer'),
295        required = False,
296        readonly = False,
297        )
298
299    emp2_position = schema.TextLine(
300        title = _(u'2nd Employer Position'),
301        required = False,
302        readonly = False,
303        )
304
305    emp2_start = schema.Date(
306        title = _(u'Start Date'),
307        required = False,
308        readonly = False,
309        )
310    emp2_end = schema.Date(
311        title = _(u'End Date'),
312        required = False,
313        readonly = False,
314        )
315
316    emp2_reason = schema.TextLine(
317        title = _(u'Reason for Leaving'),
318        required = False,
319        readonly = False,
320        )
321
322
323class IStudent(IStudentBase,IUGStudentClearance,IPGStudentClearance,IStudentPersonal):
324    """Representation of a student.
325
326    """
Note: See TracBrowser for help on using the repository browser.