Changeset 9953
- Timestamp:
- 15 Feb 2013, 09:47:34 (12 years ago)
- Location:
- main/waeup.fceokene/trunk/src/waeup/fceokene/students
- Files:
-
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/students/browser.py
r9945 r9953 85 85 class CustomStartClearancePage(StartClearancePage): 86 86 87 grok.template('startclearance') 88 89 def update(self, SUBMIT=None): 90 if not self.context.state == ADMITTED: 91 self.flash(_("Wrong state")) 92 self.redirect(self.url(self.context)) 93 return 94 if not self.portrait_uploaded: 95 self.flash(_("No portrait uploaded.")) 96 self.redirect(self.url(self.context, 'change_portrait')) 97 return 98 if not self.all_required_fields_filled: 99 self.flash(_("Not all required fields filled.")) 100 self.redirect(self.url(self.context, 'edit_base')) 101 return 102 if SUBMIT is None: 103 return 104 IWorkflowInfo(self.context).fireTransition('start_clearance') 105 self.flash(_('Clearance process has been started.')) 106 self.redirect(self.url(self.context,'cedit')) 107 return 87 @property 88 def with_ac(self): 89 mode = getattr(self.context, 'current_mode', None) 90 if mode and mode.startswith('ug'): 91 return True 92 return False 108 93 109 94 class CustomStudentClearanceEditFormPage(NigeriaStudentClearanceEditFormPage): … … 117 102 """ Page to add an online payment ticket 118 103 """ 119 grok.template('bookbed')120 104 buttonname = _('Create bed ticket') 121 105 notice = '' -
main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_browser.py
r9943 r9953 314 314 name='upload_passportuploadedit').click() 315 315 self.browser.open(self.student_path + '/start_clearance') 316 # In Okene the students can just start clearance without entering317 # an activation code.316 # In Okene the ug students start clearance with activation code ... 317 self.assertTrue('Activation Code:' in self.browser.contents) 318 318 self.browser.getControl("Start clearance now").click() 319 self.assertMatches('...Clearance process has been started...', 320 self.browser.contents) 319 self.assertTrue('Activation code is invalid' in self.browser.contents) 320 # ... and nce students without. 321 self.certificate.study_mode = 'nce_ft' 322 self.browser.open(self.student_path + '/start_clearance') 323 self.assertFalse('Activation Code:' in self.browser.contents) 324 self.browser.getControl("Start clearance now").click() 325 self.assertTrue( 326 'Clearance process has been started' in self.browser.contents) 321 327 322 328 def test_student_accommodation(self): -
main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py
r9950 r9953 131 131 else: 132 132 amount = 15400 133 # NCE I fresh133 # NCE/UG I fresh 134 134 elif student.current_level == 100 and student.state == CLEARED: 135 135 if student.depcode in ARTS: … … 137 137 else: 138 138 amount = 12495 139 # NCE II139 # NCE/UG II 140 140 elif student.current_level in (100, 110, 120) and \ 141 141 student.state == RETURNING: … … 144 144 else: 145 145 amount = 11545 146 # NCE III146 # NCE/UG III 147 147 elif student.current_level in (200, 210, 220): 148 148 if student.depcode in ARTS: … … 150 150 else: 151 151 amount = 11545 152 # NCE III repeater152 # NCE/UG III repeater 153 153 elif student.current_level in (300, 310, 320) and \ 154 154 student.current_verdict == 'O': … … 157 157 else: 158 158 amount = 6773 159 # NCE III spillover159 # NCE/UG III spillover 160 160 elif student.current_level in (300, 310, 320) and \ 161 161 student.current_verdict == 'B': … … 164 164 else: 165 165 amount = 9645 166 # NCE III second spillover166 # NCE/UG III second spillover 167 167 elif student.current_level in (400, 410, 420) and \ 168 168 student.current_verdict == 'B': … … 177 177 else: 178 178 amount = 22400 179 # NCE II179 # NCE/UG II 180 180 elif student.current_level in (100, 110, 120) and \ 181 181 student.state == RETURNING: … … 184 184 else: 185 185 amount = 18900 186 # NCE III186 # NCE/UG III 187 187 elif student.current_level in (200, 210, 220): 188 188 if student.depcode in ARTS: … … 190 190 else: 191 191 amount = 20900 192 # NCE IV192 # NCE/UG IV 193 193 elif student.current_level in (300, 310, 320): 194 194 if student.depcode in ARTS: … … 196 196 else: 197 197 amount = 18900 198 # NCE V198 # NCE/UG V 199 199 elif student.current_level in (400, 410, 420): 200 200 if student.depcode in ARTS: … … 202 202 else: 203 203 amount = 18900 204 # NCE V spillover204 # NCE/UG V spillover 205 205 elif student.current_level in (500, 510, 520) and \ 206 206 student.current_verdict == 'B': … … 209 209 else: 210 210 amount = 17400 211 # NCE V second spillover211 # NCE/UG V second spillover 212 212 elif student.current_level in (600, 610, 620) and \ 213 213 student.current_verdict == 'B':
Note: See TracChangeset for help on using the changeset viewer.