Changeset 3431 for WAeUP_SRP/uniben/waeup_custom/getAccommodationInfo.py
- Timestamp:
- 8 Apr 2008, 15:51:10 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/uniben/waeup_custom/getAccommodationInfo.py
r3425 r3431 40 40 return None 41 41 42 info['error'] = None 43 info['matric_no']=student_record.matric_no 44 info['jamb_reg_no']=student_record.jamb_reg_no 45 info['name']=student_record.name 46 info['email']=student_record.email 47 info['level']=student_record.level 48 info['verdict']=getattr(student_record,'verdict','') 49 review_state = info['review_state'] = student_record.review_state 50 info['session'] = session = context.getSessionId() 51 students_object = context.portal_url.getPortalObject().campus.students 52 student = getattr(students_object, student_id) 53 info['student_id'] = student_id 54 info['student'] = student 55 56 booking_allowed = False 57 58 # customize from here 59 42 60 ekehuan_certificates = ('BARTAPG', 43 61 'BARTAPM', … … 50 68 'BARTTHR', 51 69 ) 52 #pti_certificates = ('BENGIEP',53 # 'BENGGCPP',54 # 'BENGEEP',55 # 'BENGGEP',56 # 'BENGPEP',57 # 'BENGMEP',58 # )59 60 70 61 71 new_states = ('cleared_and_validated', … … 65 75 ) 66 76 67 info['error'] = None68 info['matric_no']=student_record.matric_no69 info['jamb_reg_no']=student_record.jamb_reg_no70 info['name']=student_record.name71 info['email']=student_record.email72 info['level']=student_record.level73 info['verdict']=getattr(student_record,'verdict','')74 review_state = info['review_state'] = student_record.review_state75 76 info['session'] = session = context.getSessionId()77 78 students_object = context.portal_url.getPortalObject().campus.students79 student = getattr(students_object, student_id)80 info['student_id'] = student_id81 info['student'] = student82 83 booking_allowed = False84 85 77 new = student_record.entry_session == session[0] 86 78 arrived = student_record.session == session[0] … … 88 80 level = None 89 81 end_level = None 82 previous = None 83 90 84 try: 91 85 level = int(student_record.level) … … 97 91 logger.info('%s has invalid end_level %s' % (student_id,student_record.end_level)) 98 92 try: 99 previous = int(student_record.session) == int(session[0]) - 1 93 previous = int(student_record.session) == int(session[0]) - 1 100 94 except: 101 95 logger.info('%s has invalid session %s' % (student_id,student_record.session)) … … 128 122 info['maintenance_paid'] = info['acco_review_state'] == "maintenance_fee_paid" 129 123 130 131 124 d = {} 132 125 delta = 0 … … 139 132 else: 140 133 bt = 'fi' 141 # else: 142 # res = context.portal_catalog(portal_type = "Certificate", id = student_record.course) 143 # if res: 144 # c_brain = res[0] 145 # #from Products.zdb import set_trace; set_trace() 146 # certificate = c_brain.getObject().getContent() 147 # try: 148 # certlevel = int(certificate.end_level) 149 # except: 150 # info["error"] = '"no end_level for","%s"' % c_brain.getId 151 # return info 152 # try: 153 # studentlevel = int(student_record.level) 154 # except: 155 # info["error"] = '"no level for","%s"' % student_record.getId 156 # return info 157 # if studentlevel >= certlevel: 158 # bt = "fi" 134 159 135 d['sex'] = 'male' 160 136 if student_record.sex:
Note: See TracChangeset for help on using the changeset viewer.