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

Last change on this file since 16798 was 16798, checked in by Henrik Bettermann, 3 years ago

Add form field.

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