Changeset 2412 for WAeUP_SRP/base/skins/cps_custom/logged_in.py
- Timestamp:
- 22 Oct 2007, 05:53:42 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/cps_custom/logged_in.py
r2407 r2412 45 45 student_app = getattr(student,'application',None) 46 46 student_per = getattr(student,'personal',None) 47 48 ######################################################### 49 47 48 ######################################################### 49 50 50 # perform makeStudentData for returning students who login for the first time 51 51 # the returning key comes from set_access_data 52 52 53 53 if request.has_key('returning') and student_app is None: 54 54 email=request.get("email") … … 65 65 elif student_app is None: 66 66 context.waeup_tool.makeStudentData(str(member)) 67 68 ######################################################### 69 67 70 student_app = getattr(student,'application',None) 68 69 ######################################################### 70 71 # add missing payments folder s72 71 72 ######################################################### 73 74 # add missing payments folder 75 73 76 if 'payments' not in student.objectIds(): 74 77 student.invokeFactory('PaymentsFolder','payments') … … 78 81 d['Title'] = 'Online Payments' 79 82 payments.getContent().edit(mapping=d) 80 81 ######################################################### 82 83 84 ######################################################### 85 83 86 #student_pume = getattr(student,'pume',None) 84 87 s_review_state = context.getStudentReviewState(student.id) … … 90 93 91 94 ######################################################### 92 95 93 96 # save email and phone of returning students after all objects have been created 94 97 … … 106 109 per_doc.edit(mapping = {'email' : email, 'phone' : phone}) 107 110 wftool.doActionFor(student_app,'close') 108 109 ######################################################### 110 111 112 ######################################################### 113 111 114 # look for passport pictures of returning students 112 115 … … 120 123 121 124 ######################################################### 122 125 123 126 # look for passport pictures of new students 124 127 … … 131 134 132 135 ######################################################### 133 136 134 137 # perform necessary updates for new students 135 138 136 139 # 1. add pin and application date to app_doc 137 140 138 141 if s_review_state in ("student_created","admitted") and\ 139 142 a_review_state == 'created' : … … 143 146 da = {} 144 147 pin = request.get('pin') 145 146 # if the student comes directly, add missing pin (fix)148 149 # if the student comes directly, add missing pin or pin with wrong syntax (fix) 147 150 if not pin: 148 151 jamb_reg_no = app_doc.jamb_reg_no … … 160 163 da['app_ac_date'] = current 161 164 app_doc.edit(mapping = da) 162 163 # 2. same as 1 but without opening app_doc 164 165 166 # 2. same as 1 but without opening app_doc, assuming that the student already logged in 167 # but the pin is missing in app_doc (fix) 168 165 169 elif s_review_state in ("admitted") and a_review_state == 'opened' and\ 166 170 not app_doc.app_ac_pin: … … 179 183 da['app_ac_pin'] = pin 180 184 app_doc.edit(mapping = da) 181 182 # 2. open personal object. This should be done in clearance_edit.183 185 186 # 3. open personal object (fix). This should be done in clearance_edit. 187 184 188 elif s_review_state in ("cleared_and_validated",) and\ 185 189 p_review_state == 'created' : 186 190 wftool.doActionFor(student_per,'open') 187 188 ######################################################### 189 191 192 ######################################################### 193 190 194 res = context.students_catalog(id = str(member)) 191 195 matric_no = res[0].matric_no … … 193 197 194 198 ######################################################### 195 199 196 200 # fetch current verdict via getVerdict 197 201 … … 208 212 study_course_doc.edit(mapping = dsc) 209 213 wftool.doActionFor(study_course,'close_for_edit') 210 211 ######################################################### 212 214 215 ######################################################### 216 213 217 has_results = context.results_import(matric_no = matric_no) 214 218 215 219 ######################################################### 216 220 217 221 # determine appropriate redirect url 218 222
Note: See TracChangeset for help on using the changeset viewer.