Changeset 4007 for WAeUP_SRP/trunk/skins/waeup_fceoyo
- Timestamp:
- 10 Mar 2009, 06:03:56 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_fceoyo/getAccommodationInfo.py
r3960 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 … … 82 87 return info 83 88 84 acco_id = 'accommodation_' + session[0]85 acco = getattr(student,acco_id,None)86 info['acco'] = acco87 info['acco_id'] = acco_id88 89 info['maintenance_paid'] = False90 if acco is not None:91 info['acco_doc'] = acco.getContent()92 info['acco_review_state'] = wf.getInfoFor(acco,'review_state',None)93 info['maintenance_paid'] = info['acco_review_state'] == "maintenance_fee_paid"94 89 d = {} 95 90 if level >= 300: … … 111 106 student_status = "%(sex)s_%(bt)s" % d 112 107 info['student_status'] = student_status 108 109 # customize end 110 111 acco_id = 'accommodation_' + session[0] 112 acco = getattr(student,acco_id,None) 113 info['acco'] = acco 114 info['acco_id'] = acco_id 115 info['maintenance_paid'] = False 116 if acco is not None: 117 info['acco_doc'] = acco.getContent() 118 info['acco_review_state'] = wf.getInfoFor(acco,'review_state',None) 119 info['maintenance_paid'] = info['acco_review_state'] == "maintenance_fee_paid" 120 elif booking_disabled: 121 info['booking_allowed'] = False 122 info['booking_disabled'] = True 123 logger.info('%s: %s eligible but booking disabled' % (student_id,student_status)) 124 113 125 return info 114
Note: See TracChangeset for help on using the changeset viewer.