Changeset 3131 for WAeUP_SRP/uniben/waeup_custom
- Timestamp:
- 8 Feb 2008, 19:56:14 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/uniben/waeup_custom/getAccommodationInfo.py
r3122 r3131 86 86 arrived = student_record.session == session[0] 87 87 previous = int(student_record.session) == int(session[0]) - 1 88 89 if student_record.review_state == 'deactivated': 88 level = None 89 end_level = None 90 try: 91 level = int(student_record.level) 92 except ValueError: 93 logger.info('%s has invalid level %s' % (member_id,student_record.level)) 94 try: 95 end_level = int(student_record.end_level) 96 except ValueError: 97 logger.info('%s has invalid end_level %s' % (member_id,student_record.end_level)) 98 99 if level is None or end_level is None or student_record.review_state == 'deactivated': 90 100 pass 91 101 elif arrived: … … 93 103 booking_allowed = student_record.review_state in new_states 94 104 else: 95 booking_allowed = not ( int(student_record.level)% 100)105 booking_allowed = not (level % 100) 96 106 elif previous: 97 107 booking_allowed = student_record.verdict in ('A','B',) … … 121 131 if new: 122 132 bt = 'fr' 123 elif int(student_record.level) + delta < int(student_record.end_level):133 elif level + delta < end_level: 124 134 bt = 're' 125 135 else: … … 146 156 if student_record.sex: 147 157 d['sex'] = 'female' 148 if student_record.faculty in ('MED','DEN') and int(student_record.level)> 400:158 if student_record.faculty in ('MED','DEN') and level > 400: 149 159 bt += "_med" 150 160 elif student_record.course in ekehuan_certificates:
Note: See TracChangeset for help on using the changeset viewer.