- Timestamp:
- 13 Feb 2011, 12:02:29 (14 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/applicants
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/applicants.py
r5748 r5753 25 25 from zope.schema.fieldproperty import FieldProperty 26 26 from waeup.sirp.interfaces import IWAeUPSIRPPluggable 27 from waeup.sirp.applicants. jambtables.interfaces import (28 IResultEntry, IApplicant, IApplicant Container, IApplicantPDEEditData27 from waeup.sirp.applicants.interfaces import ( 28 IResultEntry, IApplicant, IApplicantPDEEditData 29 29 ) 30 30 from waeup.sirp.widgets.passportwidget import PassportImage … … 135 135 def getInterfaces(self): 136 136 return implementedBy(Applicant) 137 138 139 class ApplicantContainer(grok.Container):140 grok.implements(IApplicantContainer) -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py
r5682 r5753 22 22 """Interfaces regarding student applicants and related components. 23 23 """ 24 import os 25 import waeup.sirp.browser 26 from hurry.file import HurryFile 24 27 from zope import schema 28 from zc.sourcefactory.basic import BasicSourceFactory 29 from waeup.sirp.image.schema import ImageFile 25 30 from waeup.sirp.interfaces import IWAeUPObject, SimpleWAeUPVocabulary 31 32 IMAGE_PATH = os.path.join( 33 os.path.dirname(waeup.sirp.browser.__file__), 34 'static' 35 ) 36 DEFAULT_PASSPORT_IMAGE_MALE = HurryFile( 37 'passport.jpg', 38 open(os.path.join(IMAGE_PATH, 'placeholder_m.jpg')).read(), 39 ) 40 DEFAULT_PASSPORT_IMAGE_FEMALE = HurryFile( 41 'passport.jpg', 42 open(os.path.join(IMAGE_PATH, 'placeholder_f.jpg')).read(), 43 ) 26 44 27 45 #: Categories of applications we support. … … 39 57 application_categories_vocab = SimpleWAeUPVocabulary(*APPLICATION_CATEGORIES) 40 58 59 class GenderSource(BasicSourceFactory): 60 """A gender source delivers basically a mapping 61 ``{'m': 'male', 'f': 'female'}`` 62 63 Using a source, we make sure that the tokens (which are 64 stored/expected for instance from CSV files) are something one 65 can expect and not cryptic IntIDs. 66 """ 67 def getValues(self): 68 return ['m', 'f'] 69 70 def getToken(self, value): 71 return value[0].lower() 72 73 def getTitle(self, value): 74 if value == 'm': 75 return 'male' 76 if value == 'f': 77 return 'female' 78 79 class IResultEntry(IWAeUPObject): 80 subject = schema.TextLine( 81 title = u'Subject', 82 description = u'The subject', 83 required=False, 84 ) 85 score = schema.TextLine( 86 title = u'Score', 87 description = u'The score', 88 required=False, 89 ) 90 41 91 class IApplicantsRoot(IWAeUPObject): 42 92 """A container for university applicants containers. … … 133 183 database. 134 184 """ 185 class IApplicantBaseData(IWAeUPObject): 186 """The data for an applicant. 187 188 This is a base interface with no field (except ``reg_no``) 189 required. For use with importers, forms, etc., please use one of 190 the derived interfaces below, which set more fields to required 191 state, depending on use-case. 192 """ 193 reg_no = schema.TextLine( 194 title = u'JAMB Registration Number', 195 ) 196 access_code = schema.TextLine( 197 title = u'Access Code', 198 required = False, 199 ) 200 serial = schema.TextLine( 201 title = u'Serial Number', 202 required = False, 203 ) 204 course1 = schema.TextLine( 205 title = u'1st Choice Course of Study', 206 required = False, 207 ) 208 course2 = schema.TextLine( 209 title = u'2nd Choice Course of Study', 210 required = False, 211 ) 212 course3 = schema.TextLine( 213 title = u'3rd Choice Course of Study', 214 required = False, 215 ) 216 firstname = schema.TextLine( 217 title = u'First Name', 218 required = False, 219 ) 220 middlenames = schema.TextLine( 221 title = u'Middle Names', 222 required = False, 223 ) 224 lastname = schema.TextLine( 225 title = u'Surname/Full Name', 226 required = False, 227 ) 228 jamb_age = schema.Int( 229 title = u'Age (provided by JAMB)', 230 required = False, 231 ) 232 date_of_birth = schema.Date( 233 title = u'Date of Birth', 234 required = False, 235 ) 236 jamb_state = schema.TextLine( 237 title = u'State (provided by JAMB)', 238 required = False, 239 ) 240 jamb_lga = schema.TextLine( 241 title = u'LGA (provided by JAMB)', 242 required = False, 243 ) 244 lga = schema.TextLine( 245 # XXX: should be choice 246 title = u'State/LGA (confirmed by applicant)', 247 required = False, 248 ) 249 sex = schema.Choice( 250 title = u'Sex', 251 source = GenderSource(), 252 default = u'm', 253 required = False, 254 ) 255 email = schema.TextLine( 256 title = u'Email', 257 required = False, 258 ) 259 phone = schema.TextLine( 260 title = u'Phone', 261 required = False, 262 ) 263 #passport = schema.Bool( 264 # title = u'Passport Photograph', 265 # default = True, 266 # required = False, 267 # ) 268 passport = ImageFile( 269 title = u'Passport Photograph', 270 default = DEFAULT_PASSPORT_IMAGE_MALE, 271 required = True, 272 ) 273 aos = schema.TextLine( 274 # XXX: should be choice 275 title = u'Area of Specialisation', 276 required = False, 277 ) 278 subj1 = schema.TextLine( 279 # XXX: should be choice 280 title = u'1st Choice of Study', 281 required = False, 282 ) 283 subj2 = schema.TextLine( 284 # XXX: should be choice 285 title = u'2nd Choice of Study', 286 required = False, 287 ) 288 subj3 = schema.TextLine( 289 # XXX: should be choice 290 title = u'3rd Choice of Study', 291 required = False, 292 ) 293 # 294 # Higher Educational Data 295 # 296 hq_matric_no = schema.TextLine( 297 title = u'Former Matric Number', 298 required = False, 299 ) 300 hq_type = schema.TextLine( 301 title = u'Higher Qualification', 302 required = False, 303 ) 304 hq_grade = schema.TextLine( 305 title = u'Higher Qualification Grade', 306 required = False, 307 ) 308 hq_school = schema.TextLine( 309 title = u'School Attended', 310 required = False, 311 ) 312 hq_session = schema.TextLine( 313 title = u'Session Obtained', 314 required = False, 315 ) 316 hq_disc = schema.TextLine( 317 title = u'Discipline', 318 required = False, 319 ) 320 # 321 # First sitting data 322 # 323 fst_sit_fname = schema.TextLine( 324 title = u'Full Name', 325 required = False, 326 ) 327 fst_sit_no = schema.TextLine( 328 title = u'Exam Number', 329 required = False, 330 ) 331 fst_sit_date = schema.Date( 332 title = u'Exam Date (dd/mm/yyyy)', 333 required = False, 334 ) 335 fst_sit_type = schema.TextLine( 336 # XXX: Should be choice 337 title = u'Exam Type', 338 required = False, 339 ) 340 fst_sit_results = schema.List( 341 title = u'Results', 342 required = False, 343 value_type = schema.Object( 344 title = u'Entries', 345 schema = IResultEntry, 346 required = False, 347 ) 348 ) 349 scd_sit_fname = schema.TextLine( 350 title = u'Full Name', 351 required = False, 352 ) 353 scd_sit_no = schema.TextLine( 354 title = u'Exam Number', 355 required = False, 356 ) 357 scd_sit_date = schema.Date( 358 title = u'Exam Date (dd/mm/yyyy)', 359 required = False, 360 ) 361 scd_sit_type = schema.TextLine( 362 # XXX: Should be choice 363 title = u'Exam Type', 364 required = False, 365 ) 366 scd_sit_results = schema.TextLine( 367 # XXX: Should be nested list of choices 368 title = u'Results', 369 required = False, 370 ) 371 # 372 # JAMB scores 373 # 374 eng_score = schema.TextLine( 375 title = u"'English' score", 376 required = False, 377 ) 378 subj1score = schema.TextLine( 379 title = u'1st Choice of Study Score', 380 required = False, 381 ) 382 subj2score = schema.TextLine( 383 title = u'2nd Choice of Study Score', 384 required = False, 385 ) 386 subj3score = schema.TextLine( 387 title = u'3rd Choice of Study Score', 388 required = False, 389 ) 390 # XXX: Total score??? 391 392 # 393 # Application Data 394 # 395 application_date = schema.Date( 396 title = u'Application Date', 397 required = False, 398 ) 399 status = schema.TextLine( 400 # XXX: should be 'status' type 401 title = u'Application Status', 402 required = False, 403 ) 404 screening_date = schema.Date( 405 title = u'Screening Date', 406 required = False, 407 ) 408 screening_type = schema.TextLine( 409 # XXX: schould be choice 410 title = u'Screening Type', 411 required = False, 412 ) 413 screening_score = schema.TextLine( 414 title = u'Screening Score', 415 required = False, 416 ) 417 screening_venue = schema.TextLine( 418 title = u'Screening Venue', 419 required = False, 420 ) 421 total_score = schema.TextLine( 422 title = u'Total Score', 423 required = False, 424 ) 425 course_admitted = schema.TextLine( 426 # XXX: should be choice 427 title = u'Admitted Course of Study', 428 required = False, 429 ) 430 department = schema.TextLine( 431 # XXX: if we have a course, dept. is not necessary 432 title = u'Department', 433 required = False, 434 ) 435 faculty = schema.TextLine( 436 # XXX: if we have a course, faculty is not necessary 437 title = u'Faculty', 438 required = False, 439 ) 440 entry_session = schema.TextLine( 441 # XXX: should be choice, should have sensible default: upcoming session 442 title = u'Entry Session', 443 required = False, 444 ) 445 notice = schema.Text( 446 title = u'Notice', 447 required = False, 448 ) 449 student_id = schema.TextLine( 450 title = u'Student ID', 451 required = False, 452 ) 453 import_record_no = schema.TextLine( 454 title = u'Import Record No.', 455 required = False, 456 ) 457 imported_by = schema.TextLine( 458 title = u'Imported By', 459 required = False, 460 ) 461 import_date = schema.Datetime( 462 title = u'Import Date', 463 required = False, 464 ) 465 import_from = schema.TextLine( 466 title = u'Import Source', 467 required = False, 468 ) 469 470 471 class IApplicant(IApplicantBaseData): 472 """An applicant. 473 474 This is basically the applicant base data. Here we repeat the 475 fields from base data only with the `required` attribute of 476 required attributes set to True (which is the default). 477 """ 478 access_code = schema.TextLine( 479 title = u'Access Code', 480 ) 481 course1 = schema.TextLine( 482 title = u'1st Choice Course of Study', 483 ) 484 firstname = schema.TextLine( 485 title = u'First Name', 486 ) 487 middlenames = schema.TextLine( 488 title = u'Middle Names', 489 ) 490 lastname = schema.TextLine( 491 title = u'Surname/Full Name', 492 ) 493 date_of_birth = schema.Date( 494 title = u'Date of Birth', 495 ) 496 jamb_state = schema.TextLine( 497 title = u'State (provided by JAMB)', 498 ) 499 jamb_lga = schema.TextLine( 500 title = u'LGA (provided by JAMB)', 501 ) 502 lga = schema.TextLine( 503 # XXX: should be choice 504 title = u'State/LGA (confirmed by applicant)', 505 ) 506 sex = schema.Choice( 507 title = u'Sex', 508 source = GenderSource(), 509 default = u'm', 510 ) 511 #passport = schema.Bool( 512 # title = u'Passport Photograph', 513 # default = True, 514 # ) 515 passport = ImageFile( 516 title = u'Passport Photograph', 517 default = DEFAULT_PASSPORT_IMAGE_MALE, 518 required = True, 519 ) 520 # 521 # Higher Educational Data 522 # 523 524 # 525 # First sitting data 526 # 527 fst_sit_fname = schema.TextLine( 528 title = u'Full Name', 529 ) 530 531 # 532 # Second sitting data 533 # 534 scd_sit_fname = schema.TextLine( 535 title = u'Full Name', 536 ) 537 # 538 # JAMB scores 539 # 540 541 # 542 # Application Data 543 # 544 application_date = schema.Date( 545 title = u'Application Date', 546 ) 547 status = schema.TextLine( 548 # XXX: should be 'status' type 549 title = u'Application Status', 550 ) 551 screening_date = schema.Date( 552 title = u'Screening Date', 553 ) 554 screening_type = schema.TextLine( 555 # XXX: schould be choice 556 title = u'Screening Type', 557 ) 558 screening_score = schema.TextLine( 559 title = u'Screening Score', 560 ) 561 entry_session = schema.TextLine( 562 # XXX: should be choice 563 # XXX: should have sensible default: upcoming session 564 title = u'Entry Session', 565 ) 566 import_record_no = schema.TextLine( 567 title = u'Import Record No.', 568 ) 569 imported_by = schema.TextLine( 570 title = u'Imported By', 571 ) 572 import_date = schema.Datetime( 573 title = u'Import Date', 574 ) 575 import_from = schema.TextLine( 576 title = u'Import Source', 577 ) 578 579 class IApplicantPDEEditData(IWAeUPObject): 580 """The data set presented to PDE applicants. 581 """ 582 reg_no = schema.TextLine( 583 title = u'JAMB Registration Number', 584 readonly = True, 585 ) 586 access_code = schema.TextLine( 587 title = u'Access Code', 588 readonly = True, 589 ) 590 course1 = schema.TextLine( 591 title = u'1st Choice Course of Study', 592 readonly = True, 593 ) 594 course2 = schema.TextLine( 595 title = u'2nd Choice Course of Study', 596 required = False, 597 ) 598 course3 = schema.TextLine( 599 title = u'3rd Choice Course of Study', 600 required = False, 601 ) 602 lastname = schema.TextLine( 603 title = u'Name', 604 readonly = True, 605 ) 606 jamb_age = schema.Int( 607 title = u'Age', 608 readonly = True, 609 ) 610 date_of_birth = schema.Date( 611 title = u'Date of Birth', 612 required = True, 613 ) 614 jamb_state = schema.TextLine( 615 title = u'State (provided by JAMB)', 616 readonly = True, 617 ) 618 jamb_lga = schema.TextLine( 619 title = u'LGA (provided by JAMB)', 620 readonly = True, 621 ) 622 lga = schema.TextLine( 623 # XXX: should be choice 624 title = u'State/LGA (confirmed by applicant)', 625 required = False, 626 ) 627 email = schema.TextLine( 628 title = u'Email', 629 required = False, 630 ) 631 phone = schema.TextLine( 632 title = u'Phone', 633 required = False, 634 ) 635 aos = schema.TextLine( 636 # XXX: should be choice 637 title = u'Area of Specialisation', 638 required = False, 639 ) 640 subj1 = schema.TextLine( 641 # XXX: should be choice 642 title = u'1st Choice of Study', 643 readonly = True, 644 ) 645 subj2 = schema.TextLine( 646 # XXX: should be choice 647 title = u'2nd Choice of Study', 648 required = False, 649 ) 650 subj3 = schema.TextLine( 651 # XXX: should be choice 652 title = u'3rd Choice of Study', 653 required = False, 654 ) 655 656 # 657 # Application Data 658 # 659 application_date = schema.Date( 660 title = u'Application Date', 661 readonly = True, 662 ) 663 status = schema.TextLine( 664 # XXX: should be 'status' type 665 title = u'Application Status', 666 readonly = True, 667 ) 668 screening_date = schema.Date( 669 title = u'Screening Date', 670 readonly = True, 671 ) 672 #passport = schema.Bool( 673 # title = u'Passport Photograph', 674 # default = True, 675 # required = False, 676 # ), 677 #passport = schema.Bytes( 678 # title = u'Passport Photograph', 679 # required = True, 680 # ) 681 #passport = schema.Object( 682 # title = u'Passport Photograph', 683 # required = True, 684 # schema = IImage) 685 passport = ImageFile( 686 title = u'Passport Photograph', 687 default = DEFAULT_PASSPORT_IMAGE_MALE, 688 required = True, 689 ) -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/jambtables/interfaces.py
r5752 r5753 33 33 from waeup.sirp.interfaces import IWAeUPObject 34 34 from waeup.sirp.image.schema import ImageFile 35 from waeup.sirp.applicants.interfaces import IApplicantBaseData 35 36 36 IMAGE_PATH = os.path.join(37 os.path.dirname(waeup.sirp.browser.__file__),38 'static'39 )40 DEFAULT_PASSPORT_IMAGE_MALE = HurryFile(41 'passport.jpg',42 open(os.path.join(IMAGE_PATH, 'placeholder_m.jpg')).read(),43 )44 DEFAULT_PASSPORT_IMAGE_FEMALE = HurryFile(45 'passport.jpg',46 open(os.path.join(IMAGE_PATH, 'placeholder_f.jpg')).read(),47 )48 49 class GenderSource(BasicSourceFactory):50 """A gender source delivers basically a mapping51 ``{'m': 'male', 'f': 'female'}``52 53 Using a source, we make sure that the tokens (which are54 stored/expected for instance from CSV files) are something one55 can expect and not cryptic IntIDs.56 """57 def getValues(self):58 return ['m', 'f']59 60 def getToken(self, value):61 return value[0].lower()62 63 def getTitle(self, value):64 if value == 'm':65 return 'male'66 if value == 'f':67 return 'female'68 37 69 38 class IJAMBDataRoot(IWAeUPObject): … … 83 52 ) 84 53 85 class IApplicantBaseData(IWAeUPObject):86 """The data for an applicant.87 88 This is a base interface with no field (except ``reg_no``)89 required. For use with importers, forms, etc., please use one of90 the derived interfaces below, which set more fields to required91 state, depending on use-case.92 """93 reg_no = schema.TextLine(94 title = u'JAMB Registration Number',95 )96 access_code = schema.TextLine(97 title = u'Access Code',98 required = False,99 )100 serial = schema.TextLine(101 title = u'Serial Number',102 required = False,103 )104 course1 = schema.TextLine(105 title = u'1st Choice Course of Study',106 required = False,107 )108 course2 = schema.TextLine(109 title = u'2nd Choice Course of Study',110 required = False,111 )112 course3 = schema.TextLine(113 title = u'3rd Choice Course of Study',114 required = False,115 )116 firstname = schema.TextLine(117 title = u'First Name',118 required = False,119 )120 middlenames = schema.TextLine(121 title = u'Middle Names',122 required = False,123 )124 lastname = schema.TextLine(125 title = u'Surname/Full Name',126 required = False,127 )128 jamb_age = schema.Int(129 title = u'Age (provided by JAMB)',130 required = False,131 )132 date_of_birth = schema.Date(133 title = u'Date of Birth',134 required = False,135 )136 jamb_state = schema.TextLine(137 title = u'State (provided by JAMB)',138 required = False,139 )140 jamb_lga = schema.TextLine(141 title = u'LGA (provided by JAMB)',142 required = False,143 )144 lga = schema.TextLine(145 # XXX: should be choice146 title = u'State/LGA (confirmed by applicant)',147 required = False,148 )149 sex = schema.Choice(150 title = u'Sex',151 source = GenderSource(),152 default = u'm',153 required = False,154 )155 email = schema.TextLine(156 title = u'Email',157 required = False,158 )159 phone = schema.TextLine(160 title = u'Phone',161 required = False,162 )163 #passport = schema.Bool(164 # title = u'Passport Photograph',165 # default = True,166 # required = False,167 # )168 passport = ImageFile(169 title = u'Passport Photograph',170 default = DEFAULT_PASSPORT_IMAGE_MALE,171 required = True,172 )173 aos = schema.TextLine(174 # XXX: should be choice175 title = u'Area of Specialisation',176 required = False,177 )178 subj1 = schema.TextLine(179 # XXX: should be choice180 title = u'1st Choice of Study',181 required = False,182 )183 subj2 = schema.TextLine(184 # XXX: should be choice185 title = u'2nd Choice of Study',186 required = False,187 )188 subj3 = schema.TextLine(189 # XXX: should be choice190 title = u'3rd Choice of Study',191 required = False,192 )193 #194 # Higher Educational Data195 #196 hq_matric_no = schema.TextLine(197 title = u'Former Matric Number',198 required = False,199 )200 hq_type = schema.TextLine(201 title = u'Higher Qualification',202 required = False,203 )204 hq_grade = schema.TextLine(205 title = u'Higher Qualification Grade',206 required = False,207 )208 hq_school = schema.TextLine(209 title = u'School Attended',210 required = False,211 )212 hq_session = schema.TextLine(213 title = u'Session Obtained',214 required = False,215 )216 hq_disc = schema.TextLine(217 title = u'Discipline',218 required = False,219 )220 #221 # First sitting data222 #223 fst_sit_fname = schema.TextLine(224 title = u'Full Name',225 required = False,226 )227 fst_sit_no = schema.TextLine(228 title = u'Exam Number',229 required = False,230 )231 fst_sit_date = schema.Date(232 title = u'Exam Date (dd/mm/yyyy)',233 required = False,234 )235 fst_sit_type = schema.TextLine(236 # XXX: Should be choice237 title = u'Exam Type',238 required = False,239 )240 fst_sit_results = schema.List(241 title = u'Results',242 required = False,243 value_type = schema.Object(244 title = u'Entries',245 schema = IResultEntry,246 required = False,247 )248 )249 scd_sit_fname = schema.TextLine(250 title = u'Full Name',251 required = False,252 )253 scd_sit_no = schema.TextLine(254 title = u'Exam Number',255 required = False,256 )257 scd_sit_date = schema.Date(258 title = u'Exam Date (dd/mm/yyyy)',259 required = False,260 )261 scd_sit_type = schema.TextLine(262 # XXX: Should be choice263 title = u'Exam Type',264 required = False,265 )266 scd_sit_results = schema.TextLine(267 # XXX: Should be nested list of choices268 title = u'Results',269 required = False,270 )271 #272 # JAMB scores273 #274 eng_score = schema.TextLine(275 title = u"'English' score",276 required = False,277 )278 subj1score = schema.TextLine(279 title = u'1st Choice of Study Score',280 required = False,281 )282 subj2score = schema.TextLine(283 title = u'2nd Choice of Study Score',284 required = False,285 )286 subj3score = schema.TextLine(287 title = u'3rd Choice of Study Score',288 required = False,289 )290 # XXX: Total score???291 292 #293 # Application Data294 #295 application_date = schema.Date(296 title = u'Application Date',297 required = False,298 )299 status = schema.TextLine(300 # XXX: should be 'status' type301 title = u'Application Status',302 required = False,303 )304 screening_date = schema.Date(305 title = u'Screening Date',306 required = False,307 )308 screening_type = schema.TextLine(309 # XXX: schould be choice310 title = u'Screening Type',311 required = False,312 )313 screening_score = schema.TextLine(314 title = u'Screening Score',315 required = False,316 )317 screening_venue = schema.TextLine(318 title = u'Screening Venue',319 required = False,320 )321 total_score = schema.TextLine(322 title = u'Total Score',323 required = False,324 )325 course_admitted = schema.TextLine(326 # XXX: should be choice327 title = u'Admitted Course of Study',328 required = False,329 )330 department = schema.TextLine(331 # XXX: if we have a course, dept. is not necessary332 title = u'Department',333 required = False,334 )335 faculty = schema.TextLine(336 # XXX: if we have a course, faculty is not necessary337 title = u'Faculty',338 required = False,339 )340 entry_session = schema.TextLine(341 # XXX: should be choice, should have sensible default: upcoming session342 title = u'Entry Session',343 required = False,344 )345 notice = schema.Text(346 title = u'Notice',347 required = False,348 )349 student_id = schema.TextLine(350 title = u'Student ID',351 required = False,352 )353 import_record_no = schema.TextLine(354 title = u'Import Record No.',355 required = False,356 )357 imported_by = schema.TextLine(358 title = u'Imported By',359 required = False,360 )361 import_date = schema.Datetime(362 title = u'Import Date',363 required = False,364 )365 import_from = schema.TextLine(366 title = u'Import Source',367 required = False,368 )369 370 371 class IApplicant(IApplicantBaseData):372 """An applicant.373 374 This is basically the applicant base data. Here we repeat the375 fields from base data only with the `required` attribute of376 required attributes set to True (which is the default).377 """378 access_code = schema.TextLine(379 title = u'Access Code',380 )381 course1 = schema.TextLine(382 title = u'1st Choice Course of Study',383 )384 firstname = schema.TextLine(385 title = u'First Name',386 )387 middlenames = schema.TextLine(388 title = u'Middle Names',389 )390 lastname = schema.TextLine(391 title = u'Surname/Full Name',392 )393 date_of_birth = schema.Date(394 title = u'Date of Birth',395 )396 jamb_state = schema.TextLine(397 title = u'State (provided by JAMB)',398 )399 jamb_lga = schema.TextLine(400 title = u'LGA (provided by JAMB)',401 )402 lga = schema.TextLine(403 # XXX: should be choice404 title = u'State/LGA (confirmed by applicant)',405 )406 sex = schema.Choice(407 title = u'Sex',408 source = GenderSource(),409 default = u'm',410 )411 #passport = schema.Bool(412 # title = u'Passport Photograph',413 # default = True,414 # )415 passport = ImageFile(416 title = u'Passport Photograph',417 default = DEFAULT_PASSPORT_IMAGE_MALE,418 required = True,419 )420 #421 # Higher Educational Data422 #423 424 #425 # First sitting data426 #427 fst_sit_fname = schema.TextLine(428 title = u'Full Name',429 )430 431 #432 # Second sitting data433 #434 scd_sit_fname = schema.TextLine(435 title = u'Full Name',436 )437 #438 # JAMB scores439 #440 441 #442 # Application Data443 #444 application_date = schema.Date(445 title = u'Application Date',446 )447 status = schema.TextLine(448 # XXX: should be 'status' type449 title = u'Application Status',450 )451 screening_date = schema.Date(452 title = u'Screening Date',453 )454 screening_type = schema.TextLine(455 # XXX: schould be choice456 title = u'Screening Type',457 )458 screening_score = schema.TextLine(459 title = u'Screening Score',460 )461 entry_session = schema.TextLine(462 # XXX: should be choice463 # XXX: should have sensible default: upcoming session464 title = u'Entry Session',465 )466 import_record_no = schema.TextLine(467 title = u'Import Record No.',468 )469 imported_by = schema.TextLine(470 title = u'Imported By',471 )472 import_date = schema.Datetime(473 title = u'Import Date',474 )475 import_from = schema.TextLine(476 title = u'Import Source',477 )478 479 class IApplicantPDEEditData(IWAeUPObject):480 """The data set presented to PDE applicants.481 """482 reg_no = schema.TextLine(483 title = u'JAMB Registration Number',484 readonly = True,485 )486 access_code = schema.TextLine(487 title = u'Access Code',488 readonly = True,489 )490 course1 = schema.TextLine(491 title = u'1st Choice Course of Study',492 readonly = True,493 )494 course2 = schema.TextLine(495 title = u'2nd Choice Course of Study',496 required = False,497 )498 course3 = schema.TextLine(499 title = u'3rd Choice Course of Study',500 required = False,501 )502 lastname = schema.TextLine(503 title = u'Name',504 readonly = True,505 )506 jamb_age = schema.Int(507 title = u'Age',508 readonly = True,509 )510 date_of_birth = schema.Date(511 title = u'Date of Birth',512 required = True,513 )514 jamb_state = schema.TextLine(515 title = u'State (provided by JAMB)',516 readonly = True,517 )518 jamb_lga = schema.TextLine(519 title = u'LGA (provided by JAMB)',520 readonly = True,521 )522 lga = schema.TextLine(523 # XXX: should be choice524 title = u'State/LGA (confirmed by applicant)',525 required = False,526 )527 email = schema.TextLine(528 title = u'Email',529 required = False,530 )531 phone = schema.TextLine(532 title = u'Phone',533 required = False,534 )535 aos = schema.TextLine(536 # XXX: should be choice537 title = u'Area of Specialisation',538 required = False,539 )540 subj1 = schema.TextLine(541 # XXX: should be choice542 title = u'1st Choice of Study',543 readonly = True,544 )545 subj2 = schema.TextLine(546 # XXX: should be choice547 title = u'2nd Choice of Study',548 required = False,549 )550 subj3 = schema.TextLine(551 # XXX: should be choice552 title = u'3rd Choice of Study',553 required = False,554 )555 556 #557 # Application Data558 #559 application_date = schema.Date(560 title = u'Application Date',561 readonly = True,562 )563 status = schema.TextLine(564 # XXX: should be 'status' type565 title = u'Application Status',566 readonly = True,567 )568 screening_date = schema.Date(569 title = u'Screening Date',570 readonly = True,571 )572 #passport = schema.Bool(573 # title = u'Passport Photograph',574 # default = True,575 # required = False,576 # ),577 #passport = schema.Bytes(578 # title = u'Passport Photograph',579 # required = True,580 # )581 #passport = schema.Object(582 # title = u'Passport Photograph',583 # required = True,584 # schema = IImage)585 passport = ImageFile(586 title = u'Passport Photograph',587 default = DEFAULT_PASSPORT_IMAGE_MALE,588 required = True,589 )590 54 591 55 class IApplicantPDEImportData(IApplicantBaseData): -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/jambtables/jambtables.py
r5743 r5753 36 36 from waeup.sirp.interfaces import IWAeUPSIRPPluggable 37 37 from waeup.sirp.applicants.jambtables.interfaces import ( 38 IJAMBData Table, IJAMBDataRoot38 IJAMBDataRoot 39 39 ) 40 40
Note: See TracChangeset for help on using the changeset viewer.