- Timestamp:
- 16 Jun 2013, 08:39:43 (12 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/applicants
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/applicants/interfaces.py
r9060 r10298 20 20 21 21 from zope import schema 22 from zope.interface import Attribute, invariant, Invalid 22 23 from waeup.kofa.applicants.interfaces import ( 23 24 IApplicantBaseData, … … 28 29 from waeup.kofa.schema import FormattedDate, TextLineChoice 29 30 from waeup.kofa.students.vocabularies import nats_vocab, GenderSource 30 from waeup.kofa.applicants.interfaces import contextual_reg_num_source 31 from waeup.kofa.applicants.interfaces import ( 32 contextual_reg_num_source, 33 IApplicantBaseData) 31 34 from kofacustom.nigeria.applicants.interfaces import ( 32 35 LGASource, high_qual, high_grade, exam_types, … … 40 43 from waeup.aaue.payments.interfaces import ICustomOnlinePayment 41 44 42 class ICustomUGApplicant(I NigeriaUGApplicant):45 class ICustomUGApplicant(IApplicantBaseData): 43 46 """An undergraduate applicant. 44 47 … … 47 50 adding them to the UG_OMIT* tuples. 48 51 """ 52 53 nationality = schema.Choice( 54 source = nats_vocab, 55 title = _(u'Nationality'), 56 required = True, 57 ) 58 lga = schema.Choice( 59 source = LGASource(), 60 title = _(u'State/LGA (Nigerians only)'), 61 required = False, 62 ) 63 perm_address = schema.Text( 64 title = _(u'Permanent Address'), 65 required = False, 66 ) 67 course1 = schema.Choice( 68 title = _(u'1st Choice Course of Study'), 69 source = AppCatCertificateSource(), 70 required = True, 71 ) 72 course2 = schema.Choice( 73 title = _(u'2nd Choice Course of Study'), 74 source = AppCatCertificateSource(), 75 required = False, 76 ) 77 fst_sit_fname = schema.TextLine( 78 title = _(u'Full Name'), 79 required = False, 80 readonly = False, 81 ) 82 fst_sit_no = schema.TextLine( 83 title = _(u'Exam Number'), 84 required = False, 85 readonly = False, 86 ) 87 fst_sit_date = FormattedDate( 88 title = _(u'Exam Date'), 89 required = False, 90 readonly = False, 91 show_year = True, 92 ) 93 fst_sit_type = schema.Choice( 94 title = _(u'Exam Type'), 95 required = False, 96 readonly = False, 97 vocabulary = exam_types, 98 ) 99 fst_sit_results = schema.List( 100 title = _(u'Exam Results'), 101 value_type = ResultEntryField(), 102 required = False, 103 readonly = False, 104 default = [], 105 ) 106 scd_sit_fname = schema.TextLine( 107 title = _(u'Full Name'), 108 required = False, 109 readonly = False, 110 ) 111 scd_sit_no = schema.TextLine( 112 title = _(u'Exam Number'), 113 required = False, 114 readonly = False, 115 ) 116 scd_sit_date = FormattedDate( 117 title = _(u'Exam Date'), 118 required = False, 119 readonly = False, 120 show_year = True, 121 ) 122 scd_sit_type = schema.Choice( 123 title = _(u'Exam Type'), 124 required = False, 125 readonly = False, 126 vocabulary = exam_types, 127 ) 128 scd_sit_results = schema.List( 129 title = _(u'Exam Results'), 130 value_type = ResultEntryField(), 131 required = False, 132 readonly = False, 133 default = [], 134 ) 135 alr_fname = schema.TextLine( 136 title = _(u'Full Name'), 137 required = False, 138 readonly = False, 139 ) 140 alr_no = schema.TextLine( 141 title = _(u'Exam Number'), 142 required = False, 143 readonly = False, 144 ) 145 alr_date = FormattedDate( 146 title = _(u'Exam Date'), 147 required = False, 148 readonly = False, 149 show_year = True, 150 ) 151 alr_results = schema.List( 152 title = _(u'Exam Results'), 153 value_type = ResultEntryField(), 154 required = False, 155 readonly = False, 156 default = [], 157 ) 158 jamb_subjects = schema.Text( 159 title = _(u'Subjects and Scores'), 160 required = False, 161 ) 162 jamb_score = schema.Int( 163 title = _(u'Total JAMB Score'), 164 required = False, 165 ) 166 notice = schema.Text( 167 title = _(u'Notice'), 168 required = False, 169 ) 170 screening_venue = schema.TextLine( 171 title = _(u'Screening Venue'), 172 required = False, 173 ) 174 screening_date = schema.TextLine( 175 title = _(u'Screening Date'), 176 required = False, 177 ) 178 screening_score = schema.Int( 179 title = _(u'Screening Score (%)'), 180 required = False, 181 ) 182 aggregate = schema.Int( 183 title = _(u'Aggregate Score (%)'), 184 description = _(u'(average of relative JAMB and PUTME scores)'), 185 required = False, 186 ) 187 result_uploaded = schema.Bool( 188 title = _(u'Result uploaded'), 189 default = False, 190 ) 191 student_id = schema.TextLine( 192 title = _(u'Student Id'), 193 required = False, 194 readonly = False, 195 ) 196 course_admitted = schema.Choice( 197 title = _(u'Admitted Course of Study'), 198 source = CertificateSource(), 199 required = False, 200 ) 201 locked = schema.Bool( 202 title = _(u'Form locked'), 203 default = False, 204 ) 205 206 @invariant 207 def second_choice(applicant): 208 if applicant.course1 == applicant.course2: 209 raise Invalid(_("2nd choice course must differ from 1st choice course.")) 49 210 50 211 class ICustomPGApplicant(INigeriaPGApplicant): … … 75 236 """ 76 237 77 class ICustomUGApplicantEdit(I NigeriaUGApplicantEdit):238 class ICustomUGApplicantEdit(ICustomUGApplicant): 78 239 """An undergraduate applicant interface for edit forms. 79 240
Note: See TracChangeset for help on using the changeset viewer.