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/browser.py

    r16939 r17176  
    22642264            p_combi = [p_combi,]
    22652265        student = self.context.__parent__
     2266        students_utils = getUtility(IStudentsUtils)
    22662267        # The hostel_application payment category is temporarily used
    22672268        # by Uniben.
    2268         if p_category in ('bed_allocation', 'hostel_application') and student[
    2269             'studycourse'].current_session != grok.getSite()[
    2270             'hostels'].accommodation_session:
     2269        if p_category in (
     2270                'bed_allocation', 'hostel_application') and grok.getSite()[
     2271                    'hostels'].accommodation_session - student[
     2272                        'studycourse'].current_session > students_utils.ACCOMMODATION_SPAN:
    22712273                self.flash(
    2272                     _('Your current session does not match ' + \
    2273                     'accommodation session.'), type="danger")
     2274                    _('Your current session does not allow ' + \
     2275                    'to book accommodation.'), type="danger")
    22742276                return
    22752277        if 'maintenance' in p_category:
     
    22792281                           type="warning")
    22802282                return
    2281         students_utils = getUtility(IStudentsUtils)
    22822283        error, payment = students_utils.setPaymentDetails(
    22832284            p_category, student, None, None, p_combi)
Note: See TracChangeset for help on using the changeset viewer.