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

Last change on this file since 17668 was 17632, checked in by Henrik Bettermann, 11 months ago

See ticket #773.

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