Changeset 9424 for main/waeup.kofa/trunk
- Timestamp:
- 26 Oct 2012, 17:17:10 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/accommodation.py
r9423 r9424 58 58 59 59 class BedTicket(grok.Model): 60 """This is a bed ticket which shows that the student has booked a bed 61 and paid the maintenance fee. 60 """This is a bed ticket which shows that the student has booked a bed. 62 61 """ 63 62 grok.implements(IBedTicket, IStudentNavigation) -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r9423 r9424 1342 1342 current_session = str(student['studycourse'].current_session) 1343 1343 if not student['accommodation'].has_key(current_session): 1344 self.flash(_('You have not yet booked a bed.'))1344 self.flash(_('You have not yet booked accommodation.')) 1345 1345 self.redirect(self.url(self.context)) 1346 1346 return … … 1589 1589 # If bed space has been manually allocated use this bed 1590 1590 bed = [entry for entry in entries][0] 1591 # Safety belt for paranoids: Does this bed really exist on portal? 1592 # XXX: Can be remove if nobody complains. 1593 if bed.__parent__.__parent__ is None: 1594 self.flash(_('System error: Please contact the adminsitrator.')) 1595 return 1591 1596 else: 1592 1597 # else search for other available beds … … 1598 1603 students_utils = getUtility(IStudentsUtils) 1599 1604 bed = students_utils.selectBed(available_beds) 1605 # Safety belt for paranoids: Does this bed really exist in portal? 1606 # XXX: Can be remove if nobody complains. 1607 if bed.__parent__.__parent__ is None: 1608 self.flash(_('System error: Please contact the adminsitrator.')) 1609 return 1600 1610 bed.bookBed(student.student_id) 1601 1611 else: -
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r9423 r9424 602 602 603 603 bed_coordinates = schema.TextLine( 604 title = _(u' Bed Coordinates'),604 title = _(u'Allocated Bed'), 605 605 required = True, 606 606 readonly = False, … … 608 608 609 609 bed_type = schema.TextLine( 610 title = _(u' Bed Type'),610 title = _(u'Requested Bed Type'), 611 611 required = True, 612 612 readonly = False, -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r9423 r9424 2053 2053 self.browser.getControl(name="form.p_category").value = ['hostel_maintenance'] 2054 2054 self.browser.getControl("Create ticket").click() 2055 self.assertMatches('...You have not yet booked a bed...',2055 self.assertMatches('...You have not yet booked accommodation...', 2056 2056 self.browser.contents) 2057 2057 # We continue this test in test_student_accommodation
Note: See TracChangeset for help on using the changeset viewer.