Changeset 3795
- Timestamp:
- 1 Dec 2008, 12:21:08 (16 years ago)
- Location:
- WAeUP_SRP/trunk/skins
- Files:
-
- 1 added
- 3 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 -
WAeUP_SRP/trunk/skins/waeup_student/accommodation_edit_form.pt
r2891 r3795 41 41 42 42 <ul tal:condition="not: maintenance_online" tal:omit-tag=""> 43 <li>Buy a Hostel Maint ainance Scratch Card43 <li>Buy a Hostel Maintenance Scratch Card 44 44 (Code: <span tal:replace="python: info['acco_doc'].acco_maint_code" />) for 45 45 <span tal:replace="python: info['acco_doc'].acco_maint_fee" /> Nairas</li> -
WAeUP_SRP/trunk/skins/waeup_utilities/changeRegState.py
r2961 r3795 29 29 30 30 request = context.REQUEST 31 students = context.portal_url.getPortalObject().campus.students31 #students = context.portal_url.getPortalObject().campus.students 32 32 wftool = context.portal_workflow 33 33 student_id = context.getStudentId() 34 context_doc = context 34 35 if student_id is None: 35 36 return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) 36 37 student = getattr(students,student_id) 37 #student = getattr(students,student_id) 38 #context_doc = student 38 39 try: 39 wftool.doActionFor( student,transition)40 wftool.doActionFor(context_doc,transition) 40 41 logger.info('%s executed transition %s for %s' % (member,transition,student_id)) 41 42 except:
Note: See TracChangeset for help on using the changeset viewer.