Changeset 2263
- Timestamp:
- 20 Sep 2007, 17:27:59 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r2259 r2263 1120 1120 editable_keys.remove('matric_no') 1121 1121 1122 # included only to change wf state from admitted to returning1123 if res[0].review_state not in ('admitted','objection_raised'):1124 return '%s' % res[0].id ,"student is not in state admitted or objection_raised"1125 # end inclusion1122 ## included only to change wf state from admitted to returning 1123 #if res[0].review_state not in ('admitted','objection_raised'): 1124 # return '%s' % res[0].id ,"student is not in state admitted or objection_raised" 1125 ## end inclusion 1126 1126 1127 1127 sid = res[0].id … … 1129 1129 f2t = self.field2types_student 1130 1130 d = {} 1131 #import pdb;pdb.set_trace()1132 1131 any_change = False 1133 1132 for pt in f2t.keys(): … … 1157 1156 1158 1157 1159 # included only to change wf state from admitted to returning1160 if res[0].review_state in ('admitted','objection_raised'):1161 new_state = f2t[pt]['wf_transition_return']1162 sub_obj = getattr(student_obj,f2t[pt]['id'],None)1163 if sub_obj and new_state != "remain":1164 try:1165 self.portal_workflow.doActionFor(sub_obj,new_state,dest_container=sub_obj)1166 except:1167 #logger.info('%s, wf transition %s of %s failed' % (sid,new_state,sub_obj.id))1168 pass1169 if res[0].review_state in ('admitted','objection_raised'):1170 wfaction = 'return'1171 try:1172 self.portal_workflow.doActionFor(student_obj,wfaction)1173 logger.info('%s, wf state changed' % sid)1174 any_change = True1175 except:1176 logger.info('%s, wf transition failed, old state = %s' % (sid,res[0].review_state))1177 pass1178 # end inclusion1158 ## included only to change wf state from admitted to returning 1159 # if res[0].review_state in ('admitted','objection_raised'): 1160 # new_state = f2t[pt]['wf_transition_return'] 1161 # sub_obj = getattr(student_obj,f2t[pt]['id'],None) 1162 # if sub_obj and new_state != "remain": 1163 # try: 1164 # self.portal_workflow.doActionFor(sub_obj,new_state,dest_container=sub_obj) 1165 # except: 1166 # #logger.info('%s, wf transition %s of %s failed' % (sid,new_state,sub_obj.id)) 1167 # pass 1168 #if res[0].review_state in ('admitted','objection_raised'): 1169 # wfaction = 'return' 1170 # try: 1171 # self.portal_workflow.doActionFor(student_obj,wfaction) 1172 # logger.info('%s, wf state changed' % sid) 1173 # any_change = True 1174 # except: 1175 # logger.info('%s, wf transition failed, old state = %s' % (sid,res[0].review_state)) 1176 # pass 1177 ## end inclusion 1179 1178 1180 1179 … … 1260 1259 if by_pass_queue is not None: 1261 1260 bypass_queue(bypass_queue_catalog) 1262 1261 1263 1262 dm = DataModel(item, adapters,context=self) 1264 1263 ds = DataStructure(data=item,datamodel=dm)
Note: See TracChangeset for help on using the changeset viewer.