Ignore:
Timestamp:
17 Jan 2023, 17:46:37 (20 months ago)
Author:
Henrik Bettermann
Message:

Implement special handling.

Location:
main/kofacustom.unidel/trunk/src/kofacustom/unidel
Files:
2 edited

Legend:

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

    r17278 r17304  
    196196        d['expired'] = hostels.expired
    197197        # Determine bed type
    198         bt = 'all'
     198        entry_session = student['studycourse'].entry_session
     199        if entry_session == grok.getSite()['hostels'].accommodation_session:
     200            bt = 'fr'
     201        else:
     202            bt = 're'
    199203        if student.sex == 'f':
    200204            sex = 'female'
     
    202206            sex = 'male'
    203207        special_handling = 'regular'
     208        if student.faccode in ('FLW', 'FMS'):
     209            special_handling = 'oyibu'
     210        if student.faccode in ('FET', 'FES'):
     211            special_handling = 'alero'
    204212        d['bt'] = u'%s_%s_%s' % (special_handling,sex,bt)
    205213        return d
     214
  • main/kofacustom.unidel/trunk/src/kofacustom/unidel/utils/utils.py

    r17278 r17304  
    7878        }
    7979
     80    SPECIAL_HANDLING_DICT = {
     81        'regular': 'Regular Hostel',
     82        'blocked': 'Blocked Hostel',
     83        'oyibu': 'Owa-Oyibu Campus Hostel',
     84        'alero': 'Owa-Alero Campus Hostel',
     85        }
Note: See TracChangeset for help on using the changeset viewer.