Changeset 3089 for WAeUP_SRP/uniben
- Timestamp:
- 2 Feb 2008, 14:38:10 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/uniben/waeup_custom/getAccommodationInfo.py
r3087 r3089 83 83 booking_allowed = False 84 84 85 # new = student_record.entry_session == session[0] 86 # arrived = student_record.session == session[0] 87 88 # if new and arrived and student_record.review_state in new_states: 89 # booking_allowed = True 90 # elif arrived: 91 # dummy,on_probation = divmod(int(student_record.level),100) 92 # if not on_probation: 93 # booking_allowed = True 94 # elif int(student_record.session) == int(session[0]) - 1: 95 # if student_record.verdict in ('A','B',): 96 # booking_allowed = True 97 if student_record.session == session[0]: 98 if student_record.entry_session == session[0]: 85 new = student_record.entry_session == session[0] 86 arrived = student_record.session == session[0] 87 previous = int(student_record.session) == int(session[0]) - 1 88 if arrived: 89 if new: 99 90 booking_allowed = student_record.review_state in new_states 100 91 else: 101 92 booking_allowed = not (int(student_record.level) % 100) 102 elif int(student_record.session) == int(session[0]) - 1:93 elif previous: 103 94 booking_allowed = student_record.verdict in ('A','B',) 104 95 105 96 info['booking_allowed'] = booking_allowed 106 97 if not booking_allowed: 107 98 info['acco'] = None 108 # return info109 99 110 100 acco_id = 'accommodation_' + session[0]
Note: See TracChangeset for help on using the changeset viewer.