Changeset 13545 for main/waeup.aaue/trunk/src/waeup
- Timestamp:
- 16 Dec 2015, 08:45:50 (9 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/applicants
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/applicants/browser.py
r13544 r13545 35 35 NigeriaApplicantRegistrationPage, 36 36 NigeriaExportPDFPaymentSlipPage, 37 UG_OMIT_DISPLAY_FIELDS, 38 UG_OMIT_PDF_FIELDS, 39 UG_OMIT_MANAGE_FIELDS, 40 UG_OMIT_EDIT_FIELDS) 37 ) 38 from kofacustom.nigeria.applicants.interfaces import OMIT_DISPLAY_FIELDS 41 39 from waeup.aaue.applicants.interfaces import ( 42 40 ICustomUGApplicant, … … 45 43 ) 46 44 47 UG_OMIT_PDF_FIELDS = tuple([ 48 element for element in UG_OMIT_PDF_FIELDS if not element == 'phone']) 49 UG_OMIT_PDF_FIELDS += ('reg_number','alr_fname', 'alr_no', 'alr_date', 50 'alr_results', 'notice') 51 52 FP_OMIT_FIELDS = ('hq_type', 'hq_fname', 'hq_matric_no', 53 'hq_degree', 'hq_school', 'hq_session', 'hq_disc') 54 FP_OMIT_DISPLAY_FIELDS = UG_OMIT_DISPLAY_FIELDS + FP_OMIT_FIELDS 55 FP_OMIT_PDF_FIELDS = UG_OMIT_PDF_FIELDS + FP_OMIT_FIELDS 56 FP_OMIT_MANAGE_FIELDS = UG_OMIT_MANAGE_FIELDS + FP_OMIT_FIELDS 57 FP_OMIT_EDIT_FIELDS = UG_OMIT_EDIT_FIELDS + FP_OMIT_FIELDS 58 59 PG_OMIT_FIELDS = ('programme_type',) 60 PG_OMIT_DISPLAY_FIELDS = UG_OMIT_DISPLAY_FIELDS + PG_OMIT_FIELDS 61 PG_OMIT_PDF_FIELDS = UG_OMIT_DISPLAY_FIELDS + PG_OMIT_FIELDS 62 PG_OMIT_MANAGE_FIELDS = UG_OMIT_MANAGE_FIELDS + PG_OMIT_FIELDS 63 PG_OMIT_EDIT_FIELDS = UG_OMIT_EDIT_FIELDS + PG_OMIT_FIELDS 45 UG_OMIT_FIELDS = ( 46 'hq_type', 'hq_fname', 'hq_matric_no', 47 'hq_degree', 'hq_school', 'hq_session', 'hq_disc', 48 'hq_type2', 'hq_fname2', 'hq_matric_no2', 49 'hq_degree2', 'hq_school2', 'hq_session2', 'hq_disc2', 50 'hq_type3', 'hq_fname3', 'hq_matric_no3', 51 'hq_degree3', 'hq_school3', 'hq_session3', 'hq_disc3' 52 ) 53 UG_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS + ('jamb_subjects_list',) + UG_OMIT_FIELDS 54 UG_OMIT_PDF_FIELDS = UG_OMIT_DISPLAY_FIELDS + UG_OMIT_FIELDS + ( 55 'reg_number','alr_fname', 'alr_no', 'alr_date', 56 'alr_results', 'notice') 57 UG_OMIT_MANAGE_FIELDS = ('special_application','jamb_subjects_list',) + UG_OMIT_FIELDS 58 UG_OMIT_EDIT_FIELDS = UG_OMIT_MANAGE_FIELDS + OMIT_DISPLAY_FIELDS + UG_OMIT_FIELDS + ( 59 'student_id', 60 'notice', 61 'screening_score', 62 'screening_venue', 63 'screening_date', 64 'jamb_age', 65 'jamb_subjects', 66 'jamb_score', 67 'jamb_reg_number', 68 'aggregate') 69 70 #UG_OMIT_PDF_FIELDS = tuple([ 71 # element for element in UG_OMIT_PDF_FIELDS if not element == 'phone']) 72 73 #UG_OMIT_PDF_FIELDS += ( 74 # 'reg_number','alr_fname', 'alr_no', 'alr_date', 75 # 'alr_results', 'notice' 76 # ) 77 78 FP_OMIT_DISPLAY_FIELDS = UG_OMIT_DISPLAY_FIELDS + UG_OMIT_FIELDS 79 FP_OMIT_PDF_FIELDS = UG_OMIT_PDF_FIELDS + UG_OMIT_FIELDS 80 FP_OMIT_MANAGE_FIELDS = UG_OMIT_MANAGE_FIELDS + UG_OMIT_FIELDS 81 FP_OMIT_EDIT_FIELDS = UG_OMIT_EDIT_FIELDS + UG_OMIT_FIELDS 82 83 PG_OMIT_FIELDS = ( 84 'fst_sit_fname', 85 'fst_sit_no', 86 'fst_sit_date', 87 'fst_sit_type', 88 'fst_sit_results', 89 'scd_sit_fname', 90 'scd_sit_no', 91 'scd_sit_date', 92 'scd_sit_type', 93 'scd_sit_results', 94 'programme_type' 95 ) 96 PG_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS + ( 97 'jamb_subjects_list',) + PG_OMIT_FIELDS 98 PG_OMIT_PDF_FIELDS = PG_OMIT_DISPLAY_FIELDS + PG_OMIT_FIELDS + ( 99 'reg_number','alr_fname', 'alr_no', 'alr_date', 100 'alr_results', 'notice') 101 PG_OMIT_MANAGE_FIELDS = ( 102 'special_application','jamb_subjects_list',) + PG_OMIT_FIELDS 103 PG_OMIT_EDIT_FIELDS = PG_OMIT_MANAGE_FIELDS + OMIT_DISPLAY_FIELDS + PG_OMIT_FIELDS + ( 104 'student_id', 105 'notice', 106 'screening_score', 107 'screening_venue', 108 'screening_date', 109 'jamb_age', 110 'jamb_subjects', 111 'jamb_score', 112 'jamb_reg_number', 113 'aggregate') 64 114 65 115 class CustomApplicantDisplayFormPage(NigeriaApplicantDisplayFormPage): -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/interfaces.py
r13544 r13545 226 226 readonly = False, 227 227 ) 228 229 hq_type2 = schema.Choice( 230 title = _(u'Qualification Obtained'), 231 required = False, 232 readonly = False, 233 vocabulary = high_qual, 234 ) 235 236 hq_fname2 = schema.TextLine( 237 title = _(u'Full Name'), 238 required = False, 239 readonly = False, 240 ) 241 242 hq_matric_no2 = schema.TextLine( 243 title = _(u'Former Matric Number'), 244 required = False, 245 readonly = False, 246 ) 247 248 hq_degree2 = schema.Choice( 249 title = _(u'Class of Degree'), 250 required = False, 251 readonly = False, 252 vocabulary = high_grade, 253 ) 254 255 hq_school2 = schema.TextLine( 256 title = _(u'Institution Attended'), 257 required = False, 258 readonly = False, 259 ) 260 261 hq_session2 = schema.TextLine( 262 title = _(u'Years Attended'), 263 required = False, 264 readonly = False, 265 ) 266 267 hq_disc2 = schema.TextLine( 268 title = _(u'Discipline'), 269 required = False, 270 readonly = False, 271 ) 272 273 hq_type3 = schema.Choice( 274 title = _(u'Qualification Obtained'), 275 required = False, 276 readonly = False, 277 vocabulary = high_qual, 278 ) 279 280 hq_fname3 = schema.TextLine( 281 title = _(u'Full Name'), 282 required = False, 283 readonly = False, 284 ) 285 286 hq_matric_no3 = schema.TextLine( 287 title = _(u'Former Matric Number'), 288 required = False, 289 readonly = False, 290 ) 291 292 hq_degree3 = schema.Choice( 293 title = _(u'Class of Degree'), 294 required = False, 295 readonly = False, 296 vocabulary = high_grade, 297 ) 298 299 hq_school3 = schema.TextLine( 300 title = _(u'Institution Attended'), 301 required = False, 302 readonly = False, 303 ) 304 305 hq_session3 = schema.TextLine( 306 title = _(u'Years Attended'), 307 required = False, 308 readonly = False, 309 ) 310 311 hq_disc3 = schema.TextLine( 312 title = _(u'Discipline'), 313 required = False, 314 readonly = False, 315 ) 228 316 notice = schema.Text( 229 317 title = _(u'Notice'), … … 421 509 422 510 class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant, 423 ITranscriptApplicant):511 ITranscriptApplicant): 424 512 """An interface for all three types of applicants. 425 513 -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/tests/test_applicantcopier.py
r13368 r13545 61 61 self.browser.getControl(name="form.alr_fname").value = 'Uli' 62 62 self.browser.getControl(name="form.alr_no").value = '345' 63 self.browser.getControl(name="form.hq_type").value = ['nce']64 self.browser.getControl(name="form.hq_fname").value = 'Beate'65 self.browser.getControl(name="form.hq_matric_no").value = '444'66 self.browser.getControl(name="form.hq_degree").value = ['upper_credit']67 self.browser.getControl(name="form.hq_school").value = 'my school'68 self.browser.getControl(name="form.hq_session").value = '2011/12'69 self.browser.getControl(name="form.hq_disc").value = 'funny sport'70 63 71 64 self.browser.getControl("Save").click() … … 84 77 self.assertEqual(student.alr_fname, 'Uli') 85 78 self.assertEqual(student.alr_no, '345') 86 self.assertEqual(student.hq_type, 'nce')87 self.assertEqual(student.hq_fname, 'Beate')88 self.assertEqual(student.hq_matric_no, '444')89 self.assertEqual(student.hq_degree, 'upper_credit')90 self.assertEqual(student.hq_school, 'my school')91 self.assertEqual(student.hq_session, '2011/12')92 self.assertEqual(student.hq_disc, 'funny sport') -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/tests/test_browser.py
r13544 r13545 97 97 self.assertEqual(self.browser.headers['Status'], '200 Ok') 98 98 self.assertTrue("Dispatch Address" in self.browser.contents) 99 100 def test_pg_application_manage(self): 101 # Add pg applicants container 102 self.pgcontainer = ApplicantsContainer() 103 self.pgcontainer.mode = 'create' 104 self.pgcontainer.code = u'pgft%s' % session_1 105 self.pgcontainer.prefix = u'pgft' 106 self.pgcontainer.application_category = u'no' 107 self.pgcontainer.year = session_1 108 self.pgcontainer.application_fee = 300.0 109 self.pgcontainer.title = u'This is the pgft%s container' % session_1 110 self.app['applicants'][self.pgcontainer.code] = self.pgcontainer 111 delta = datetime.timedelta(days=10) 112 self.pgcontainer.startdate = datetime.datetime.now(pytz.utc) - delta 113 self.pgcontainer.enddate = datetime.datetime.now(pytz.utc) + delta 114 # Add applicant 115 pgapplicant = createObject(u'waeup.Applicant') 116 pgapplicant.firstname = u'Anna' 117 pgapplicant.lastname = u'Post' 118 self.app['applicants'][self.pgcontainer.code].addApplicant(pgapplicant) 119 self.pgapplication_number = pgapplicant.application_number 120 self.pgapplicant = self.app['applicants'][self.pgcontainer.code][ 121 self.pgapplication_number] 122 self.pgapplicant_path = ('http://localhost/app/applicants/pgft%s/%s' 123 % (session_1, self.pgapplication_number)) 124 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 125 self.browser.open(self.pgapplicant_path) 126 self.assertEqual(self.browser.headers['Status'], '200 Ok') 127 self.assertTrue("3rd Higher Education Record" in self.browser.contents) -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/utils.py
r13538 r13545 39 39 'form.applicant_id': _(u'Base Data'), 40 40 #'form.course1': _(u'Programmes/Courses Desired'), 41 'form.hq_type': _(u'Higher Education Record'), 41 'form.fst_sit_fname': _(u'1st Sitting'), 42 'form.scd_sit_fname': _(u'2nd Sitting'), 43 'form.alr_fname': _(u'Advanced Level Record'), 44 'form.hq_type': _(u'1st Higher Education Record'), 45 'form.hq_type2': _(u'2nd Higher Education Record'), 46 'form.hq_type3': _(u'3rd Higher Education Record'), 42 47 'form.presently': _(u'Course or Programme Presently Attending'), 43 48 'form.nysc_year': _(u'NYSC Information'), … … 48 53 'form.presently_inst': _(u'Presently attending a course or programme'), 49 54 'form.olevel_type': _(u"'O' Level Records"), 50 'form.fst_sit_fname': _(u'1st Sitting'), 51 'form.scd_sit_fname': _(u'2nd Sitting'), 52 'form.alr_fname': _(u'Advanced Level Record'), 55 53 56 } 54 57
Note: See TracChangeset for help on using the changeset viewer.