- Timestamp:
- 4 Nov 2012, 10:27:40 (12 years ago)
- Location:
- main/waeup.futminna/trunk/src/waeup/futminna/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.futminna/trunk/src/waeup/futminna/students/tests/test_browser.py
r9431 r9523 151 151 IWorkflowState(self.student).setState('returning') 152 152 error, payment = utils.setPaymentDetails('schoolfee',self.student) 153 # Uups, we forgot to add a session configuration for next session 154 self.assertEqual('Session configuration object is not available.', error) 155 configuration = createObject('waeup.SessionConfiguration') 156 configuration.academic_session = 2005 157 self.app['configuration'].addSessionConfiguration(configuration) 158 159 error, payment = utils.setPaymentDetails('schoolfee',self.student) 153 160 self.assertEqual(payment.p_level, 200) 154 161 self.assertEqual(payment.p_session, 2005) … … 238 245 self.browser.contents) 239 246 return 247 248 def test_student_payments(self): 249 # Login 250 self.browser.open(self.login_path) 251 self.browser.getControl(name="form.login").value = self.student_id 252 self.browser.getControl(name="form.password").value = 'spwd' 253 self.browser.getControl("Login").click() 254 self.browser.open(self.student_path + '/payments') 255 self.assertTrue( 256 'Add current session payment ticket' in self.browser.contents) 257 self.assertFalse( 258 'Add previous session payment ticket' in self.browser.contents) 259 return -
main/waeup.futminna/trunk/src/waeup/futminna/students/utils.py
r9431 r9523 68 68 p_level = student['studycourse'].current_level 69 69 p_current = True 70 session = str(p_session) 71 try: 72 academic_session = grok.getSite()['configuration'][session] 73 except KeyError: 70 academic_session = self._getSessionConfiguration(p_session) 71 if academic_session == None: 74 72 return _(u'Session configuration object is not available.'), None 73 # Determine fee. 75 74 if category == 'schoolfee': 76 75 try: … … 105 104 amount = 0.0 106 105 if student.state == RETURNING: 106 # Override p_session and p_level 107 107 p_session, p_level = self.getReturningData(student) 108 academic_session = self._getSessionConfiguration(p_session) 109 if academic_session == None: 110 return _(u'Session configuration object is not available.'), None 108 111 elif category == 'clearance': 109 112 try: -
main/waeup.futminna/trunk/src/waeup/futminna/students/viewlets.py
r9242 r9523 21 21 FileDisplay, FileUpload, Image) 22 22 from waeup.kofa.students.browser import ExportPDFClearanceSlipPage 23 from waeup.kofa.students.viewlets import AddPreviousPaymentActionButton 23 24 24 25 from kofacustom.nigeria.interfaces import MessageFactory as _ 25 26 27 28 class AddPreviousPaymentActionButton(AddPreviousPaymentActionButton): 29 30 @property 31 def target_url(self): 32 return '' 26 33 27 34 # Accepted by Institution
Note: See TracChangeset for help on using the changeset viewer.