Changeset 18179


Ignore:
Timestamp:
19 Sep 2025, 07:52:19 (14 months ago)
Author:
Henrik Bettermann
Message:

Only fresh students can book accommodation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/utils.py

    r18151 r18179  
    263263        return None, payment
    264264
    265     #def checkAccommodationRequirements(self, student, acc_details):
    266     #    msg = super(CustomStudentsUtils, self).checkAccommodationRequirements(
    267     #        student, acc_details)
    268     #    if msg:
    269     #        return msg
    270     #    if student.faccode not in ('FLW', 'FMED',):
    271     #        return _('You are not eligible to book accommodation.')
    272     #    return
     265    def checkAccommodationRequirements(self, student, acc_details):
     266        msg = super(CustomStudentsUtils, self).checkAccommodationRequirements(
     267            student, acc_details)
     268        if msg:
     269            return msg
     270        if student['studycourse'].entry_session != grok.getSite()[
     271            'hostels'].accommodation_session:
     272            return _('Only newly admitted students can book accommodation.')
     273        return
    273274
    274275    def getAccommodationDetails(self, student):
Note: See TracChangeset for help on using the changeset viewer.