Changeset 8685 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 12 Jun 2012, 07:17:01 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r8642 r8685 1055 1055 if p_category == 'bed_allocation' and student[ 1056 1056 'studycourse'].current_session != grok.getSite()[ 1057 ' configuration'].accommodation_session:1057 'hostels'].accommodation_session: 1058 1058 self.flash( 1059 1059 _('Your current session does not match ' + \ -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r8642 r8685 172 172 173 173 # Configure university 174 self.app[' configuration'].accommodation_states = ['admitted']175 self.app[' configuration'].accommodation_session = 2004174 self.app['hostels'].accommodation_states = ['admitted'] 175 self.app['hostels'].accommodation_session = 2004 176 176 self.app['configuration'].carry_over = True 177 177 configuration = createObject('waeup.SessionConfiguration') … … 1601 1601 self.browser.getControl(name="form.p_category").value = ['bed_allocation'] 1602 1602 # If student is not in accommodation session, payment cannot be processed 1603 self.app[' configuration'].accommodation_session = 20111603 self.app['hostels'].accommodation_session = 2011 1604 1604 self.browser.getControl("Create ticket").click() 1605 1605 self.assertMatches('...Your current session does not match...', 1606 1606 self.browser.contents) 1607 self.app[' configuration'].accommodation_session = 20041607 self.app['hostels'].accommodation_session = 2004 1608 1608 self.browser.getControl("Add online payment ticket").click() 1609 1609 self.browser.getControl(name="form.p_category").value = ['bed_allocation'] -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r8621 r8685 320 320 d = {} 321 321 d['error'] = u'' 322 site_configuration = grok.getSite()['configuration']323 d['booking_session'] = site_configuration.accommodation_session324 d['allowed_states'] = site_configuration.accommodation_states322 hostels = grok.getSite()['hostels'] 323 d['booking_session'] = hostels.accommodation_session 324 d['allowed_states'] = hostels.accommodation_states 325 325 # Determine bed type 326 326 studycourse = student['studycourse'] … … 331 331 return 332 332 end_level = certificate.end_level 333 if entry_session == grok.getSite()[ 334 'configuration'].accommodation_session: 333 if entry_session == grok.getSite()['hostels'].accommodation_session: 335 334 bt = 'fr' 336 335 elif current_level >= end_level:
Note: See TracChangeset for help on using the changeset viewer.