Changeset 13160
- Timestamp:
- 10 Jul 2015, 11:39:13 (10 years ago)
- Location:
- main/kofacustom.nigeria/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk
- Property svn:ignore
-
old new 6 6 parts 7 7 sources 8 uuid.txt 8 9 var
-
- Property svn:ignore
-
main/kofacustom.nigeria/trunk/CHANGES.txt
r13142 r13160 4 4 1.2 (unreleased) 5 5 ================ 6 7 - Replace `jamb_subjects` field by the list-of-choices field 8 `jamb_subjects_list` which allows to select items from the `jambsubjects` 9 vocabulary. This field is available only for CBT application. 6 10 7 11 - Implement CBT application (Uniben). -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/interfaces.py
r13157 r13160 20 20 21 21 from zope import schema 22 from zope.component import getUtility 22 23 from waeup.kofa.applicants.interfaces import ( 23 24 contextual_reg_num_source, … … 26 27 from waeup.kofa.schoolgrades import ResultEntryField 27 28 from waeup.kofa.interfaces import ( 28 SimpleKofaVocabulary, academic_sessions_vocab, validate_email) 29 SimpleKofaVocabulary, 30 academic_sessions_vocab, 31 validate_email, 32 SubjectSource, 33 IKofaUtils) 29 34 from waeup.kofa.schema import FormattedDate, TextLineChoice 30 35 from waeup.kofa.students.vocabularies import nats_vocab, GenderSource … … 34 39 from kofacustom.nigeria.payments.interfaces import INigeriaOnlinePayment 35 40 41 jambsubjects = SimpleKofaVocabulary( 42 (_('Use of English'),'english_language'), 43 (_('Agricultural Science'),'agricultural_science'), 44 (_('Arabic'),'arabic'), 45 (_('Biology'),'biology'), 46 (_('Book Keeping'),'book_keeping'), 47 (_('Chemistry'),'chemistry'), 48 (_('Christian Religious Studies'),'christian_religious_studies'), 49 (_('Commerce'),'commerce'), 50 (_('Economics'),'economics'), 51 (_('Financial Accounting'),'financial_accounting'), 52 (_('Fine Art'),'fine_art'), 53 (_('Food and Nutrition'),'food_and_nutrition'), 54 (_('French'),'french'), 55 (_('Geography'),'geography'), 56 (_('German'),'german'), 57 (_('Government'),'government'), 58 (_('Hausa'),'hausa'), 59 (_('Home Economics'),'home_economics'), 60 (_('History'),'history'), 61 (_('Igbo'),'igbo'), 62 (_('Literature in English'),'literature_in_english'), 63 (_('Literature in Nigerian Languages'),'literature_in_nigerian_languages'), 64 (_('Mathematics'),'mathematics'), 65 (_('Music'),'music'), 66 (_('Physics'),'physics'), 67 (_('Yoruba'),'yoruba'), 68 ) 69 70 class JAMBSubjectSource(SubjectSource): 71 """A source for school subjects used in exam documentation. 72 """ 73 74 def getTitle(self, value): 75 subjects_dict = getUtility(IKofaUtils).EXAM_SUBJECTS_DICT 76 return "%s" % subjects_dict[value] 77 36 78 # Fields to be omitted in all display forms. course_admitted is 37 79 # rendered separately. … … 41 83 42 84 # UG students are all undergraduate students. 43 UG_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS 85 UG_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS + ('jamb_subjects_list',) 44 86 UG_OMIT_PDF_FIELDS = UG_OMIT_DISPLAY_FIELDS + ('phone',) 45 UG_OMIT_MANAGE_FIELDS = ('special_application', )87 UG_OMIT_MANAGE_FIELDS = ('special_application','jamb_subjects_list',) 46 88 UG_OMIT_EDIT_FIELDS = UG_OMIT_MANAGE_FIELDS + OMIT_DISPLAY_FIELDS + ( 47 89 'student_id', … … 50 92 'screening_venue', 51 93 'screening_date', 52 #'jamb_age',94 'jamb_age', 53 95 'jamb_subjects', 54 96 'jamb_score', … … 61 103 'hq_degree', 'hq_school', 62 104 'hq_session', 'hq_disc', 63 'aggregate' )105 'aggregate', 'jamb_subjects') 64 106 CBT_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS + CBT_OMIT_FIELDS 65 CBT_OMIT_MANAGE_FIELDS = UG_OMIT_MANAGE_FIELDS + CBT_OMIT_FIELDS 66 CBT_OMIT_EDIT_FIELDS = UG_OMIT_MANAGE_FIELDS + OMIT_DISPLAY_FIELDS + CBT_OMIT_FIELDS + ( 107 CBT_OMIT_MANAGE_FIELDS = CBT_OMIT_FIELDS + ('special_application',) 108 CBT_OMIT_EDIT_FIELDS = OMIT_DISPLAY_FIELDS + CBT_OMIT_FIELDS + ( 109 'special_application', 67 110 'student_id', 68 111 'notice', … … 81 124 'hq_type', 'hq_matric_no', 82 125 'hq_degree', 'hq_school', 83 'hq_session', 'hq_disc', )126 'hq_session', 'hq_disc', 'jamb_subjects_list') 84 127 PUTME_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS + PUTME_OMIT_FIELDS 85 128 PUTME_OMIT_MANAGE_FIELDS = UG_OMIT_MANAGE_FIELDS + PUTME_OMIT_FIELDS … … 97 140 # PUDE is a subgroup of UG with the same interface. 98 141 PUDE_OMIT_FIELDS = ( 99 'jamb_subjects','jamb_score', 'jamb_age', 'aggregate' )142 'jamb_subjects','jamb_score', 'jamb_age', 'aggregate', 'jamb_subjects_list') 100 143 PUDE_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS + PUDE_OMIT_FIELDS 101 144 PUDE_OMIT_MANAGE_FIELDS = UG_OMIT_MANAGE_FIELDS + PUDE_OMIT_FIELDS … … 188 231 required = False, 189 232 ) 233 jamb_subjects_list = schema.List( 234 title = _(u'JAMB Subjects'), 235 default = ['english',], 236 required = False, 237 value_type = schema.Choice( 238 vocabulary = jambsubjects 239 #source = JAMBSubjectSource(), 240 ), 241 ) 190 242 jamb_score = schema.Int( 191 243 title = _(u'Total JAMB Score'), … … 523 575 show_year = True, 524 576 ) 525 jamb_subjects = schema.Text( 526 title = _(u'Subjects and Scores'), 527 description = _(u'Enter all four subjects, one subject with score per line!'), 528 required = True, 577 jamb_subjects_list = schema.List( 578 title = _(u'JAMB Subjects'), 579 description = _(u'Select four subjects.'), 580 default = ['english',], 581 required = True, 582 value_type = schema.Choice( 583 vocabulary = jambsubjects 584 #source = JAMBSubjectSource(), 585 ), 529 586 ) 530 587 … … 534 591 'email'].order = INigeriaUGApplicant['email'].order 535 592 INigeriaUGApplicantEdit[ 536 'jamb_subjects '].order = INigeriaUGApplicant['jamb_subjects'].order593 'jamb_subjects_list'].order = INigeriaUGApplicant['jamb_subjects_list'].order 537 594 538 595 class INigeriaPGApplicantEdit(INigeriaPGApplicant): -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/tests/test_browser.py
r13155 r13160 348 348 applicant.notice = u'Some notice\nin lines.' 349 349 applicant.jamb_subjects = u'Line 1\nLine 2' 350 applicant.jamb_subjects_list = ['english_language', 'fine_art'] 350 351 applicant.screening_score = 98 351 352 applicant.screening_venue = u'Exam Room' … … 369 370 'fst_sit_results,fst_sit_type,history,hq_degree,hq_disc,' 370 371 'hq_matric_no,hq_school,hq_session,hq_type,jamb_reg_number,' 371 'jamb_score,jamb_subjects,lastname,lga,locked,middlename,' 372 'jamb_score,jamb_subjects,jamb_subjects_list,' 373 'lastname,lga,locked,middlename,' 372 374 'nationality,notice,nysc_lga,nysc_year,password,phone,' 373 375 'presently_inst,reg_number,result_uploaded,scd_sit_date,' … … 379 381 'Anna M. Tester,anna@sample.com,,,,,,,,,,,Anna,,,,,,' 380 382 '[u\'2015-07-06 11:21:22 WAT - Application initialized by system\']' 381 ',,,,,,,,,Line 1++Line 2,Tester,,0,M.,NG,"Some notice\nin lines.",,,' 383 ',,,,,,,,,Line 1++Line 2,"[\'english_language\', \'fine_art\']",' 384 'Tester,,0,M.,NG,"Some notice\nin lines.",,,' 382 385 'any password,+234-123-12345#,,123456,,,,,,,' 383 386 '"Saturday, 16th June 2012 2:00:00 PM",98,Exam Room,f,,,' … … 396 399 'fst_sit_results','fst_sit_type','history','hq_degree','hq_disc', 397 400 'hq_matric_no','hq_school','hq_session','hq_type','jamb_reg_number', 398 'jamb_score','jamb_subjects','lastname','lga','locked','middlename', 401 'jamb_score','jamb_subjects','jamb_subjects_list', 402 'lastname','lga','locked','middlename', 399 403 'nationality','notice','nysc_lga','nysc_year','password','phone', 400 404 'presently_inst','reg_number','result_uploaded','scd_sit_date', … … 423 427 'fst_sit_results','fst_sit_type','history','hq_degree','hq_disc', 424 428 'hq_matric_no','hq_school','hq_session','hq_type','jamb_reg_number', 425 'jamb_score','jamb_subjects','lastname','lga','locked','middlename', 429 'jamb_score','jamb_subjects','jamb_subjects_list', 430 'lastname','lga','locked','middlename', 426 431 'nationality','notice','nysc_lga','nysc_year','password','phone', 427 432 'presently_inst','reg_number','result_uploaded','scd_sit_date', -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/utils.py
r13150 r13160 53 53 'form.employer': _(u'Employment History'), 54 54 'form.jamb_subjects': _(u'JAMB Data'), 55 'form.jamb_subjects_list': _(u'JAMB Data'), 55 56 'form.notice': _(u'Application Process Information'), 56 57 'form.pp_school': _(u'Post Primary School Qualification'), -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/utils/utils.py
r13148 r13160 88 88 'engineering_science': 'Engineering Science', 89 89 'financial_accounting': 'Financial Accounting', 90 'fine_art': 'Fine Art', 90 91 'food_and_nutrition': 'Food and Nutrition', 91 92 'french': 'French', … … 99 100 'health_science': 'Health Science', 100 101 'history': 'History', 102 'home_economics': 'Home Economics', 101 103 'home_management': 'Home Management', 102 104 'human_biology': 'Human Biology',
Note: See TracChangeset for help on using the changeset viewer.