Ignore:
Timestamp:
10 Mar 2009, 06:03:56 (16 years ago)
Author:
Henrik Bettermann
Message:

ease disabling hostel booking (not yet tested)

FCE Okene remains unchanged.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_futminna/getAccommodationInfo.py

    r4004 r4007  
    5656info['student'] = student
    5757
     58# do not change these settings!
     59
    5860booking_allowed = False
     61info['booking_disabled'] = False
    5962
    6063# customize from here
     
    7881    return info
    7982
    80 acco_id = 'accommodation_' + session[0]
    81 acco = getattr(student,acco_id,None)
    82 info['acco'] = acco
    83 info['acco_id'] = acco_id
    84 
    85 info['maintenance_paid'] = False
    86 if acco is not None:
    87     info['acco_doc'] = acco.getContent()
    88     info['acco_review_state'] = wf.getInfoFor(acco,'review_state',None)
    89     info['maintenance_paid'] = info['acco_review_state'] == "maintenance_fee_paid"
    90 elif booking_disabled:
    91     info['booking_allowed'] = False
    92    
    9383d = {}
    9484d['sex'] = 'male'
     
    10191info['student_status'] = student_status
    10292
     93# customize end
     94
     95acco_id = 'accommodation_' + session[0]
     96acco = getattr(student,acco_id,None)
     97info['acco'] = acco
     98info['acco_id'] = acco_id
     99info['maintenance_paid'] = False
     100if acco is not None:
     101    info['acco_doc'] = acco.getContent()
     102    info['acco_review_state'] = wf.getInfoFor(acco,'review_state',None)
     103    info['maintenance_paid'] = info['acco_review_state'] == "maintenance_fee_paid"
     104elif booking_disabled:
     105    info['booking_allowed'] = False
     106    info['booking_disabled'] = True
     107    logger.info('%s: %s eligible but booking disabled' % (student_id,student_status))
     108
    103109return info
Note: See TracChangeset for help on using the changeset viewer.