source: main/waeup.aaue/trunk/src/waeup/aaue/applicants/interfaces.py @ 17627

Last change on this file since 17627 was 17627, checked in by Henrik Bettermann, 13 months ago

Implement cutoff mark for application.

  • Property svn:keywords set to Id
File size: 48.6 KB
Line 
1## $Id: interfaces.py 17627 2023-10-29 21:05:12Z henrik $
2##
3## Copyright (C) 2011 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"""Customized interfaces of the university application package.
19"""
20
21from zope import schema
22from zope.interface import Attribute, invariant, Invalid
23from waeup.kofa.applicants.interfaces import (
24    IApplicantBaseData,
25    AppCatCertificateSource, CertificateSource)
26from waeup.kofa.schoolgrades import ResultEntryField
27from waeup.kofa.interfaces import (
28    SimpleKofaVocabulary, academic_sessions_vocab, validate_email)
29from waeup.kofa.schema import FormattedDate, TextLineChoice, PhoneNumber
30from waeup.kofa.interfaces import IKofaObject
31from waeup.kofa.students.vocabularies import (
32    nats_vocab, GenderSource, StudyLevelSource)
33from waeup.kofa.applicants.interfaces import (
34    contextual_reg_num_source,
35    IApplicantBaseData,
36    IApplicantRefereeReport)
37from waeup.kofa.refereeentries import RefereeEntryField
38from waeup.kofa.university.vocabularies import StudyModeSource
39from kofacustom.nigeria.applicants.interfaces import (
40    LGASource, high_qual, high_grade, exam_types,
41    INigeriaUGApplicant, INigeriaPGApplicant,
42    INigeriaApplicantOnlinePayment,
43    INigeriaUGApplicantEdit, INigeriaPGApplicantEdit,
44    INigeriaApplicantUpdateByRegNo,
45    IPUTMEApplicantEdit,
46    )
47from waeup.aaue.interfaces import MessageFactory as _
48from waeup.aaue.payments.interfaces import ICustomOnlinePayment
49
50programme_types_vocab = SimpleKofaVocabulary(
51    (_('Undergraduate Programme (100 level)'), 'regular'),
52    (_('Direct Entry (200 level)'), 'direct'),
53    (_('not applicable'), 'na'),
54    )
55
56certificate_types_vocab = SimpleKofaVocabulary(
57    (_('Full-time Degree'), 'ft'),
58    (_('Part-time Degree'), 'pt'),
59    (_('Diploma'), 'dp'),
60    (_('Masters Degree'), 'ma'),
61    (_('Doctorate Degree'), 'phd'),
62    )
63
64document_types_vocab = SimpleKofaVocabulary(
65    (_('Certificate'), 'certificate'),
66    (_('Result'), 'result'),
67    (_('Transcript'), 'transcript'),
68    (_('Studentship'), 'studship'),
69    )
70
71application_types_vocab = SimpleKofaVocabulary(
72    (_('Academic Staff Positions'), 'academic'),
73    (_('Senior Non-Teaching Staff'), 'senior'),
74    (_('Junior Staff (Non-Teaching)'), 'junior'),
75    )
76
77request_types_vocab = SimpleKofaVocabulary(
78    #(_('Scanned Result'), 'result'),
79    #(_('Scanned Certificate'), 'certificate'),
80    #(_('Scanned Transcript'), 'transcript'),
81    (_('Attestation'), 'attest'),
82    (_('Proficiency in English Language'), 'english'),
83    )
84
85rating_vocab = SimpleKofaVocabulary(
86    (_('Excellent'), 'e'),
87    (_('Very good'), 'vg'),
88    (_('Good'), 'g'),
89    (_('Slightly above average'), 'saa'),
90    (_('Average'), 'a'),
91    (_('Below average'), 'ba'),
92    (_('Unable to assess'), 'unable'),
93    )
94
95overallpromise_vocab = SimpleKofaVocabulary(
96    (_('Very good (highest 10%)'), 'vg'),
97    (_('Good (next 15%)'), 'g'),
98    (_('Above average (next 15%)'), 'aa'),
99    (_('Average (middle 20%)'), 'a'),
100    (_('Below average (lower 10%)'), 'ba'),
101    )
102
103
104class ICustomUGApplicant(IApplicantBaseData):
105    """An undergraduate applicant.
106
107    This interface defines the least common multiple of all fields
108    in ug application forms. In customized forms, fields can be excluded by
109    adding them to the UG_OMIT* tuples.
110    """
111
112    #programme_type = schema.Choice(
113    #    title = _(u'Programme Type'),
114    #    vocabulary = programme_types_vocab,
115    #    required = False,
116    #    )
117
118    nationality = schema.Choice(
119        source = nats_vocab,
120        title = _(u'Nationality'),
121        required = True,
122        )
123
124    lga = schema.Choice(
125        source = LGASource(),
126        title = _(u'State/LGA (Nigerians only)'),
127        required = False,
128        )
129
130    perm_address = schema.Text(
131        title = _(u'Permanent Address'),
132        required = False,
133        )
134
135    home_town = schema.TextLine(
136        title = _(u'Home Town'),
137        required = False,
138        )
139
140    #jamb_reg_number = schema.TextLine(
141    #    title = _(u'JAMB Registration Number'),
142    #    required = False,
143    #    )
144
145    jamb_score = schema.Int(
146        title = _(u'Total JAMB Score'),
147        required = False,
148        )
149
150    jamb_subjects = schema.Text(
151        title = _(u'JAMB Subjects and Scores'),
152        required = False,
153        )
154
155    course1 = schema.Choice(
156        title = _(u'1st Choice Course of Study'),
157        source = AppCatCertificateSource(),
158        required = False,
159        )
160
161    course2 = schema.Choice(
162        title = _(u'2nd Choice Course of Study'),
163        source = AppCatCertificateSource(),
164        required = False,
165        )
166
167    course3 = schema.Choice(
168        title = _(u'3rd Choice Course of Study'),
169        source = AppCatCertificateSource(),
170        required = False,
171        )
172
173    fst_sit_fname = schema.TextLine(
174        title = _(u'Name in Full'),
175        required = False,
176        readonly = False,
177        )
178
179    fst_sit_no = schema.TextLine(
180        title = _(u'Exam Number'),
181        required = False,
182        readonly = False,
183        )
184
185    fst_sit_sc_pin = schema.TextLine(
186        title = _(u'Scratch Card Pin'),
187        required = False,
188        readonly = False,
189        )
190
191    fst_sit_sc_serial_number = schema.TextLine(
192        title = _(u'Scratch Card Serial Number'),
193        required = False,
194        readonly = False,
195        )
196
197    fst_sit_date = FormattedDate(
198        title = _(u'Exam Date'),
199        required = False,
200        readonly = False,
201        show_year = True,
202        )
203
204    fst_sit_type = schema.Choice(
205        title = _(u'Exam Type'),
206        required = False,
207        readonly = False,
208        vocabulary = exam_types,
209        )
210
211    fst_sit_results = schema.List(
212        title = _(u'Exam Results'),
213        value_type = ResultEntryField(),
214        required = False,
215        readonly = False,
216        defaultFactory=list,
217        )
218
219    scd_sit_fname = schema.TextLine(
220        title = _(u'Name in Full'),
221        required = False,
222        readonly = False,
223        )
224
225    scd_sit_no = schema.TextLine(
226        title = _(u'Exam Number'),
227        required = False,
228        readonly = False,
229        )
230
231    scd_sit_sc_pin = schema.TextLine(
232        title = _(u'Scratch Card Pin'),
233        required = False,
234        readonly = False,
235        )
236
237    scd_sit_sc_serial_number = schema.TextLine(
238        title = _(u'Scratch Card Serial Number'),
239        required = False,
240        readonly = False,
241        )
242
243    scd_sit_date = FormattedDate(
244        title = _(u'Exam Date'),
245        required = False,
246        readonly = False,
247        show_year = True,
248        )
249
250    scd_sit_type = schema.Choice(
251        title = _(u'Exam Type'),
252        required = False,
253        readonly = False,
254        vocabulary = exam_types,
255        )
256
257    scd_sit_results = schema.List(
258        title = _(u'Exam Results'),
259        value_type = ResultEntryField(),
260        required = False,
261        readonly = False,
262        defaultFactory=list,
263        )
264
265    alr_fname = schema.TextLine(
266        title = _(u'Name in Full'),
267        required = False,
268        readonly = False,
269        )
270
271    alr_no = schema.TextLine(
272        title = _(u'Exam Number'),
273        required = False,
274        readonly = False,
275        )
276
277    alr_date = FormattedDate(
278        title = _(u'Exam Date'),
279        required = False,
280        readonly = False,
281        show_year = True,
282        )
283
284    alr_results = schema.List(
285        title = _(u'Exam Results'),
286        value_type = ResultEntryField(),
287        required = False,
288        readonly = False,
289        defaultFactory=list,
290        )
291
292    hq_type = schema.Choice(
293        title = _(u'Qualification Obtained'),
294        required = False,
295        readonly = False,
296        vocabulary = high_qual,
297        )
298
299    hq_fname = schema.TextLine(
300        title = _(u'Name in Full'),
301        required = False,
302        readonly = False,
303        )
304
305    hq_matric_no = schema.TextLine(
306        title = _(u'Former Matric Number'),
307        required = False,
308        readonly = False,
309        )
310
311    hq_degree = schema.Choice(
312        title = _(u'Class of Degree'),
313        required = False,
314        readonly = False,
315        vocabulary = high_grade,
316        )
317
318    hq_school = schema.TextLine(
319        title = _(u'Institution Attended'),
320        required = False,
321        readonly = False,
322        )
323
324    hq_session = schema.TextLine(
325        title = _(u'Years Attended'),
326        required = False,
327        readonly = False,
328        )
329
330    hq_disc = schema.TextLine(
331        title = _(u'Discipline'),
332        required = False,
333        readonly = False,
334        )
335
336    hq_type2 = schema.Choice(
337        title = _(u'Qualification Obtained'),
338        required = False,
339        readonly = False,
340        vocabulary = high_qual,
341        )
342
343    hq_fname2 = schema.TextLine(
344        title = _(u'Name in Full'),
345        required = False,
346        readonly = False,
347        )
348
349    hq_matric_no2 = schema.TextLine(
350        title = _(u'Former Matric Number'),
351        required = False,
352        readonly = False,
353        )
354
355    hq_degree2 = schema.Choice(
356        title = _(u'Class of Degree'),
357        required = False,
358        readonly = False,
359        vocabulary = high_grade,
360        )
361
362    hq_school2 = schema.TextLine(
363        title = _(u'Institution Attended'),
364        required = False,
365        readonly = False,
366        )
367
368    hq_session2 = schema.TextLine(
369        title = _(u'Years Attended'),
370        required = False,
371        readonly = False,
372        )
373
374    hq_disc2 = schema.TextLine(
375        title = _(u'Discipline'),
376        required = False,
377        readonly = False,
378        )
379
380    hq_type3 = schema.Choice(
381        title = _(u'Qualification Obtained'),
382        required = False,
383        readonly = False,
384        vocabulary = high_qual,
385        )
386
387    hq_fname3 = schema.TextLine(
388        title = _(u'Name in Full'),
389        required = False,
390        readonly = False,
391        )
392
393    hq_matric_no3 = schema.TextLine(
394        title = _(u'Former Matric Number'),
395        required = False,
396        readonly = False,
397        )
398
399    hq_degree3 = schema.Choice(
400        title = _(u'Class of Degree'),
401        required = False,
402        readonly = False,
403        vocabulary = high_grade,
404        )
405
406    hq_school3 = schema.TextLine(
407        title = _(u'Institution Attended'),
408        required = False,
409        readonly = False,
410        )
411
412    hq_session3 = schema.TextLine(
413        title = _(u'Years Attended'),
414        required = False,
415        readonly = False,
416        )
417
418    hq_disc3 = schema.TextLine(
419        title = _(u'Discipline'),
420        required = False,
421        readonly = False,
422        )
423
424    nysc_year = schema.Int(
425        title = _(u'Nysc Year'),
426        required = False,
427        readonly = False,
428        )
429
430    nysc_location = schema.TextLine(
431        title = _(u'Nysc Location'),
432        required = False,
433        )
434
435    nysc_lga = schema.Choice(
436        source = LGASource(),
437        title = _(u'Nysc LGA'),
438        required = False,
439        )
440
441    employer = schema.TextLine(
442        title = _(u'Employer'),
443        required = False,
444        readonly = False,
445        )
446
447    emp_position = schema.TextLine(
448        title = _(u'Employer Position'),
449        required = False,
450        readonly = False,
451        )
452
453    emp_start = FormattedDate(
454        title = _(u'Start Date'),
455        required = False,
456        readonly = False,
457        show_year = True,
458        )
459
460    emp_end = FormattedDate(
461        title = _(u'End Date'),
462        required = False,
463        readonly = False,
464        show_year = True,
465        )
466
467    emp_reason = schema.TextLine(
468        title = _(u'Reason for Leaving'),
469        required = False,
470        readonly = False,
471        )
472
473    employer2 = schema.TextLine(
474        title = _(u'2nd Employer'),
475        required = False,
476        readonly = False,
477        )
478
479    emp2_position = schema.TextLine(
480        title = _(u'2nd Employer Position'),
481        required = False,
482        readonly = False,
483        )
484
485    emp2_start = FormattedDate(
486        title = _(u'Start Date'),
487        required = False,
488        readonly = False,
489        show_year = True,
490        )
491
492    emp2_end = FormattedDate(
493        title = _(u'End Date'),
494        required = False,
495        readonly = False,
496        show_year = True,
497        )
498
499    emp2_reason = schema.TextLine(
500        title = _(u'Reason for Leaving'),
501        required = False,
502        readonly = False,
503        )
504
505    former_matric = schema.TextLine(
506        title = _(u'If yes, matric number'),
507        required = False,
508        readonly = False,
509        )
510
511    notice = schema.Text(
512        title = _(u'Notice'),
513        required = False,
514        )
515
516
517    master_sheet_number = schema.TextLine(
518        title = _(u'Master Sheet Number'),
519        required = False,
520        readonly = False,
521        )
522
523    screening_venue = schema.TextLine(
524        title = _(u'Screening Venue'),
525        required = False,
526        )
527
528    screening_date = schema.TextLine(
529        title = _(u'Screening Date'),
530        required = False,
531        )
532
533    screening_score = schema.Int(
534        title = _(u'Screening Points'),
535        required = False,
536        )
537
538    student_id = schema.TextLine(
539        title = _(u'Student Id'),
540        required = False,
541        readonly = False,
542        )
543
544    course_admitted = schema.Choice(
545        title = _(u'Admitted Course of Study'),
546        source = CertificateSource(),
547        required = False,
548        )
549
550    locked = schema.Bool(
551        title = _(u'Form locked'),
552        default = False,
553        )
554
555    @invariant
556    def course_choice(applicant):
557
558        if applicant.course1:
559            if  applicant.jamb_score is None:
560                raise Invalid(_("Total JAMB score not set."))
561            if applicant.course1.custom_float_1 and applicant.course1.custom_float_1 > applicant.jamb_score:
562                raise Invalid(_("You do not meet the minimum cutoff mark for course %s. Cutoff score for this course is %s. Please consider selecting an alternative choice." % (
563                    applicant.course1.code, applicant.course1.custom_float_1)))
564
565        if applicant.course2:
566            if  applicant.jamb_score is None:
567                raise Invalid(_("Total JAMB score not set."))
568            if applicant.course2.custom_float_1 and applicant.course2.custom_float_1 > applicant.jamb_score:
569                raise Invalid(_("You do not meet the minimum cutoff mark for course %s. Cutoff score for this course is %s. Please consider selecting an alternative choice." % (
570                    applicant.course2.code, applicant.course2.custom_float_1)))
571
572        if applicant.course3:
573            if  applicant.jamb_score is None:
574                raise Invalid(_("Total JAMB score not set."))
575            if applicant.course3.custom_float_1 and applicant.course3.custom_float_1 > applicant.jamb_score:
576                raise Invalid(_("You do not meet the minimum cutoff mark for course %s. Cutoff score for this course is %s. Please consider selecting an alternative choice." % (
577                    applicant.course3.code, applicant.course3.custom_float_1)))
578
579        if applicant.course1 == applicant.course2:
580            raise Invalid(_("2nd choice course must differ from 1st choice course."))
581        if applicant.course1 == applicant.course3:
582            raise Invalid(_("3rd choice course must differ from 1st choice course."))
583        if applicant.course2 == applicant.course3:
584            raise Invalid(_("3rd choice course must differ from 2nd choice course."))
585
586#ICustomUGApplicant['programme_type'].order = IApplicantBaseData[
587#    'reg_number'].order
588
589
590class ICustomPGApplicant(IApplicantBaseData):
591    """A postgraduate applicant.
592
593    This interface defines the least common multiple of all fields
594    in pg application forms. In customized forms, fields can be excluded by
595    adding them to the PG_OMIT* tuples.
596    """
597
598    nationality = schema.Choice(
599        source = nats_vocab,
600        title = _(u'Nationality'),
601        required = True,
602        )
603    lga = schema.Choice(
604        source = LGASource(),
605        title = _(u'State/LGA (Nigerians only)'),
606        required = False,
607        )
608    #perm_address = schema.Text(
609    #    title = _(u'Permanent Address'),
610    #    required = False,
611    #    )
612    course1 = schema.Choice(
613        title = _(u'1st Choice Course of Study'),
614        source = AppCatCertificateSource(),
615        required = True,
616        )
617    course2 = schema.Choice(
618        title = _(u'2nd Choice Course of Study'),
619        source = AppCatCertificateSource(),
620        required = False,
621        )
622    abstract = schema.Text(
623        title = _(u'Summary of Research Proposal'),
624        description = _(u'Brief abstract of intended project/research work'),
625        required = False,
626        )
627    fst_sit_fname = schema.TextLine(
628        title = _(u'Name in Full'),
629        required = False,
630        readonly = False,
631        )
632    fst_sit_no = schema.TextLine(
633        title = _(u'Exam Number'),
634        required = False,
635        readonly = False,
636        )
637    fst_sit_date = FormattedDate(
638        title = _(u'Exam Date'),
639        required = False,
640        readonly = False,
641        show_year = True,
642        )
643    fst_sit_type = schema.Choice(
644        title = _(u'Exam Type'),
645        required = False,
646        readonly = False,
647        vocabulary = exam_types,
648        )
649    fst_sit_results = schema.List(
650        title = _(u'Exam Results'),
651        value_type = ResultEntryField(),
652        required = False,
653        readonly = False,
654        defaultFactory=list,
655        )
656    scd_sit_fname = schema.TextLine(
657        title = _(u'Name in Full'),
658        required = False,
659        readonly = False,
660        )
661    scd_sit_no = schema.TextLine(
662        title = _(u'Exam Number'),
663        required = False,
664        readonly = False,
665        )
666    scd_sit_date = FormattedDate(
667        title = _(u'Exam Date'),
668        required = False,
669        readonly = False,
670        show_year = True,
671        )
672    scd_sit_type = schema.Choice(
673        title = _(u'Exam Type'),
674        required = False,
675        readonly = False,
676        vocabulary = exam_types,
677        )
678    scd_sit_results = schema.List(
679        title = _(u'Exam Results'),
680        value_type = ResultEntryField(),
681        required = False,
682        readonly = False,
683        defaultFactory=list,
684        )
685    hq_type = schema.Choice(
686        title = _(u'Qualification Obtained'),
687        required = False,
688        readonly = False,
689        vocabulary = high_qual,
690        )
691    hq_fname = schema.TextLine(
692        title = _(u'Name in Full'),
693        required = False,
694        readonly = False,
695        )
696    hq_matric_no = schema.TextLine(
697        title = _(u'Former Matric Number'),
698        required = False,
699        readonly = False,
700        )
701    hq_degree = schema.Choice(
702        title = _(u'Class of Degree'),
703        required = False,
704        readonly = False,
705        vocabulary = high_grade,
706        )
707    hq_school = schema.TextLine(
708        title = _(u'Institution Attended'),
709        required = False,
710        readonly = False,
711        )
712    hq_session = schema.TextLine(
713        title = _(u'Years Attended'),
714        required = False,
715        readonly = False,
716        )
717    hq_disc = schema.TextLine(
718        title = _(u'Discipline'),
719        required = False,
720        readonly = False,
721        )
722    hq_type2 = schema.Choice(
723        title = _(u'Qualification Obtained'),
724        required = False,
725        readonly = False,
726        vocabulary = high_qual,
727        )
728
729    hq_fname2 = schema.TextLine(
730        title = _(u'Name in Full'),
731        required = False,
732        readonly = False,
733        )
734
735    hq_matric_no2 = schema.TextLine(
736        title = _(u'Former Matric Number'),
737        required = False,
738        readonly = False,
739        )
740
741    hq_degree2 = schema.Choice(
742        title = _(u'Class of Degree'),
743        required = False,
744        readonly = False,
745        vocabulary = high_grade,
746        )
747
748    hq_school2 = schema.TextLine(
749        title = _(u'Institution Attended'),
750        required = False,
751        readonly = False,
752        )
753
754    hq_session2 = schema.TextLine(
755        title = _(u'Years Attended'),
756        required = False,
757        readonly = False,
758        )
759
760    hq_disc2 = schema.TextLine(
761        title = _(u'Discipline'),
762        required = False,
763        readonly = False,
764        )
765
766    hq_type3 = schema.Choice(
767        title = _(u'Qualification Obtained'),
768        required = False,
769        readonly = False,
770        vocabulary = high_qual,
771        )
772
773    hq_fname3 = schema.TextLine(
774        title = _(u'Name in Full'),
775        required = False,
776        readonly = False,
777        )
778
779    hq_matric_no3 = schema.TextLine(
780        title = _(u'Former Matric Number'),
781        required = False,
782        readonly = False,
783        )
784
785    hq_degree3 = schema.Choice(
786        title = _(u'Class of Degree'),
787        required = False,
788        readonly = False,
789        vocabulary = high_grade,
790        )
791
792    hq_school3 = schema.TextLine(
793        title = _(u'Institution Attended'),
794        required = False,
795        readonly = False,
796        )
797
798    hq_session3 = schema.TextLine(
799        title = _(u'Years Attended'),
800        required = False,
801        readonly = False,
802        )
803
804    hq_disc3 = schema.TextLine(
805        title = _(u'Discipline'),
806        required = False,
807        readonly = False,
808        )
809
810    hq_type4 = schema.Choice(
811        title = _(u'Qualification Obtained'),
812        required = False,
813        readonly = False,
814        vocabulary = high_qual,
815        )
816
817    hq_fname4 = schema.TextLine(
818        title = _(u'Name in Full'),
819        required = False,
820        readonly = False,
821        )
822
823    hq_matric_no4 = schema.TextLine(
824        title = _(u'Former Matric Number'),
825        required = False,
826        readonly = False,
827        )
828
829    hq_degree4 = schema.Choice(
830        title = _(u'Class of Degree'),
831        required = False,
832        readonly = False,
833        vocabulary = high_grade,
834        )
835
836    hq_school4 = schema.TextLine(
837        title = _(u'Institution Attended'),
838        required = False,
839        readonly = False,
840        )
841
842    hq_session4 = schema.TextLine(
843        title = _(u'Years Attended'),
844        required = False,
845        readonly = False,
846        )
847
848    hq_disc4 = schema.TextLine(
849        title = _(u'Discipline'),
850        required = False,
851        readonly = False,
852        )
853    presently_inst = schema.TextLine(
854        title = _(u'If yes, name of institution'),
855        required = False,
856        readonly = False,
857        )
858    nysc_year = schema.Int(
859        title = _(u'Nysc Year'),
860        required = False,
861        readonly = False,
862        )
863    nysc_lga = schema.Choice(
864        source = LGASource(),
865        title = _(u'Nysc Location'),
866        description = _(u'Leave blank for exception letters.'),
867        required = False,
868        )
869    employer = schema.TextLine(
870        title = _(u'Employer'),
871        required = False,
872        readonly = False,
873        )
874    emp_position = schema.TextLine(
875        title = _(u'Employer Position'),
876        required = False,
877        readonly = False,
878        )
879    emp_start = FormattedDate(
880        title = _(u'Start Date'),
881        required = False,
882        readonly = False,
883        show_year = True,
884        )
885    emp_end = FormattedDate(
886        title = _(u'End Date'),
887        required = False,
888        readonly = False,
889        show_year = True,
890        )
891    emp_reason = schema.TextLine(
892        title = _(u'Reason for Leaving'),
893        required = False,
894        readonly = False,
895        )
896    employer2 = schema.TextLine(
897        title = _(u'2nd Employer'),
898        required = False,
899        readonly = False,
900        )
901    emp2_position = schema.TextLine(
902        title = _(u'2nd Employer Position'),
903        required = False,
904        readonly = False,
905        )
906    emp2_start = FormattedDate(
907        title = _(u'Start Date'),
908        required = False,
909        readonly = False,
910        show_year = True,
911        )
912    emp2_end = FormattedDate(
913        title = _(u'End Date'),
914        required = False,
915        readonly = False,
916        show_year = True,
917        )
918    emp2_reason = schema.TextLine(
919        title = _(u'Reason for Leaving'),
920        required = False,
921        readonly = False,
922        )
923    former_matric = schema.TextLine(
924        title = _(u'If yes, matric number'),
925        required = False,
926        readonly = False,
927        )
928    notice = schema.Text(
929        title = _(u'Notice'),
930        required = False,
931        readonly = False,
932        )
933    screening_venue = schema.TextLine(
934        title = _(u'Screening Venue'),
935        required = False,
936        )
937    screening_date = schema.TextLine(
938        title = _(u'Screening Date'),
939        required = False,
940        )
941    screening_score = schema.Float(
942        title = _(u'Screening Score (%)'),
943        required = False,
944        )
945    student_id = schema.TextLine(
946        title = _(u'Student Id'),
947        required = False,
948        readonly = False,
949        )
950    course_admitted = schema.Choice(
951        title = _(u'Admitted Course of Study'),
952        source = CertificateSource(),
953        required = False,
954        readonly = False,
955        )
956    locked = schema.Bool(
957        title = _(u'Form locked'),
958        default = False,
959        required = False,
960        )
961
962    referees = schema.List(
963        title = _(u'Referees'),
964        value_type = RefereeEntryField(),
965        description = _(u'Maximum 3 referees'),
966        required = True,
967        defaultFactory=list,
968        )
969
970class ITranscriptApplicant(IKofaObject):
971    """A transcript applicant.
972    """
973
974    suspended = schema.Bool(
975        title = _(u'Account suspended'),
976        default = False,
977        required = False,
978        )
979
980    locked = schema.Bool(
981        title = _(u'Form locked'),
982        default = False,
983        required = False,
984        )
985
986    applicant_id = schema.TextLine(
987        title = _(u'Application Id'),
988        required = False,
989        readonly = False,
990        )
991
992    reg_number = TextLineChoice(
993        title = _(u'Kofa Registration Number'),
994        readonly = False,
995        required = True,
996        source = contextual_reg_num_source,
997        )
998
999    firstname = schema.TextLine(
1000        title = _(u'First Name'),
1001        required = True,
1002        )
1003
1004    middlename = schema.TextLine(
1005        title = _(u'Middle Name'),
1006        required = False,
1007        )
1008
1009    lastname = schema.TextLine(
1010        title = _(u'Last Name (Surname)'),
1011        required = True,
1012        )
1013
1014    matric_number = schema.TextLine(
1015        title = _(u'Matriculation Number'),
1016        readonly = False,
1017        required = True,
1018        )
1019
1020    date_of_birth = FormattedDate(
1021        title = _(u'Date of Birth'),
1022        required = False,
1023        #date_format = u'%d/%m/%Y', # Use grok-instance-wide default
1024        show_year = True,
1025        )
1026
1027    sex = schema.Choice(
1028        title = _(u'Gender'),
1029        source = GenderSource(),
1030        required = True,
1031        )
1032
1033    place_of_birth = schema.TextLine(
1034        title = _(u'Place of Birth'),
1035        readonly = False,
1036        required = False,
1037        )
1038
1039    nationality = schema.Choice(
1040        vocabulary = nats_vocab,
1041        title = _(u'Nationality'),
1042        required = False,
1043        )
1044
1045    email = schema.ASCIILine(
1046        title = _(u'Email Address'),
1047        required = True,
1048        constraint=validate_email,
1049        )
1050
1051    phone = PhoneNumber(
1052        title = _(u'Phone'),
1053        description = u'',
1054        required = False,
1055        )
1056
1057    perm_address = schema.Text(
1058        title = _(u'Current Local Address'),
1059        required = False,
1060        readonly = False,
1061        )
1062
1063    dispatch_address = schema.Text(
1064        title = _(u'Dispatch Addresses'),
1065        description = u'Addresses to which transcript should be posted.',
1066        required = False,
1067        readonly = False,
1068        )
1069
1070    entry_mode = schema.Choice(
1071        title = _(u'Entry Mode'),
1072        source = StudyModeSource(),
1073        required = False,
1074        readonly = False,
1075        )
1076
1077    entry_session = schema.Choice(
1078        title = _(u'Entry Session'),
1079        source = academic_sessions_vocab,
1080        required = False,
1081        readonly = False,
1082        )
1083
1084    end_session = schema.Choice(
1085        title = _(u'End Session'),
1086        source = academic_sessions_vocab,
1087        required = False,
1088        readonly = False,
1089        )
1090
1091    course_studied = schema.Choice(
1092        title = _(u'Course of Study / Degree'),
1093        source = CertificateSource(),
1094        required = False,
1095        readonly = False,
1096        )
1097
1098    purpose = schema.TextLine(
1099        title = _(u'Purpose of this Application'),
1100        readonly = False,
1101        required = False,
1102        )
1103
1104    course_changed = schema.Choice(
1105        title = _(u'Change of Study Course'),
1106        description = u'If yes, select previous course of study.',
1107        source = CertificateSource(),
1108        readonly = False,
1109        required = False,
1110        )
1111
1112    change_level = schema.Choice(
1113        title = _(u'Change Level'),
1114        description = u'If yes, select level at which you changed course of study.',
1115        source = StudyLevelSource(),
1116        required = False,
1117        readonly = False,
1118        )
1119
1120    applied_before_date = FormattedDate(
1121        title = _(u'Applied and obtained Transcript before?'),
1122        description = u'If yes, select month and year of application.',
1123        required = False,
1124        show_year = True,
1125        )
1126
1127
1128    no_copies = schema.Choice(
1129        title = _(u'Number of Copies'),
1130        description = u'Must correspond with the number of dispatch addresses above.',
1131        values=[1, 2, 3, 4],
1132        required = False,
1133        readonly = False,
1134        default = 1,
1135        )
1136
1137class ICertificateRequest(IKofaObject):
1138    """A transcript applicant.
1139    """
1140
1141    suspended = schema.Bool(
1142        title = _(u'Account suspended'),
1143        default = False,
1144        required = False,
1145        )
1146
1147    locked = schema.Bool(
1148        title = _(u'Form locked'),
1149        default = False,
1150        required = False,
1151        )
1152
1153    applicant_id = schema.TextLine(
1154        title = _(u'Application Id'),
1155        required = False,
1156        readonly = False,
1157        )
1158
1159    reg_number = TextLineChoice(
1160        title = _(u'Kofa Registration Number'),
1161        readonly = False,
1162        required = True,
1163        source = contextual_reg_num_source,
1164        )
1165
1166    firstname = schema.TextLine(
1167        title = _(u'First Name'),
1168        required = True,
1169        )
1170
1171    middlename = schema.TextLine(
1172        title = _(u'Middle Name'),
1173        required = False,
1174        )
1175
1176    lastname = schema.TextLine(
1177        title = _(u'Last Name (Surname)'),
1178        required = True,
1179        )
1180
1181    matric_number = schema.TextLine(
1182        title = _(u'Matriculation Number'),
1183        readonly = False,
1184        required = True,
1185        )
1186
1187    date_of_birth = FormattedDate(
1188        title = _(u'Date of Birth'),
1189        required = False,
1190        #date_format = u'%d/%m/%Y', # Use grok-instance-wide default
1191        show_year = True,
1192        )
1193
1194    sex = schema.Choice(
1195        title = _(u'Gender'),
1196        source = GenderSource(),
1197        required = True,
1198        )
1199
1200    place_of_birth = schema.TextLine(
1201        title = _(u'Place of Birth'),
1202        readonly = False,
1203        required = False,
1204        )
1205
1206    nationality = schema.Choice(
1207        vocabulary = nats_vocab,
1208        title = _(u'Nationality'),
1209        required = False,
1210        )
1211
1212    email = schema.ASCIILine(
1213        title = _(u'Email Address'),
1214        required = True,
1215        constraint=validate_email,
1216        )
1217
1218    phone = PhoneNumber(
1219        title = _(u'Phone'),
1220        description = u'',
1221        required = False,
1222        )
1223
1224    entry_session = schema.Choice(
1225        title = _(u'Entry Session'),
1226        source = academic_sessions_vocab,
1227        required = False,
1228        readonly = False,
1229        )
1230
1231    end_session = schema.Choice(
1232        title = _(u'End Session'),
1233        source = academic_sessions_vocab,
1234        required = False,
1235        readonly = False,
1236        )
1237
1238    course_studied = schema.Choice(
1239        title = _(u'Course of Study / Degree'),
1240        source = CertificateSource(),
1241        required = True,
1242        readonly = False,
1243        )
1244
1245    certificate_type = schema.Choice(
1246        title = _(u'Certificate Type'),
1247        vocabulary = certificate_types_vocab,
1248        required = False,
1249        )
1250
1251
1252class IVerificationRequest(IKofaObject):
1253    """A applicant asking for verification.
1254    """
1255
1256    suspended = schema.Bool(
1257        title = _(u'Account suspended'),
1258        default = False,
1259        required = False,
1260        )
1261
1262    locked = schema.Bool(
1263        title = _(u'Form locked'),
1264        default = False,
1265        required = False,
1266        )
1267
1268    applicant_id = schema.TextLine(
1269        title = _(u'Application Id'),
1270        required = False,
1271        readonly = False,
1272        )
1273
1274    #reg_number = TextLineChoice(
1275    #    title = _(u'Kofa Registration Number'),
1276    #    readonly = False,
1277    #    required = True,
1278    #    source = contextual_reg_num_source,
1279    #    )
1280
1281    firstname = schema.TextLine(
1282        title = _(u'First Name'),
1283        required = True,
1284        )
1285
1286    middlename = schema.TextLine(
1287        title = _(u'Middle Name'),
1288        required = False,
1289        )
1290
1291    lastname = schema.TextLine(
1292        title = _(u'Last Name (Surname)'),
1293        required = True,
1294        )
1295
1296    sex = schema.Choice(
1297        title = _(u'Gender'),
1298        source = GenderSource(),
1299        required = True,
1300        )
1301
1302    email = schema.ASCIILine(
1303        title = _(u'Email Address'),
1304        required = True,
1305        constraint=validate_email,
1306        )
1307
1308    phone = PhoneNumber(
1309        title = _(u'Phone'),
1310        description = u'',
1311        required = False,
1312        )
1313
1314    matric_number = schema.TextLine(
1315        title = _(u'Verification Body Reference Number'),
1316        readonly = False,
1317        required = True,
1318        )
1319
1320    body_address = schema.Text(
1321        title = _(u'Verification Body Address'),
1322        required = True,
1323        )
1324
1325    document_type = schema.Choice(
1326        title = _(u'Document Type'),
1327        vocabulary = document_types_vocab,
1328        required = True,
1329        )
1330
1331class IFedexRequest(IKofaObject):
1332    """A applicant requests payment for courier.
1333    """
1334
1335    suspended = schema.Bool(
1336        title = _(u'Account suspended'),
1337        default = False,
1338        required = False,
1339        )
1340
1341    locked = schema.Bool(
1342        title = _(u'Form locked'),
1343        default = False,
1344        required = False,
1345        )
1346
1347    applicant_id = schema.TextLine(
1348        title = _(u'Application Id'),
1349        required = False,
1350        readonly = False,
1351        )
1352
1353    trans_id = schema.TextLine(
1354        title = _(u'Transcript Application Id'),
1355        required = True,
1356        readonly = False,
1357        #description = u'This serve as a unique identifier which '
1358        #               'allows the the officer to verify the transcript '
1359        #               'in order to avoid errors before dispatch.',
1360        )
1361
1362    #reg_number = TextLineChoice(
1363    #    title = _(u'Kofa Registration Number'),
1364    #    readonly = False,
1365    #    required = True,
1366    #    source = contextual_reg_num_source,
1367    #    )
1368
1369    firstname = schema.TextLine(
1370        title = _(u'First Name'),
1371        required = True,
1372        )
1373
1374    middlename = schema.TextLine(
1375        title = _(u'Middle Name'),
1376        required = False,
1377        )
1378
1379    lastname = schema.TextLine(
1380        title = _(u'Last Name (Surname)'),
1381        required = True,
1382        )
1383
1384    sex = schema.Choice(
1385        title = _(u'Gender'),
1386        source = GenderSource(),
1387        required = True,
1388        )
1389
1390    email = schema.ASCIILine(
1391        title = _(u'Email Address'),
1392        required = True,
1393        constraint=validate_email,
1394        )
1395
1396    phone = PhoneNumber(
1397        title = _(u'Phone'),
1398        description = u'',
1399        required = False,
1400        )
1401
1402    matric_number = schema.TextLine(
1403        title = _(u'WES Reference Number (where applicable)'),
1404        readonly = False,
1405        required = False,
1406        )
1407
1408    dispatch_address = schema.Text(
1409        title = _(u'Dispatch Address'),
1410        required = True,
1411        )
1412
1413class IRecruitment(IKofaObject):
1414    """A recruitment application.
1415    """
1416
1417    suspended = schema.Bool(
1418        title = _(u'Account suspended'),
1419        default = False,
1420        required = False,
1421        )
1422
1423    locked = schema.Bool(
1424        title = _(u'Form locked'),
1425        default = False,
1426        required = False,
1427        )
1428
1429    applicant_id = schema.TextLine(
1430        title = _(u'Application Id'),
1431        required = False,
1432        readonly = False,
1433        )
1434
1435    #reg_number = TextLineChoice(
1436    #    title = _(u'Kofa Registration Number'),
1437    #    readonly = False,
1438    #    required = True,
1439    #    source = contextual_reg_num_source,
1440    #    )
1441
1442    application_types = schema.Choice(
1443        title = _(u'Application Category'),
1444        vocabulary = application_types_vocab,
1445        required = True,
1446        )
1447
1448    position_comment = schema.Text(
1449        title = _(u'Desired Position'),
1450        required = True,
1451        description = u'Copy and paste the vacant position '
1452                       'text from the <a target="_blank" '
1453                       'href="https://aauekpoma.edu.ng/">university website</a>.',
1454        )
1455
1456    firstname = schema.TextLine(
1457        title = _(u'First Name'),
1458        required = True,
1459        )
1460
1461    middlename = schema.TextLine(
1462        title = _(u'Middle Name'),
1463        required = False,
1464        )
1465
1466    lastname = schema.TextLine(
1467        title = _(u'Last Name (Surname)'),
1468        required = True,
1469        )
1470
1471    sex = schema.Choice(
1472        title = _(u'Gender'),
1473        source = GenderSource(),
1474        required = True,
1475        )
1476
1477    email = schema.ASCIILine(
1478        title = _(u'Email Address'),
1479        required = True,
1480        constraint=validate_email,
1481        )
1482
1483    phone = PhoneNumber(
1484        title = _(u'Phone'),
1485        description = u'',
1486        required = False,
1487        )
1488
1489    address = schema.Text(
1490        title = _(u'Address'),
1491        required = True,
1492        )
1493
1494class ISendByEmailRequest(IKofaObject):
1495    """A applicant asking for sending an email.
1496    """
1497
1498    suspended = schema.Bool(
1499        title = _(u'Account suspended'),
1500        default = False,
1501        required = False,
1502        )
1503
1504    locked = schema.Bool(
1505        title = _(u'Form locked'),
1506        default = False,
1507        required = False,
1508        )
1509
1510    applicant_id = schema.TextLine(
1511        title = _(u'Applicant Id'),
1512        required = False,
1513        readonly = False,
1514        )
1515
1516    firstname = schema.TextLine(
1517        title = _(u'First Name'),
1518        required = True,
1519        )
1520
1521    middlename = schema.TextLine(
1522        title = _(u'Middle Name'),
1523        required = False,
1524        )
1525
1526    lastname = schema.TextLine(
1527        title = _(u'Last Name (Surname)'),
1528        required = True,
1529        )
1530
1531    sex = schema.Choice(
1532        title = _(u'Gender'),
1533        source = GenderSource(),
1534        required = True,
1535        )
1536
1537    email = schema.ASCIILine(
1538        title = _(u"Applicant's Email Address"),
1539        required = True,
1540        constraint=validate_email,
1541        )
1542
1543    phone = PhoneNumber(
1544        title = _(u'Phone'),
1545        description = u'',
1546        required = False,
1547        )
1548
1549    body_address = schema.Text(
1550        title = _(u'Address of Requesting Organization'),
1551        required = True,
1552        )
1553
1554    body_email = schema.ASCIILine(
1555        title = _(u"Email Address of Requesting Organization"),
1556        required = True,
1557        constraint=validate_email,
1558        )
1559
1560    request_type = schema.Choice(
1561        title = _(u'Request Type'),
1562        vocabulary = request_types_vocab,
1563        required = True,
1564        )
1565
1566    document_type = schema.Choice(
1567        title = _(u'Document Type'),
1568        vocabulary = document_types_vocab,
1569        required = True,
1570        )
1571
1572class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant,
1573                       ITranscriptApplicant, ICertificateRequest,
1574                       IVerificationRequest, ISendByEmailRequest,
1575                       IFedexRequest, IRecruitment):
1576    """An interface for all types of applicants.
1577
1578    Attention: The ICustomPGApplicant field seetings will be overwritten
1579    by ICustomPGApplicant field settings. If a field is defined
1580    in both interfaces zope.schema validates only against the
1581    constraints in ICustomUGApplicant. This does not affect the forms
1582    since they are build on either ICustomUGApplicant or ICustomPGApplicant.
1583    """
1584
1585    def writeLogMessage(view, comment):
1586        """Adds an INFO message to the log file
1587        """
1588
1589    def createStudent():
1590        """Create a student object from applicatnt data
1591        and copy applicant object.
1592        """
1593
1594class ICustomUGApplicantEdit(ICustomUGApplicant):
1595    """An undergraduate applicant interface for edit forms.
1596
1597    Here we can repeat the fields from base data and set the
1598    `required` and `readonly` attributes to True to further restrict
1599    the data access. Or we can allow only certain certificates to be
1600    selected by choosing the appropriate source.
1601
1602    We cannot omit fields here. This has to be done in the
1603    respective form page.
1604    """
1605
1606    #programme_type = schema.Choice(
1607    #    title = _(u'Programme Type'),
1608    #    vocabulary = programme_types_vocab,
1609    #    required = True,
1610    #    )
1611
1612    date_of_birth = FormattedDate(
1613        title = _(u'Date of Birth'),
1614        required = True,
1615        show_year = True,
1616        )
1617
1618    course1 = schema.Choice(
1619        title = _(u'1st Choice Course of Study'),
1620        source = AppCatCertificateSource(),
1621        required = True,
1622        )
1623
1624    course2 = schema.Choice(
1625        title = _(u'2nd Choice Course of Study'),
1626        source = AppCatCertificateSource(),
1627        required = True,
1628        )
1629
1630    course3 = schema.Choice(
1631        title = _(u'3rd Choice Course of Study'),
1632        source = AppCatCertificateSource(),
1633        required = True,
1634        )
1635
1636    fst_sit_fname = schema.TextLine(
1637        title = _(u'Name in Full'),
1638        required = True,
1639        readonly = False,
1640        )
1641
1642    fst_sit_no = schema.TextLine(
1643        title = _(u'Exam Number'),
1644        required = True,
1645        readonly = False,
1646        )
1647
1648    fst_sit_sc_pin = schema.TextLine(
1649        title = _(u'Scratch Card Pin'),
1650        required = True,
1651        readonly = False,
1652        )
1653
1654    fst_sit_sc_serial_number = schema.TextLine(
1655        title = _(u'Scratch Card Serial Number'),
1656        required = True,
1657        readonly = False,
1658        )
1659
1660    fst_sit_date = FormattedDate(
1661        title = _(u'Exam Date'),
1662        required = True,
1663        readonly = False,
1664        show_year = True,
1665        )
1666
1667    fst_sit_type = schema.Choice(
1668        title = _(u'Exam Type'),
1669        required = True,
1670        readonly = False,
1671        vocabulary = exam_types,
1672        )
1673
1674    # course1 works only on manage pages. On edit pages course1 input is missing
1675    # and no Invalid exception is raised.
1676    # NoInputData: NoInputD...course1'
1677    # Therefore, we check and compare course1 on CustomApplicantEditFormPage.
1678    @invariant
1679    def course_choice(applicant):
1680        if applicant.course2 == applicant.course3:
1681            raise Invalid(_("3rd choice course must differ from 2nd choice course."))
1682
1683#ICustomUGApplicantEdit['programme_type'].order = ICustomUGApplicant[
1684#    'programme_type'].order
1685ICustomUGApplicantEdit['date_of_birth'].order = ICustomUGApplicant[
1686    'date_of_birth'].order
1687ICustomUGApplicantEdit['course1'].order = ICustomUGApplicant[
1688    'course1'].order
1689ICustomUGApplicantEdit['course2'].order = ICustomUGApplicant[
1690    'course2'].order
1691ICustomUGApplicantEdit['course3'].order = ICustomUGApplicant[
1692    'course3'].order
1693ICustomUGApplicantEdit['fst_sit_fname'].order = ICustomUGApplicant[
1694    'fst_sit_fname'].order
1695ICustomUGApplicantEdit['fst_sit_no'].order = ICustomUGApplicant[
1696    'fst_sit_no'].order
1697ICustomUGApplicantEdit['fst_sit_sc_pin'].order = ICustomUGApplicant[
1698    'fst_sit_sc_pin'].order
1699ICustomUGApplicantEdit['fst_sit_sc_serial_number'].order = ICustomUGApplicant[
1700    'fst_sit_sc_serial_number'].order
1701ICustomUGApplicantEdit['fst_sit_date'].order = ICustomUGApplicant[
1702    'fst_sit_date'].order
1703ICustomUGApplicantEdit['fst_sit_type'].order = ICustomUGApplicant[
1704    'fst_sit_type'].order
1705
1706class ICustomPGApplicantEdit(ICustomPGApplicant):
1707    """A postgraduate applicant interface for editing.
1708
1709    Here we can repeat the fields from base data and set the
1710    `required` and `readonly` attributes to True to further restrict
1711    the data access. Or we can allow only certain certificates to be
1712    selected by choosing the appropriate source.
1713
1714    We cannot omit fields here. This has to be done in the
1715    respective form page.
1716    """
1717
1718    email = schema.ASCIILine(
1719        title = _(u'Email Address'),
1720        required = True,
1721        constraint=validate_email,
1722        )
1723    date_of_birth = FormattedDate(
1724        title = _(u'Date of Birth'),
1725        required = True,
1726        show_year = True,
1727        )
1728
1729ICustomPGApplicantEdit[
1730    'date_of_birth'].order =  ICustomPGApplicant['date_of_birth'].order
1731ICustomPGApplicantEdit[
1732    'email'].order =  ICustomPGApplicant['email'].order
1733
1734class ICustomApplicantOnlinePayment(INigeriaApplicantOnlinePayment):
1735    """An applicant payment via payment gateways.
1736
1737    """
1738
1739class IPUTMEApplicantEdit(IPUTMEApplicantEdit):
1740    """An undergraduate applicant interface for editing.
1741
1742    Here we can repeat the fields from base data and set the
1743    `required` and `readonly` attributes to True to further restrict
1744    the data access. Or we can allow only certain certificates to be
1745    selected by choosing the appropriate source.
1746
1747    We cannot omit fields here. This has to be done in the
1748    respective form page.
1749    """
1750
1751class ICustomApplicantUpdateByRegNo(ICustomApplicant):
1752    """Representation of an applicant.
1753
1754    Skip regular reg_number validation if reg_number is used for finding
1755    the applicant object.
1756    """
1757
1758    reg_number = schema.TextLine(
1759        title = u'Registration Number',
1760        required = False,
1761        )
1762
1763class ICustomApplicantRefereeReport(IApplicantRefereeReport):
1764    """A referee report.
1765    """
1766
1767    referee_rank = schema.TextLine(
1768        title = _(u'Referee Rank or Profession'),
1769        required = False,
1770        )
1771
1772    referee_inst = schema.TextLine(
1773        title = _(u'Referee Institution/University'),
1774        required = False,
1775        )
1776
1777    duration = schema.Text(
1778        title = _(u'How long and in what capacity have you known the candidate?'),
1779        required = False,
1780        )
1781
1782    itellectual = schema.Choice(
1783        title = _(u'Intellectual Capacity'),
1784        required = False,
1785        readonly = False,
1786        vocabulary = rating_vocab,
1787        )
1788
1789    persistent = schema.Choice(
1790        title = _(u'Capacity for Persistent and Independent Academic Study'),
1791        required = False,
1792        readonly = False,
1793        vocabulary = rating_vocab,
1794        )
1795
1796    imaginative = schema.Choice(
1797        title = _(u'Ability for Imaginative Thought'),
1798        required = False,
1799        readonly = False,
1800        vocabulary = rating_vocab,
1801        )
1802
1803    productive = schema.Choice(
1804        title = _(u'Promise of Productive Scholarship'),
1805        required = False,
1806        readonly = False,
1807        vocabulary = rating_vocab,
1808        )
1809
1810    previous = schema.Choice(
1811        title = _(u'Quality of Previous Work'),
1812        required = False,
1813        readonly = False,
1814        vocabulary = rating_vocab,
1815        )
1816
1817    expression = schema.Choice(
1818        title = _(u'Oral and Written Expression in English'),
1819        required = False,
1820        readonly = False,
1821        vocabulary = rating_vocab,
1822        )
1823
1824    personality = schema.Text(
1825        title = _(u'Please comment on the candidate\'s personality '
1826            'with particular reference to his/her moral character, emotional '
1827            'and physical stabilty'),
1828        required = False,
1829        )
1830
1831    #promise = schema.Choice(
1832    #    title = _(u'Candidate\'s overall promise'),
1833    #    required = False,
1834    #    readonly = False,
1835    #    vocabulary = overallpromise_vocab,
1836    #    )
1837
1838    report = schema.Text(
1839        title = _(u'Any other relevant information which would help '
1840            'in determining the candidate\'s suitability?'),
1841        required = False,
1842        )
1843
1844    objection = schema.Text(
1845        title = _(u'Have you any objection to the contents of this '
1846            'evaluation being disclosed to any award-given body if '
1847            'the need arises?'),
1848        required = False,
1849        )
1850
1851    ability = schema.Choice(
1852        title = _(u'Ability to Work in a Team'),
1853        required = False,
1854        readonly = False,
1855        vocabulary = rating_vocab,
1856        )
1857
1858    overall = schema.Choice(
1859        title = _(u'Overall Assessment of Candidate'),
1860        required = False,
1861        readonly = False,
1862        vocabulary = rating_vocab,
1863        )
Note: See TracBrowser for help on using the repository browser.