Changeset 3795 for WAeUP_SRP/trunk/skins/waeup_futminna
- Timestamp:
- 1 Dec 2008, 12:21:08 (16 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_futminna
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_futminna/getAccommodationInfo.py
r3788 r3795 58 58 # customize from here 59 59 60 61 new_states = ('cleared_and_validated',62 'school_fee_paid',63 'courses_registered',64 'courses_validated',65 )66 67 new = student_record.entry_session == session[0]68 arrived = student_record.session == session[0]69 70 level = None71 end_level = None72 previous = None73 74 60 try: 75 61 level = int(student_record.level) 76 62 except: 77 63 logger.info('%s has invalid level %s' % (student_id,student_record.level)) 78 try: 79 end_level = int(student_record.end_level) 80 except: 81 logger.info('%s has invalid end_level %s' % (student_id,student_record.end_level)) 82 try: 83 previous = int(student_record.session) == int(session[0]) - 1 84 except: 85 logger.info('%s has invalid session %s' % (student_id,student_record.session)) 64 info['acco'] = None 65 info['booking_allowed'] = False 66 info['student_status'] = '' 67 return info 86 68 87 if level is None or end_level is None or student_record.review_state == 'deactivated': 88 pass 89 elif arrived: 90 if new: 91 booking_allowed = student_record.review_state in new_states 92 else: 93 #booking_allowed = not (level % 100) 94 booking_allowed = True 95 elif previous: 96 booking_allowed = not student_record.verdict in ('I',) 97 98 info['booking_allowed'] = booking_allowed 99 if not booking_allowed: 69 if review_state in ('cleared_and_validated','school_fee_paid','courses_registered', 'courses_validated',) and student_record.session == session[0]: 70 info['booking_allowed'] = True 71 info['online_payment'] = True 72 else: 100 73 info['acco'] = None 74 info['booking_allowed'] = False 101 75 info['student_status'] = '' 102 76 return info … … 106 80 info['acco'] = acco 107 81 info['acco_id'] = acco_id 108 bt = 're' 82 109 83 info['maintenance_paid'] = False 110 84 if acco is not None: … … 112 86 info['acco_review_state'] = wf.getInfoFor(acco,'review_state',None) 113 87 info['maintenance_paid'] = info['acco_review_state'] == "maintenance_fee_paid" 114 115 88 d = {} 116 89 d['sex'] = 'male' 90 d['bt'] = 'all' 117 91 if student_record.sex: 118 92 d['sex'] = 'female' 93 119 94 info['sex']=d['sex'] 120 d['bt'] = 'all'121 95 student_status = "%(sex)s_%(bt)s" % d 122 96 info['student_status'] = student_status
Note: See TracChangeset for help on using the changeset viewer.