Ignore:
Timestamp:
12 Jun 2012, 07:17:01 (13 years ago)
Author:
Henrik Bettermann
Message:

Add hostel allocation start end end date attributes to hostels.

Move hostel allocation parameters from configuration to hostels. AccommodationOfficer? must be able to edit these parameters.

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  
    10551055        if p_category == 'bed_allocation' and student[
    10561056            'studycourse'].current_session != grok.getSite()[
    1057             'configuration'].accommodation_session:
     1057            'hostels'].accommodation_session:
    10581058                self.flash(
    10591059                    _('Your current session does not match ' + \
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r8642 r8685  
    172172
    173173        # Configure university
    174         self.app['configuration'].accommodation_states = ['admitted']
    175         self.app['configuration'].accommodation_session = 2004
     174        self.app['hostels'].accommodation_states = ['admitted']
     175        self.app['hostels'].accommodation_session = 2004
    176176        self.app['configuration'].carry_over = True
    177177        configuration = createObject('waeup.SessionConfiguration')
     
    16011601        self.browser.getControl(name="form.p_category").value = ['bed_allocation']
    16021602        # If student is not in accommodation session, payment cannot be processed
    1603         self.app['configuration'].accommodation_session = 2011
     1603        self.app['hostels'].accommodation_session = 2011
    16041604        self.browser.getControl("Create ticket").click()
    16051605        self.assertMatches('...Your current session does not match...',
    16061606                           self.browser.contents)
    1607         self.app['configuration'].accommodation_session = 2004
     1607        self.app['hostels'].accommodation_session = 2004
    16081608        self.browser.getControl("Add online payment ticket").click()
    16091609        self.browser.getControl(name="form.p_category").value = ['bed_allocation']
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r8621 r8685  
    320320        d = {}
    321321        d['error'] = u''
    322         site_configuration = grok.getSite()['configuration']
    323         d['booking_session'] = site_configuration.accommodation_session
    324         d['allowed_states'] = site_configuration.accommodation_states
     322        hostels = grok.getSite()['hostels']
     323        d['booking_session'] = hostels.accommodation_session
     324        d['allowed_states'] = hostels.accommodation_states
    325325        # Determine bed type
    326326        studycourse = student['studycourse']
     
    331331            return
    332332        end_level = certificate.end_level
    333         if entry_session == grok.getSite()[
    334             'configuration'].accommodation_session:
     333        if entry_session == grok.getSite()['hostels'].accommodation_session:
    335334            bt = 'fr'
    336335        elif current_level >= end_level:
Note: See TracChangeset for help on using the changeset viewer.