- Timestamp:
- 3 Dec 2021, 08:10:26 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.unidel/trunk/src/kofacustom/unidel/applicants/interfaces.py
r16721 r16734 26 26 from waeup.kofa.interfaces import ( 27 27 SimpleKofaVocabulary, academic_sessions_vocab, validate_email) 28 from waeup.kofa.schema import FormattedDate, TextLineChoice 28 from waeup.kofa.schema import FormattedDate, TextLineChoice, PhoneNumber 29 29 from waeup.kofa.students.vocabularies import nats_vocab, GenderSource 30 30 from waeup.kofa.applicants.interfaces import contextual_reg_num_source 31 31 from kofacustom.nigeria.applicants.interfaces import ( 32 LGASource, high_qual, high_grade, exam_types, 32 LGASource, high_qual, high_grade, exam_types, DisabilitiesSource, 33 programme_types_vocab, jambsubjects, validate_jamb_reg_number, 33 34 INigeriaUGApplicant, INigeriaPGApplicant, 34 35 INigeriaApplicantOnlinePayment, … … 42 43 class ICustomUGApplicant(INigeriaUGApplicant): 43 44 """An undergraduate applicant. 44 45 This interface defines the least common multiple of all fields 46 in ug application forms. In customized forms, fields can be excluded by 47 adding them to the UG_OMIT* tuples. 48 """ 45 """ 46 47 disabilities = schema.Choice( 48 title = _(u'Disability'), 49 source = DisabilitiesSource(), 50 required = False, 51 ) 52 nationality = schema.Choice( 53 source = nats_vocab, 54 title = _(u'Nationality'), 55 required = False, 56 ) 57 lga = schema.Choice( 58 source = LGASource(), 59 title = _(u'State/LGA (Nigerians only)'), 60 required = False, 61 ) 62 perm_address = schema.Text( 63 title = _(u'Permanent Address'), 64 required = False, 65 ) 66 67 next_kin_name = schema.TextLine( 68 title = _(u'Next of Kin Name'), 69 required = False, 70 readonly = False, 71 ) 72 73 next_kin_relation = schema.TextLine( 74 title = _(u'Next of Kin Relationship'), 75 required = False, 76 readonly = False, 77 ) 78 79 next_kin_address = schema.Text( 80 title = _(u'Next of Kin Address'), 81 required = False, 82 readonly = False, 83 ) 84 85 next_kin_phone = PhoneNumber( 86 title = _(u'Next of Kin Phone'), 87 description = u'', 88 required = False, 89 readonly = False, 90 ) 91 92 course1 = schema.Choice( 93 title = _(u'1st Choice Course of Study'), 94 source = AppCatCertificateSource(), 95 required = True, 96 ) 97 course2 = schema.Choice( 98 title = _(u'2nd Choice Course of Study'), 99 source = AppCatCertificateSource(), 100 required = False, 101 ) 102 103 fst_sit_fname = schema.TextLine( 104 title = _(u'Full Name'), 105 required = False, 106 readonly = False, 107 ) 108 109 fst_sit_no = schema.TextLine( 110 title = _(u'Exam Number'), 111 required = False, 112 readonly = False, 113 ) 114 115 fst_sit_date = FormattedDate( 116 title = _(u'Exam Date'), 117 required = False, 118 readonly = False, 119 show_year = True, 120 ) 121 122 fst_sit_type = schema.Choice( 123 title = _(u'Exam Type'), 124 required = False, 125 readonly = False, 126 vocabulary = exam_types, 127 ) 128 129 fst_sit_results = schema.List( 130 title = _(u'Exam Results'), 131 value_type = ResultEntryField(), 132 required = False, 133 readonly = False, 134 defaultFactory=list, 135 ) 136 137 scd_sit_fname = schema.TextLine( 138 title = _(u'Full Name'), 139 required = False, 140 readonly = False, 141 ) 142 143 scd_sit_no = schema.TextLine( 144 title = _(u'Exam Number'), 145 required = False, 146 readonly = False, 147 ) 148 149 scd_sit_date = FormattedDate( 150 title = _(u'Exam Date'), 151 required = False, 152 readonly = False, 153 show_year = True, 154 ) 155 156 scd_sit_type = schema.Choice( 157 title = _(u'Exam Type'), 158 required = False, 159 readonly = False, 160 vocabulary = exam_types, 161 ) 162 163 scd_sit_results = schema.List( 164 title = _(u'Exam Results'), 165 value_type = ResultEntryField(), 166 required = False, 167 readonly = False, 168 defaultFactory=list, 169 ) 170 171 programme_type = schema.Choice( 172 title = _(u'Programme Type'), 173 vocabulary = programme_types_vocab, 174 required = False, 175 ) 176 177 hq_type = schema.Choice( 178 title = _(u'Qualification Obtained'), 179 required = False, 180 readonly = False, 181 vocabulary = high_qual, 182 ) 183 hq_matric_no = schema.TextLine( 184 title = _(u'Former Matric Number'), 185 required = False, 186 readonly = False, 187 ) 188 hq_degree = schema.Choice( 189 title = _(u'Class of Degree'), 190 required = False, 191 readonly = False, 192 vocabulary = high_grade, 193 ) 194 hq_school = schema.TextLine( 195 title = _(u'Institution Attended'), 196 required = False, 197 readonly = False, 198 ) 199 hq_session = schema.TextLine( 200 title = _(u'Years Attended'), 201 required = False, 202 readonly = False, 203 ) 204 hq_disc = schema.TextLine( 205 title = _(u'Discipline'), 206 required = False, 207 readonly = False, 208 ) 209 jamb_subjects = schema.Text( 210 title = _(u'Subjects and Scores'), 211 required = False, 212 ) 213 jamb_subjects_list = schema.List( 214 title = _(u'JAMB Subjects'), 215 required = False, 216 defaultFactory=list, 217 value_type = schema.Choice( 218 vocabulary = jambsubjects 219 #source = JAMBSubjectSource(), 220 ), 221 ) 222 jamb_score = schema.Int( 223 title = _(u'Total JAMB Score'), 224 required = False, 225 ) 226 #jamb_age = schema.Int( 227 # title = _(u'Age (provided by JAMB)'), 228 # required = False, 229 # ) 230 jamb_reg_number = schema.TextLine( 231 title = _(u'JAMB Registration Number'), 232 required = False, 233 constraint=validate_jamb_reg_number, 234 ) 235 notice = schema.Text( 236 title = _(u'Notice'), 237 required = False, 238 ) 239 screening_venue = schema.TextLine( 240 title = _(u'Screening Venue'), 241 required = False, 242 ) 243 screening_date = schema.TextLine( 244 title = _(u'Screening Date'), 245 required = False, 246 ) 247 screening_score = schema.Int( 248 title = _(u'Screening Score (%)'), 249 required = False, 250 ) 251 aggregate = schema.Int( 252 title = _(u'Aggregate Score (%)'), 253 description = _(u'(average of relative JAMB and PUTME scores)'), 254 required = False, 255 ) 256 result_uploaded = schema.Bool( 257 title = _(u'Result uploaded'), 258 default = False, 259 required = False, 260 ) 261 student_id = schema.TextLine( 262 title = _(u'Student Id'), 263 required = False, 264 readonly = False, 265 ) 266 course_admitted = schema.Choice( 267 title = _(u'Admitted Course of Study'), 268 source = CertificateSource(), 269 required = False, 270 ) 271 locked = schema.Bool( 272 title = _(u'Form locked'), 273 default = False, 274 required = False, 275 ) 49 276 50 277 class ICustomPGApplicant(INigeriaPGApplicant): 51 278 """A postgraduate applicant. 52 53 This interface defines the least common multiple of all fields 54 in pg application forms. In customized forms, fields can be excluded by 55 adding them to the PG_OMIT* tuples. 56 """ 57 279 """ 58 280 59 281 class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant): … … 76 298 """ 77 299 78 class ICustomUGApplicantEdit(I NigeriaUGApplicantEdit):300 class ICustomUGApplicantEdit(ICustomUGApplicant): 79 301 """An undergraduate applicant interface for edit forms. 80 302
Note: See TracChangeset for help on using the changeset viewer.