Changeset 10132
- Timestamp:
- 1 May 2013, 06:53:18 (12 years ago)
- Location:
- main/waeup.kwarapoly/trunk/src/waeup/kwarapoly
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/applicants/applicant.py
r9347 r10132 31 31 grok.provides(ICustomApplicant) 32 32 33 @property 34 def is_nd(self): 35 if self.applicant_id.startswith('nd') \ 36 or self.applicant_id.startswith('prend'): 37 return True 38 return False 39 40 33 41 # Set all attributes of CustomApplicant required in ICustomApplicant as field 34 42 # properties. Doing this, we do not have to set initial attributes -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/applicants/interfaces.py
r9347 r10132 31 31 from kofacustom.nigeria.applicants.interfaces import ( 32 32 LGASource, high_qual, high_grade, exam_types, 33 OMIT_DISPLAY_FIELDS, 33 34 INigeriaUGApplicant, INigeriaPGApplicant, 34 35 INigeriaApplicantOnlinePayment, … … 40 41 from waeup.kwarapoly.payments.interfaces import ICustomOnlinePayment 41 42 42 class ICustomUGApplicant(INigeriaUGApplicant): 43 ND_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS + ( 44 'hq_type', 45 'hq_matric_no', 46 'hq_degree', 47 'hq_school', 48 'hq_session', 49 'hq_disc', 50 'hq_type') 51 ND_OMIT_PDF_FIELDS = ND_OMIT_DISPLAY_FIELDS + ('phone',) 52 ND_OMIT_MANAGE_FIELDS = () 53 ND_OMIT_EDIT_FIELDS = ND_OMIT_MANAGE_FIELDS + ND_OMIT_DISPLAY_FIELDS + ( 54 'student_id', 'notice', 55 'screening_score', 56 'screening_venue', 57 'screening_date', 58 'jamb_subjects', 59 'jamb_score', 60 'aggregate') 61 62 class ICustomUGApplicant(IApplicantBaseData): 43 63 """An undergraduate applicant. 44 64 … … 47 67 adding them to the UG_OMIT* tuples. 48 68 """ 69 70 nationality = schema.Choice( 71 source = nats_vocab, 72 title = _(u'Nationality'), 73 required = True, 74 ) 75 lga = schema.Choice( 76 source = LGASource(), 77 title = _(u'State/LGA (Nigerians only)'), 78 required = False, 79 ) 80 #perm_address = schema.Text( 81 # title = _(u'Permanent Address'), 82 # required = False, 83 # ) 84 next_kin_address = schema.Text( 85 title = _(u'Next of Kin Address'), 86 required = False, 87 ) 88 course1 = schema.Choice( 89 title = _(u'1st Choice Course of Study'), 90 source = AppCatCertificateSource(), 91 required = True, 92 ) 93 course2 = schema.Choice( 94 title = _(u'2nd Choice Course of Study'), 95 source = AppCatCertificateSource(), 96 required = False, 97 ) 98 olevel_type = schema.Choice( 99 title = _(u'Qualification Obtained'), 100 required = False, 101 readonly = False, 102 vocabulary = exam_types, 103 ) 104 olevel_school = schema.TextLine( 105 title = _(u'Institution Attended'), 106 required = False, 107 readonly = False, 108 ) 109 olevel_exam_number = schema.TextLine( 110 title = _(u'Exam Number'), 111 required = False, 112 readonly = False, 113 ) 114 olevel_exam_date = FormattedDate( 115 title = _(u'Exam Date'), 116 required = False, 117 readonly = False, 118 show_year = True, 119 ) 120 olevel_results = schema.List( 121 title = _(u'Exam Results'), 122 value_type = ResultEntryField(), 123 required = False, 124 readonly = False, 125 default = [], 126 ) 127 hq_type = schema.Choice( 128 title = _(u'Qualification Obtained'), 129 required = False, 130 readonly = False, 131 vocabulary = high_qual, 132 ) 133 hq_matric_no = schema.TextLine( 134 title = _(u'Former Matric Number'), 135 required = False, 136 readonly = False, 137 ) 138 hq_degree = schema.Choice( 139 title = _(u'Class of Degree'), 140 required = False, 141 readonly = False, 142 vocabulary = high_grade, 143 ) 144 hq_school = schema.TextLine( 145 title = _(u'Institution Attended'), 146 required = False, 147 readonly = False, 148 ) 149 hq_session = schema.TextLine( 150 title = _(u'Years Attended'), 151 required = False, 152 readonly = False, 153 ) 154 hq_disc = schema.TextLine( 155 title = _(u'Discipline'), 156 required = False, 157 readonly = False, 158 ) 159 jamb_subjects = schema.Text( 160 title = _(u'Subjects and Scores'), 161 required = False, 162 ) 163 jamb_score = schema.Int( 164 title = _(u'Total JAMB Score'), 165 required = False, 166 ) 167 notice = schema.Text( 168 title = _(u'Notice'), 169 required = False, 170 ) 171 screening_venue = schema.TextLine( 172 title = _(u'Screening Venue'), 173 required = False, 174 ) 175 screening_date = schema.TextLine( 176 title = _(u'Screening Date'), 177 required = False, 178 ) 179 screening_score = schema.Int( 180 title = _(u'Screening Score (%)'), 181 required = False, 182 ) 183 aggregate = schema.Int( 184 title = _(u'Aggregate Score (%)'), 185 description = _(u'(average of relative JAMB and PUTME scores)'), 186 required = False, 187 ) 188 result_uploaded = schema.Bool( 189 title = _(u'Result uploaded'), 190 default = False, 191 ) 192 student_id = schema.TextLine( 193 title = _(u'Student Id'), 194 required = False, 195 readonly = False, 196 ) 197 course_admitted = schema.Choice( 198 title = _(u'Admitted Course of Study'), 199 source = CertificateSource(), 200 required = False, 201 ) 202 locked = schema.Bool( 203 title = _(u'Form locked'), 204 default = False, 205 ) 49 206 50 207 class ICustomPGApplicant(INigeriaPGApplicant): … … 75 232 """ 76 233 77 class ICustomUGApplicantEdit(I NigeriaUGApplicantEdit):234 class ICustomUGApplicantEdit(ICustomUGApplicant): 78 235 """An undergraduate applicant interface for edit forms. 79 236 … … 104 261 """ 105 262 106 class IPUTMEApplicantEdit(IPUTMEApplicantEdit):107 """An undergraduate applicant interface for editing.108 109 Here we can repeat the fields from base data and set the110 `required` and `readonly` attributes to True to further restrict111 the data access. Or we can allow only certain certificates to be112 selected by choosing the appropriate source.113 114 We cannot omit fields here. This has to be done in the115 respective form page.116 """117 118 class ICustomApplicantUpdateByRegNo(INigeriaApplicantUpdateByRegNo):119 """Representation of an applicant.120 121 Skip regular reg_number validation if reg_number is used for finding122 the applicant object.123 """124 -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/applicants/utils.py
r10121 r10132 23 23 import grok 24 24 from kofacustom.nigeria.applicants.utils import NigeriaApplicantsUtils 25 from waeup.kwarapoly.interfaces import MessageFactory as _ 25 26 26 27 … … 41 42 'pgpt': ['Postgraduate Part-Time Programmes', 'PG'] 42 43 } 44 45 SEPARATORS_DICT = { 46 'form.applicant_id': _(u'Base Data'), 47 'form.course1': _(u'Programmes/Courses Desired'), 48 'form.hq_type': _(u'Higher Education Record'), 49 'form.jamb_subjects': _(u'JAMB Data'), 50 'form.notice': _(u'Application Process Information'), 51 'form.pp_school': _(u'Post Primary School Qualification'), 52 'form.presently_inst': _(u'Presently attending a course or programme'), 53 'form.olevel_type': _(u"'O' Level Record"), 54 } -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/browser.py
r10131 r10132 226 226 xmldict['institution_acct'] = '7000016463' 227 227 xmldict['institution_bank_id'] = '9' 228 elif self.applicant.applicant_id.startswith('nd') \ 229 or self.applicant.applicant_id.startswith('prend'): 228 elif self.applicant.is_nd: 230 229 xmldict['institution_acct'] = '2014191363' 231 230 xmldict['institution_bank_id'] = '8'
Note: See TracChangeset for help on using the changeset viewer.