[7853] | 1 | ## $Id: interfaces.py 16786 2022-02-08 21:35:52Z 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, |
---|
[16786] | 35 | IApplicantBaseData, |
---|
| 36 | IApplicantRefereeReport) |
---|
[16763] | 37 | from waeup.kofa.refereeentries import RefereeEntryField |
---|
[13544] | 38 | from waeup.kofa.university.vocabularies import StudyModeSource |
---|
[8931] | 39 | from kofacustom.nigeria.applicants.interfaces import ( |
---|
| 40 | LGASource, high_qual, high_grade, exam_types, |
---|
| 41 | INigeriaUGApplicant, INigeriaPGApplicant, |
---|
| 42 | INigeriaApplicantOnlinePayment, |
---|
[8980] | 43 | INigeriaUGApplicantEdit, INigeriaPGApplicantEdit, |
---|
| 44 | INigeriaApplicantUpdateByRegNo, |
---|
| 45 | IPUTMEApplicantEdit, |
---|
[8931] | 46 | ) |
---|
[8444] | 47 | from waeup.aaue.interfaces import MessageFactory as _ |
---|
| 48 | from waeup.aaue.payments.interfaces import ICustomOnlinePayment |
---|
[7853] | 49 | |
---|
[10924] | 50 | programme_types_vocab = SimpleKofaVocabulary( |
---|
[11542] | 51 | (_('Undergraduate Programme (100 level)'), 'regular'), |
---|
| 52 | (_('Direct Entry (200 level)'), 'direct'), |
---|
[10924] | 53 | (_('not applicable'), 'na'), |
---|
| 54 | ) |
---|
| 55 | |
---|
[15118] | 56 | certificate_types_vocab = SimpleKofaVocabulary( |
---|
| 57 | (_('Full-time Degree'), 'ft'), |
---|
| 58 | (_('Part-time Degree'), 'pt'), |
---|
| 59 | (_('Diploma'), 'dp'), |
---|
| 60 | (_('Masters Degree'), 'ma'), |
---|
| 61 | (_('Doctorate Degree'), 'phd'), |
---|
| 62 | ) |
---|
| 63 | |
---|
[15530] | 64 | document_types_vocab = SimpleKofaVocabulary( |
---|
| 65 | (_('Certificate'), 'certificate'), |
---|
| 66 | (_('Result'), 'result'), |
---|
| 67 | (_('Transcript'), 'transcript'), |
---|
| 68 | (_('Studentship'), 'studship'), |
---|
| 69 | ) |
---|
| 70 | |
---|
[15991] | 71 | application_types_vocab = SimpleKofaVocabulary( |
---|
| 72 | (_('Academic Staff Positions'), 'academic'), |
---|
| 73 | (_('Senior Non-Teaching Staff'), 'senior'), |
---|
| 74 | (_('Junior Staff (Non-Teaching)'), 'junior'), |
---|
| 75 | ) |
---|
| 76 | |
---|
[15740] | 77 | request_types_vocab = SimpleKofaVocabulary( |
---|
| 78 | (_('Scanned Result'), 'result'), |
---|
| 79 | (_('Scanned Certificate'), 'certificate'), |
---|
| 80 | (_('Scanned Transcript'), 'transcript'), |
---|
| 81 | (_('Attestation'), 'attest'), |
---|
| 82 | (_('Proficiency in English Language'), 'english'), |
---|
| 83 | ) |
---|
| 84 | |
---|
[16786] | 85 | rating_vocab = SimpleKofaVocabulary( |
---|
| 86 | (_('Excellent'), 'e'), |
---|
| 87 | (_('Very good'), 'vg'), |
---|
| 88 | (_('Good'), 'g'), |
---|
| 89 | (_('Slightly above average'), 'saa'), |
---|
| 90 | (_('Average'), 'a'), |
---|
| 91 | (_('Below average'), 'ba'), |
---|
| 92 | (_('Unable to assess'), 'unable'), |
---|
| 93 | ) |
---|
| 94 | |
---|
| 95 | overallpromise_vocab = SimpleKofaVocabulary( |
---|
| 96 | (_('Very good (highest 10%)'), 'vg'), |
---|
| 97 | (_('Good (next 15%)'), 'g'), |
---|
| 98 | (_('Above average (next 15%)'), 'aa'), |
---|
| 99 | (_('Average (middle 20%)'), 'a'), |
---|
| 100 | (_('Below average (lower 10%)'), 'ba'), |
---|
| 101 | ) |
---|
| 102 | |
---|
| 103 | |
---|
[10298] | 104 | class ICustomUGApplicant(IApplicantBaseData): |
---|
[8012] | 105 | """An undergraduate applicant. |
---|
| 106 | |
---|
[8521] | 107 | This interface defines the least common multiple of all fields |
---|
| 108 | in ug application forms. In customized forms, fields can be excluded by |
---|
| 109 | adding them to the UG_OMIT* tuples. |
---|
[8012] | 110 | """ |
---|
| 111 | |
---|
[13977] | 112 | #programme_type = schema.Choice( |
---|
| 113 | # title = _(u'Programme Type'), |
---|
| 114 | # vocabulary = programme_types_vocab, |
---|
| 115 | # required = False, |
---|
| 116 | # ) |
---|
[10924] | 117 | |
---|
[10298] | 118 | nationality = schema.Choice( |
---|
| 119 | source = nats_vocab, |
---|
| 120 | title = _(u'Nationality'), |
---|
| 121 | required = True, |
---|
| 122 | ) |
---|
[14829] | 123 | |
---|
[10298] | 124 | lga = schema.Choice( |
---|
| 125 | source = LGASource(), |
---|
| 126 | title = _(u'State/LGA (Nigerians only)'), |
---|
| 127 | required = False, |
---|
| 128 | ) |
---|
[14829] | 129 | |
---|
[10298] | 130 | perm_address = schema.Text( |
---|
| 131 | title = _(u'Permanent Address'), |
---|
| 132 | required = False, |
---|
| 133 | ) |
---|
[14829] | 134 | |
---|
[10308] | 135 | home_town = schema.TextLine( |
---|
[10306] | 136 | title = _(u'Home Town'), |
---|
| 137 | required = False, |
---|
| 138 | ) |
---|
[14829] | 139 | |
---|
[13977] | 140 | #jamb_reg_number = schema.TextLine( |
---|
| 141 | # title = _(u'JAMB Registration Number'), |
---|
| 142 | # required = False, |
---|
| 143 | # ) |
---|
[14829] | 144 | |
---|
[10311] | 145 | jamb_score = schema.Int( |
---|
| 146 | title = _(u'Total JAMB Score'), |
---|
| 147 | required = False, |
---|
| 148 | ) |
---|
[14829] | 149 | |
---|
[13977] | 150 | jamb_subjects = schema.Text( |
---|
| 151 | title = _(u'JAMB Subjects and Scores'), |
---|
| 152 | required = False, |
---|
| 153 | ) |
---|
[14829] | 154 | |
---|
[10298] | 155 | course1 = schema.Choice( |
---|
| 156 | title = _(u'1st Choice Course of Study'), |
---|
| 157 | source = AppCatCertificateSource(), |
---|
[14468] | 158 | required = False, |
---|
[10298] | 159 | ) |
---|
[14829] | 160 | |
---|
[10298] | 161 | course2 = schema.Choice( |
---|
| 162 | title = _(u'2nd Choice Course of Study'), |
---|
| 163 | source = AppCatCertificateSource(), |
---|
| 164 | required = False, |
---|
| 165 | ) |
---|
[14829] | 166 | |
---|
[15455] | 167 | course3 = schema.Choice( |
---|
| 168 | title = _(u'3rd Choice Course of Study'), |
---|
| 169 | source = AppCatCertificateSource(), |
---|
| 170 | required = False, |
---|
| 171 | ) |
---|
| 172 | |
---|
[10298] | 173 | fst_sit_fname = schema.TextLine( |
---|
| 174 | title = _(u'Full Name'), |
---|
| 175 | required = False, |
---|
| 176 | readonly = False, |
---|
| 177 | ) |
---|
[14829] | 178 | |
---|
[10298] | 179 | fst_sit_no = schema.TextLine( |
---|
| 180 | title = _(u'Exam Number'), |
---|
| 181 | required = False, |
---|
| 182 | readonly = False, |
---|
| 183 | ) |
---|
[14829] | 184 | |
---|
| 185 | fst_sit_sc_pin = schema.TextLine( |
---|
| 186 | title = _(u'Scratch Card Pin'), |
---|
| 187 | required = False, |
---|
| 188 | readonly = False, |
---|
| 189 | ) |
---|
| 190 | |
---|
| 191 | fst_sit_sc_serial_number = schema.TextLine( |
---|
| 192 | title = _(u'Scratch Card Serial Number'), |
---|
| 193 | required = False, |
---|
| 194 | readonly = False, |
---|
| 195 | ) |
---|
| 196 | |
---|
[10298] | 197 | fst_sit_date = FormattedDate( |
---|
| 198 | title = _(u'Exam Date'), |
---|
| 199 | required = False, |
---|
| 200 | readonly = False, |
---|
| 201 | show_year = True, |
---|
| 202 | ) |
---|
[14829] | 203 | |
---|
[10298] | 204 | fst_sit_type = schema.Choice( |
---|
| 205 | title = _(u'Exam Type'), |
---|
| 206 | required = False, |
---|
| 207 | readonly = False, |
---|
| 208 | vocabulary = exam_types, |
---|
| 209 | ) |
---|
[14829] | 210 | |
---|
[10298] | 211 | fst_sit_results = schema.List( |
---|
| 212 | title = _(u'Exam Results'), |
---|
| 213 | value_type = ResultEntryField(), |
---|
| 214 | required = False, |
---|
| 215 | readonly = False, |
---|
[14017] | 216 | defaultFactory=list, |
---|
[10298] | 217 | ) |
---|
[14829] | 218 | |
---|
[10298] | 219 | scd_sit_fname = schema.TextLine( |
---|
| 220 | title = _(u'Full Name'), |
---|
| 221 | required = False, |
---|
| 222 | readonly = False, |
---|
| 223 | ) |
---|
[14829] | 224 | |
---|
[10298] | 225 | scd_sit_no = schema.TextLine( |
---|
| 226 | title = _(u'Exam Number'), |
---|
| 227 | required = False, |
---|
| 228 | readonly = False, |
---|
| 229 | ) |
---|
[14829] | 230 | |
---|
| 231 | scd_sit_sc_pin = schema.TextLine( |
---|
| 232 | title = _(u'Scratch Card Pin'), |
---|
| 233 | required = False, |
---|
| 234 | readonly = False, |
---|
| 235 | ) |
---|
| 236 | |
---|
| 237 | scd_sit_sc_serial_number = schema.TextLine( |
---|
| 238 | title = _(u'Scratch Card Serial Number'), |
---|
| 239 | required = False, |
---|
| 240 | readonly = False, |
---|
| 241 | ) |
---|
| 242 | |
---|
[10298] | 243 | scd_sit_date = FormattedDate( |
---|
| 244 | title = _(u'Exam Date'), |
---|
| 245 | required = False, |
---|
| 246 | readonly = False, |
---|
| 247 | show_year = True, |
---|
| 248 | ) |
---|
[14829] | 249 | |
---|
[10298] | 250 | scd_sit_type = schema.Choice( |
---|
| 251 | title = _(u'Exam Type'), |
---|
| 252 | required = False, |
---|
| 253 | readonly = False, |
---|
| 254 | vocabulary = exam_types, |
---|
| 255 | ) |
---|
[14829] | 256 | |
---|
[10298] | 257 | scd_sit_results = schema.List( |
---|
| 258 | title = _(u'Exam Results'), |
---|
| 259 | value_type = ResultEntryField(), |
---|
| 260 | required = False, |
---|
| 261 | readonly = False, |
---|
[14017] | 262 | defaultFactory=list, |
---|
[10298] | 263 | ) |
---|
[14829] | 264 | |
---|
[10298] | 265 | alr_fname = schema.TextLine( |
---|
| 266 | title = _(u'Full Name'), |
---|
| 267 | required = False, |
---|
| 268 | readonly = False, |
---|
| 269 | ) |
---|
[14829] | 270 | |
---|
[10298] | 271 | alr_no = schema.TextLine( |
---|
| 272 | title = _(u'Exam Number'), |
---|
| 273 | required = False, |
---|
| 274 | readonly = False, |
---|
| 275 | ) |
---|
[14829] | 276 | |
---|
[10298] | 277 | alr_date = FormattedDate( |
---|
| 278 | title = _(u'Exam Date'), |
---|
| 279 | required = False, |
---|
| 280 | readonly = False, |
---|
| 281 | show_year = True, |
---|
| 282 | ) |
---|
[14829] | 283 | |
---|
[10298] | 284 | alr_results = schema.List( |
---|
| 285 | title = _(u'Exam Results'), |
---|
| 286 | value_type = ResultEntryField(), |
---|
| 287 | required = False, |
---|
| 288 | readonly = False, |
---|
[14017] | 289 | defaultFactory=list, |
---|
[10298] | 290 | ) |
---|
[14829] | 291 | |
---|
[10998] | 292 | hq_type = schema.Choice( |
---|
| 293 | title = _(u'Qualification Obtained'), |
---|
| 294 | required = False, |
---|
| 295 | readonly = False, |
---|
| 296 | vocabulary = high_qual, |
---|
| 297 | ) |
---|
| 298 | |
---|
| 299 | hq_fname = schema.TextLine( |
---|
| 300 | title = _(u'Full Name'), |
---|
| 301 | required = False, |
---|
| 302 | readonly = False, |
---|
| 303 | ) |
---|
| 304 | |
---|
| 305 | hq_matric_no = schema.TextLine( |
---|
| 306 | title = _(u'Former Matric Number'), |
---|
| 307 | required = False, |
---|
| 308 | readonly = False, |
---|
| 309 | ) |
---|
| 310 | |
---|
| 311 | hq_degree = schema.Choice( |
---|
| 312 | title = _(u'Class of Degree'), |
---|
| 313 | required = False, |
---|
| 314 | readonly = False, |
---|
| 315 | vocabulary = high_grade, |
---|
| 316 | ) |
---|
| 317 | |
---|
| 318 | hq_school = schema.TextLine( |
---|
| 319 | title = _(u'Institution Attended'), |
---|
| 320 | required = False, |
---|
| 321 | readonly = False, |
---|
| 322 | ) |
---|
| 323 | |
---|
| 324 | hq_session = schema.TextLine( |
---|
| 325 | title = _(u'Years Attended'), |
---|
| 326 | required = False, |
---|
| 327 | readonly = False, |
---|
| 328 | ) |
---|
| 329 | |
---|
| 330 | hq_disc = schema.TextLine( |
---|
| 331 | title = _(u'Discipline'), |
---|
| 332 | required = False, |
---|
| 333 | readonly = False, |
---|
| 334 | ) |
---|
[13545] | 335 | |
---|
| 336 | hq_type2 = schema.Choice( |
---|
| 337 | title = _(u'Qualification Obtained'), |
---|
| 338 | required = False, |
---|
| 339 | readonly = False, |
---|
| 340 | vocabulary = high_qual, |
---|
| 341 | ) |
---|
| 342 | |
---|
| 343 | hq_fname2 = schema.TextLine( |
---|
| 344 | title = _(u'Full Name'), |
---|
| 345 | required = False, |
---|
| 346 | readonly = False, |
---|
| 347 | ) |
---|
| 348 | |
---|
| 349 | hq_matric_no2 = schema.TextLine( |
---|
| 350 | title = _(u'Former Matric Number'), |
---|
| 351 | required = False, |
---|
| 352 | readonly = False, |
---|
| 353 | ) |
---|
| 354 | |
---|
| 355 | hq_degree2 = schema.Choice( |
---|
| 356 | title = _(u'Class of Degree'), |
---|
| 357 | required = False, |
---|
| 358 | readonly = False, |
---|
| 359 | vocabulary = high_grade, |
---|
| 360 | ) |
---|
| 361 | |
---|
| 362 | hq_school2 = schema.TextLine( |
---|
| 363 | title = _(u'Institution Attended'), |
---|
| 364 | required = False, |
---|
| 365 | readonly = False, |
---|
| 366 | ) |
---|
| 367 | |
---|
| 368 | hq_session2 = schema.TextLine( |
---|
| 369 | title = _(u'Years Attended'), |
---|
| 370 | required = False, |
---|
| 371 | readonly = False, |
---|
| 372 | ) |
---|
| 373 | |
---|
| 374 | hq_disc2 = schema.TextLine( |
---|
| 375 | title = _(u'Discipline'), |
---|
| 376 | required = False, |
---|
| 377 | readonly = False, |
---|
| 378 | ) |
---|
| 379 | |
---|
| 380 | hq_type3 = schema.Choice( |
---|
| 381 | title = _(u'Qualification Obtained'), |
---|
| 382 | required = False, |
---|
| 383 | readonly = False, |
---|
| 384 | vocabulary = high_qual, |
---|
| 385 | ) |
---|
| 386 | |
---|
| 387 | hq_fname3 = schema.TextLine( |
---|
| 388 | title = _(u'Full Name'), |
---|
| 389 | required = False, |
---|
| 390 | readonly = False, |
---|
| 391 | ) |
---|
| 392 | |
---|
| 393 | hq_matric_no3 = schema.TextLine( |
---|
| 394 | title = _(u'Former Matric Number'), |
---|
| 395 | required = False, |
---|
| 396 | readonly = False, |
---|
| 397 | ) |
---|
| 398 | |
---|
| 399 | hq_degree3 = schema.Choice( |
---|
| 400 | title = _(u'Class of Degree'), |
---|
| 401 | required = False, |
---|
| 402 | readonly = False, |
---|
| 403 | vocabulary = high_grade, |
---|
| 404 | ) |
---|
| 405 | |
---|
| 406 | hq_school3 = schema.TextLine( |
---|
| 407 | title = _(u'Institution Attended'), |
---|
| 408 | required = False, |
---|
| 409 | readonly = False, |
---|
| 410 | ) |
---|
| 411 | |
---|
| 412 | hq_session3 = schema.TextLine( |
---|
| 413 | title = _(u'Years Attended'), |
---|
| 414 | required = False, |
---|
| 415 | readonly = False, |
---|
| 416 | ) |
---|
| 417 | |
---|
| 418 | hq_disc3 = schema.TextLine( |
---|
| 419 | title = _(u'Discipline'), |
---|
| 420 | required = False, |
---|
| 421 | readonly = False, |
---|
| 422 | ) |
---|
[13679] | 423 | |
---|
| 424 | nysc_year = schema.Int( |
---|
| 425 | title = _(u'Nysc Year'), |
---|
| 426 | required = False, |
---|
| 427 | readonly = False, |
---|
| 428 | ) |
---|
| 429 | |
---|
| 430 | nysc_location = schema.TextLine( |
---|
| 431 | title = _(u'Nysc Location'), |
---|
| 432 | required = False, |
---|
| 433 | ) |
---|
| 434 | |
---|
| 435 | nysc_lga = schema.Choice( |
---|
| 436 | source = LGASource(), |
---|
| 437 | title = _(u'Nysc LGA'), |
---|
| 438 | required = False, |
---|
| 439 | ) |
---|
| 440 | |
---|
| 441 | employer = schema.TextLine( |
---|
| 442 | title = _(u'Employer'), |
---|
| 443 | required = False, |
---|
| 444 | readonly = False, |
---|
| 445 | ) |
---|
| 446 | |
---|
| 447 | emp_position = schema.TextLine( |
---|
| 448 | title = _(u'Employer Position'), |
---|
| 449 | required = False, |
---|
| 450 | readonly = False, |
---|
| 451 | ) |
---|
| 452 | |
---|
| 453 | emp_start = FormattedDate( |
---|
| 454 | title = _(u'Start Date'), |
---|
| 455 | required = False, |
---|
| 456 | readonly = False, |
---|
| 457 | show_year = True, |
---|
| 458 | ) |
---|
| 459 | |
---|
| 460 | emp_end = FormattedDate( |
---|
| 461 | title = _(u'End Date'), |
---|
| 462 | required = False, |
---|
| 463 | readonly = False, |
---|
| 464 | show_year = True, |
---|
| 465 | ) |
---|
| 466 | |
---|
| 467 | emp_reason = schema.TextLine( |
---|
| 468 | title = _(u'Reason for Leaving'), |
---|
| 469 | required = False, |
---|
| 470 | readonly = False, |
---|
| 471 | ) |
---|
| 472 | |
---|
| 473 | employer2 = schema.TextLine( |
---|
| 474 | title = _(u'2nd Employer'), |
---|
| 475 | required = False, |
---|
| 476 | readonly = False, |
---|
| 477 | ) |
---|
| 478 | |
---|
| 479 | emp2_position = schema.TextLine( |
---|
| 480 | title = _(u'2nd Employer Position'), |
---|
| 481 | required = False, |
---|
| 482 | readonly = False, |
---|
| 483 | ) |
---|
| 484 | |
---|
| 485 | emp2_start = FormattedDate( |
---|
| 486 | title = _(u'Start Date'), |
---|
| 487 | required = False, |
---|
| 488 | readonly = False, |
---|
| 489 | show_year = True, |
---|
| 490 | ) |
---|
| 491 | |
---|
| 492 | emp2_end = FormattedDate( |
---|
| 493 | title = _(u'End Date'), |
---|
| 494 | required = False, |
---|
| 495 | readonly = False, |
---|
| 496 | show_year = True, |
---|
| 497 | ) |
---|
| 498 | |
---|
| 499 | emp2_reason = schema.TextLine( |
---|
| 500 | title = _(u'Reason for Leaving'), |
---|
| 501 | required = False, |
---|
| 502 | readonly = False, |
---|
| 503 | ) |
---|
| 504 | |
---|
| 505 | former_matric = schema.TextLine( |
---|
| 506 | title = _(u'If yes, matric number'), |
---|
| 507 | required = False, |
---|
| 508 | readonly = False, |
---|
| 509 | ) |
---|
| 510 | |
---|
[10298] | 511 | notice = schema.Text( |
---|
| 512 | title = _(u'Notice'), |
---|
| 513 | required = False, |
---|
| 514 | ) |
---|
[13977] | 515 | |
---|
| 516 | |
---|
| 517 | master_sheet_number = schema.TextLine( |
---|
| 518 | title = _(u'Master Sheet Number'), |
---|
| 519 | required = False, |
---|
| 520 | readonly = False, |
---|
| 521 | ) |
---|
| 522 | |
---|
[13996] | 523 | screening_venue = schema.TextLine( |
---|
| 524 | title = _(u'Screening Venue'), |
---|
| 525 | required = False, |
---|
| 526 | ) |
---|
[14666] | 527 | |
---|
[13996] | 528 | screening_date = schema.TextLine( |
---|
| 529 | title = _(u'Screening Date'), |
---|
| 530 | required = False, |
---|
| 531 | ) |
---|
[14666] | 532 | |
---|
[13996] | 533 | screening_score = schema.Int( |
---|
[14028] | 534 | title = _(u'Screening Points'), |
---|
[13996] | 535 | required = False, |
---|
| 536 | ) |
---|
[14666] | 537 | |
---|
[10298] | 538 | student_id = schema.TextLine( |
---|
| 539 | title = _(u'Student Id'), |
---|
| 540 | required = False, |
---|
| 541 | readonly = False, |
---|
| 542 | ) |
---|
[14666] | 543 | |
---|
[10298] | 544 | course_admitted = schema.Choice( |
---|
| 545 | title = _(u'Admitted Course of Study'), |
---|
| 546 | source = CertificateSource(), |
---|
| 547 | required = False, |
---|
| 548 | ) |
---|
[14666] | 549 | |
---|
[10298] | 550 | locked = schema.Bool( |
---|
| 551 | title = _(u'Form locked'), |
---|
| 552 | default = False, |
---|
| 553 | ) |
---|
| 554 | |
---|
| 555 | @invariant |
---|
[15455] | 556 | def course_choice(applicant): |
---|
[10298] | 557 | if applicant.course1 == applicant.course2: |
---|
| 558 | raise Invalid(_("2nd choice course must differ from 1st choice course.")) |
---|
[15455] | 559 | if applicant.course1 == applicant.course3: |
---|
| 560 | raise Invalid(_("3rd choice course must differ from 1st choice course.")) |
---|
| 561 | if applicant.course2 == applicant.course3: |
---|
| 562 | raise Invalid(_("3rd choice course must differ from 2nd choice course.")) |
---|
[10298] | 563 | |
---|
[13977] | 564 | #ICustomUGApplicant['programme_type'].order = IApplicantBaseData[ |
---|
| 565 | # 'reg_number'].order |
---|
[10924] | 566 | |
---|
[16756] | 567 | |
---|
| 568 | class ICustomPGApplicant(IApplicantBaseData): |
---|
[7853] | 569 | """A postgraduate applicant. |
---|
| 570 | |
---|
[8521] | 571 | This interface defines the least common multiple of all fields |
---|
| 572 | in pg application forms. In customized forms, fields can be excluded by |
---|
| 573 | adding them to the PG_OMIT* tuples. |
---|
[7866] | 574 | """ |
---|
| 575 | |
---|
[16756] | 576 | nationality = schema.Choice( |
---|
| 577 | source = nats_vocab, |
---|
| 578 | title = _(u'Nationality'), |
---|
| 579 | required = True, |
---|
| 580 | ) |
---|
| 581 | lga = schema.Choice( |
---|
| 582 | source = LGASource(), |
---|
| 583 | title = _(u'State/LGA (Nigerians only)'), |
---|
| 584 | required = False, |
---|
| 585 | ) |
---|
| 586 | #perm_address = schema.Text( |
---|
| 587 | # title = _(u'Permanent Address'), |
---|
| 588 | # required = False, |
---|
| 589 | # ) |
---|
| 590 | course1 = schema.Choice( |
---|
| 591 | title = _(u'1st Choice Course of Study'), |
---|
| 592 | source = AppCatCertificateSource(), |
---|
| 593 | required = True, |
---|
| 594 | ) |
---|
| 595 | course2 = schema.Choice( |
---|
| 596 | title = _(u'2nd Choice Course of Study'), |
---|
| 597 | source = AppCatCertificateSource(), |
---|
| 598 | required = False, |
---|
| 599 | ) |
---|
| 600 | hq_type = schema.Choice( |
---|
| 601 | title = _(u'Qualification Obtained'), |
---|
| 602 | required = False, |
---|
| 603 | readonly = False, |
---|
| 604 | vocabulary = high_qual, |
---|
| 605 | ) |
---|
| 606 | hq_fname = schema.TextLine( |
---|
| 607 | title = _(u'Full Name'), |
---|
| 608 | required = False, |
---|
| 609 | readonly = False, |
---|
| 610 | ) |
---|
| 611 | hq_matric_no = schema.TextLine( |
---|
| 612 | title = _(u'Former Matric Number'), |
---|
| 613 | required = False, |
---|
| 614 | readonly = False, |
---|
| 615 | ) |
---|
| 616 | hq_degree = schema.Choice( |
---|
| 617 | title = _(u'Class of Degree'), |
---|
| 618 | required = False, |
---|
| 619 | readonly = False, |
---|
| 620 | vocabulary = high_grade, |
---|
| 621 | ) |
---|
| 622 | hq_school = schema.TextLine( |
---|
| 623 | title = _(u'Institution Attended'), |
---|
| 624 | required = False, |
---|
| 625 | readonly = False, |
---|
| 626 | ) |
---|
| 627 | hq_session = schema.TextLine( |
---|
| 628 | title = _(u'Years Attended'), |
---|
| 629 | required = False, |
---|
| 630 | readonly = False, |
---|
| 631 | ) |
---|
| 632 | hq_disc = schema.TextLine( |
---|
| 633 | title = _(u'Discipline'), |
---|
| 634 | required = False, |
---|
| 635 | readonly = False, |
---|
| 636 | ) |
---|
[16763] | 637 | hq_type2 = schema.Choice( |
---|
| 638 | title = _(u'Qualification Obtained'), |
---|
| 639 | required = False, |
---|
| 640 | readonly = False, |
---|
| 641 | vocabulary = high_qual, |
---|
| 642 | ) |
---|
| 643 | |
---|
| 644 | hq_fname2 = schema.TextLine( |
---|
[16756] | 645 | title = _(u'Full Name'), |
---|
| 646 | required = False, |
---|
| 647 | readonly = False, |
---|
| 648 | ) |
---|
[16763] | 649 | |
---|
| 650 | hq_matric_no2 = schema.TextLine( |
---|
| 651 | title = _(u'Former Matric Number'), |
---|
[16756] | 652 | required = False, |
---|
| 653 | readonly = False, |
---|
| 654 | ) |
---|
[16763] | 655 | |
---|
| 656 | hq_degree2 = schema.Choice( |
---|
| 657 | title = _(u'Class of Degree'), |
---|
[16756] | 658 | required = False, |
---|
| 659 | readonly = False, |
---|
[16763] | 660 | vocabulary = high_grade, |
---|
[16756] | 661 | ) |
---|
[16763] | 662 | |
---|
| 663 | hq_school2 = schema.TextLine( |
---|
| 664 | title = _(u'Institution Attended'), |
---|
[16756] | 665 | required = False, |
---|
| 666 | readonly = False, |
---|
| 667 | ) |
---|
[16763] | 668 | |
---|
| 669 | hq_session2 = schema.TextLine( |
---|
| 670 | title = _(u'Years Attended'), |
---|
[16756] | 671 | required = False, |
---|
| 672 | readonly = False, |
---|
| 673 | ) |
---|
[16763] | 674 | |
---|
| 675 | hq_disc2 = schema.TextLine( |
---|
| 676 | title = _(u'Discipline'), |
---|
| 677 | required = False, |
---|
| 678 | readonly = False, |
---|
| 679 | ) |
---|
| 680 | |
---|
| 681 | hq_type3 = schema.Choice( |
---|
| 682 | title = _(u'Qualification Obtained'), |
---|
| 683 | required = False, |
---|
| 684 | readonly = False, |
---|
| 685 | vocabulary = high_qual, |
---|
| 686 | ) |
---|
| 687 | |
---|
| 688 | hq_fname3 = schema.TextLine( |
---|
[16756] | 689 | title = _(u'Full Name'), |
---|
| 690 | required = False, |
---|
| 691 | readonly = False, |
---|
| 692 | ) |
---|
[16763] | 693 | |
---|
| 694 | hq_matric_no3 = schema.TextLine( |
---|
| 695 | title = _(u'Former Matric Number'), |
---|
[16756] | 696 | required = False, |
---|
| 697 | readonly = False, |
---|
| 698 | ) |
---|
[16763] | 699 | |
---|
| 700 | hq_degree3 = schema.Choice( |
---|
| 701 | title = _(u'Class of Degree'), |
---|
[16756] | 702 | required = False, |
---|
| 703 | readonly = False, |
---|
[16763] | 704 | vocabulary = high_grade, |
---|
[16756] | 705 | ) |
---|
[16763] | 706 | |
---|
| 707 | hq_school3 = schema.TextLine( |
---|
| 708 | title = _(u'Institution Attended'), |
---|
[16756] | 709 | required = False, |
---|
| 710 | readonly = False, |
---|
| 711 | ) |
---|
[16763] | 712 | |
---|
| 713 | hq_session3 = schema.TextLine( |
---|
| 714 | title = _(u'Years Attended'), |
---|
[16756] | 715 | required = False, |
---|
| 716 | readonly = False, |
---|
| 717 | ) |
---|
[16763] | 718 | |
---|
| 719 | hq_disc3 = schema.TextLine( |
---|
| 720 | title = _(u'Discipline'), |
---|
| 721 | required = False, |
---|
| 722 | readonly = False, |
---|
| 723 | ) |
---|
| 724 | |
---|
| 725 | hq_type4 = schema.Choice( |
---|
| 726 | title = _(u'Qualification Obtained'), |
---|
| 727 | required = False, |
---|
| 728 | readonly = False, |
---|
| 729 | vocabulary = high_qual, |
---|
| 730 | ) |
---|
| 731 | |
---|
| 732 | hq_fname4 = schema.TextLine( |
---|
| 733 | title = _(u'Full Name'), |
---|
| 734 | required = False, |
---|
| 735 | readonly = False, |
---|
| 736 | ) |
---|
| 737 | |
---|
| 738 | hq_matric_no4 = schema.TextLine( |
---|
| 739 | title = _(u'Former Matric Number'), |
---|
| 740 | required = False, |
---|
| 741 | readonly = False, |
---|
| 742 | ) |
---|
| 743 | |
---|
| 744 | hq_degree4 = schema.Choice( |
---|
| 745 | title = _(u'Class of Degree'), |
---|
| 746 | required = False, |
---|
| 747 | readonly = False, |
---|
| 748 | vocabulary = high_grade, |
---|
| 749 | ) |
---|
| 750 | |
---|
| 751 | hq_school4 = schema.TextLine( |
---|
| 752 | title = _(u'Institution Attended'), |
---|
| 753 | required = False, |
---|
| 754 | readonly = False, |
---|
| 755 | ) |
---|
| 756 | |
---|
| 757 | hq_session4 = schema.TextLine( |
---|
| 758 | title = _(u'Years Attended'), |
---|
| 759 | required = False, |
---|
| 760 | readonly = False, |
---|
| 761 | ) |
---|
| 762 | |
---|
| 763 | hq_disc4 = schema.TextLine( |
---|
| 764 | title = _(u'Discipline'), |
---|
| 765 | required = False, |
---|
| 766 | readonly = False, |
---|
| 767 | ) |
---|
[16756] | 768 | presently_inst = schema.TextLine( |
---|
| 769 | title = _(u'If yes, name of institution'), |
---|
| 770 | required = False, |
---|
| 771 | readonly = False, |
---|
| 772 | ) |
---|
| 773 | nysc_year = schema.Int( |
---|
| 774 | title = _(u'Nysc Year'), |
---|
| 775 | required = False, |
---|
| 776 | readonly = False, |
---|
| 777 | ) |
---|
| 778 | nysc_lga = schema.Choice( |
---|
| 779 | source = LGASource(), |
---|
| 780 | title = _(u'Nysc Location'), |
---|
| 781 | description = _(u'Leave blank for exception letters.'), |
---|
| 782 | required = False, |
---|
| 783 | ) |
---|
| 784 | employer = schema.TextLine( |
---|
| 785 | title = _(u'Employer'), |
---|
| 786 | required = False, |
---|
| 787 | readonly = False, |
---|
| 788 | ) |
---|
| 789 | emp_position = schema.TextLine( |
---|
| 790 | title = _(u'Employer Position'), |
---|
| 791 | required = False, |
---|
| 792 | readonly = False, |
---|
| 793 | ) |
---|
| 794 | emp_start = FormattedDate( |
---|
| 795 | title = _(u'Start Date'), |
---|
| 796 | required = False, |
---|
| 797 | readonly = False, |
---|
| 798 | show_year = True, |
---|
| 799 | ) |
---|
| 800 | emp_end = FormattedDate( |
---|
| 801 | title = _(u'End Date'), |
---|
| 802 | required = False, |
---|
| 803 | readonly = False, |
---|
| 804 | show_year = True, |
---|
| 805 | ) |
---|
| 806 | emp_reason = schema.TextLine( |
---|
| 807 | title = _(u'Reason for Leaving'), |
---|
| 808 | required = False, |
---|
| 809 | readonly = False, |
---|
| 810 | ) |
---|
| 811 | employer2 = schema.TextLine( |
---|
| 812 | title = _(u'2nd Employer'), |
---|
| 813 | required = False, |
---|
| 814 | readonly = False, |
---|
| 815 | ) |
---|
| 816 | emp2_position = schema.TextLine( |
---|
| 817 | title = _(u'2nd Employer Position'), |
---|
| 818 | required = False, |
---|
| 819 | readonly = False, |
---|
| 820 | ) |
---|
| 821 | emp2_start = FormattedDate( |
---|
| 822 | title = _(u'Start Date'), |
---|
| 823 | required = False, |
---|
| 824 | readonly = False, |
---|
| 825 | show_year = True, |
---|
| 826 | ) |
---|
| 827 | emp2_end = FormattedDate( |
---|
| 828 | title = _(u'End Date'), |
---|
| 829 | required = False, |
---|
| 830 | readonly = False, |
---|
| 831 | show_year = True, |
---|
| 832 | ) |
---|
| 833 | emp2_reason = schema.TextLine( |
---|
| 834 | title = _(u'Reason for Leaving'), |
---|
| 835 | required = False, |
---|
| 836 | readonly = False, |
---|
| 837 | ) |
---|
[16763] | 838 | former_matric = schema.TextLine( |
---|
| 839 | title = _(u'If yes, matric number'), |
---|
| 840 | required = False, |
---|
| 841 | readonly = False, |
---|
| 842 | ) |
---|
[16756] | 843 | notice = schema.Text( |
---|
| 844 | title = _(u'Notice'), |
---|
| 845 | required = False, |
---|
| 846 | readonly = False, |
---|
| 847 | ) |
---|
| 848 | screening_venue = schema.TextLine( |
---|
| 849 | title = _(u'Screening Venue'), |
---|
| 850 | required = False, |
---|
| 851 | ) |
---|
| 852 | screening_date = schema.TextLine( |
---|
| 853 | title = _(u'Screening Date'), |
---|
| 854 | required = False, |
---|
| 855 | ) |
---|
| 856 | screening_score = schema.Float( |
---|
| 857 | title = _(u'Screening Score (%)'), |
---|
| 858 | required = False, |
---|
| 859 | ) |
---|
| 860 | student_id = schema.TextLine( |
---|
| 861 | title = _(u'Student Id'), |
---|
| 862 | required = False, |
---|
| 863 | readonly = False, |
---|
| 864 | ) |
---|
| 865 | course_admitted = schema.Choice( |
---|
| 866 | title = _(u'Admitted Course of Study'), |
---|
| 867 | source = CertificateSource(), |
---|
| 868 | required = False, |
---|
| 869 | readonly = False, |
---|
| 870 | ) |
---|
| 871 | locked = schema.Bool( |
---|
| 872 | title = _(u'Form locked'), |
---|
| 873 | default = False, |
---|
| 874 | required = False, |
---|
| 875 | ) |
---|
| 876 | |
---|
[16763] | 877 | referees = schema.List( |
---|
| 878 | title = _(u'Referees'), |
---|
| 879 | value_type = RefereeEntryField(), |
---|
| 880 | required = False, |
---|
| 881 | defaultFactory=list, |
---|
| 882 | ) |
---|
| 883 | |
---|
[13544] | 884 | class ITranscriptApplicant(IKofaObject): |
---|
| 885 | """A transcript applicant. |
---|
| 886 | """ |
---|
[8012] | 887 | |
---|
[13544] | 888 | suspended = schema.Bool( |
---|
| 889 | title = _(u'Account suspended'), |
---|
| 890 | default = False, |
---|
| 891 | required = False, |
---|
| 892 | ) |
---|
| 893 | |
---|
| 894 | locked = schema.Bool( |
---|
| 895 | title = _(u'Form locked'), |
---|
| 896 | default = False, |
---|
| 897 | required = False, |
---|
| 898 | ) |
---|
| 899 | |
---|
| 900 | applicant_id = schema.TextLine( |
---|
[15951] | 901 | title = _(u'Application Id'), |
---|
[13544] | 902 | required = False, |
---|
| 903 | readonly = False, |
---|
| 904 | ) |
---|
| 905 | |
---|
[14472] | 906 | reg_number = TextLineChoice( |
---|
[14486] | 907 | title = _(u'Kofa Registration Number'), |
---|
[14472] | 908 | readonly = False, |
---|
| 909 | required = True, |
---|
| 910 | source = contextual_reg_num_source, |
---|
| 911 | ) |
---|
| 912 | |
---|
[13544] | 913 | firstname = schema.TextLine( |
---|
| 914 | title = _(u'First Name'), |
---|
| 915 | required = True, |
---|
| 916 | ) |
---|
| 917 | |
---|
| 918 | middlename = schema.TextLine( |
---|
| 919 | title = _(u'Middle Name'), |
---|
| 920 | required = False, |
---|
| 921 | ) |
---|
| 922 | |
---|
| 923 | lastname = schema.TextLine( |
---|
| 924 | title = _(u'Last Name (Surname)'), |
---|
| 925 | required = True, |
---|
| 926 | ) |
---|
| 927 | |
---|
[14472] | 928 | matric_number = schema.TextLine( |
---|
| 929 | title = _(u'Matriculation Number'), |
---|
[13544] | 930 | readonly = False, |
---|
[14486] | 931 | required = True, |
---|
[13544] | 932 | ) |
---|
| 933 | |
---|
| 934 | date_of_birth = FormattedDate( |
---|
| 935 | title = _(u'Date of Birth'), |
---|
[15275] | 936 | required = False, |
---|
[13544] | 937 | #date_format = u'%d/%m/%Y', # Use grok-instance-wide default |
---|
| 938 | show_year = True, |
---|
| 939 | ) |
---|
| 940 | |
---|
[15791] | 941 | sex = schema.Choice( |
---|
| 942 | title = _(u'Gender'), |
---|
| 943 | source = GenderSource(), |
---|
| 944 | required = True, |
---|
| 945 | ) |
---|
| 946 | |
---|
[13544] | 947 | place_of_birth = schema.TextLine( |
---|
| 948 | title = _(u'Place of Birth'), |
---|
| 949 | readonly = False, |
---|
[15275] | 950 | required = False, |
---|
[13544] | 951 | ) |
---|
| 952 | |
---|
| 953 | nationality = schema.Choice( |
---|
| 954 | vocabulary = nats_vocab, |
---|
| 955 | title = _(u'Nationality'), |
---|
[15275] | 956 | required = False, |
---|
[13544] | 957 | ) |
---|
| 958 | |
---|
| 959 | email = schema.ASCIILine( |
---|
| 960 | title = _(u'Email Address'), |
---|
| 961 | required = True, |
---|
| 962 | constraint=validate_email, |
---|
| 963 | ) |
---|
| 964 | |
---|
| 965 | phone = PhoneNumber( |
---|
| 966 | title = _(u'Phone'), |
---|
| 967 | description = u'', |
---|
[15275] | 968 | required = False, |
---|
[13544] | 969 | ) |
---|
| 970 | |
---|
| 971 | perm_address = schema.Text( |
---|
| 972 | title = _(u'Current Local Address'), |
---|
[15275] | 973 | required = False, |
---|
[13544] | 974 | readonly = False, |
---|
| 975 | ) |
---|
| 976 | |
---|
| 977 | dispatch_address = schema.Text( |
---|
[14306] | 978 | title = _(u'Dispatch Addresses'), |
---|
| 979 | description = u'Addresses to which transcript should be posted.', |
---|
[15275] | 980 | required = False, |
---|
[13544] | 981 | readonly = False, |
---|
| 982 | ) |
---|
| 983 | |
---|
| 984 | entry_mode = schema.Choice( |
---|
| 985 | title = _(u'Entry Mode'), |
---|
| 986 | source = StudyModeSource(), |
---|
[15275] | 987 | required = False, |
---|
[13544] | 988 | readonly = False, |
---|
| 989 | ) |
---|
| 990 | |
---|
| 991 | entry_session = schema.Choice( |
---|
| 992 | title = _(u'Entry Session'), |
---|
| 993 | source = academic_sessions_vocab, |
---|
[15275] | 994 | required = False, |
---|
[13544] | 995 | readonly = False, |
---|
| 996 | ) |
---|
| 997 | |
---|
| 998 | end_session = schema.Choice( |
---|
| 999 | title = _(u'End Session'), |
---|
| 1000 | source = academic_sessions_vocab, |
---|
[15275] | 1001 | required = False, |
---|
[13544] | 1002 | readonly = False, |
---|
| 1003 | ) |
---|
| 1004 | |
---|
| 1005 | course_studied = schema.Choice( |
---|
| 1006 | title = _(u'Course of Study / Degree'), |
---|
| 1007 | source = CertificateSource(), |
---|
[15275] | 1008 | required = False, |
---|
[13544] | 1009 | readonly = False, |
---|
| 1010 | ) |
---|
| 1011 | |
---|
| 1012 | purpose = schema.TextLine( |
---|
| 1013 | title = _(u'Purpose of this Application'), |
---|
| 1014 | readonly = False, |
---|
| 1015 | required = False, |
---|
| 1016 | ) |
---|
| 1017 | |
---|
| 1018 | course_changed = schema.Choice( |
---|
| 1019 | title = _(u'Change of Study Course'), |
---|
| 1020 | description = u'If yes, select previous course of study.', |
---|
| 1021 | source = CertificateSource(), |
---|
| 1022 | readonly = False, |
---|
| 1023 | required = False, |
---|
| 1024 | ) |
---|
| 1025 | |
---|
| 1026 | change_level = schema.Choice( |
---|
| 1027 | title = _(u'Change Level'), |
---|
| 1028 | description = u'If yes, select level at which you changed course of study.', |
---|
| 1029 | source = StudyLevelSource(), |
---|
| 1030 | required = False, |
---|
| 1031 | readonly = False, |
---|
| 1032 | ) |
---|
| 1033 | |
---|
[14306] | 1034 | no_copies = schema.Choice( |
---|
| 1035 | title = _(u'Number of Copies'), |
---|
| 1036 | description = u'Must correspond with the number of dispatch addresses above.', |
---|
| 1037 | values=[1, 2, 3, 4], |
---|
| 1038 | required = False, |
---|
| 1039 | readonly = False, |
---|
| 1040 | default = 1, |
---|
| 1041 | ) |
---|
| 1042 | |
---|
[14304] | 1043 | class ICertificateRequest(IKofaObject): |
---|
| 1044 | """A transcript applicant. |
---|
| 1045 | """ |
---|
[13544] | 1046 | |
---|
[14304] | 1047 | suspended = schema.Bool( |
---|
| 1048 | title = _(u'Account suspended'), |
---|
| 1049 | default = False, |
---|
| 1050 | required = False, |
---|
| 1051 | ) |
---|
| 1052 | |
---|
| 1053 | locked = schema.Bool( |
---|
| 1054 | title = _(u'Form locked'), |
---|
| 1055 | default = False, |
---|
| 1056 | required = False, |
---|
| 1057 | ) |
---|
| 1058 | |
---|
| 1059 | applicant_id = schema.TextLine( |
---|
[15951] | 1060 | title = _(u'Application Id'), |
---|
[14304] | 1061 | required = False, |
---|
| 1062 | readonly = False, |
---|
| 1063 | ) |
---|
| 1064 | |
---|
[14472] | 1065 | reg_number = TextLineChoice( |
---|
[14486] | 1066 | title = _(u'Kofa Registration Number'), |
---|
[14472] | 1067 | readonly = False, |
---|
| 1068 | required = True, |
---|
| 1069 | source = contextual_reg_num_source, |
---|
| 1070 | ) |
---|
| 1071 | |
---|
[14304] | 1072 | firstname = schema.TextLine( |
---|
| 1073 | title = _(u'First Name'), |
---|
| 1074 | required = True, |
---|
| 1075 | ) |
---|
| 1076 | |
---|
| 1077 | middlename = schema.TextLine( |
---|
| 1078 | title = _(u'Middle Name'), |
---|
| 1079 | required = False, |
---|
| 1080 | ) |
---|
| 1081 | |
---|
| 1082 | lastname = schema.TextLine( |
---|
| 1083 | title = _(u'Last Name (Surname)'), |
---|
| 1084 | required = True, |
---|
| 1085 | ) |
---|
| 1086 | |
---|
[14472] | 1087 | matric_number = schema.TextLine( |
---|
| 1088 | title = _(u'Matriculation Number'), |
---|
[14304] | 1089 | readonly = False, |
---|
[14486] | 1090 | required = True, |
---|
[14304] | 1091 | ) |
---|
| 1092 | |
---|
| 1093 | date_of_birth = FormattedDate( |
---|
| 1094 | title = _(u'Date of Birth'), |
---|
[15275] | 1095 | required = False, |
---|
[14304] | 1096 | #date_format = u'%d/%m/%Y', # Use grok-instance-wide default |
---|
| 1097 | show_year = True, |
---|
| 1098 | ) |
---|
| 1099 | |
---|
[15791] | 1100 | sex = schema.Choice( |
---|
| 1101 | title = _(u'Gender'), |
---|
| 1102 | source = GenderSource(), |
---|
| 1103 | required = True, |
---|
| 1104 | ) |
---|
| 1105 | |
---|
[14304] | 1106 | place_of_birth = schema.TextLine( |
---|
| 1107 | title = _(u'Place of Birth'), |
---|
| 1108 | readonly = False, |
---|
[15275] | 1109 | required = False, |
---|
[14304] | 1110 | ) |
---|
| 1111 | |
---|
| 1112 | nationality = schema.Choice( |
---|
| 1113 | vocabulary = nats_vocab, |
---|
| 1114 | title = _(u'Nationality'), |
---|
[15275] | 1115 | required = False, |
---|
[14304] | 1116 | ) |
---|
| 1117 | |
---|
| 1118 | email = schema.ASCIILine( |
---|
| 1119 | title = _(u'Email Address'), |
---|
| 1120 | required = True, |
---|
| 1121 | constraint=validate_email, |
---|
| 1122 | ) |
---|
| 1123 | |
---|
| 1124 | phone = PhoneNumber( |
---|
| 1125 | title = _(u'Phone'), |
---|
| 1126 | description = u'', |
---|
[15275] | 1127 | required = False, |
---|
[14304] | 1128 | ) |
---|
| 1129 | |
---|
| 1130 | entry_session = schema.Choice( |
---|
| 1131 | title = _(u'Entry Session'), |
---|
| 1132 | source = academic_sessions_vocab, |
---|
[15275] | 1133 | required = False, |
---|
[14304] | 1134 | readonly = False, |
---|
| 1135 | ) |
---|
| 1136 | |
---|
| 1137 | end_session = schema.Choice( |
---|
| 1138 | title = _(u'End Session'), |
---|
| 1139 | source = academic_sessions_vocab, |
---|
[15275] | 1140 | required = False, |
---|
[14304] | 1141 | readonly = False, |
---|
| 1142 | ) |
---|
| 1143 | |
---|
| 1144 | course_studied = schema.Choice( |
---|
| 1145 | title = _(u'Course of Study / Degree'), |
---|
| 1146 | source = CertificateSource(), |
---|
[14486] | 1147 | required = True, |
---|
[14304] | 1148 | readonly = False, |
---|
| 1149 | ) |
---|
| 1150 | |
---|
[15118] | 1151 | certificate_type = schema.Choice( |
---|
| 1152 | title = _(u'Certificate Type'), |
---|
| 1153 | vocabulary = certificate_types_vocab, |
---|
[15275] | 1154 | required = False, |
---|
[15118] | 1155 | ) |
---|
[14306] | 1156 | |
---|
[15118] | 1157 | |
---|
[15530] | 1158 | class IVerificationRequest(IKofaObject): |
---|
| 1159 | """A applicant asking for verification. |
---|
| 1160 | """ |
---|
| 1161 | |
---|
| 1162 | suspended = schema.Bool( |
---|
| 1163 | title = _(u'Account suspended'), |
---|
| 1164 | default = False, |
---|
| 1165 | required = False, |
---|
| 1166 | ) |
---|
| 1167 | |
---|
| 1168 | locked = schema.Bool( |
---|
| 1169 | title = _(u'Form locked'), |
---|
| 1170 | default = False, |
---|
| 1171 | required = False, |
---|
| 1172 | ) |
---|
| 1173 | |
---|
| 1174 | applicant_id = schema.TextLine( |
---|
[15951] | 1175 | title = _(u'Application Id'), |
---|
[15530] | 1176 | required = False, |
---|
| 1177 | readonly = False, |
---|
| 1178 | ) |
---|
| 1179 | |
---|
| 1180 | #reg_number = TextLineChoice( |
---|
| 1181 | # title = _(u'Kofa Registration Number'), |
---|
| 1182 | # readonly = False, |
---|
| 1183 | # required = True, |
---|
| 1184 | # source = contextual_reg_num_source, |
---|
| 1185 | # ) |
---|
| 1186 | |
---|
| 1187 | firstname = schema.TextLine( |
---|
| 1188 | title = _(u'First Name'), |
---|
| 1189 | required = True, |
---|
| 1190 | ) |
---|
| 1191 | |
---|
| 1192 | middlename = schema.TextLine( |
---|
| 1193 | title = _(u'Middle Name'), |
---|
| 1194 | required = False, |
---|
| 1195 | ) |
---|
| 1196 | |
---|
| 1197 | lastname = schema.TextLine( |
---|
| 1198 | title = _(u'Last Name (Surname)'), |
---|
| 1199 | required = True, |
---|
| 1200 | ) |
---|
| 1201 | |
---|
[15791] | 1202 | sex = schema.Choice( |
---|
| 1203 | title = _(u'Gender'), |
---|
| 1204 | source = GenderSource(), |
---|
| 1205 | required = True, |
---|
| 1206 | ) |
---|
| 1207 | |
---|
[15530] | 1208 | email = schema.ASCIILine( |
---|
| 1209 | title = _(u'Email Address'), |
---|
| 1210 | required = True, |
---|
| 1211 | constraint=validate_email, |
---|
| 1212 | ) |
---|
| 1213 | |
---|
[15861] | 1214 | phone = PhoneNumber( |
---|
| 1215 | title = _(u'Phone'), |
---|
| 1216 | description = u'', |
---|
| 1217 | required = False, |
---|
| 1218 | ) |
---|
| 1219 | |
---|
[15530] | 1220 | matric_number = schema.TextLine( |
---|
| 1221 | title = _(u'Verification Body Reference Number'), |
---|
| 1222 | readonly = False, |
---|
| 1223 | required = True, |
---|
| 1224 | ) |
---|
| 1225 | |
---|
| 1226 | body_address = schema.Text( |
---|
| 1227 | title = _(u'Verification Body Address'), |
---|
| 1228 | required = True, |
---|
| 1229 | ) |
---|
| 1230 | |
---|
| 1231 | document_type = schema.Choice( |
---|
| 1232 | title = _(u'Document Type'), |
---|
| 1233 | vocabulary = document_types_vocab, |
---|
| 1234 | required = True, |
---|
| 1235 | ) |
---|
| 1236 | |
---|
[15950] | 1237 | class IFedexRequest(IKofaObject): |
---|
| 1238 | """A applicant requests payment for courier. |
---|
| 1239 | """ |
---|
| 1240 | |
---|
| 1241 | suspended = schema.Bool( |
---|
| 1242 | title = _(u'Account suspended'), |
---|
| 1243 | default = False, |
---|
| 1244 | required = False, |
---|
| 1245 | ) |
---|
| 1246 | |
---|
| 1247 | locked = schema.Bool( |
---|
| 1248 | title = _(u'Form locked'), |
---|
| 1249 | default = False, |
---|
| 1250 | required = False, |
---|
| 1251 | ) |
---|
| 1252 | |
---|
| 1253 | applicant_id = schema.TextLine( |
---|
[15951] | 1254 | title = _(u'Application Id'), |
---|
[15950] | 1255 | required = False, |
---|
| 1256 | readonly = False, |
---|
| 1257 | ) |
---|
| 1258 | |
---|
[15951] | 1259 | trans_id = schema.TextLine( |
---|
[15954] | 1260 | title = _(u'Transcript Application Id'), |
---|
[15951] | 1261 | required = True, |
---|
| 1262 | readonly = False, |
---|
[16005] | 1263 | #description = u'This serve as a unique identifier which ' |
---|
| 1264 | # 'allows the the officer to verify the transcript ' |
---|
| 1265 | # 'in order to avoid errors before dispatch.', |
---|
[15951] | 1266 | ) |
---|
| 1267 | |
---|
[15950] | 1268 | #reg_number = TextLineChoice( |
---|
| 1269 | # title = _(u'Kofa Registration Number'), |
---|
| 1270 | # readonly = False, |
---|
| 1271 | # required = True, |
---|
| 1272 | # source = contextual_reg_num_source, |
---|
| 1273 | # ) |
---|
| 1274 | |
---|
| 1275 | firstname = schema.TextLine( |
---|
| 1276 | title = _(u'First Name'), |
---|
| 1277 | required = True, |
---|
| 1278 | ) |
---|
| 1279 | |
---|
| 1280 | middlename = schema.TextLine( |
---|
| 1281 | title = _(u'Middle Name'), |
---|
| 1282 | required = False, |
---|
| 1283 | ) |
---|
| 1284 | |
---|
| 1285 | lastname = schema.TextLine( |
---|
| 1286 | title = _(u'Last Name (Surname)'), |
---|
| 1287 | required = True, |
---|
| 1288 | ) |
---|
| 1289 | |
---|
| 1290 | sex = schema.Choice( |
---|
| 1291 | title = _(u'Gender'), |
---|
| 1292 | source = GenderSource(), |
---|
| 1293 | required = True, |
---|
| 1294 | ) |
---|
| 1295 | |
---|
| 1296 | email = schema.ASCIILine( |
---|
| 1297 | title = _(u'Email Address'), |
---|
| 1298 | required = True, |
---|
| 1299 | constraint=validate_email, |
---|
| 1300 | ) |
---|
| 1301 | |
---|
| 1302 | phone = PhoneNumber( |
---|
| 1303 | title = _(u'Phone'), |
---|
| 1304 | description = u'', |
---|
| 1305 | required = False, |
---|
| 1306 | ) |
---|
| 1307 | |
---|
| 1308 | matric_number = schema.TextLine( |
---|
| 1309 | title = _(u'WES Reference Number (where applicable)'), |
---|
| 1310 | readonly = False, |
---|
| 1311 | required = False, |
---|
| 1312 | ) |
---|
| 1313 | |
---|
| 1314 | dispatch_address = schema.Text( |
---|
| 1315 | title = _(u'Dispatch Address'), |
---|
| 1316 | required = True, |
---|
| 1317 | ) |
---|
| 1318 | |
---|
[15991] | 1319 | class IRecruitment(IKofaObject): |
---|
| 1320 | """A recruitment application. |
---|
| 1321 | """ |
---|
| 1322 | |
---|
| 1323 | suspended = schema.Bool( |
---|
| 1324 | title = _(u'Account suspended'), |
---|
| 1325 | default = False, |
---|
| 1326 | required = False, |
---|
| 1327 | ) |
---|
| 1328 | |
---|
| 1329 | locked = schema.Bool( |
---|
| 1330 | title = _(u'Form locked'), |
---|
| 1331 | default = False, |
---|
| 1332 | required = False, |
---|
| 1333 | ) |
---|
| 1334 | |
---|
| 1335 | applicant_id = schema.TextLine( |
---|
| 1336 | title = _(u'Application Id'), |
---|
| 1337 | required = False, |
---|
| 1338 | readonly = False, |
---|
| 1339 | ) |
---|
| 1340 | |
---|
| 1341 | #reg_number = TextLineChoice( |
---|
| 1342 | # title = _(u'Kofa Registration Number'), |
---|
| 1343 | # readonly = False, |
---|
| 1344 | # required = True, |
---|
| 1345 | # source = contextual_reg_num_source, |
---|
| 1346 | # ) |
---|
| 1347 | |
---|
| 1348 | application_types = schema.Choice( |
---|
| 1349 | title = _(u'Application Category'), |
---|
| 1350 | vocabulary = application_types_vocab, |
---|
| 1351 | required = True, |
---|
| 1352 | ) |
---|
| 1353 | |
---|
[15994] | 1354 | position_comment = schema.Text( |
---|
| 1355 | title = _(u'Desired Position'), |
---|
| 1356 | required = True, |
---|
| 1357 | description = u'Copy and paste the vacant position ' |
---|
| 1358 | 'text from the <a target="_blank" ' |
---|
| 1359 | 'href="https://aauekpoma.edu.ng/">university website</a>.', |
---|
| 1360 | ) |
---|
| 1361 | |
---|
[15991] | 1362 | firstname = schema.TextLine( |
---|
| 1363 | title = _(u'First Name'), |
---|
| 1364 | required = True, |
---|
| 1365 | ) |
---|
| 1366 | |
---|
| 1367 | middlename = schema.TextLine( |
---|
| 1368 | title = _(u'Middle Name'), |
---|
| 1369 | required = False, |
---|
| 1370 | ) |
---|
| 1371 | |
---|
| 1372 | lastname = schema.TextLine( |
---|
| 1373 | title = _(u'Last Name (Surname)'), |
---|
| 1374 | required = True, |
---|
| 1375 | ) |
---|
| 1376 | |
---|
| 1377 | sex = schema.Choice( |
---|
| 1378 | title = _(u'Gender'), |
---|
| 1379 | source = GenderSource(), |
---|
| 1380 | required = True, |
---|
| 1381 | ) |
---|
| 1382 | |
---|
| 1383 | email = schema.ASCIILine( |
---|
| 1384 | title = _(u'Email Address'), |
---|
| 1385 | required = True, |
---|
| 1386 | constraint=validate_email, |
---|
| 1387 | ) |
---|
| 1388 | |
---|
| 1389 | phone = PhoneNumber( |
---|
| 1390 | title = _(u'Phone'), |
---|
| 1391 | description = u'', |
---|
| 1392 | required = False, |
---|
| 1393 | ) |
---|
| 1394 | |
---|
| 1395 | address = schema.Text( |
---|
| 1396 | title = _(u'Address'), |
---|
| 1397 | required = True, |
---|
| 1398 | ) |
---|
| 1399 | |
---|
[15531] | 1400 | class ISendByEmailRequest(IKofaObject): |
---|
| 1401 | """A applicant asking for sending an email. |
---|
| 1402 | """ |
---|
[15530] | 1403 | |
---|
[15531] | 1404 | suspended = schema.Bool( |
---|
| 1405 | title = _(u'Account suspended'), |
---|
| 1406 | default = False, |
---|
| 1407 | required = False, |
---|
| 1408 | ) |
---|
| 1409 | |
---|
| 1410 | locked = schema.Bool( |
---|
| 1411 | title = _(u'Form locked'), |
---|
| 1412 | default = False, |
---|
| 1413 | required = False, |
---|
| 1414 | ) |
---|
| 1415 | |
---|
| 1416 | applicant_id = schema.TextLine( |
---|
| 1417 | title = _(u'Applicant Id'), |
---|
| 1418 | required = False, |
---|
| 1419 | readonly = False, |
---|
| 1420 | ) |
---|
| 1421 | |
---|
| 1422 | firstname = schema.TextLine( |
---|
| 1423 | title = _(u'First Name'), |
---|
| 1424 | required = True, |
---|
| 1425 | ) |
---|
| 1426 | |
---|
| 1427 | middlename = schema.TextLine( |
---|
| 1428 | title = _(u'Middle Name'), |
---|
| 1429 | required = False, |
---|
| 1430 | ) |
---|
| 1431 | |
---|
| 1432 | lastname = schema.TextLine( |
---|
| 1433 | title = _(u'Last Name (Surname)'), |
---|
| 1434 | required = True, |
---|
| 1435 | ) |
---|
| 1436 | |
---|
[15791] | 1437 | sex = schema.Choice( |
---|
| 1438 | title = _(u'Gender'), |
---|
| 1439 | source = GenderSource(), |
---|
| 1440 | required = True, |
---|
| 1441 | ) |
---|
| 1442 | |
---|
[15531] | 1443 | email = schema.ASCIILine( |
---|
| 1444 | title = _(u"Applicant's Email Address"), |
---|
| 1445 | required = True, |
---|
| 1446 | constraint=validate_email, |
---|
| 1447 | ) |
---|
| 1448 | |
---|
[15861] | 1449 | phone = PhoneNumber( |
---|
| 1450 | title = _(u'Phone'), |
---|
| 1451 | description = u'', |
---|
| 1452 | required = False, |
---|
| 1453 | ) |
---|
| 1454 | |
---|
[15531] | 1455 | body_address = schema.Text( |
---|
| 1456 | title = _(u'Address of Requesting Organization'), |
---|
| 1457 | required = True, |
---|
| 1458 | ) |
---|
| 1459 | |
---|
| 1460 | body_email = schema.ASCIILine( |
---|
| 1461 | title = _(u"Email Address of Requesting Organization"), |
---|
| 1462 | required = True, |
---|
| 1463 | constraint=validate_email, |
---|
| 1464 | ) |
---|
| 1465 | |
---|
[15740] | 1466 | request_type = schema.Choice( |
---|
| 1467 | title = _(u'Request Type'), |
---|
| 1468 | vocabulary = request_types_vocab, |
---|
| 1469 | required = True, |
---|
| 1470 | ) |
---|
| 1471 | |
---|
[15693] | 1472 | document_type = schema.Choice( |
---|
| 1473 | title = _(u'Document Type'), |
---|
| 1474 | vocabulary = document_types_vocab, |
---|
| 1475 | required = True, |
---|
| 1476 | ) |
---|
| 1477 | |
---|
[13544] | 1478 | class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant, |
---|
[15530] | 1479 | ITranscriptApplicant, ICertificateRequest, |
---|
[15951] | 1480 | IVerificationRequest, ISendByEmailRequest, |
---|
[15991] | 1481 | IFedexRequest, IRecruitment): |
---|
[14471] | 1482 | """An interface for all types of applicants. |
---|
[13544] | 1483 | |
---|
[8931] | 1484 | Attention: The ICustomPGApplicant field seetings will be overwritten |
---|
| 1485 | by ICustomPGApplicant field settings. If a field is defined |
---|
[8728] | 1486 | in both interfaces zope.schema validates only against the |
---|
[8931] | 1487 | constraints in ICustomUGApplicant. This does not affect the forms |
---|
| 1488 | since they are build on either ICustomUGApplicant or ICustomPGApplicant. |
---|
[8012] | 1489 | """ |
---|
| 1490 | |
---|
[8746] | 1491 | def writeLogMessage(view, comment): |
---|
[8053] | 1492 | """Adds an INFO message to the log file |
---|
| 1493 | """ |
---|
| 1494 | |
---|
| 1495 | def createStudent(): |
---|
| 1496 | """Create a student object from applicatnt data |
---|
| 1497 | and copy applicant object. |
---|
| 1498 | """ |
---|
| 1499 | |
---|
[10298] | 1500 | class ICustomUGApplicantEdit(ICustomUGApplicant): |
---|
[8728] | 1501 | """An undergraduate applicant interface for edit forms. |
---|
[8012] | 1502 | |
---|
| 1503 | Here we can repeat the fields from base data and set the |
---|
| 1504 | `required` and `readonly` attributes to True to further restrict |
---|
| 1505 | the data access. Or we can allow only certain certificates to be |
---|
| 1506 | selected by choosing the appropriate source. |
---|
| 1507 | |
---|
| 1508 | We cannot omit fields here. This has to be done in the |
---|
| 1509 | respective form page. |
---|
| 1510 | """ |
---|
| 1511 | |
---|
[13977] | 1512 | #programme_type = schema.Choice( |
---|
| 1513 | # title = _(u'Programme Type'), |
---|
| 1514 | # vocabulary = programme_types_vocab, |
---|
| 1515 | # required = True, |
---|
| 1516 | # ) |
---|
[13548] | 1517 | |
---|
[10924] | 1518 | date_of_birth = FormattedDate( |
---|
| 1519 | title = _(u'Date of Birth'), |
---|
| 1520 | required = True, |
---|
| 1521 | show_year = True, |
---|
| 1522 | ) |
---|
| 1523 | |
---|
[15462] | 1524 | course1 = schema.Choice( |
---|
| 1525 | title = _(u'1st Choice Course of Study'), |
---|
| 1526 | source = AppCatCertificateSource(), |
---|
| 1527 | required = True, |
---|
| 1528 | ) |
---|
| 1529 | |
---|
| 1530 | course2 = schema.Choice( |
---|
| 1531 | title = _(u'2nd Choice Course of Study'), |
---|
| 1532 | source = AppCatCertificateSource(), |
---|
| 1533 | required = True, |
---|
| 1534 | ) |
---|
| 1535 | |
---|
| 1536 | course3 = schema.Choice( |
---|
| 1537 | title = _(u'3rd Choice Course of Study'), |
---|
| 1538 | source = AppCatCertificateSource(), |
---|
| 1539 | required = True, |
---|
| 1540 | ) |
---|
| 1541 | |
---|
[14829] | 1542 | fst_sit_fname = schema.TextLine( |
---|
| 1543 | title = _(u'Full Name'), |
---|
| 1544 | required = True, |
---|
| 1545 | readonly = False, |
---|
| 1546 | ) |
---|
| 1547 | |
---|
| 1548 | fst_sit_no = schema.TextLine( |
---|
| 1549 | title = _(u'Exam Number'), |
---|
| 1550 | required = True, |
---|
| 1551 | readonly = False, |
---|
| 1552 | ) |
---|
| 1553 | |
---|
| 1554 | fst_sit_sc_pin = schema.TextLine( |
---|
| 1555 | title = _(u'Scratch Card Pin'), |
---|
| 1556 | required = True, |
---|
| 1557 | readonly = False, |
---|
| 1558 | ) |
---|
| 1559 | |
---|
| 1560 | fst_sit_sc_serial_number = schema.TextLine( |
---|
| 1561 | title = _(u'Scratch Card Serial Number'), |
---|
| 1562 | required = True, |
---|
| 1563 | readonly = False, |
---|
| 1564 | ) |
---|
| 1565 | |
---|
| 1566 | fst_sit_date = FormattedDate( |
---|
| 1567 | title = _(u'Exam Date'), |
---|
| 1568 | required = True, |
---|
| 1569 | readonly = False, |
---|
| 1570 | show_year = True, |
---|
| 1571 | ) |
---|
| 1572 | |
---|
| 1573 | fst_sit_type = schema.Choice( |
---|
| 1574 | title = _(u'Exam Type'), |
---|
| 1575 | required = True, |
---|
| 1576 | readonly = False, |
---|
| 1577 | vocabulary = exam_types, |
---|
| 1578 | ) |
---|
| 1579 | |
---|
[15459] | 1580 | # course1 works only on manage pages. On edit pages course1 input is missing |
---|
| 1581 | # and no Invalid exception is raised. |
---|
| 1582 | # NoInputData: NoInputD...course1' |
---|
| 1583 | # Therefore, we check and compare course1 on CustomApplicantEditFormPage. |
---|
| 1584 | @invariant |
---|
| 1585 | def course_choice(applicant): |
---|
| 1586 | if applicant.course2 == applicant.course3: |
---|
| 1587 | raise Invalid(_("3rd choice course must differ from 2nd choice course.")) |
---|
| 1588 | |
---|
[13977] | 1589 | #ICustomUGApplicantEdit['programme_type'].order = ICustomUGApplicant[ |
---|
| 1590 | # 'programme_type'].order |
---|
[10924] | 1591 | ICustomUGApplicantEdit['date_of_birth'].order = ICustomUGApplicant[ |
---|
| 1592 | 'date_of_birth'].order |
---|
[15462] | 1593 | ICustomUGApplicantEdit['course1'].order = ICustomUGApplicant[ |
---|
| 1594 | 'course1'].order |
---|
| 1595 | ICustomUGApplicantEdit['course2'].order = ICustomUGApplicant[ |
---|
| 1596 | 'course2'].order |
---|
| 1597 | ICustomUGApplicantEdit['course3'].order = ICustomUGApplicant[ |
---|
| 1598 | 'course3'].order |
---|
[14829] | 1599 | ICustomUGApplicantEdit['fst_sit_fname'].order = ICustomUGApplicant[ |
---|
| 1600 | 'fst_sit_fname'].order |
---|
| 1601 | ICustomUGApplicantEdit['fst_sit_no'].order = ICustomUGApplicant[ |
---|
| 1602 | 'fst_sit_no'].order |
---|
| 1603 | ICustomUGApplicantEdit['fst_sit_sc_pin'].order = ICustomUGApplicant[ |
---|
| 1604 | 'fst_sit_sc_pin'].order |
---|
| 1605 | ICustomUGApplicantEdit['fst_sit_sc_serial_number'].order = ICustomUGApplicant[ |
---|
| 1606 | 'fst_sit_sc_serial_number'].order |
---|
| 1607 | ICustomUGApplicantEdit['fst_sit_date'].order = ICustomUGApplicant[ |
---|
| 1608 | 'fst_sit_date'].order |
---|
| 1609 | ICustomUGApplicantEdit['fst_sit_type'].order = ICustomUGApplicant[ |
---|
| 1610 | 'fst_sit_type'].order |
---|
[10924] | 1611 | |
---|
[16756] | 1612 | class ICustomPGApplicantEdit(ICustomPGApplicant): |
---|
[7866] | 1613 | """A postgraduate applicant interface for editing. |
---|
| 1614 | |
---|
| 1615 | Here we can repeat the fields from base data and set the |
---|
| 1616 | `required` and `readonly` attributes to True to further restrict |
---|
| 1617 | the data access. Or we can allow only certain certificates to be |
---|
| 1618 | selected by choosing the appropriate source. |
---|
| 1619 | |
---|
| 1620 | We cannot omit fields here. This has to be done in the |
---|
| 1621 | respective form page. |
---|
[8017] | 1622 | """ |
---|
[8455] | 1623 | |
---|
[16756] | 1624 | email = schema.ASCIILine( |
---|
| 1625 | title = _(u'Email Address'), |
---|
| 1626 | required = True, |
---|
| 1627 | constraint=validate_email, |
---|
| 1628 | ) |
---|
| 1629 | date_of_birth = FormattedDate( |
---|
| 1630 | title = _(u'Date of Birth'), |
---|
| 1631 | required = True, |
---|
| 1632 | show_year = True, |
---|
| 1633 | ) |
---|
| 1634 | |
---|
| 1635 | ICustomPGApplicantEdit[ |
---|
| 1636 | 'date_of_birth'].order = ICustomPGApplicant['date_of_birth'].order |
---|
| 1637 | ICustomPGApplicantEdit[ |
---|
| 1638 | 'email'].order = ICustomPGApplicant['email'].order |
---|
| 1639 | |
---|
[8931] | 1640 | class ICustomApplicantOnlinePayment(INigeriaApplicantOnlinePayment): |
---|
[8247] | 1641 | """An applicant payment via payment gateways. |
---|
| 1642 | |
---|
| 1643 | """ |
---|
[8532] | 1644 | |
---|
[8980] | 1645 | class IPUTMEApplicantEdit(IPUTMEApplicantEdit): |
---|
[8532] | 1646 | """An undergraduate applicant interface for editing. |
---|
| 1647 | |
---|
| 1648 | Here we can repeat the fields from base data and set the |
---|
| 1649 | `required` and `readonly` attributes to True to further restrict |
---|
| 1650 | the data access. Or we can allow only certain certificates to be |
---|
| 1651 | selected by choosing the appropriate source. |
---|
| 1652 | |
---|
| 1653 | We cannot omit fields here. This has to be done in the |
---|
| 1654 | respective form page. |
---|
| 1655 | """ |
---|
| 1656 | |
---|
[14471] | 1657 | class ICustomApplicantUpdateByRegNo(ICustomApplicant): |
---|
[8583] | 1658 | """Representation of an applicant. |
---|
| 1659 | |
---|
| 1660 | Skip regular reg_number validation if reg_number is used for finding |
---|
| 1661 | the applicant object. |
---|
| 1662 | """ |
---|
[8980] | 1663 | |
---|
[14471] | 1664 | reg_number = schema.TextLine( |
---|
| 1665 | title = u'Registration Number', |
---|
| 1666 | required = False, |
---|
| 1667 | ) |
---|
[13544] | 1668 | |
---|
[16786] | 1669 | class ICustomApplicantRefereeReport(IApplicantRefereeReport): |
---|
| 1670 | """A referee report. |
---|
| 1671 | """ |
---|
[13544] | 1672 | |
---|
[16786] | 1673 | duration = schema.Text( |
---|
| 1674 | title = _(u'How long and in what capacity have you known the candidate?'), |
---|
| 1675 | required = False, |
---|
| 1676 | ) |
---|
[14471] | 1677 | |
---|
[16786] | 1678 | itellectual = schema.Choice( |
---|
| 1679 | title = _(u'Intellectual Capacity'), |
---|
| 1680 | required = False, |
---|
| 1681 | readonly = False, |
---|
| 1682 | vocabulary = rating_vocab, |
---|
| 1683 | ) |
---|
[14471] | 1684 | |
---|
[16786] | 1685 | persistent = schema.Choice( |
---|
| 1686 | title = _(u'Capacity for Persistent and Independent Academic Study'), |
---|
| 1687 | required = False, |
---|
| 1688 | readonly = False, |
---|
| 1689 | vocabulary = rating_vocab, |
---|
| 1690 | ) |
---|
| 1691 | |
---|
| 1692 | imaginative = schema.Choice( |
---|
| 1693 | title = _(u'Ability for Imaginative Thought'), |
---|
| 1694 | required = False, |
---|
| 1695 | readonly = False, |
---|
| 1696 | vocabulary = rating_vocab, |
---|
| 1697 | ) |
---|
| 1698 | |
---|
| 1699 | productive = schema.Choice( |
---|
| 1700 | title = _(u'Promise of Productive Scholarship'), |
---|
| 1701 | required = False, |
---|
| 1702 | readonly = False, |
---|
| 1703 | vocabulary = rating_vocab, |
---|
| 1704 | ) |
---|
| 1705 | |
---|
| 1706 | previous = schema.Choice( |
---|
| 1707 | title = _(u'Quality of Previous Work'), |
---|
| 1708 | required = False, |
---|
| 1709 | readonly = False, |
---|
| 1710 | vocabulary = rating_vocab, |
---|
| 1711 | ) |
---|
| 1712 | |
---|
| 1713 | expression = schema.Choice( |
---|
| 1714 | title = _(u'Oral and Written Expression in English'), |
---|
| 1715 | required = False, |
---|
| 1716 | readonly = False, |
---|
| 1717 | vocabulary = rating_vocab, |
---|
| 1718 | ) |
---|
| 1719 | |
---|
| 1720 | personality = schema.Text( |
---|
| 1721 | title = _(u'Please comment on the candidate\'s personality ' |
---|
| 1722 | 'with particular reference to his/her moral character, emotional ' |
---|
| 1723 | 'and physical stabilty'), |
---|
| 1724 | required = False, |
---|
| 1725 | ) |
---|
| 1726 | |
---|
| 1727 | promise = schema.Choice( |
---|
| 1728 | title = _(u'Candidate\'s overall promise'), |
---|
| 1729 | required = False, |
---|
| 1730 | readonly = False, |
---|
| 1731 | vocabulary = overallpromise_vocab, |
---|
| 1732 | ) |
---|
| 1733 | |
---|
| 1734 | report = schema.Text( |
---|
| 1735 | title = _(u'Any other relevant information which would help ' |
---|
| 1736 | 'in determining the candidate\'s suitability?'), |
---|
| 1737 | required = False, |
---|
| 1738 | ) |
---|
| 1739 | |
---|
| 1740 | objection = schema.Text( |
---|
| 1741 | title = _(u'Have you any objection to the contents of this ' |
---|
| 1742 | 'evaluation being disclosed to any award-given body if ' |
---|
| 1743 | 'the need arises?'), |
---|
| 1744 | required = False, |
---|
| 1745 | ) |
---|
| 1746 | |
---|