Changeset 4007 for WAeUP_SRP/trunk/skins/waeup_unilorin
- Timestamp:
- 10 Mar 2009, 06:03:56 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_unilorin/getAccommodationInfo.py
r3690 r4007 15 15 logger = logging.getLogger('Skins.getAccommodationInfo') 16 16 import DateTime 17 18 booking_disabled = True 17 19 18 20 request = context.REQUEST … … 54 56 info['student'] = student 55 57 58 # do not change these settings! 59 56 60 booking_allowed = False 61 info['booking_disabled'] = False 57 62 58 63 # customize from here … … 76 81 return info 77 82 78 acco_id = 'accommodation_' + session[0]79 acco = getattr(student,acco_id,None)80 info['acco'] = acco81 info['acco_id'] = acco_id82 83 info['maintenance_paid'] = False84 if acco is not None:85 info['acco_doc'] = acco.getContent()86 info['acco_review_state'] = wf.getInfoFor(acco,'review_state',None)87 info['maintenance_paid'] = info['acco_review_state'] == "maintenance_fee_paid"88 83 d = {} 89 84 if level >= 300: … … 105 100 student_status = "%(sex)s_%(bt)s" % d 106 101 info['student_status'] = student_status 102 103 # customize end 104 105 acco_id = 'accommodation_' + session[0] 106 acco = getattr(student,acco_id,None) 107 info['acco'] = acco 108 info['acco_id'] = acco_id 109 info['maintenance_paid'] = False 110 if acco is not None: 111 info['acco_doc'] = acco.getContent() 112 info['acco_review_state'] = wf.getInfoFor(acco,'review_state',None) 113 info['maintenance_paid'] = info['acco_review_state'] == "maintenance_fee_paid" 114 elif booking_disabled: 115 info['booking_allowed'] = False 116 info['booking_disabled'] = True 117 logger.info('%s: %s eligible but booking disabled' % (student_id,student_status)) 118 107 119 return info 108 120
Note: See TracChangeset for help on using the changeset viewer.