- Timestamp:
- 4 Nov 2012, 06:13:36 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r9517 r9519 2033 2033 2034 2034 def test_student_schoolfee_payment(self): 2035 configuration = createObject('waeup.SessionConfiguration') 2036 configuration.academic_session = 2005 2037 self.app['configuration'].addSessionConfiguration(configuration) 2035 2038 # Login 2036 2039 self.browser.open(self.login_path) … … 2208 2211 2209 2212 def test_postgraduate_student_payments(self): 2213 configuration = createObject('waeup.SessionConfiguration') 2214 configuration.academic_session = 2005 2215 self.app['configuration'].addSessionConfiguration(configuration) 2210 2216 self.certificate.study_mode = 'pg_ft' 2211 2217 self.certificate.start_level = 999 -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r9517 r9519 300 300 return 301 301 302 def _getSessionConfiguration(self, session): 303 try: 304 return grok.getSite()['configuration'][str(session)] 305 except KeyError: 306 return None 307 302 308 def setPaymentDetails(self, category, student, 303 309 previous_session, previous_level): … … 326 332 p_level = student['studycourse'].current_level 327 333 p_current = True 328 session = str(p_session) 329 try: 330 academic_session = grok.getSite()['configuration'][session] 331 except KeyError: 334 academic_session = self._getSessionConfiguration(p_session) 335 if academic_session == None: 332 336 return _(u'Session configuration object is not available.'), None 333 337 if category == 'schoolfee': … … 353 357 # has paid for. Payment session is always next session. 354 358 p_session, p_level = self.getReturningData(student) 359 academic_session = self._getSessionConfiguration(p_session) 360 if academic_session == None: 361 return _(u'Session configuration object is not available.'), None 355 362 amount = getattr(certificate, 'school_fee_2', 0.0) 356 363 elif student.is_postgrad and student.state == PAID: … … 358 365 # but their level always remains the same. 359 366 p_session += 1 367 academic_session = self._getSessionConfiguration(p_session) 368 if academic_session == None: 369 return _(u'Session configuration object is not available.'), None 360 370 amount = getattr(certificate, 'school_fee_2', 0.0) 361 371 elif category == 'clearance':
Note: See TracChangeset for help on using the changeset viewer.