Ignore:
Timestamp:
25 Nov 2022, 11:54:59 (22 months ago)
Author:
Henrik Bettermann
Message:

Allow students to book accommodation also if they are in previous sessions (not activated in base package).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r16966 r17176  
    654654        return d
    655655
     656    ACCOMMODATION_SPAN = 0
     657
    656658    def checkAccommodationRequirements(self, student, acc_details):
    657659        if acc_details.get('expired', False):
     
    672674        if not student.state in acc_details['allowed_states']:
    673675            return _("You are in the wrong registration state.")
    674         if student['studycourse'].current_session != acc_details[
    675             'booking_session']:
    676             return _('Your current session does not '
    677                      'match accommodation session.')
     676        if  acc_details['booking_session'] - student[
     677            'studycourse'].current_session > self.ACCOMMODATION_SPAN:
     678            return _('Your current session does not allow ' + \
     679                    'to book accommodation.')
    678680        bsession = str(acc_details['booking_session'])
    679681        if bsession in student['accommodation'].keys() \
Note: See TracChangeset for help on using the changeset viewer.