Changeset 2268 for WAeUP_SRP/base
- Timestamp:
- 21 Sep 2007, 20:11:08 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r2267 r2268 1156 1156 if not res: 1157 1157 return '',"no student with id %s" % sid 1158 elif matric_no and res[0].matric_no and\1158 if matric_no and res[0].matric_no and\ 1159 1159 matric_no != res[0].matric_no: 1160 return '%s' % res[0].id ,"student has no matric_no %s" % matric_no1161 elif jamb_reg_no and res[0].jamb_reg_no and\1160 logger.info("%s, old matric_no %s overwritten with %s" % (res[0].id,res[0].matric_no,matric_no)) 1161 if jamb_reg_no and res[0].jamb_reg_no and\ 1162 1162 jamb_reg_no != res[0].jamb_reg_no: 1163 return '%s' % res[0].id ,"student has no jamb_reg_no %s" % jamb_reg_no1163 logger.info("%s, old reg_no %s overwritten with %s" % (res[0].id,res[0].jamb_reg_no,jamb_reg_no)) 1164 1164 elif jamb_reg_no: 1165 1165 res = self.students_catalog(jamb_reg_no = jamb_reg_no) … … 1173 1173 editable_keys.remove('matric_no') 1174 1174 1175 # included only to change wf state from admitted to returning1176 if res[0].review_state not in ('admitted','objection_raised'):1177 return '%s' % res[0].id ,"student is not in state admitted or objection_raised"1178 # end inclusion1175 ## included only to change wf state from admitted to returning 1176 #if res[0].review_state not in ('admitted','objection_raised'): 1177 # return '%s' % res[0].id ,"student is not in state admitted or objection_raised" 1178 ## end inclusion 1179 1179 1180 1180 sid = res[0].id … … 1210 1210 1211 1211 1212 # included only to change wf state from admitted to returning1213 if res[0].review_state in ('admitted','objection_raised'):1214 new_state = f2t[pt]['wf_transition_return']1215 sub_obj = getattr(student_obj,f2t[pt]['id'],None)1216 if sub_obj and new_state != "remain":1217 try:1218 self.portal_workflow.doActionFor(sub_obj,new_state,dest_container=sub_obj)1219 except:1220 #logger.info('%s, wf transition %s of %s failed' % (sid,new_state,sub_obj.id))1221 pass1222 if res[0].review_state in ('admitted','objection_raised'):1223 wfaction = 'return'1224 try:1225 self.portal_workflow.doActionFor(student_obj,wfaction)1226 logger.info('%s, wf state changed' % sid)1227 any_change = True1228 except:1229 logger.info('%s, wf transition failed, old state = %s' % (sid,res[0].review_state))1230 pass1231 # end inclusion1212 ## included only to change wf state from admitted to returning 1213 # if res[0].review_state in ('admitted','objection_raised'): 1214 # new_state = f2t[pt]['wf_transition_return'] 1215 # sub_obj = getattr(student_obj,f2t[pt]['id'],None) 1216 # if sub_obj and new_state != "remain": 1217 # try: 1218 # self.portal_workflow.doActionFor(sub_obj,new_state,dest_container=sub_obj) 1219 # except: 1220 # #logger.info('%s, wf transition %s of %s failed' % (sid,new_state,sub_obj.id)) 1221 # pass 1222 #if res[0].review_state in ('admitted','objection_raised'): 1223 # wfaction = 'return' 1224 # try: 1225 # self.portal_workflow.doActionFor(student_obj,wfaction) 1226 # logger.info('%s, wf state changed' % sid) 1227 # any_change = True 1228 # except: 1229 # logger.info('%s, wf transition failed, old state = %s' % (sid,res[0].review_state)) 1230 # pass 1231 ## end inclusion 1232 1232 1233 1233
Note: See TracChangeset for help on using the changeset viewer.