- Timestamp:
- 10 Mar 2009, 06:03:56 (16 years ago)
- Location:
- WAeUP_SRP/trunk/skins
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_aaua/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: … … 106 101 d['sex'] = 'female' 107 102 108 109 103 info['sex']=d['sex'] 110 104 d['bt'] = bt 111 105 student_status = "%(sex)s_%(bt)s" % d 112 106 info['student_status'] = student_status 107 108 # customize end 109 110 acco_id = 'accommodation_' + session[0] 111 acco = getattr(student,acco_id,None) 112 info['acco'] = acco 113 info['acco_id'] = acco_id 114 info['maintenance_paid'] = False 115 if acco is not None: 116 info['acco_doc'] = acco.getContent() 117 info['acco_review_state'] = wf.getInfoFor(acco,'review_state',None) 118 info['maintenance_paid'] = info['acco_review_state'] == "maintenance_fee_paid" 119 elif booking_disabled: 120 info['booking_allowed'] = False 121 info['booking_disabled'] = True 122 logger.info('%s: %s eligible but booking disabled' % (student_id,student_status)) 123 113 124 return info 114 125 -
WAeUP_SRP/trunk/skins/waeup_accommodation/getAccommodationInfo.py
r3985 r4007 16 16 import DateTime 17 17 18 booking_disabled = False18 booking_disabled = True 19 19 20 20 request = context.REQUEST … … 56 56 info['student'] = student 57 57 58 # do not change these settings! 59 58 60 booking_allowed = False 61 info['booking_disabled'] = False 59 62 60 63 # customize from here … … 76 79 'courses_validated', 77 80 ) 81 new = None 82 arrived = None 78 83 79 84 try: … … 85 90 except: 86 91 logger.info('%s has invalid session %s' % (student_id,student_record.session)) 87 92 88 93 level = None 89 94 end_level = None … … 117 122 info['acco'] = None 118 123 info['student_status'] = '' 119 logger.info('%s: no bed found' % (student_id))124 logger.info('%s: not eligible' % (student_id)) 120 125 return info 121 122 acco_id = 'accommodation_' + session[0]123 acco = getattr(student,acco_id,None)124 info['acco'] = acco125 info['acco_id'] = acco_id126 bt = 're'127 info['maintenance_paid'] = False128 if acco is not None:129 info['acco_doc'] = acco.getContent()130 info['acco_review_state'] = wf.getInfoFor(acco,'review_state',None)131 info['maintenance_paid'] = info['acco_review_state'] == "maintenance_fee_paid"132 elif booking_disabled:133 info['booking_allowed'] = False134 126 135 127 d = {} … … 143 135 else: 144 136 bt = 'fi' 145 146 137 d['sex'] = 'male' 147 138 if student_record.sex: … … 157 148 student_status = "%(sex)s_%(bt)s" % d 158 149 info['student_status'] = student_status 150 151 # customize end 152 153 acco_id = 'accommodation_' + session[0] 154 acco = getattr(student,acco_id,None) 155 info['acco'] = acco 156 info['acco_id'] = acco_id 157 info['maintenance_paid'] = False 158 if acco is not None: 159 info['acco_doc'] = acco.getContent() 160 info['acco_review_state'] = wf.getInfoFor(acco,'review_state',None) 161 info['maintenance_paid'] = info['acco_review_state'] == "maintenance_fee_paid" 162 elif booking_disabled: 163 info['booking_allowed'] = False 164 info['booking_disabled'] = True 165 logger.info('%s: %s eligible but booking disabled' % (student_id,student_status)) 166 159 167 return info -
WAeUP_SRP/trunk/skins/waeup_accommodation/reserve_accommodation.py
r3784 r4007 34 34 35 35 mode = 'create' 36 if info['booking_disabled']: 37 return context.REQUEST.RESPONSE.redirect("%s/booking_disabled" % info['student'].absolute_url()) 36 38 if not info['booking_allowed']: 37 39 return context.REQUEST.RESPONSE.redirect("%s/no_booking_allowed" % info['student'].absolute_url()) -
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 -
WAeUP_SRP/trunk/skins/waeup_futminna/getAccommodationInfo.py
r4004 r4007 56 56 info['student'] = student 57 57 58 # do not change these settings! 59 58 60 booking_allowed = False 61 info['booking_disabled'] = False 59 62 60 63 # customize from here … … 78 81 return info 79 82 80 acco_id = 'accommodation_' + session[0]81 acco = getattr(student,acco_id,None)82 info['acco'] = acco83 info['acco_id'] = acco_id84 85 info['maintenance_paid'] = False86 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'] = False92 93 83 d = {} 94 84 d['sex'] = 'male' … … 101 91 info['student_status'] = student_status 102 92 93 # customize end 94 95 acco_id = 'accommodation_' + session[0] 96 acco = getattr(student,acco_id,None) 97 info['acco'] = acco 98 info['acco_id'] = acco_id 99 info['maintenance_paid'] = False 100 if 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" 104 elif 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 103 109 return info -
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.