Changeset 4009 for WAeUP_SRP/trunk/skins/waeup_fceokene
- Timestamp:
- 10 Mar 2009, 08:03:23 (16 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_fceokene
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_fceokene/getAccommodationInfo.py
r3960 r4009 15 15 logger = logging.getLogger('Skins.getAccommodationInfo') 16 16 import DateTime 17 18 booking_disabled = False 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 … … 80 85 info['booking_allowed'] = False 81 86 info['student_status'] = '' 87 logger.info('%s: not eligible' % (student_id)) 82 88 return info 83 89 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 90 d = {} 95 91 if level >= 300: … … 111 107 student_status = "%(sex)s_%(bt)s" % d 112 108 info['student_status'] = student_status 109 110 # customize end 111 112 acco_id = 'accommodation_' + session[0] 113 acco = getattr(student,acco_id,None) 114 info['acco'] = acco 115 info['acco_id'] = acco_id 116 info['maintenance_paid'] = False 117 if acco is not None: 118 info['acco_doc'] = acco.getContent() 119 info['acco_review_state'] = wf.getInfoFor(acco,'review_state',None) 120 info['maintenance_paid'] = info['acco_review_state'] == "maintenance_fee_paid" 121 elif booking_disabled: 122 info['booking_disabled'] = True 123 logger.info('%s: %s eligible but booking disabled' % (student_id,student_status)) 124 113 125 return info 114 126 -
WAeUP_SRP/trunk/skins/waeup_fceokene/reserve_accommodation.py
r3772 r4009 9 9 """ 10 10 process the the accommodation reservation 11 customized for FCE Okene (random booking order) 11 12 """ 12 13 try: … … 34 35 35 36 mode = 'create' 37 if info['booking_disabled']: 38 return context.REQUEST.RESPONSE.redirect("%s/booking_disabled" % info['student'].absolute_url()) 36 39 if not info['booking_allowed']: 37 40 return context.REQUEST.RESPONSE.redirect("%s/no_booking_allowed" % info['student'].absolute_url())
Note: See TracChangeset for help on using the changeset viewer.