[7853] | 1 | ## $Id: interfaces.py 15740 2019-11-02 06:33:14Z 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] | 21 | from zope import schema |
---|
[10298] | 22 | from zope.interface import Attribute, invariant, Invalid |
---|
[8051] | 23 | from waeup.kofa.applicants.interfaces import ( |
---|
[8053] | 24 | IApplicantBaseData, |
---|
[8051] | 25 | AppCatCertificateSource, CertificateSource) |
---|
| 26 | from waeup.kofa.schoolgrades import ResultEntryField |
---|
[8532] | 27 | from waeup.kofa.interfaces import ( |
---|
| 28 | SimpleKofaVocabulary, academic_sessions_vocab, validate_email) |
---|
[13544] | 29 | from waeup.kofa.schema import FormattedDate, TextLineChoice, PhoneNumber |
---|
| 30 | from waeup.kofa.interfaces import IKofaObject |
---|
| 31 | from waeup.kofa.students.vocabularies import ( |
---|
| 32 | nats_vocab, GenderSource, StudyLevelSource) |
---|
[10298] | 33 | from waeup.kofa.applicants.interfaces import ( |
---|
| 34 | contextual_reg_num_source, |
---|
| 35 | IApplicantBaseData) |
---|
[13544] | 36 | from waeup.kofa.university.vocabularies import StudyModeSource |
---|
[8931] | 37 | from kofacustom.nigeria.applicants.interfaces import ( |
---|
| 38 | LGASource, high_qual, high_grade, exam_types, |
---|
| 39 | INigeriaUGApplicant, INigeriaPGApplicant, |
---|
| 40 | INigeriaApplicantOnlinePayment, |
---|
[8980] | 41 | INigeriaUGApplicantEdit, INigeriaPGApplicantEdit, |
---|
| 42 | INigeriaApplicantUpdateByRegNo, |
---|
| 43 | IPUTMEApplicantEdit, |
---|
[8931] | 44 | ) |
---|
[8444] | 45 | from waeup.aaue.interfaces import MessageFactory as _ |
---|
| 46 | from waeup.aaue.payments.interfaces import ICustomOnlinePayment |
---|
[7853] | 47 | |
---|
[10924] | 48 | programme_types_vocab = SimpleKofaVocabulary( |
---|
[11542] | 49 | (_('Undergraduate Programme (100 level)'), 'regular'), |
---|
| 50 | (_('Direct Entry (200 level)'), 'direct'), |
---|
[10924] | 51 | (_('not applicable'), 'na'), |
---|
| 52 | ) |
---|
| 53 | |
---|
[15118] | 54 | certificate_types_vocab = SimpleKofaVocabulary( |
---|
| 55 | (_('Full-time Degree'), 'ft'), |
---|
| 56 | (_('Part-time Degree'), 'pt'), |
---|
| 57 | (_('Diploma'), 'dp'), |
---|
| 58 | (_('Masters Degree'), 'ma'), |
---|
| 59 | (_('Doctorate Degree'), 'phd'), |
---|
| 60 | ) |
---|
| 61 | |
---|
[15530] | 62 | document_types_vocab = SimpleKofaVocabulary( |
---|
| 63 | (_('Certificate'), 'certificate'), |
---|
| 64 | (_('Result'), 'result'), |
---|
| 65 | (_('Transcript'), 'transcript'), |
---|
| 66 | (_('Studentship'), 'studship'), |
---|
| 67 | ) |
---|
| 68 | |
---|
[15740] | 69 | request_types_vocab = SimpleKofaVocabulary( |
---|
| 70 | (_('Scanned Result'), 'result'), |
---|
| 71 | (_('Scanned Certificate'), 'certificate'), |
---|
| 72 | (_('Scanned Transcript'), 'transcript'), |
---|
| 73 | (_('Attestation'), 'attest'), |
---|
| 74 | (_('Proficiency in English Language'), 'english'), |
---|
| 75 | ) |
---|
| 76 | |
---|
[10298] | 77 | class ICustomUGApplicant(IApplicantBaseData): |
---|
[8012] | 78 | """An undergraduate applicant. |
---|
| 79 | |
---|
[8521] | 80 | This interface defines the least common multiple of all fields |
---|
| 81 | in ug application forms. In customized forms, fields can be excluded by |
---|
| 82 | adding them to the UG_OMIT* tuples. |
---|
[8012] | 83 | """ |
---|
| 84 | |
---|
[13977] | 85 | #programme_type = schema.Choice( |
---|
| 86 | # title = _(u'Programme Type'), |
---|
| 87 | # vocabulary = programme_types_vocab, |
---|
| 88 | # required = False, |
---|
| 89 | # ) |
---|
[10924] | 90 | |
---|
[10298] | 91 | nationality = schema.Choice( |
---|
| 92 | source = nats_vocab, |
---|
| 93 | title = _(u'Nationality'), |
---|
| 94 | required = True, |
---|
| 95 | ) |
---|
[14829] | 96 | |
---|
[10298] | 97 | lga = schema.Choice( |
---|
| 98 | source = LGASource(), |
---|
| 99 | title = _(u'State/LGA (Nigerians only)'), |
---|
| 100 | required = False, |
---|
| 101 | ) |
---|
[14829] | 102 | |
---|
[10298] | 103 | perm_address = schema.Text( |
---|
| 104 | title = _(u'Permanent Address'), |
---|
| 105 | required = False, |
---|
| 106 | ) |
---|
[14829] | 107 | |
---|
[10308] | 108 | home_town = schema.TextLine( |
---|
[10306] | 109 | title = _(u'Home Town'), |
---|
| 110 | required = False, |
---|
| 111 | ) |
---|
[14829] | 112 | |
---|
[13977] | 113 | #jamb_reg_number = schema.TextLine( |
---|
| 114 | # title = _(u'JAMB Registration Number'), |
---|
| 115 | # required = False, |
---|
| 116 | # ) |
---|
[14829] | 117 | |
---|
[10311] | 118 | jamb_score = schema.Int( |
---|
| 119 | title = _(u'Total JAMB Score'), |
---|
| 120 | required = False, |
---|
| 121 | ) |
---|
[14829] | 122 | |
---|
[13977] | 123 | jamb_subjects = schema.Text( |
---|
| 124 | title = _(u'JAMB Subjects and Scores'), |
---|
| 125 | required = False, |
---|
| 126 | ) |
---|
[14829] | 127 | |
---|
[10298] | 128 | course1 = schema.Choice( |
---|
| 129 | title = _(u'1st Choice Course of Study'), |
---|
| 130 | source = AppCatCertificateSource(), |
---|
[14468] | 131 | required = False, |
---|
[10298] | 132 | ) |
---|
[14829] | 133 | |
---|
[10298] | 134 | course2 = schema.Choice( |
---|
| 135 | title = _(u'2nd Choice Course of Study'), |
---|
| 136 | source = AppCatCertificateSource(), |
---|
| 137 | required = False, |
---|
| 138 | ) |
---|
[14829] | 139 | |
---|
[15455] | 140 | course3 = schema.Choice( |
---|
| 141 | title = _(u'3rd Choice Course of Study'), |
---|
| 142 | source = AppCatCertificateSource(), |
---|
| 143 | required = False, |
---|
| 144 | ) |
---|
| 145 | |
---|
[10298] | 146 | fst_sit_fname = schema.TextLine( |
---|
| 147 | title = _(u'Full Name'), |
---|
| 148 | required = False, |
---|
| 149 | readonly = False, |
---|
| 150 | ) |
---|
[14829] | 151 | |
---|
[10298] | 152 | fst_sit_no = schema.TextLine( |
---|
| 153 | title = _(u'Exam Number'), |
---|
| 154 | required = False, |
---|
| 155 | readonly = False, |
---|
| 156 | ) |
---|
[14829] | 157 | |
---|
| 158 | fst_sit_sc_pin = schema.TextLine( |
---|
| 159 | title = _(u'Scratch Card Pin'), |
---|
| 160 | required = False, |
---|
| 161 | readonly = False, |
---|
| 162 | ) |
---|
| 163 | |
---|
| 164 | fst_sit_sc_serial_number = schema.TextLine( |
---|
| 165 | title = _(u'Scratch Card Serial Number'), |
---|
| 166 | required = False, |
---|
| 167 | readonly = False, |
---|
| 168 | ) |
---|
| 169 | |
---|
[10298] | 170 | fst_sit_date = FormattedDate( |
---|
| 171 | title = _(u'Exam Date'), |
---|
| 172 | required = False, |
---|
| 173 | readonly = False, |
---|
| 174 | show_year = True, |
---|
| 175 | ) |
---|
[14829] | 176 | |
---|
[10298] | 177 | fst_sit_type = schema.Choice( |
---|
| 178 | title = _(u'Exam Type'), |
---|
| 179 | required = False, |
---|
| 180 | readonly = False, |
---|
| 181 | vocabulary = exam_types, |
---|
| 182 | ) |
---|
[14829] | 183 | |
---|
[10298] | 184 | fst_sit_results = schema.List( |
---|
| 185 | title = _(u'Exam Results'), |
---|
| 186 | value_type = ResultEntryField(), |
---|
| 187 | required = False, |
---|
| 188 | readonly = False, |
---|
[14017] | 189 | defaultFactory=list, |
---|
[10298] | 190 | ) |
---|
[14829] | 191 | |
---|
[10298] | 192 | scd_sit_fname = schema.TextLine( |
---|
| 193 | title = _(u'Full Name'), |
---|
| 194 | required = False, |
---|
| 195 | readonly = False, |
---|
| 196 | ) |
---|
[14829] | 197 | |
---|
[10298] | 198 | scd_sit_no = schema.TextLine( |
---|
| 199 | title = _(u'Exam Number'), |
---|
| 200 | required = False, |
---|
| 201 | readonly = False, |
---|
| 202 | ) |
---|
[14829] | 203 | |
---|
| 204 | scd_sit_sc_pin = schema.TextLine( |
---|
| 205 | title = _(u'Scratch Card Pin'), |
---|
| 206 | required = False, |
---|
| 207 | readonly = False, |
---|
| 208 | ) |
---|
| 209 | |
---|
| 210 | scd_sit_sc_serial_number = schema.TextLine( |
---|
| 211 | title = _(u'Scratch Card Serial Number'), |
---|
| 212 | required = False, |
---|
| 213 | readonly = False, |
---|
| 214 | ) |
---|
| 215 | |
---|
[10298] | 216 | scd_sit_date = FormattedDate( |
---|
| 217 | title = _(u'Exam Date'), |
---|
| 218 | required = False, |
---|
| 219 | readonly = False, |
---|
| 220 | show_year = True, |
---|
| 221 | ) |
---|
[14829] | 222 | |
---|
[10298] | 223 | scd_sit_type = schema.Choice( |
---|
| 224 | title = _(u'Exam Type'), |
---|
| 225 | required = False, |
---|
| 226 | readonly = False, |
---|
| 227 | vocabulary = exam_types, |
---|
| 228 | ) |
---|
[14829] | 229 | |
---|
[10298] | 230 | scd_sit_results = schema.List( |
---|
| 231 | title = _(u'Exam Results'), |
---|
| 232 | value_type = ResultEntryField(), |
---|
| 233 | required = False, |
---|
| 234 | readonly = False, |
---|
[14017] | 235 | defaultFactory=list, |
---|
[10298] | 236 | ) |
---|
[14829] | 237 | |
---|
[10298] | 238 | alr_fname = schema.TextLine( |
---|
| 239 | title = _(u'Full Name'), |
---|
| 240 | required = False, |
---|
| 241 | readonly = False, |
---|
| 242 | ) |
---|
[14829] | 243 | |
---|
[10298] | 244 | alr_no = schema.TextLine( |
---|
| 245 | title = _(u'Exam Number'), |
---|
| 246 | required = False, |
---|
| 247 | readonly = False, |
---|
| 248 | ) |
---|
[14829] | 249 | |
---|
[10298] | 250 | alr_date = FormattedDate( |
---|
| 251 | title = _(u'Exam Date'), |
---|
| 252 | required = False, |
---|
| 253 | readonly = False, |
---|
| 254 | show_year = True, |
---|
| 255 | ) |
---|
[14829] | 256 | |
---|
[10298] | 257 | alr_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 | |
---|
[10998] | 265 | hq_type = schema.Choice( |
---|
| 266 | title = _(u'Qualification Obtained'), |
---|
| 267 | required = False, |
---|
| 268 | readonly = False, |
---|
| 269 | vocabulary = high_qual, |
---|
| 270 | ) |
---|
| 271 | |
---|
| 272 | hq_fname = schema.TextLine( |
---|
| 273 | title = _(u'Full Name'), |
---|
| 274 | required = False, |
---|
| 275 | readonly = False, |
---|
| 276 | ) |
---|
| 277 | |
---|
| 278 | hq_matric_no = schema.TextLine( |
---|
| 279 | title = _(u'Former Matric Number'), |
---|
| 280 | required = False, |
---|
| 281 | readonly = False, |
---|
| 282 | ) |
---|
| 283 | |
---|
| 284 | hq_degree = schema.Choice( |
---|
| 285 | title = _(u'Class of Degree'), |
---|
| 286 | required = False, |
---|
| 287 | readonly = False, |
---|
| 288 | vocabulary = high_grade, |
---|
| 289 | ) |
---|
| 290 | |
---|
| 291 | hq_school = schema.TextLine( |
---|
| 292 | title = _(u'Institution Attended'), |
---|
| 293 | required = False, |
---|
| 294 | readonly = False, |
---|
| 295 | ) |
---|
| 296 | |
---|
| 297 | hq_session = schema.TextLine( |
---|
| 298 | title = _(u'Years Attended'), |
---|
| 299 | required = False, |
---|
| 300 | readonly = False, |
---|
| 301 | ) |
---|
| 302 | |
---|
| 303 | hq_disc = schema.TextLine( |
---|
| 304 | title = _(u'Discipline'), |
---|
| 305 | required = False, |
---|
| 306 | readonly = False, |
---|
| 307 | ) |
---|
[13545] | 308 | |
---|
| 309 | hq_type2 = schema.Choice( |
---|
| 310 | title = _(u'Qualification Obtained'), |
---|
| 311 | required = False, |
---|
| 312 | readonly = False, |
---|
| 313 | vocabulary = high_qual, |
---|
| 314 | ) |
---|
| 315 | |
---|
| 316 | hq_fname2 = schema.TextLine( |
---|
| 317 | title = _(u'Full Name'), |
---|
| 318 | required = False, |
---|
| 319 | readonly = False, |
---|
| 320 | ) |
---|
| 321 | |
---|
| 322 | hq_matric_no2 = schema.TextLine( |
---|
| 323 | title = _(u'Former Matric Number'), |
---|
| 324 | required = False, |
---|
| 325 | readonly = False, |
---|
| 326 | ) |
---|
| 327 | |
---|
| 328 | hq_degree2 = schema.Choice( |
---|
| 329 | title = _(u'Class of Degree'), |
---|
| 330 | required = False, |
---|
| 331 | readonly = False, |
---|
| 332 | vocabulary = high_grade, |
---|
| 333 | ) |
---|
| 334 | |
---|
| 335 | hq_school2 = schema.TextLine( |
---|
| 336 | title = _(u'Institution Attended'), |
---|
| 337 | required = False, |
---|
| 338 | readonly = False, |
---|
| 339 | ) |
---|
| 340 | |
---|
| 341 | hq_session2 = schema.TextLine( |
---|
| 342 | title = _(u'Years Attended'), |
---|
| 343 | required = False, |
---|
| 344 | readonly = False, |
---|
| 345 | ) |
---|
| 346 | |
---|
| 347 | hq_disc2 = schema.TextLine( |
---|
| 348 | title = _(u'Discipline'), |
---|
| 349 | required = False, |
---|
| 350 | readonly = False, |
---|
| 351 | ) |
---|
| 352 | |
---|
| 353 | hq_type3 = schema.Choice( |
---|
| 354 | title = _(u'Qualification Obtained'), |
---|
| 355 | required = False, |
---|
| 356 | readonly = False, |
---|
| 357 | vocabulary = high_qual, |
---|
| 358 | ) |
---|
| 359 | |
---|
| 360 | hq_fname3 = schema.TextLine( |
---|
| 361 | title = _(u'Full Name'), |
---|
| 362 | required = False, |
---|
| 363 | readonly = False, |
---|
| 364 | ) |
---|
| 365 | |
---|
| 366 | hq_matric_no3 = schema.TextLine( |
---|
| 367 | title = _(u'Former Matric Number'), |
---|
| 368 | required = False, |
---|
| 369 | readonly = False, |
---|
| 370 | ) |
---|
| 371 | |
---|
| 372 | hq_degree3 = schema.Choice( |
---|
| 373 | title = _(u'Class of Degree'), |
---|
| 374 | required = False, |
---|
| 375 | readonly = False, |
---|
| 376 | vocabulary = high_grade, |
---|
| 377 | ) |
---|
| 378 | |
---|
| 379 | hq_school3 = schema.TextLine( |
---|
| 380 | title = _(u'Institution Attended'), |
---|
| 381 | required = False, |
---|
| 382 | readonly = False, |
---|
| 383 | ) |
---|
| 384 | |
---|
| 385 | hq_session3 = schema.TextLine( |
---|
| 386 | title = _(u'Years Attended'), |
---|
| 387 | required = False, |
---|
| 388 | readonly = False, |
---|
| 389 | ) |
---|
| 390 | |
---|
| 391 | hq_disc3 = schema.TextLine( |
---|
| 392 | title = _(u'Discipline'), |
---|
| 393 | required = False, |
---|
| 394 | readonly = False, |
---|
| 395 | ) |
---|
[13679] | 396 | |
---|
| 397 | nysc_year = schema.Int( |
---|
| 398 | title = _(u'Nysc Year'), |
---|
| 399 | required = False, |
---|
| 400 | readonly = False, |
---|
| 401 | ) |
---|
| 402 | |
---|
| 403 | nysc_location = schema.TextLine( |
---|
| 404 | title = _(u'Nysc Location'), |
---|
| 405 | required = False, |
---|
| 406 | ) |
---|
| 407 | |
---|
| 408 | nysc_lga = schema.Choice( |
---|
| 409 | source = LGASource(), |
---|
| 410 | title = _(u'Nysc LGA'), |
---|
| 411 | required = False, |
---|
| 412 | ) |
---|
| 413 | |
---|
| 414 | employer = schema.TextLine( |
---|
| 415 | title = _(u'Employer'), |
---|
| 416 | required = False, |
---|
| 417 | readonly = False, |
---|
| 418 | ) |
---|
| 419 | |
---|
| 420 | emp_position = schema.TextLine( |
---|
| 421 | title = _(u'Employer Position'), |
---|
| 422 | required = False, |
---|
| 423 | readonly = False, |
---|
| 424 | ) |
---|
| 425 | |
---|
| 426 | emp_start = FormattedDate( |
---|
| 427 | title = _(u'Start Date'), |
---|
| 428 | required = False, |
---|
| 429 | readonly = False, |
---|
| 430 | show_year = True, |
---|
| 431 | ) |
---|
| 432 | |
---|
| 433 | emp_end = FormattedDate( |
---|
| 434 | title = _(u'End Date'), |
---|
| 435 | required = False, |
---|
| 436 | readonly = False, |
---|
| 437 | show_year = True, |
---|
| 438 | ) |
---|
| 439 | |
---|
| 440 | emp_reason = schema.TextLine( |
---|
| 441 | title = _(u'Reason for Leaving'), |
---|
| 442 | required = False, |
---|
| 443 | readonly = False, |
---|
| 444 | ) |
---|
| 445 | |
---|
| 446 | employer2 = schema.TextLine( |
---|
| 447 | title = _(u'2nd Employer'), |
---|
| 448 | required = False, |
---|
| 449 | readonly = False, |
---|
| 450 | ) |
---|
| 451 | |
---|
| 452 | emp2_position = schema.TextLine( |
---|
| 453 | title = _(u'2nd Employer Position'), |
---|
| 454 | required = False, |
---|
| 455 | readonly = False, |
---|
| 456 | ) |
---|
| 457 | |
---|
| 458 | emp2_start = FormattedDate( |
---|
| 459 | title = _(u'Start Date'), |
---|
| 460 | required = False, |
---|
| 461 | readonly = False, |
---|
| 462 | show_year = True, |
---|
| 463 | ) |
---|
| 464 | |
---|
| 465 | emp2_end = FormattedDate( |
---|
| 466 | title = _(u'End Date'), |
---|
| 467 | required = False, |
---|
| 468 | readonly = False, |
---|
| 469 | show_year = True, |
---|
| 470 | ) |
---|
| 471 | |
---|
| 472 | emp2_reason = schema.TextLine( |
---|
| 473 | title = _(u'Reason for Leaving'), |
---|
| 474 | required = False, |
---|
| 475 | readonly = False, |
---|
| 476 | ) |
---|
| 477 | |
---|
| 478 | former_matric = schema.TextLine( |
---|
| 479 | title = _(u'If yes, matric number'), |
---|
| 480 | required = False, |
---|
| 481 | readonly = False, |
---|
| 482 | ) |
---|
| 483 | |
---|
[10298] | 484 | notice = schema.Text( |
---|
| 485 | title = _(u'Notice'), |
---|
| 486 | required = False, |
---|
| 487 | ) |
---|
[13977] | 488 | |
---|
| 489 | |
---|
| 490 | master_sheet_number = schema.TextLine( |
---|
| 491 | title = _(u'Master Sheet Number'), |
---|
| 492 | required = False, |
---|
| 493 | readonly = False, |
---|
| 494 | ) |
---|
| 495 | |
---|
[13996] | 496 | screening_venue = schema.TextLine( |
---|
| 497 | title = _(u'Screening Venue'), |
---|
| 498 | required = False, |
---|
| 499 | ) |
---|
[14666] | 500 | |
---|
[13996] | 501 | screening_date = schema.TextLine( |
---|
| 502 | title = _(u'Screening Date'), |
---|
| 503 | required = False, |
---|
| 504 | ) |
---|
[14666] | 505 | |
---|
[13996] | 506 | screening_score = schema.Int( |
---|
[14028] | 507 | title = _(u'Screening Points'), |
---|
[13996] | 508 | required = False, |
---|
| 509 | ) |
---|
[14666] | 510 | |
---|
[10298] | 511 | student_id = schema.TextLine( |
---|
| 512 | title = _(u'Student Id'), |
---|
| 513 | required = False, |
---|
| 514 | readonly = False, |
---|
| 515 | ) |
---|
[14666] | 516 | |
---|
[10298] | 517 | course_admitted = schema.Choice( |
---|
| 518 | title = _(u'Admitted Course of Study'), |
---|
| 519 | source = CertificateSource(), |
---|
| 520 | required = False, |
---|
| 521 | ) |
---|
[14666] | 522 | |
---|
[10298] | 523 | locked = schema.Bool( |
---|
| 524 | title = _(u'Form locked'), |
---|
| 525 | default = False, |
---|
| 526 | ) |
---|
| 527 | |
---|
| 528 | @invariant |
---|
[15455] | 529 | def course_choice(applicant): |
---|
[10298] | 530 | if applicant.course1 == applicant.course2: |
---|
| 531 | raise Invalid(_("2nd choice course must differ from 1st choice course.")) |
---|
[15455] | 532 | if applicant.course1 == applicant.course3: |
---|
| 533 | raise Invalid(_("3rd choice course must differ from 1st choice course.")) |
---|
| 534 | if applicant.course2 == applicant.course3: |
---|
| 535 | raise Invalid(_("3rd choice course must differ from 2nd choice course.")) |
---|
[10298] | 536 | |
---|
[13977] | 537 | #ICustomUGApplicant['programme_type'].order = IApplicantBaseData[ |
---|
| 538 | # 'reg_number'].order |
---|
[10924] | 539 | |
---|
[8931] | 540 | class ICustomPGApplicant(INigeriaPGApplicant): |
---|
[7853] | 541 | """A postgraduate applicant. |
---|
| 542 | |
---|
[8521] | 543 | This interface defines the least common multiple of all fields |
---|
| 544 | in pg application forms. In customized forms, fields can be excluded by |
---|
| 545 | adding them to the PG_OMIT* tuples. |
---|
[7866] | 546 | """ |
---|
| 547 | |
---|
[13544] | 548 | class ITranscriptApplicant(IKofaObject): |
---|
| 549 | """A transcript applicant. |
---|
| 550 | """ |
---|
[8012] | 551 | |
---|
[13544] | 552 | suspended = schema.Bool( |
---|
| 553 | title = _(u'Account suspended'), |
---|
| 554 | default = False, |
---|
| 555 | required = False, |
---|
| 556 | ) |
---|
| 557 | |
---|
| 558 | locked = schema.Bool( |
---|
| 559 | title = _(u'Form locked'), |
---|
| 560 | default = False, |
---|
| 561 | required = False, |
---|
| 562 | ) |
---|
| 563 | |
---|
| 564 | applicant_id = schema.TextLine( |
---|
| 565 | title = _(u'Applicant Id'), |
---|
| 566 | required = False, |
---|
| 567 | readonly = False, |
---|
| 568 | ) |
---|
| 569 | |
---|
[14472] | 570 | reg_number = TextLineChoice( |
---|
[14486] | 571 | title = _(u'Kofa Registration Number'), |
---|
[14472] | 572 | readonly = False, |
---|
| 573 | required = True, |
---|
| 574 | source = contextual_reg_num_source, |
---|
| 575 | ) |
---|
| 576 | |
---|
[13544] | 577 | firstname = schema.TextLine( |
---|
| 578 | title = _(u'First Name'), |
---|
| 579 | required = True, |
---|
| 580 | ) |
---|
| 581 | |
---|
| 582 | middlename = schema.TextLine( |
---|
| 583 | title = _(u'Middle Name'), |
---|
| 584 | required = False, |
---|
| 585 | ) |
---|
| 586 | |
---|
| 587 | lastname = schema.TextLine( |
---|
| 588 | title = _(u'Last Name (Surname)'), |
---|
| 589 | required = True, |
---|
| 590 | ) |
---|
| 591 | |
---|
[14472] | 592 | matric_number = schema.TextLine( |
---|
| 593 | title = _(u'Matriculation Number'), |
---|
[13544] | 594 | readonly = False, |
---|
[14486] | 595 | required = True, |
---|
[13544] | 596 | ) |
---|
| 597 | |
---|
| 598 | date_of_birth = FormattedDate( |
---|
| 599 | title = _(u'Date of Birth'), |
---|
[15275] | 600 | required = False, |
---|
[13544] | 601 | #date_format = u'%d/%m/%Y', # Use grok-instance-wide default |
---|
| 602 | show_year = True, |
---|
| 603 | ) |
---|
| 604 | |
---|
| 605 | place_of_birth = schema.TextLine( |
---|
| 606 | title = _(u'Place of Birth'), |
---|
| 607 | readonly = False, |
---|
[15275] | 608 | required = False, |
---|
[13544] | 609 | ) |
---|
| 610 | |
---|
| 611 | nationality = schema.Choice( |
---|
| 612 | vocabulary = nats_vocab, |
---|
| 613 | title = _(u'Nationality'), |
---|
[15275] | 614 | required = False, |
---|
[13544] | 615 | ) |
---|
| 616 | |
---|
| 617 | email = schema.ASCIILine( |
---|
| 618 | title = _(u'Email Address'), |
---|
| 619 | required = True, |
---|
| 620 | constraint=validate_email, |
---|
| 621 | ) |
---|
| 622 | |
---|
| 623 | phone = PhoneNumber( |
---|
| 624 | title = _(u'Phone'), |
---|
| 625 | description = u'', |
---|
[15275] | 626 | required = False, |
---|
[13544] | 627 | ) |
---|
| 628 | |
---|
| 629 | perm_address = schema.Text( |
---|
| 630 | title = _(u'Current Local Address'), |
---|
[15275] | 631 | required = False, |
---|
[13544] | 632 | readonly = False, |
---|
| 633 | ) |
---|
| 634 | |
---|
| 635 | dispatch_address = schema.Text( |
---|
[14306] | 636 | title = _(u'Dispatch Addresses'), |
---|
| 637 | description = u'Addresses to which transcript should be posted.', |
---|
[15275] | 638 | required = False, |
---|
[13544] | 639 | readonly = False, |
---|
| 640 | ) |
---|
| 641 | |
---|
| 642 | entry_mode = schema.Choice( |
---|
| 643 | title = _(u'Entry Mode'), |
---|
| 644 | source = StudyModeSource(), |
---|
[15275] | 645 | required = False, |
---|
[13544] | 646 | readonly = False, |
---|
| 647 | ) |
---|
| 648 | |
---|
| 649 | entry_session = schema.Choice( |
---|
| 650 | title = _(u'Entry Session'), |
---|
| 651 | source = academic_sessions_vocab, |
---|
[15275] | 652 | required = False, |
---|
[13544] | 653 | readonly = False, |
---|
| 654 | ) |
---|
| 655 | |
---|
| 656 | end_session = schema.Choice( |
---|
| 657 | title = _(u'End Session'), |
---|
| 658 | source = academic_sessions_vocab, |
---|
[15275] | 659 | required = False, |
---|
[13544] | 660 | readonly = False, |
---|
| 661 | ) |
---|
| 662 | |
---|
| 663 | course_studied = schema.Choice( |
---|
| 664 | title = _(u'Course of Study / Degree'), |
---|
| 665 | source = CertificateSource(), |
---|
[15275] | 666 | required = False, |
---|
[13544] | 667 | readonly = False, |
---|
| 668 | ) |
---|
| 669 | |
---|
| 670 | purpose = schema.TextLine( |
---|
| 671 | title = _(u'Purpose of this Application'), |
---|
| 672 | readonly = False, |
---|
| 673 | required = False, |
---|
| 674 | ) |
---|
| 675 | |
---|
| 676 | course_changed = schema.Choice( |
---|
| 677 | title = _(u'Change of Study Course'), |
---|
| 678 | description = u'If yes, select previous course of study.', |
---|
| 679 | source = CertificateSource(), |
---|
| 680 | readonly = False, |
---|
| 681 | required = False, |
---|
| 682 | ) |
---|
| 683 | |
---|
| 684 | change_level = schema.Choice( |
---|
| 685 | title = _(u'Change Level'), |
---|
| 686 | description = u'If yes, select level at which you changed course of study.', |
---|
| 687 | source = StudyLevelSource(), |
---|
| 688 | required = False, |
---|
| 689 | readonly = False, |
---|
| 690 | ) |
---|
| 691 | |
---|
[14306] | 692 | no_copies = schema.Choice( |
---|
| 693 | title = _(u'Number of Copies'), |
---|
| 694 | description = u'Must correspond with the number of dispatch addresses above.', |
---|
| 695 | values=[1, 2, 3, 4], |
---|
| 696 | required = False, |
---|
| 697 | readonly = False, |
---|
| 698 | default = 1, |
---|
| 699 | ) |
---|
| 700 | |
---|
[14304] | 701 | class ICertificateRequest(IKofaObject): |
---|
| 702 | """A transcript applicant. |
---|
| 703 | """ |
---|
[13544] | 704 | |
---|
[14304] | 705 | suspended = schema.Bool( |
---|
| 706 | title = _(u'Account suspended'), |
---|
| 707 | default = False, |
---|
| 708 | required = False, |
---|
| 709 | ) |
---|
| 710 | |
---|
| 711 | locked = schema.Bool( |
---|
| 712 | title = _(u'Form locked'), |
---|
| 713 | default = False, |
---|
| 714 | required = False, |
---|
| 715 | ) |
---|
| 716 | |
---|
| 717 | applicant_id = schema.TextLine( |
---|
| 718 | title = _(u'Applicant Id'), |
---|
| 719 | required = False, |
---|
| 720 | readonly = False, |
---|
| 721 | ) |
---|
| 722 | |
---|
[14472] | 723 | reg_number = TextLineChoice( |
---|
[14486] | 724 | title = _(u'Kofa Registration Number'), |
---|
[14472] | 725 | readonly = False, |
---|
| 726 | required = True, |
---|
| 727 | source = contextual_reg_num_source, |
---|
| 728 | ) |
---|
| 729 | |
---|
[14304] | 730 | firstname = schema.TextLine( |
---|
| 731 | title = _(u'First Name'), |
---|
| 732 | required = True, |
---|
| 733 | ) |
---|
| 734 | |
---|
| 735 | middlename = schema.TextLine( |
---|
| 736 | title = _(u'Middle Name'), |
---|
| 737 | required = False, |
---|
| 738 | ) |
---|
| 739 | |
---|
| 740 | lastname = schema.TextLine( |
---|
| 741 | title = _(u'Last Name (Surname)'), |
---|
| 742 | required = True, |
---|
| 743 | ) |
---|
| 744 | |
---|
[14472] | 745 | matric_number = schema.TextLine( |
---|
| 746 | title = _(u'Matriculation Number'), |
---|
[14304] | 747 | readonly = False, |
---|
[14486] | 748 | required = True, |
---|
[14304] | 749 | ) |
---|
| 750 | |
---|
| 751 | date_of_birth = FormattedDate( |
---|
| 752 | title = _(u'Date of Birth'), |
---|
[15275] | 753 | required = False, |
---|
[14304] | 754 | #date_format = u'%d/%m/%Y', # Use grok-instance-wide default |
---|
| 755 | show_year = True, |
---|
| 756 | ) |
---|
| 757 | |
---|
| 758 | place_of_birth = schema.TextLine( |
---|
| 759 | title = _(u'Place of Birth'), |
---|
| 760 | readonly = False, |
---|
[15275] | 761 | required = False, |
---|
[14304] | 762 | ) |
---|
| 763 | |
---|
| 764 | nationality = schema.Choice( |
---|
| 765 | vocabulary = nats_vocab, |
---|
| 766 | title = _(u'Nationality'), |
---|
[15275] | 767 | required = False, |
---|
[14304] | 768 | ) |
---|
| 769 | |
---|
| 770 | email = schema.ASCIILine( |
---|
| 771 | title = _(u'Email Address'), |
---|
| 772 | required = True, |
---|
| 773 | constraint=validate_email, |
---|
| 774 | ) |
---|
| 775 | |
---|
| 776 | phone = PhoneNumber( |
---|
| 777 | title = _(u'Phone'), |
---|
| 778 | description = u'', |
---|
[15275] | 779 | required = False, |
---|
[14304] | 780 | ) |
---|
| 781 | |
---|
| 782 | entry_session = schema.Choice( |
---|
| 783 | title = _(u'Entry Session'), |
---|
| 784 | source = academic_sessions_vocab, |
---|
[15275] | 785 | required = False, |
---|
[14304] | 786 | readonly = False, |
---|
| 787 | ) |
---|
| 788 | |
---|
| 789 | end_session = schema.Choice( |
---|
| 790 | title = _(u'End Session'), |
---|
| 791 | source = academic_sessions_vocab, |
---|
[15275] | 792 | required = False, |
---|
[14304] | 793 | readonly = False, |
---|
| 794 | ) |
---|
| 795 | |
---|
| 796 | course_studied = schema.Choice( |
---|
| 797 | title = _(u'Course of Study / Degree'), |
---|
| 798 | source = CertificateSource(), |
---|
[14486] | 799 | required = True, |
---|
[14304] | 800 | readonly = False, |
---|
| 801 | ) |
---|
| 802 | |
---|
[15118] | 803 | certificate_type = schema.Choice( |
---|
| 804 | title = _(u'Certificate Type'), |
---|
| 805 | vocabulary = certificate_types_vocab, |
---|
[15275] | 806 | required = False, |
---|
[15118] | 807 | ) |
---|
[14306] | 808 | |
---|
[15118] | 809 | |
---|
[15530] | 810 | class IVerificationRequest(IKofaObject): |
---|
| 811 | """A applicant asking for verification. |
---|
| 812 | """ |
---|
| 813 | |
---|
| 814 | suspended = schema.Bool( |
---|
| 815 | title = _(u'Account suspended'), |
---|
| 816 | default = False, |
---|
| 817 | required = False, |
---|
| 818 | ) |
---|
| 819 | |
---|
| 820 | locked = schema.Bool( |
---|
| 821 | title = _(u'Form locked'), |
---|
| 822 | default = False, |
---|
| 823 | required = False, |
---|
| 824 | ) |
---|
| 825 | |
---|
| 826 | applicant_id = schema.TextLine( |
---|
| 827 | title = _(u'Applicant Id'), |
---|
| 828 | required = False, |
---|
| 829 | readonly = False, |
---|
| 830 | ) |
---|
| 831 | |
---|
| 832 | #reg_number = TextLineChoice( |
---|
| 833 | # title = _(u'Kofa Registration Number'), |
---|
| 834 | # readonly = False, |
---|
| 835 | # required = True, |
---|
| 836 | # source = contextual_reg_num_source, |
---|
| 837 | # ) |
---|
| 838 | |
---|
| 839 | firstname = schema.TextLine( |
---|
| 840 | title = _(u'First Name'), |
---|
| 841 | required = True, |
---|
| 842 | ) |
---|
| 843 | |
---|
| 844 | middlename = schema.TextLine( |
---|
| 845 | title = _(u'Middle Name'), |
---|
| 846 | required = False, |
---|
| 847 | ) |
---|
| 848 | |
---|
| 849 | lastname = schema.TextLine( |
---|
| 850 | title = _(u'Last Name (Surname)'), |
---|
| 851 | required = True, |
---|
| 852 | ) |
---|
| 853 | |
---|
| 854 | email = schema.ASCIILine( |
---|
| 855 | title = _(u'Email Address'), |
---|
| 856 | required = True, |
---|
| 857 | constraint=validate_email, |
---|
| 858 | ) |
---|
| 859 | |
---|
| 860 | matric_number = schema.TextLine( |
---|
| 861 | title = _(u'Verification Body Reference Number'), |
---|
| 862 | readonly = False, |
---|
| 863 | required = True, |
---|
| 864 | ) |
---|
| 865 | |
---|
| 866 | body_address = schema.Text( |
---|
| 867 | title = _(u'Verification Body Address'), |
---|
| 868 | required = True, |
---|
| 869 | ) |
---|
| 870 | |
---|
| 871 | document_type = schema.Choice( |
---|
| 872 | title = _(u'Document Type'), |
---|
| 873 | vocabulary = document_types_vocab, |
---|
| 874 | required = True, |
---|
| 875 | ) |
---|
| 876 | |
---|
[15531] | 877 | class ISendByEmailRequest(IKofaObject): |
---|
| 878 | """A applicant asking for sending an email. |
---|
| 879 | """ |
---|
[15530] | 880 | |
---|
[15531] | 881 | suspended = schema.Bool( |
---|
| 882 | title = _(u'Account suspended'), |
---|
| 883 | default = False, |
---|
| 884 | required = False, |
---|
| 885 | ) |
---|
| 886 | |
---|
| 887 | locked = schema.Bool( |
---|
| 888 | title = _(u'Form locked'), |
---|
| 889 | default = False, |
---|
| 890 | required = False, |
---|
| 891 | ) |
---|
| 892 | |
---|
| 893 | applicant_id = schema.TextLine( |
---|
| 894 | title = _(u'Applicant Id'), |
---|
| 895 | required = False, |
---|
| 896 | readonly = False, |
---|
| 897 | ) |
---|
| 898 | |
---|
| 899 | firstname = schema.TextLine( |
---|
| 900 | title = _(u'First Name'), |
---|
| 901 | required = True, |
---|
| 902 | ) |
---|
| 903 | |
---|
| 904 | middlename = schema.TextLine( |
---|
| 905 | title = _(u'Middle Name'), |
---|
| 906 | required = False, |
---|
| 907 | ) |
---|
| 908 | |
---|
| 909 | lastname = schema.TextLine( |
---|
| 910 | title = _(u'Last Name (Surname)'), |
---|
| 911 | required = True, |
---|
| 912 | ) |
---|
| 913 | |
---|
| 914 | email = schema.ASCIILine( |
---|
| 915 | title = _(u"Applicant's Email Address"), |
---|
| 916 | required = True, |
---|
| 917 | constraint=validate_email, |
---|
| 918 | ) |
---|
| 919 | |
---|
| 920 | body_address = schema.Text( |
---|
| 921 | title = _(u'Address of Requesting Organization'), |
---|
| 922 | required = True, |
---|
| 923 | ) |
---|
| 924 | |
---|
| 925 | body_email = schema.ASCIILine( |
---|
| 926 | title = _(u"Email Address of Requesting Organization"), |
---|
| 927 | required = True, |
---|
| 928 | constraint=validate_email, |
---|
| 929 | ) |
---|
| 930 | |
---|
[15740] | 931 | request_type = schema.Choice( |
---|
| 932 | title = _(u'Request Type'), |
---|
| 933 | vocabulary = request_types_vocab, |
---|
| 934 | required = True, |
---|
| 935 | ) |
---|
| 936 | |
---|
[15693] | 937 | document_type = schema.Choice( |
---|
| 938 | title = _(u'Document Type'), |
---|
| 939 | vocabulary = document_types_vocab, |
---|
| 940 | required = True, |
---|
| 941 | ) |
---|
| 942 | |
---|
[13544] | 943 | class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant, |
---|
[15530] | 944 | ITranscriptApplicant, ICertificateRequest, |
---|
[15531] | 945 | IVerificationRequest, ISendByEmailRequest): |
---|
[14471] | 946 | """An interface for all types of applicants. |
---|
[13544] | 947 | |
---|
[8931] | 948 | Attention: The ICustomPGApplicant field seetings will be overwritten |
---|
| 949 | by ICustomPGApplicant field settings. If a field is defined |
---|
[8728] | 950 | in both interfaces zope.schema validates only against the |
---|
[8931] | 951 | constraints in ICustomUGApplicant. This does not affect the forms |
---|
| 952 | since they are build on either ICustomUGApplicant or ICustomPGApplicant. |
---|
[8012] | 953 | """ |
---|
| 954 | |
---|
[8746] | 955 | def writeLogMessage(view, comment): |
---|
[8053] | 956 | """Adds an INFO message to the log file |
---|
| 957 | """ |
---|
| 958 | |
---|
| 959 | def createStudent(): |
---|
| 960 | """Create a student object from applicatnt data |
---|
| 961 | and copy applicant object. |
---|
| 962 | """ |
---|
| 963 | |
---|
[10298] | 964 | class ICustomUGApplicantEdit(ICustomUGApplicant): |
---|
[8728] | 965 | """An undergraduate applicant interface for edit forms. |
---|
[8012] | 966 | |
---|
| 967 | Here we can repeat the fields from base data and set the |
---|
| 968 | `required` and `readonly` attributes to True to further restrict |
---|
| 969 | the data access. Or we can allow only certain certificates to be |
---|
| 970 | selected by choosing the appropriate source. |
---|
| 971 | |
---|
| 972 | We cannot omit fields here. This has to be done in the |
---|
| 973 | respective form page. |
---|
| 974 | """ |
---|
| 975 | |
---|
[13977] | 976 | #programme_type = schema.Choice( |
---|
| 977 | # title = _(u'Programme Type'), |
---|
| 978 | # vocabulary = programme_types_vocab, |
---|
| 979 | # required = True, |
---|
| 980 | # ) |
---|
[13548] | 981 | |
---|
[10924] | 982 | date_of_birth = FormattedDate( |
---|
| 983 | title = _(u'Date of Birth'), |
---|
| 984 | required = True, |
---|
| 985 | show_year = True, |
---|
| 986 | ) |
---|
| 987 | |
---|
[15462] | 988 | course1 = schema.Choice( |
---|
| 989 | title = _(u'1st Choice Course of Study'), |
---|
| 990 | source = AppCatCertificateSource(), |
---|
| 991 | required = True, |
---|
| 992 | ) |
---|
| 993 | |
---|
| 994 | course2 = schema.Choice( |
---|
| 995 | title = _(u'2nd Choice Course of Study'), |
---|
| 996 | source = AppCatCertificateSource(), |
---|
| 997 | required = True, |
---|
| 998 | ) |
---|
| 999 | |
---|
| 1000 | course3 = schema.Choice( |
---|
| 1001 | title = _(u'3rd Choice Course of Study'), |
---|
| 1002 | source = AppCatCertificateSource(), |
---|
| 1003 | required = True, |
---|
| 1004 | ) |
---|
| 1005 | |
---|
[14829] | 1006 | fst_sit_fname = schema.TextLine( |
---|
| 1007 | title = _(u'Full Name'), |
---|
| 1008 | required = True, |
---|
| 1009 | readonly = False, |
---|
| 1010 | ) |
---|
| 1011 | |
---|
| 1012 | fst_sit_no = schema.TextLine( |
---|
| 1013 | title = _(u'Exam Number'), |
---|
| 1014 | required = True, |
---|
| 1015 | readonly = False, |
---|
| 1016 | ) |
---|
| 1017 | |
---|
| 1018 | fst_sit_sc_pin = schema.TextLine( |
---|
| 1019 | title = _(u'Scratch Card Pin'), |
---|
| 1020 | required = True, |
---|
| 1021 | readonly = False, |
---|
| 1022 | ) |
---|
| 1023 | |
---|
| 1024 | fst_sit_sc_serial_number = schema.TextLine( |
---|
| 1025 | title = _(u'Scratch Card Serial Number'), |
---|
| 1026 | required = True, |
---|
| 1027 | readonly = False, |
---|
| 1028 | ) |
---|
| 1029 | |
---|
| 1030 | fst_sit_date = FormattedDate( |
---|
| 1031 | title = _(u'Exam Date'), |
---|
| 1032 | required = True, |
---|
| 1033 | readonly = False, |
---|
| 1034 | show_year = True, |
---|
| 1035 | ) |
---|
| 1036 | |
---|
| 1037 | fst_sit_type = schema.Choice( |
---|
| 1038 | title = _(u'Exam Type'), |
---|
| 1039 | required = True, |
---|
| 1040 | readonly = False, |
---|
| 1041 | vocabulary = exam_types, |
---|
| 1042 | ) |
---|
| 1043 | |
---|
[15459] | 1044 | # course1 works only on manage pages. On edit pages course1 input is missing |
---|
| 1045 | # and no Invalid exception is raised. |
---|
| 1046 | # NoInputData: NoInputD...course1' |
---|
| 1047 | # Therefore, we check and compare course1 on CustomApplicantEditFormPage. |
---|
| 1048 | @invariant |
---|
| 1049 | def course_choice(applicant): |
---|
| 1050 | if applicant.course2 == applicant.course3: |
---|
| 1051 | raise Invalid(_("3rd choice course must differ from 2nd choice course.")) |
---|
| 1052 | |
---|
[13977] | 1053 | #ICustomUGApplicantEdit['programme_type'].order = ICustomUGApplicant[ |
---|
| 1054 | # 'programme_type'].order |
---|
[10924] | 1055 | ICustomUGApplicantEdit['date_of_birth'].order = ICustomUGApplicant[ |
---|
| 1056 | 'date_of_birth'].order |
---|
[15462] | 1057 | ICustomUGApplicantEdit['course1'].order = ICustomUGApplicant[ |
---|
| 1058 | 'course1'].order |
---|
| 1059 | ICustomUGApplicantEdit['course2'].order = ICustomUGApplicant[ |
---|
| 1060 | 'course2'].order |
---|
| 1061 | ICustomUGApplicantEdit['course3'].order = ICustomUGApplicant[ |
---|
| 1062 | 'course3'].order |
---|
[14829] | 1063 | ICustomUGApplicantEdit['fst_sit_fname'].order = ICustomUGApplicant[ |
---|
| 1064 | 'fst_sit_fname'].order |
---|
| 1065 | ICustomUGApplicantEdit['fst_sit_no'].order = ICustomUGApplicant[ |
---|
| 1066 | 'fst_sit_no'].order |
---|
| 1067 | ICustomUGApplicantEdit['fst_sit_sc_pin'].order = ICustomUGApplicant[ |
---|
| 1068 | 'fst_sit_sc_pin'].order |
---|
| 1069 | ICustomUGApplicantEdit['fst_sit_sc_serial_number'].order = ICustomUGApplicant[ |
---|
| 1070 | 'fst_sit_sc_serial_number'].order |
---|
| 1071 | ICustomUGApplicantEdit['fst_sit_date'].order = ICustomUGApplicant[ |
---|
| 1072 | 'fst_sit_date'].order |
---|
| 1073 | ICustomUGApplicantEdit['fst_sit_type'].order = ICustomUGApplicant[ |
---|
| 1074 | 'fst_sit_type'].order |
---|
[10924] | 1075 | |
---|
[8980] | 1076 | class ICustomPGApplicantEdit(INigeriaPGApplicantEdit): |
---|
[7866] | 1077 | """A postgraduate applicant interface for editing. |
---|
| 1078 | |
---|
| 1079 | Here we can repeat the fields from base data and set the |
---|
| 1080 | `required` and `readonly` attributes to True to further restrict |
---|
| 1081 | the data access. Or we can allow only certain certificates to be |
---|
| 1082 | selected by choosing the appropriate source. |
---|
| 1083 | |
---|
| 1084 | We cannot omit fields here. This has to be done in the |
---|
| 1085 | respective form page. |
---|
[8017] | 1086 | """ |
---|
[8455] | 1087 | |
---|
[8931] | 1088 | class ICustomApplicantOnlinePayment(INigeriaApplicantOnlinePayment): |
---|
[8247] | 1089 | """An applicant payment via payment gateways. |
---|
| 1090 | |
---|
| 1091 | """ |
---|
[8532] | 1092 | |
---|
[8980] | 1093 | class IPUTMEApplicantEdit(IPUTMEApplicantEdit): |
---|
[8532] | 1094 | """An undergraduate applicant interface for editing. |
---|
| 1095 | |
---|
| 1096 | Here we can repeat the fields from base data and set the |
---|
| 1097 | `required` and `readonly` attributes to True to further restrict |
---|
| 1098 | the data access. Or we can allow only certain certificates to be |
---|
| 1099 | selected by choosing the appropriate source. |
---|
| 1100 | |
---|
| 1101 | We cannot omit fields here. This has to be done in the |
---|
| 1102 | respective form page. |
---|
| 1103 | """ |
---|
| 1104 | |
---|
[14471] | 1105 | class ICustomApplicantUpdateByRegNo(ICustomApplicant): |
---|
[8583] | 1106 | """Representation of an applicant. |
---|
| 1107 | |
---|
| 1108 | Skip regular reg_number validation if reg_number is used for finding |
---|
| 1109 | the applicant object. |
---|
| 1110 | """ |
---|
[8980] | 1111 | |
---|
[14471] | 1112 | reg_number = schema.TextLine( |
---|
| 1113 | title = u'Registration Number', |
---|
| 1114 | required = False, |
---|
| 1115 | ) |
---|
[13544] | 1116 | |
---|
| 1117 | |
---|
[14471] | 1118 | |
---|
| 1119 | |
---|