[13814] | 1 | # -*- coding: utf-8 -*- |
---|
[7853] | 2 | ## $Id: interfaces.py 18019 2025-02-12 17:50:45Z henrik $ |
---|
| 3 | ## |
---|
| 4 | ## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann |
---|
| 5 | ## This program is free software; you can redistribute it and/or modify |
---|
| 6 | ## it under the terms of the GNU General Public License as published by |
---|
| 7 | ## the Free Software Foundation; either version 2 of the License, or |
---|
| 8 | ## (at your option) any later version. |
---|
| 9 | ## |
---|
| 10 | ## This program is distributed in the hope that it will be useful, |
---|
| 11 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 12 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 13 | ## GNU General Public License for more details. |
---|
| 14 | ## |
---|
| 15 | ## You should have received a copy of the GNU General Public License |
---|
| 16 | ## along with this program; if not, write to the Free Software |
---|
| 17 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
| 18 | ## |
---|
| 19 | """Customized interfaces of the university application package. |
---|
| 20 | """ |
---|
| 21 | |
---|
[13831] | 22 | #from grok import getSite |
---|
[17659] | 23 | import re |
---|
[8012] | 24 | from zope import schema |
---|
[16771] | 25 | from zope.interface import invariant, Invalid |
---|
[16152] | 26 | from zope.component import getUtility |
---|
| 27 | from zope.catalog.interfaces import ICatalog |
---|
[13814] | 28 | from zc.sourcefactory.basic import BasicSourceFactory |
---|
[8051] | 29 | from waeup.kofa.applicants.interfaces import ( |
---|
[8053] | 30 | IApplicantBaseData, |
---|
[8051] | 31 | AppCatCertificateSource, CertificateSource) |
---|
[16078] | 32 | from waeup.kofa.university.vocabularies import StudyModeSource |
---|
| 33 | from waeup.kofa.students.vocabularies import ( |
---|
| 34 | nats_vocab, GenderSource, StudyLevelSource) |
---|
[8051] | 35 | from waeup.kofa.schoolgrades import ResultEntryField |
---|
[8530] | 36 | from waeup.kofa.interfaces import ( |
---|
[13814] | 37 | SimpleKofaVocabulary, academic_sessions_vocab, validate_email, |
---|
[16131] | 38 | IKofaObject, ContextualDictSourceFactoryBase) |
---|
[13814] | 39 | from waeup.kofa.schema import FormattedDate, TextLineChoice, PhoneNumber |
---|
[15490] | 40 | from waeup.kofa.students.vocabularies import ( |
---|
| 41 | nats_vocab, GenderSource) |
---|
[14106] | 42 | from waeup.kofa.refereeentries import RefereeEntryField |
---|
[8530] | 43 | from waeup.kofa.applicants.interfaces import contextual_reg_num_source |
---|
[15490] | 44 | from kofacustom.nigeria.interfaces import DisabilitiesSource |
---|
[8928] | 45 | from kofacustom.nigeria.applicants.interfaces import ( |
---|
| 46 | LGASource, high_qual, high_grade, exam_types, |
---|
[14140] | 47 | programme_types_vocab, jambsubjects, |
---|
[8928] | 48 | INigeriaUGApplicant, INigeriaPGApplicant, |
---|
| 49 | INigeriaApplicantOnlinePayment, |
---|
[9006] | 50 | INigeriaUGApplicantEdit, INigeriaPGApplicantEdit, |
---|
| 51 | INigeriaApplicantUpdateByRegNo, |
---|
| 52 | IPUTMEApplicantEdit, |
---|
[14140] | 53 | IBankAccount, |
---|
[8928] | 54 | ) |
---|
[8020] | 55 | from waeup.uniben.interfaces import MessageFactory as _ |
---|
[8247] | 56 | from waeup.uniben.payments.interfaces import ICustomOnlinePayment |
---|
[7853] | 57 | |
---|
[17659] | 58 | |
---|
| 59 | # Define a validation method for JAMB reg numbers |
---|
| 60 | class NotMatricRegNumber(schema.ValidationError): |
---|
| 61 | __doc__ = u"Invalid matriculation number" |
---|
| 62 | |
---|
| 63 | #: Regular expression to check matric_number formats. |
---|
| 64 | check_matric_number = re.compile(r"^[^0-9\s][^\s]*$").match |
---|
| 65 | |
---|
| 66 | def validate_matric_number(value): |
---|
| 67 | if not check_matric_number(value): |
---|
| 68 | raise NotMatricRegNumber(value) |
---|
| 69 | return True |
---|
| 70 | |
---|
[16152] | 71 | class TranscriptCertificateSource(CertificateSource): |
---|
| 72 | """Include Department and Faculty in Title. |
---|
| 73 | """ |
---|
| 74 | def getValues(self, context): |
---|
| 75 | catalog = getUtility(ICatalog, name='certificates_catalog') |
---|
| 76 | resultset = catalog.searchResults(code=(None, None)) |
---|
| 77 | resultlist = sorted(resultset, key=lambda |
---|
| 78 | value: value.__parent__.__parent__.__parent__.code + |
---|
| 79 | value.__parent__.__parent__.code + |
---|
| 80 | value.code) |
---|
| 81 | return resultlist |
---|
[13814] | 82 | |
---|
[16152] | 83 | def getTitle(self, context, value): |
---|
| 84 | """ |
---|
| 85 | """ |
---|
| 86 | try: title = "%s / %s / %s (%s)" % ( |
---|
| 87 | value.__parent__.__parent__.__parent__.title, |
---|
| 88 | value.__parent__.__parent__.title, |
---|
| 89 | value.title, value.code) |
---|
| 90 | except AttributeError: |
---|
| 91 | title = "NA / %s (%s)" % (value.title, value.code) |
---|
| 92 | return title |
---|
| 93 | |
---|
[13814] | 94 | REGISTRATION_CATS = { |
---|
| 95 | 'corporate': ('Corporate Registration', 250000, 1), |
---|
| 96 | 'group': ('Group Registration', 200000, 2), |
---|
| 97 | 'individual': ('Individual Registration', 45000, 3), |
---|
| 98 | 'student': ('Student Registration', 5000, 4), |
---|
[13824] | 99 | 'fullpage': ('Full Page Advert', 250000, 5), |
---|
| 100 | 'halfpage': ('Half Page Advert', 150000, 6), |
---|
| 101 | 'quarterpage': ('Quarter Page Advert', 100000, 7), |
---|
[13814] | 102 | } |
---|
| 103 | |
---|
| 104 | class RegTypesSource(BasicSourceFactory): |
---|
| 105 | """A source that delivers all kinds of registrations. |
---|
| 106 | """ |
---|
| 107 | def getValues(self): |
---|
| 108 | sorted_items = sorted(REGISTRATION_CATS.items(), |
---|
| 109 | key=lambda element: element[1][2]) |
---|
| 110 | return [item[0] for item in sorted_items] |
---|
| 111 | |
---|
| 112 | def getTitle(self, value): |
---|
| 113 | return u"%s @ ₦ %s" % ( |
---|
| 114 | REGISTRATION_CATS[value][0], |
---|
| 115 | REGISTRATION_CATS[value][1]) |
---|
| 116 | |
---|
[16131] | 117 | DESTINATION_COST = { |
---|
[16144] | 118 | #'none': ('To the moon', 1000000000.0, 1), |
---|
[18015] | 119 | 'local': ('Within Nigeria', 27500.0, 1), |
---|
| 120 | 'inter2': ('International', 37500.0, 2), |
---|
| 121 | 'nigeria': ('Within Nigeria (deprecated)', 20000.0, 3), |
---|
| 122 | 'africa': ('Within Africa (deprecated)', 30000.0, 4), |
---|
| 123 | 'inter': ('International (deprecated)', 35000.0, 5), |
---|
| 124 | 'cert_nigeria': ('Certified Copy - Within Nigeria (deprecated)', 13000.0, 6), |
---|
| 125 | 'cert_africa': ('Certified Copy - Within Africa (deprecated)', 23000.0, 7), |
---|
| 126 | 'cert_inter': ('Certified Copy - International (deprecated)', 28000.0, 8), |
---|
[16131] | 127 | } |
---|
| 128 | |
---|
| 129 | class DestinationCostSource(BasicSourceFactory): |
---|
| 130 | """A source that delivers continents and shipment costs. |
---|
| 131 | """ |
---|
| 132 | def getValues(self): |
---|
| 133 | sorted_items = sorted(DESTINATION_COST.items(), |
---|
| 134 | key=lambda element: element[1][2]) |
---|
| 135 | return [item[0] for item in sorted_items] |
---|
| 136 | |
---|
[16151] | 137 | def getToken(self, value): |
---|
| 138 | return value |
---|
| 139 | |
---|
[16131] | 140 | def getTitle(self, value): |
---|
| 141 | return u"%s (₦ %s)" % ( |
---|
| 142 | DESTINATION_COST[value][0], |
---|
| 143 | DESTINATION_COST[value][1]) |
---|
| 144 | |
---|
[16151] | 145 | class OrderSource(BasicSourceFactory): |
---|
| 146 | """ |
---|
| 147 | """ |
---|
| 148 | def getValues(self): |
---|
| 149 | return ['o', 'c'] |
---|
| 150 | |
---|
| 151 | def getToken(self, value): |
---|
| 152 | return value |
---|
| 153 | |
---|
| 154 | def getTitle(self, value): |
---|
| 155 | if value == 'o': |
---|
| 156 | return _('Original') |
---|
| 157 | if value == 'c': |
---|
| 158 | return _('Certified True Copy') |
---|
| 159 | |
---|
[16804] | 160 | class ProficiencySource(BasicSourceFactory): |
---|
| 161 | """ |
---|
| 162 | """ |
---|
| 163 | def getValues(self): |
---|
[16809] | 164 | return ['n', 'c', 'p'] |
---|
[16804] | 165 | |
---|
| 166 | def getToken(self, value): |
---|
| 167 | return value |
---|
| 168 | |
---|
| 169 | def getTitle(self, value): |
---|
[16809] | 170 | if value == 'n': |
---|
| 171 | return _('none') |
---|
[16804] | 172 | if value == 'c': |
---|
| 173 | return _('conversational') |
---|
[16807] | 174 | if value == 'p': |
---|
[16804] | 175 | return _('professional') |
---|
| 176 | |
---|
[16807] | 177 | class PreferredSessionSource(BasicSourceFactory): |
---|
| 178 | """ |
---|
| 179 | """ |
---|
| 180 | def getValues(self): |
---|
| 181 | return ['m', 'e', 'w'] |
---|
| 182 | |
---|
| 183 | def getToken(self, value): |
---|
| 184 | return value |
---|
| 185 | |
---|
| 186 | def getTitle(self, value): |
---|
| 187 | if value == 'm': |
---|
| 188 | return _('morning') |
---|
| 189 | if value == 'e': |
---|
| 190 | return _('evening') |
---|
| 191 | if value == 'w': |
---|
| 192 | return _('weekend') |
---|
| 193 | |
---|
[13814] | 194 | class IUnibenRegistration(IKofaObject): |
---|
| 195 | """A Uniben registrant. |
---|
| 196 | """ |
---|
| 197 | |
---|
| 198 | suspended = schema.Bool( |
---|
| 199 | title = _(u'Account suspended'), |
---|
| 200 | default = False, |
---|
| 201 | required = False, |
---|
| 202 | ) |
---|
| 203 | |
---|
| 204 | locked = schema.Bool( |
---|
| 205 | title = _(u'Form locked'), |
---|
| 206 | default = False, |
---|
| 207 | required = False, |
---|
| 208 | ) |
---|
| 209 | |
---|
| 210 | applicant_id = schema.TextLine( |
---|
| 211 | title = _(u'Registrant Id'), |
---|
| 212 | required = False, |
---|
| 213 | readonly = False, |
---|
| 214 | ) |
---|
| 215 | |
---|
| 216 | firstname = schema.TextLine( |
---|
| 217 | title = _(u'First Name'), |
---|
| 218 | required = True, |
---|
| 219 | ) |
---|
| 220 | |
---|
| 221 | middlename = schema.TextLine( |
---|
| 222 | title = _(u'Middle Name'), |
---|
| 223 | required = False, |
---|
| 224 | ) |
---|
| 225 | |
---|
| 226 | lastname = schema.TextLine( |
---|
| 227 | title = _(u'Last Name (Surname)'), |
---|
| 228 | required = True, |
---|
| 229 | ) |
---|
| 230 | |
---|
[13819] | 231 | sex = schema.Choice( |
---|
| 232 | title = _(u'Sex'), |
---|
| 233 | source = GenderSource(), |
---|
| 234 | required = True, |
---|
[13814] | 235 | ) |
---|
| 236 | |
---|
| 237 | nationality = schema.Choice( |
---|
| 238 | vocabulary = nats_vocab, |
---|
| 239 | title = _(u'Nationality'), |
---|
| 240 | required = False, |
---|
| 241 | ) |
---|
| 242 | |
---|
| 243 | email = schema.ASCIILine( |
---|
| 244 | title = _(u'Email Address'), |
---|
| 245 | required = True, |
---|
| 246 | constraint=validate_email, |
---|
| 247 | ) |
---|
| 248 | |
---|
| 249 | phone = PhoneNumber( |
---|
| 250 | title = _(u'Phone'), |
---|
| 251 | description = u'', |
---|
| 252 | required = False, |
---|
| 253 | ) |
---|
| 254 | |
---|
[13819] | 255 | #perm_address = schema.Text( |
---|
| 256 | # title = _(u'Current Local Address'), |
---|
| 257 | # required = False, |
---|
| 258 | # readonly = False, |
---|
| 259 | # ) |
---|
| 260 | |
---|
| 261 | institution = schema.TextLine( |
---|
| 262 | title = _(u'Institution/Organisation'), |
---|
[13814] | 263 | required = False, |
---|
| 264 | readonly = False, |
---|
| 265 | ) |
---|
| 266 | |
---|
[13828] | 267 | city = schema.TextLine( |
---|
| 268 | title = _(u'City'), |
---|
| 269 | required = False, |
---|
| 270 | readonly = False, |
---|
| 271 | ) |
---|
| 272 | |
---|
[13819] | 273 | lga = schema.Choice( |
---|
| 274 | source = LGASource(), |
---|
| 275 | title = _(u'State/LGA'), |
---|
| 276 | required = False, |
---|
| 277 | ) |
---|
| 278 | |
---|
[13831] | 279 | matric_number = schema.TextLine( |
---|
| 280 | title = _(u'Uniben Matriculation Number'), |
---|
| 281 | required = False, |
---|
| 282 | readonly = False, |
---|
| 283 | ) |
---|
| 284 | |
---|
[13814] | 285 | registration_cats = schema.List( |
---|
| 286 | title = _(u'Registration Categories'), |
---|
| 287 | value_type = schema.Choice(source=RegTypesSource()), |
---|
| 288 | required = True, |
---|
[14020] | 289 | defaultFactory=list, |
---|
[13814] | 290 | ) |
---|
| 291 | |
---|
[13831] | 292 | # @invariant |
---|
| 293 | # def matric_number_exists(applicant): |
---|
| 294 | # if applicant.matric_number: |
---|
| 295 | # catalog = getUtility(ICatalog, name='students_catalog') |
---|
| 296 | # accommodation_session = getSite()['hostels'].accommodation_session |
---|
| 297 | # student = catalog.searchResults(matric_number=( |
---|
| 298 | # applicant.matric_number, applicant.matric_number)) |
---|
| 299 | # if len(student) != 1: |
---|
| 300 | # raise Invalid(_("Matriculation number not found.")) |
---|
[13814] | 301 | |
---|
[16078] | 302 | class ITranscriptApplicant(IKofaObject): |
---|
| 303 | """A transcript applicant. |
---|
| 304 | """ |
---|
| 305 | |
---|
| 306 | suspended = schema.Bool( |
---|
| 307 | title = _(u'Account suspended'), |
---|
| 308 | default = False, |
---|
| 309 | required = False, |
---|
| 310 | ) |
---|
| 311 | |
---|
| 312 | locked = schema.Bool( |
---|
| 313 | title = _(u'Form locked'), |
---|
| 314 | default = False, |
---|
| 315 | required = False, |
---|
| 316 | ) |
---|
| 317 | |
---|
| 318 | applicant_id = schema.TextLine( |
---|
[16131] | 319 | title = _(u'Transcript Application Id'), |
---|
[16078] | 320 | required = False, |
---|
| 321 | readonly = False, |
---|
| 322 | ) |
---|
| 323 | |
---|
[16131] | 324 | student_id = schema.TextLine( |
---|
| 325 | title = _(u'Kofa Student Id'), |
---|
| 326 | required = False, |
---|
[16078] | 327 | readonly = False, |
---|
[16131] | 328 | ) |
---|
| 329 | |
---|
| 330 | matric_number = schema.TextLine( |
---|
| 331 | title = _(u'Matriculation Number'), |
---|
| 332 | readonly = False, |
---|
[16078] | 333 | required = True, |
---|
[17659] | 334 | constraint = validate_matric_number, |
---|
[16078] | 335 | ) |
---|
| 336 | |
---|
| 337 | firstname = schema.TextLine( |
---|
[16151] | 338 | title = _(u'First Name in School'), |
---|
[16078] | 339 | required = True, |
---|
| 340 | ) |
---|
| 341 | |
---|
| 342 | middlename = schema.TextLine( |
---|
[16151] | 343 | title = _(u'Middle Name in School'), |
---|
[16078] | 344 | required = False, |
---|
| 345 | ) |
---|
| 346 | |
---|
| 347 | lastname = schema.TextLine( |
---|
[16151] | 348 | title = _(u'Surname in School'), |
---|
[16078] | 349 | required = True, |
---|
| 350 | ) |
---|
| 351 | |
---|
| 352 | date_of_birth = FormattedDate( |
---|
| 353 | title = _(u'Date of Birth'), |
---|
[17597] | 354 | required = False, |
---|
[16078] | 355 | #date_format = u'%d/%m/%Y', # Use grok-instance-wide default |
---|
| 356 | show_year = True, |
---|
| 357 | ) |
---|
| 358 | |
---|
| 359 | sex = schema.Choice( |
---|
| 360 | title = _(u'Gender'), |
---|
| 361 | source = GenderSource(), |
---|
| 362 | required = True, |
---|
| 363 | ) |
---|
| 364 | |
---|
[16151] | 365 | #nationality = schema.Choice( |
---|
| 366 | # vocabulary = nats_vocab, |
---|
| 367 | # title = _(u'Nationality'), |
---|
| 368 | # required = False, |
---|
| 369 | # ) |
---|
[16078] | 370 | |
---|
| 371 | email = schema.ASCIILine( |
---|
| 372 | title = _(u'Email Address'), |
---|
| 373 | required = True, |
---|
| 374 | constraint=validate_email, |
---|
| 375 | ) |
---|
| 376 | |
---|
| 377 | phone = PhoneNumber( |
---|
| 378 | title = _(u'Phone'), |
---|
| 379 | description = u'', |
---|
| 380 | required = False, |
---|
| 381 | ) |
---|
| 382 | |
---|
[16151] | 383 | #perm_address = schema.Text( |
---|
| 384 | # title = _(u'Current Local Address'), |
---|
| 385 | # required = False, |
---|
| 386 | # readonly = False, |
---|
| 387 | # ) |
---|
| 388 | |
---|
[16153] | 389 | collected = schema.Bool( |
---|
| 390 | title = _(u'Have you collected transcript before?'), |
---|
| 391 | default = False, |
---|
[17597] | 392 | required = False, |
---|
[16153] | 393 | ) |
---|
| 394 | |
---|
[16151] | 395 | entry_session = schema.Choice( |
---|
| 396 | title = _(u'Academic Session of Entry'), |
---|
| 397 | source = academic_sessions_vocab, |
---|
[17597] | 398 | required = False, |
---|
[16078] | 399 | readonly = False, |
---|
| 400 | ) |
---|
| 401 | |
---|
[16151] | 402 | end_session = schema.Choice( |
---|
| 403 | title = _(u'Academic Session of Graduation'), |
---|
| 404 | source = academic_sessions_vocab, |
---|
[17597] | 405 | required = False, |
---|
[16078] | 406 | readonly = False, |
---|
| 407 | ) |
---|
| 408 | |
---|
| 409 | entry_mode = schema.Choice( |
---|
[16151] | 410 | title = _(u'Mode of Entry'), |
---|
[16078] | 411 | source = StudyModeSource(), |
---|
[17597] | 412 | required = False, |
---|
[16078] | 413 | readonly = False, |
---|
| 414 | ) |
---|
| 415 | |
---|
| 416 | course_studied = schema.Choice( |
---|
[16151] | 417 | title = _(u'Course of Study'), |
---|
[16152] | 418 | source = TranscriptCertificateSource(), |
---|
[16201] | 419 | description = u'Faculty / Department / Course', |
---|
[16376] | 420 | required = True, |
---|
[16078] | 421 | readonly = False, |
---|
| 422 | ) |
---|
| 423 | |
---|
| 424 | course_changed = schema.Choice( |
---|
[16151] | 425 | title = _(u'Change of Study Course / Transfer'), |
---|
[16078] | 426 | description = u'If yes, select previous course of study.', |
---|
[16152] | 427 | source = TranscriptCertificateSource(), |
---|
[16078] | 428 | readonly = False, |
---|
| 429 | required = False, |
---|
| 430 | ) |
---|
| 431 | |
---|
[16153] | 432 | spillover_level = schema.Choice( |
---|
| 433 | title = _(u'Spill-over'), |
---|
| 434 | description = u'Any spill-over? If yes, select session of spill-over.', |
---|
| 435 | source = academic_sessions_vocab, |
---|
| 436 | required = False, |
---|
| 437 | readonly = False, |
---|
| 438 | ) |
---|
[16151] | 439 | |
---|
| 440 | purpose = schema.TextLine( |
---|
| 441 | title = _(u'Transcript Purpose'), |
---|
[16078] | 442 | required = False, |
---|
[16151] | 443 | ) |
---|
| 444 | |
---|
| 445 | order = schema.Choice( |
---|
| 446 | source = OrderSource(), |
---|
| 447 | title = _(u'Type of Order'), |
---|
[17597] | 448 | required = False, |
---|
[16151] | 449 | ) |
---|
| 450 | |
---|
| 451 | dispatch_address = schema.Text( |
---|
| 452 | title = _(u'Recipient Body'), |
---|
[17659] | 453 | description = u'Addresses to which transcripts should be posted. ' |
---|
[16151] | 454 | 'All addresses must involve same courier charges.', |
---|
[16307] | 455 | required = True, |
---|
[16078] | 456 | readonly = False, |
---|
| 457 | ) |
---|
| 458 | |
---|
[17659] | 459 | dispatch_email = schema.ASCIILine( |
---|
| 460 | title = _(u'Recipient Email Address'), |
---|
| 461 | required = False, |
---|
| 462 | constraint=validate_email, |
---|
| 463 | ) |
---|
| 464 | |
---|
| 465 | dispatch_phone = PhoneNumber( |
---|
| 466 | title = _(u'Recipient Phone'), |
---|
| 467 | description = u'', |
---|
| 468 | required = False, |
---|
| 469 | ) |
---|
| 470 | |
---|
[16151] | 471 | charge = schema.Choice( |
---|
[16182] | 472 | title = _(u'Transcript Charge'), |
---|
[16151] | 473 | source = DestinationCostSource(), |
---|
[17597] | 474 | required = False, |
---|
[16198] | 475 | readonly = False, |
---|
[16151] | 476 | ) |
---|
| 477 | |
---|
[16078] | 478 | no_copies = schema.Choice( |
---|
| 479 | title = _(u'Number of Copies'), |
---|
| 480 | description = u'Must correspond with the number of dispatch addresses above.', |
---|
| 481 | values=[1, 2, 3, 4], |
---|
[17597] | 482 | required = False, |
---|
[16078] | 483 | readonly = False, |
---|
| 484 | default = 1, |
---|
| 485 | ) |
---|
| 486 | |
---|
[16471] | 487 | courier_tno = schema.TextLine( |
---|
| 488 | title = _(u'Courier Tracking Number'), |
---|
| 489 | required = False, |
---|
| 490 | ) |
---|
| 491 | |
---|
| 492 | proc_date = FormattedDate( |
---|
| 493 | title = _(u'Processing Date'), |
---|
| 494 | required = False, |
---|
| 495 | #date_format = u'%d/%m/%Y', # Use grok-instance-wide default |
---|
| 496 | show_year = True, |
---|
| 497 | ) |
---|
| 498 | |
---|
[16771] | 499 | @invariant |
---|
| 500 | def type_of_order(applicant): |
---|
[16775] | 501 | if not applicant.collected and applicant.order != 'o': |
---|
| 502 | raise Invalid(_("If you haven't collected transcript before, type of order must be 'original'.")) |
---|
[16772] | 503 | if applicant.order == 'o' and applicant.charge.startswith('cert_'): |
---|
| 504 | raise Invalid(_("You've selected the wrong transcript charge.")) |
---|
| 505 | if applicant.order == 'c' and not applicant.charge.startswith('cert_'): |
---|
| 506 | raise Invalid(_("You've selected the wrong transcript charge.")) |
---|
[18019] | 507 | if applicant.charge not in ('inter2', 'local'): |
---|
| 508 | raise Invalid(_("This fee is deprecated. Please select a current transcript charge.")) |
---|
[16471] | 509 | |
---|
[16804] | 510 | class IFrenchApplicant(IKofaObject): |
---|
| 511 | """A transcript applicant. |
---|
| 512 | """ |
---|
[16771] | 513 | |
---|
[16804] | 514 | suspended = schema.Bool( |
---|
| 515 | title = _(u'Account suspended'), |
---|
| 516 | default = False, |
---|
| 517 | required = False, |
---|
| 518 | ) |
---|
| 519 | |
---|
| 520 | locked = schema.Bool( |
---|
| 521 | title = _(u'Form locked'), |
---|
| 522 | default = False, |
---|
| 523 | required = False, |
---|
| 524 | ) |
---|
| 525 | |
---|
| 526 | applicant_id = schema.TextLine( |
---|
| 527 | title = _(u'Applicant Id'), |
---|
| 528 | required = False, |
---|
| 529 | readonly = False, |
---|
| 530 | ) |
---|
| 531 | |
---|
| 532 | firstname = schema.TextLine( |
---|
| 533 | title = _(u'First Name'), |
---|
| 534 | required = True, |
---|
| 535 | ) |
---|
| 536 | |
---|
| 537 | middlename = schema.TextLine( |
---|
| 538 | title = _(u'Middle Name'), |
---|
| 539 | required = False, |
---|
| 540 | ) |
---|
| 541 | |
---|
| 542 | lastname = schema.TextLine( |
---|
| 543 | title = _(u'Surname'), |
---|
| 544 | required = True, |
---|
| 545 | ) |
---|
| 546 | |
---|
| 547 | date_of_birth = FormattedDate( |
---|
| 548 | title = _(u'Date of Birth'), |
---|
| 549 | required = False, |
---|
| 550 | #date_format = u'%d/%m/%Y', # Use grok-instance-wide default |
---|
| 551 | show_year = True, |
---|
| 552 | ) |
---|
| 553 | |
---|
| 554 | sex = schema.Choice( |
---|
| 555 | title = _(u'Gender'), |
---|
| 556 | source = GenderSource(), |
---|
| 557 | required = True, |
---|
| 558 | ) |
---|
| 559 | |
---|
| 560 | nationality = schema.Choice( |
---|
| 561 | vocabulary = nats_vocab, |
---|
| 562 | title = _(u'Nationality'), |
---|
| 563 | required = False, |
---|
| 564 | ) |
---|
| 565 | |
---|
| 566 | email = schema.ASCIILine( |
---|
| 567 | title = _(u'Email Address'), |
---|
| 568 | required = True, |
---|
| 569 | constraint=validate_email, |
---|
| 570 | ) |
---|
| 571 | |
---|
| 572 | phone = PhoneNumber( |
---|
| 573 | title = _(u'Phone'), |
---|
| 574 | description = u'', |
---|
| 575 | required = False, |
---|
| 576 | ) |
---|
| 577 | |
---|
| 578 | work = schema.TextLine( |
---|
| 579 | title = _(u'Place of Work'), |
---|
| 580 | required = False, |
---|
| 581 | ) |
---|
| 582 | |
---|
| 583 | hq_obtained = schema.Choice( |
---|
| 584 | title = _(u'Highest Qualification Obtained'), |
---|
| 585 | required = False, |
---|
| 586 | readonly = False, |
---|
| 587 | vocabulary = high_qual, |
---|
| 588 | ) |
---|
| 589 | |
---|
| 590 | hq_date = FormattedDate( |
---|
| 591 | title = _(u'Highest Qualification Date'), |
---|
| 592 | required = False, |
---|
| 593 | readonly = False, |
---|
| 594 | show_year = True, |
---|
| 595 | ) |
---|
[16807] | 596 | |
---|
| 597 | pref_session = schema.Choice( |
---|
| 598 | source = PreferredSessionSource(), |
---|
| 599 | title = _(u'Preferred Session'), |
---|
| 600 | required = False, |
---|
| 601 | ) |
---|
| 602 | |
---|
[16804] | 603 | proficiency = schema.Choice( |
---|
| 604 | source = ProficiencySource(), |
---|
| 605 | title = _(u'Level of Proficiency'), |
---|
| 606 | required = False, |
---|
| 607 | ) |
---|
| 608 | |
---|
| 609 | guarantor = schema.TextLine( |
---|
| 610 | title = _(u'Name of Guarantor'), |
---|
| 611 | required = False, |
---|
| 612 | ) |
---|
| 613 | |
---|
[16945] | 614 | course_admitted = schema.Choice( |
---|
| 615 | title = _(u'Admitted Course of Study'), |
---|
| 616 | source = CertificateSource(), |
---|
| 617 | required = False, |
---|
| 618 | ) |
---|
| 619 | |
---|
[17964] | 620 | class IAfrimalApplicant(IKofaObject): |
---|
| 621 | """An AFRIMAL applicant. |
---|
| 622 | """ |
---|
| 623 | |
---|
| 624 | suspended = schema.Bool( |
---|
| 625 | title = _(u'Account suspended'), |
---|
| 626 | default = False, |
---|
| 627 | required = False, |
---|
| 628 | ) |
---|
| 629 | |
---|
| 630 | locked = schema.Bool( |
---|
| 631 | title = _(u'Form locked'), |
---|
| 632 | default = False, |
---|
| 633 | required = False, |
---|
| 634 | ) |
---|
| 635 | |
---|
| 636 | applicant_id = schema.TextLine( |
---|
| 637 | title = _(u'Applicant Id'), |
---|
| 638 | required = False, |
---|
| 639 | readonly = False, |
---|
| 640 | ) |
---|
| 641 | |
---|
| 642 | firstname = schema.TextLine( |
---|
| 643 | title = _(u'First Name'), |
---|
| 644 | required = True, |
---|
| 645 | ) |
---|
| 646 | |
---|
| 647 | middlename = schema.TextLine( |
---|
| 648 | title = _(u'Middle Name'), |
---|
| 649 | required = False, |
---|
| 650 | ) |
---|
| 651 | |
---|
| 652 | lastname = schema.TextLine( |
---|
| 653 | title = _(u'Surname'), |
---|
| 654 | required = True, |
---|
| 655 | ) |
---|
| 656 | |
---|
| 657 | date_of_birth = FormattedDate( |
---|
| 658 | title = _(u'Date of Birth'), |
---|
| 659 | required = False, |
---|
| 660 | #date_format = u'%d/%m/%Y', # Use grok-instance-wide default |
---|
| 661 | show_year = True, |
---|
| 662 | ) |
---|
| 663 | |
---|
| 664 | sex = schema.Choice( |
---|
| 665 | title = _(u'Gender'), |
---|
| 666 | source = GenderSource(), |
---|
| 667 | required = True, |
---|
| 668 | ) |
---|
| 669 | |
---|
| 670 | nationality = schema.Choice( |
---|
| 671 | vocabulary = nats_vocab, |
---|
| 672 | title = _(u'Nationality'), |
---|
| 673 | required = False, |
---|
| 674 | ) |
---|
| 675 | |
---|
| 676 | email = schema.ASCIILine( |
---|
| 677 | title = _(u'Email Address'), |
---|
| 678 | required = True, |
---|
| 679 | constraint=validate_email, |
---|
| 680 | ) |
---|
| 681 | |
---|
| 682 | phone = PhoneNumber( |
---|
| 683 | title = _(u'Phone'), |
---|
| 684 | description = u'', |
---|
| 685 | required = False, |
---|
| 686 | ) |
---|
| 687 | |
---|
| 688 | hq_obtained = schema.Choice( |
---|
| 689 | title = _(u'Highest Qualification Obtained'), |
---|
| 690 | required = False, |
---|
| 691 | readonly = False, |
---|
| 692 | vocabulary = high_qual, |
---|
| 693 | ) |
---|
| 694 | |
---|
| 695 | current_employer = schema.TextLine( |
---|
| 696 | title = _(u'Current Employer'), |
---|
| 697 | required = False, |
---|
| 698 | ) |
---|
| 699 | |
---|
| 700 | course1 = schema.Choice( |
---|
| 701 | title = _(u'Course of Study'), |
---|
| 702 | source = AppCatCertificateSource(), |
---|
| 703 | required = True, |
---|
| 704 | ) |
---|
| 705 | |
---|
| 706 | course_admitted = schema.Choice( |
---|
| 707 | title = _(u'Admitted Course of Study'), |
---|
| 708 | source = CertificateSource(), |
---|
| 709 | required = False, |
---|
| 710 | ) |
---|
| 711 | |
---|
[14140] | 712 | class ICustomUGApplicant(IApplicantBaseData, IBankAccount): |
---|
[8012] | 713 | """An undergraduate applicant. |
---|
| 714 | |
---|
[8519] | 715 | This interface defines the least common multiple of all fields |
---|
| 716 | in ug application forms. In customized forms, fields can be excluded by |
---|
| 717 | adding them to the UG_OMIT* tuples. |
---|
[8012] | 718 | """ |
---|
| 719 | |
---|
[15490] | 720 | disabilities = schema.Choice( |
---|
| 721 | title = _(u'Disabilities'), |
---|
| 722 | source = DisabilitiesSource(), |
---|
| 723 | required = False, |
---|
| 724 | ) |
---|
[14140] | 725 | nationality = schema.Choice( |
---|
| 726 | source = nats_vocab, |
---|
| 727 | title = _(u'Nationality'), |
---|
| 728 | required = False, |
---|
| 729 | ) |
---|
| 730 | lga = schema.Choice( |
---|
| 731 | source = LGASource(), |
---|
| 732 | title = _(u'State/LGA (Nigerians only)'), |
---|
| 733 | required = False, |
---|
| 734 | ) |
---|
| 735 | #perm_address = schema.Text( |
---|
| 736 | # title = _(u'Permanent Address'), |
---|
| 737 | # required = False, |
---|
| 738 | # ) |
---|
| 739 | course1 = schema.Choice( |
---|
| 740 | title = _(u'1st Choice Course of Study'), |
---|
| 741 | source = AppCatCertificateSource(), |
---|
| 742 | required = True, |
---|
| 743 | ) |
---|
| 744 | course2 = schema.Choice( |
---|
| 745 | title = _(u'2nd Choice Course of Study'), |
---|
| 746 | source = AppCatCertificateSource(), |
---|
| 747 | required = False, |
---|
| 748 | ) |
---|
| 749 | |
---|
| 750 | programme_type = schema.Choice( |
---|
| 751 | title = _(u'Programme Type'), |
---|
| 752 | vocabulary = programme_types_vocab, |
---|
| 753 | required = False, |
---|
| 754 | ) |
---|
| 755 | |
---|
| 756 | hq_type = schema.Choice( |
---|
| 757 | title = _(u'Qualification Obtained'), |
---|
| 758 | required = False, |
---|
| 759 | readonly = False, |
---|
| 760 | vocabulary = high_qual, |
---|
| 761 | ) |
---|
| 762 | hq_matric_no = schema.TextLine( |
---|
| 763 | title = _(u'Former Matric Number'), |
---|
| 764 | required = False, |
---|
| 765 | readonly = False, |
---|
| 766 | ) |
---|
| 767 | hq_degree = schema.Choice( |
---|
| 768 | title = _(u'Class of Degree'), |
---|
| 769 | required = False, |
---|
| 770 | readonly = False, |
---|
| 771 | vocabulary = high_grade, |
---|
| 772 | ) |
---|
| 773 | hq_school = schema.TextLine( |
---|
| 774 | title = _(u'Institution Attended'), |
---|
| 775 | required = False, |
---|
| 776 | readonly = False, |
---|
| 777 | ) |
---|
| 778 | hq_session = schema.TextLine( |
---|
| 779 | title = _(u'Years Attended'), |
---|
| 780 | required = False, |
---|
| 781 | readonly = False, |
---|
| 782 | ) |
---|
| 783 | hq_disc = schema.TextLine( |
---|
| 784 | title = _(u'Discipline'), |
---|
| 785 | required = False, |
---|
| 786 | readonly = False, |
---|
| 787 | ) |
---|
[14141] | 788 | fst_sit_fname = schema.TextLine( |
---|
| 789 | title = _(u'Full Name'), |
---|
| 790 | required = False, |
---|
| 791 | readonly = False, |
---|
| 792 | ) |
---|
| 793 | fst_sit_no = schema.TextLine( |
---|
| 794 | title = _(u'Exam Number'), |
---|
| 795 | required = False, |
---|
| 796 | readonly = False, |
---|
| 797 | ) |
---|
| 798 | fst_sit_date = FormattedDate( |
---|
| 799 | title = _(u'Exam Date'), |
---|
| 800 | required = False, |
---|
| 801 | readonly = False, |
---|
| 802 | show_year = True, |
---|
| 803 | ) |
---|
| 804 | fst_sit_type = schema.Choice( |
---|
| 805 | title = _(u'Exam Type'), |
---|
| 806 | required = False, |
---|
| 807 | readonly = False, |
---|
| 808 | vocabulary = exam_types, |
---|
| 809 | ) |
---|
| 810 | fst_sit_results = schema.List( |
---|
| 811 | title = _(u'Exam Results'), |
---|
| 812 | value_type = ResultEntryField(), |
---|
| 813 | required = False, |
---|
| 814 | readonly = False, |
---|
| 815 | defaultFactory=list, |
---|
| 816 | ) |
---|
| 817 | scd_sit_fname = schema.TextLine( |
---|
| 818 | title = _(u'Full Name'), |
---|
| 819 | required = False, |
---|
| 820 | readonly = False, |
---|
| 821 | ) |
---|
| 822 | scd_sit_no = schema.TextLine( |
---|
| 823 | title = _(u'Exam Number'), |
---|
| 824 | required = False, |
---|
| 825 | readonly = False, |
---|
| 826 | ) |
---|
| 827 | scd_sit_date = FormattedDate( |
---|
| 828 | title = _(u'Exam Date'), |
---|
| 829 | required = False, |
---|
| 830 | readonly = False, |
---|
| 831 | show_year = True, |
---|
| 832 | ) |
---|
| 833 | scd_sit_type = schema.Choice( |
---|
| 834 | title = _(u'Exam Type'), |
---|
| 835 | required = False, |
---|
| 836 | readonly = False, |
---|
| 837 | vocabulary = exam_types, |
---|
| 838 | ) |
---|
| 839 | scd_sit_results = schema.List( |
---|
| 840 | title = _(u'Exam Results'), |
---|
| 841 | value_type = ResultEntryField(), |
---|
| 842 | required = False, |
---|
| 843 | readonly = False, |
---|
| 844 | defaultFactory=list, |
---|
| 845 | ) |
---|
[17538] | 846 | jamb_reg_number = schema.TextLine( |
---|
| 847 | title = _(u'JAMB Registration Number'), |
---|
| 848 | required = False, |
---|
| 849 | ) |
---|
[14140] | 850 | jamb_subjects = schema.Text( |
---|
| 851 | title = _(u'Subjects and Scores'), |
---|
| 852 | required = False, |
---|
| 853 | ) |
---|
| 854 | jamb_subjects_list = schema.List( |
---|
| 855 | title = _(u'JAMB Subjects'), |
---|
| 856 | required = False, |
---|
| 857 | defaultFactory=list, |
---|
| 858 | value_type = schema.Choice( |
---|
| 859 | vocabulary = jambsubjects |
---|
| 860 | #source = JAMBSubjectSource(), |
---|
| 861 | ), |
---|
| 862 | ) |
---|
[16744] | 863 | jamb_score = schema.Float( |
---|
[14140] | 864 | title = _(u'Total JAMB Score'), |
---|
| 865 | required = False, |
---|
| 866 | ) |
---|
| 867 | #jamb_age = schema.Int( |
---|
| 868 | # title = _(u'Age (provided by JAMB)'), |
---|
| 869 | # required = False, |
---|
| 870 | # ) |
---|
[17538] | 871 | course_admitted = schema.Choice( |
---|
| 872 | title = _(u'Admitted Course of Study'), |
---|
| 873 | source = CertificateSource(), |
---|
[14140] | 874 | required = False, |
---|
| 875 | ) |
---|
| 876 | notice = schema.Text( |
---|
| 877 | title = _(u'Notice'), |
---|
| 878 | required = False, |
---|
| 879 | ) |
---|
| 880 | screening_venue = schema.TextLine( |
---|
| 881 | title = _(u'Screening Venue'), |
---|
| 882 | required = False, |
---|
| 883 | ) |
---|
| 884 | screening_date = schema.TextLine( |
---|
| 885 | title = _(u'Screening Date'), |
---|
| 886 | required = False, |
---|
| 887 | ) |
---|
[16744] | 888 | screening_score = schema.Float( |
---|
[14140] | 889 | title = _(u'Screening Score (%)'), |
---|
| 890 | required = False, |
---|
| 891 | ) |
---|
[16744] | 892 | aggregate = schema.Float( |
---|
[14140] | 893 | title = _(u'Aggregate Score (%)'), |
---|
[16742] | 894 | description = _(u'(average of relative JAMB and PUTME scores)'), |
---|
[14140] | 895 | required = False, |
---|
| 896 | ) |
---|
| 897 | result_uploaded = schema.Bool( |
---|
| 898 | title = _(u'Result uploaded'), |
---|
| 899 | default = False, |
---|
| 900 | required = False, |
---|
| 901 | ) |
---|
| 902 | student_id = schema.TextLine( |
---|
| 903 | title = _(u'Student Id'), |
---|
| 904 | required = False, |
---|
| 905 | readonly = False, |
---|
| 906 | ) |
---|
| 907 | locked = schema.Bool( |
---|
| 908 | title = _(u'Form locked'), |
---|
| 909 | default = False, |
---|
| 910 | required = False, |
---|
| 911 | ) |
---|
| 912 | |
---|
| 913 | ICustomUGApplicant[ |
---|
| 914 | 'locked'].order = IApplicantBaseData['suspended'].order |
---|
| 915 | ICustomUGApplicant[ |
---|
| 916 | 'result_uploaded'].order = ICustomUGApplicant['suspended'].order |
---|
| 917 | |
---|
[8928] | 918 | class ICustomPGApplicant(INigeriaPGApplicant): |
---|
[7853] | 919 | """A postgraduate applicant. |
---|
| 920 | |
---|
[8519] | 921 | This interface defines the least common multiple of all fields |
---|
| 922 | in pg application forms. In customized forms, fields can be excluded by |
---|
| 923 | adding them to the PG_OMIT* tuples. |
---|
[7866] | 924 | """ |
---|
| 925 | |
---|
[14106] | 926 | referees = schema.List( |
---|
| 927 | title = _(u'Referees'), |
---|
| 928 | value_type = RefereeEntryField(), |
---|
| 929 | required = False, |
---|
| 930 | defaultFactory=list, |
---|
| 931 | ) |
---|
[8012] | 932 | |
---|
[14106] | 933 | ICustomPGApplicant[ |
---|
| 934 | 'referees'].order = INigeriaPGApplicant['emp2_reason'].order |
---|
| 935 | |
---|
[13814] | 936 | class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant, |
---|
[17964] | 937 | IUnibenRegistration, ITranscriptApplicant, IFrenchApplicant, |
---|
| 938 | IAfrimalApplicant): |
---|
[8012] | 939 | """An interface for both types of applicants. |
---|
| 940 | |
---|
[8928] | 941 | Attention: The ICustomPGApplicant field seetings will be overwritten |
---|
| 942 | by ICustomPGApplicant field settings. If a field is defined |
---|
[8727] | 943 | in both interfaces zope.schema validates only against the |
---|
[8928] | 944 | constraints in ICustomUGApplicant. This does not affect the forms |
---|
| 945 | since they are build on either ICustomUGApplicant or ICustomPGApplicant. |
---|
[8012] | 946 | """ |
---|
| 947 | |
---|
[8743] | 948 | def writeLogMessage(view, comment): |
---|
[8053] | 949 | """Adds an INFO message to the log file |
---|
| 950 | """ |
---|
| 951 | |
---|
| 952 | def createStudent(): |
---|
[8668] | 953 | """Create a student object from applicant data |
---|
[8053] | 954 | and copy applicant object. |
---|
| 955 | """ |
---|
| 956 | |
---|
[14212] | 957 | class ICustomUGApplicantEdit(ICustomUGApplicant): |
---|
[8727] | 958 | """An undergraduate applicant interface for edit forms. |
---|
[8012] | 959 | |
---|
| 960 | Here we can repeat the fields from base data and set the |
---|
| 961 | `required` and `readonly` attributes to True to further restrict |
---|
| 962 | the data access. Or we can allow only certain certificates to be |
---|
| 963 | selected by choosing the appropriate source. |
---|
| 964 | |
---|
| 965 | We cannot omit fields here. This has to be done in the |
---|
| 966 | respective form page. |
---|
| 967 | """ |
---|
| 968 | |
---|
[14212] | 969 | email = schema.ASCIILine( |
---|
| 970 | title = _(u'Email Address'), |
---|
| 971 | required = True, |
---|
| 972 | constraint=validate_email, |
---|
| 973 | ) |
---|
| 974 | date_of_birth = FormattedDate( |
---|
| 975 | title = _(u'Date of Birth'), |
---|
| 976 | required = True, |
---|
| 977 | show_year = True, |
---|
| 978 | ) |
---|
| 979 | |
---|
| 980 | ICustomUGApplicantEdit[ |
---|
| 981 | 'date_of_birth'].order = ICustomUGApplicant['date_of_birth'].order |
---|
| 982 | ICustomUGApplicantEdit[ |
---|
| 983 | 'email'].order = ICustomUGApplicant['email'].order |
---|
| 984 | |
---|
[9056] | 985 | class ICustomPGApplicantEdit(INigeriaPGApplicantEdit): |
---|
[7866] | 986 | """A postgraduate applicant interface for editing. |
---|
| 987 | |
---|
| 988 | Here we can repeat the fields from base data and set the |
---|
| 989 | `required` and `readonly` attributes to True to further restrict |
---|
| 990 | the data access. Or we can allow only certain certificates to be |
---|
| 991 | selected by choosing the appropriate source. |
---|
| 992 | |
---|
| 993 | We cannot omit fields here. This has to be done in the |
---|
| 994 | respective form page. |
---|
[8017] | 995 | """ |
---|
[8454] | 996 | |
---|
[14106] | 997 | referees = schema.List( |
---|
| 998 | title = _(u'Referees'), |
---|
| 999 | value_type = RefereeEntryField(), |
---|
| 1000 | required = False, |
---|
| 1001 | defaultFactory=list, |
---|
| 1002 | ) |
---|
[13814] | 1003 | |
---|
[14106] | 1004 | ICustomPGApplicantEdit[ |
---|
| 1005 | 'referees'].order = INigeriaPGApplicantEdit['emp2_reason'].order |
---|
| 1006 | |
---|
[8928] | 1007 | class ICustomApplicantOnlinePayment(INigeriaApplicantOnlinePayment): |
---|
[8247] | 1008 | """An applicant payment via payment gateways. |
---|
| 1009 | |
---|
| 1010 | """ |
---|
[8530] | 1011 | |
---|
[14153] | 1012 | class IPUTMEApplicantEdit(ICustomUGApplicant): |
---|
[8530] | 1013 | """An undergraduate applicant interface for editing. |
---|
| 1014 | |
---|
| 1015 | Here we can repeat the fields from base data and set the |
---|
| 1016 | `required` and `readonly` attributes to True to further restrict |
---|
| 1017 | the data access. Or we can allow only certain certificates to be |
---|
| 1018 | selected by choosing the appropriate source. |
---|
| 1019 | |
---|
| 1020 | We cannot omit fields here. This has to be done in the |
---|
| 1021 | respective form page. |
---|
| 1022 | """ |
---|
| 1023 | |
---|
[14153] | 1024 | email = schema.ASCIILine( |
---|
| 1025 | title = _(u'Email Address'), |
---|
| 1026 | required = True, |
---|
| 1027 | constraint=validate_email, |
---|
| 1028 | ) |
---|
| 1029 | date_of_birth = FormattedDate( |
---|
| 1030 | title = _(u'Date of Birth'), |
---|
| 1031 | required = True, |
---|
| 1032 | show_year = True, |
---|
| 1033 | ) |
---|
| 1034 | nationality = schema.Choice( |
---|
| 1035 | source = nats_vocab, |
---|
| 1036 | title = _(u'Nationality'), |
---|
| 1037 | required = True, |
---|
| 1038 | ) |
---|
| 1039 | |
---|
| 1040 | IPUTMEApplicantEdit[ |
---|
| 1041 | 'date_of_birth'].order = ICustomUGApplicant['date_of_birth'].order |
---|
| 1042 | IPUTMEApplicantEdit[ |
---|
| 1043 | 'email'].order = ICustomUGApplicant['email'].order |
---|
| 1044 | IPUTMEApplicantEdit[ |
---|
| 1045 | 'nationality'].order = ICustomUGApplicant['nationality'].order |
---|
| 1046 | |
---|
[9056] | 1047 | class ICustomApplicantUpdateByRegNo(INigeriaApplicantUpdateByRegNo): |
---|
[8582] | 1048 | """Representation of an applicant. |
---|
| 1049 | |
---|
| 1050 | Skip regular reg_number validation if reg_number is used for finding |
---|
| 1051 | the applicant object. |
---|
| 1052 | """ |
---|