Changeset 2268
- Timestamp:
- 21 Sep 2007, 20:11:08 (17 years ago)
- Location:
- WAeUP_SRP
- Files:
-
- 4 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 -
WAeUP_SRP/uniben/profiles/default/actions.xml
r2262 r2268 52 52 </action> 53 53 <action title="Import Data" action_id="import" category="global" 54 condition_expr="python:member and member.has_role('Manager')" url_expr="string: ./import"55 visible="True"> 56 <permission>View</permission> 57 </action> 54 condition_expr="python:member and member.has_role('Manager')" url_expr="string:${portal_url}/import" 55 visible="True"> 56 <permission>View</permission> 57 </action> 58 58 <action title="action_manage_vocabularies" action_id="manage_vocabularies" 59 59 category="global" condition_expr="" -
WAeUP_SRP/uniben/profiles/default/layouts/import_student.xml
r2237 r2268 8 8 <property name="flexible_widgets"/> 9 9 <property name="validate_values_expr"></property> 10 11 <widget name="id" meta_type="String Widget"> 12 <property name="title">Id</property> 13 <property name="fields"> 14 <element value="email"/> 15 </property> 16 <property name="is_required">False</property> 17 <property name="label">Id</property> 18 <property name="label_edit">Id</property> 19 <property name="readonly_layout_modes"/> 20 <property name="hidden_layout_modes"/> 21 <property name="hidden_readonly_layout_modes"/> 22 </widget> 23 10 24 <widget name="reg_transition" meta_type="String Widget"> 11 25 <property name="title">Transition after import</property> … … 262 276 <property name="hidden_readonly_layout_modes"/> 263 277 </widget> 264 278 265 279 <widget name="jamb_state" meta_type="String Widget"> 266 280 <property name="title">JAMB State</property> -
WAeUP_SRP/uniben/profiles/default/schemas/import_student.xml
r2188 r2268 2 2 <?xml-stylesheet type="text/xsl" href="schema.xsl"?> 3 3 <object name="import_student" meta_type="CPS Schema"> 4 <field name="id" meta_type="CPS String Field"/> 4 5 <field name="reg_transition" meta_type="CPS String Field"/> 5 6 <field name="firstname" meta_type="CPS String Field"/>
Note: See TracChangeset for help on using the changeset viewer.