Changeset 1898
- Timestamp:
- 14 Jun 2007, 19:26:02 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/WAeUPTool.py
r1895 r1898 269 269 if dict.get('sex'): 270 270 d['jamb_sex'] = 'F' 271 entry_session = dict.get('entry_session') 272 wfaction = 'return' 273 wft = 'wf_transition_returning' 274 if entry_session == self.getSessionId(): 275 wfaction = 'admit' 276 wft = 'wf_transition_admitted' 271 277 for pt in f2t.keys(): 272 278 student_obj.invokeFactory(pt,f2t[pt]['id']) 273 279 sub_obj = getattr(student_obj,f2t[pt]['id']) 274 280 sub_doc = sub_obj.getContent() 275 self.portal_workflow.doActionFor(sub_obj,'open',dest_container=sub_obj)281 #self.portal_workflow.doActionFor(sub_obj,'open',dest_container=sub_obj) 276 282 d['Title'] = f2t[pt]['title'] 277 283 for field in f2t[pt]['fields']: 278 284 d[field] = dict.get(field,'') 279 285 sub_doc.edit(mapping = d) 280 new_state = f2t[pt][ 'wf_transition']286 new_state = f2t[pt][wft] 281 287 if new_state != "remain": 282 288 self.portal_workflow.doActionFor(sub_obj,new_state,dest_container=sub_obj) 283 entry_session = dict.get('entry_session')284 wfaction = 'return'285 if entry_session == self.getSessionId():286 wfaction = 'admit'287 289 self.portal_workflow.doActionFor(student_obj,wfaction) 288 290 student_obj.manage_setLocalRoles(sid, ['Owner',]) … … 735 737 {'id': 'application', 736 738 'title': 'Application Data', 737 'wf_transition': 'close', 739 'wf_transition_returning': 'close', 740 'wf_transition_admitted': 'remain', 738 741 'fields': 739 742 ('jamb_reg_no', … … 747 750 # {'id': 'pume', 748 751 # 'title': 'Pume Data', 749 # 'wf_transition': 'close', 752 # 'wf_transition_returning': 'close', 753 # 'wf_transition_admitted': 'close', 750 754 # 'fields': 751 755 # ('pume_score', … … 755 759 {'id': 'clearance', 756 760 'title': 'Clearance Data', 757 'wf_transition': 'close', 761 'wf_transition_returning': 'close', 762 'wf_transition_admitted': 'remain', 758 763 'fields': 759 764 ('matric_no', … … 766 771 {'id': 'personal', 767 772 'title': 'Personal Data', 768 'wf_transition': 'open', 773 'wf_transition_returning': 'open', 774 'wf_transition_admitted': 'remain', 769 775 'fields': 770 776 ('firstname', … … 780 786 {'id': 'study_course', 781 787 'title': 'Study Course', 782 'wf_transition': 'open', 788 'wf_transition_returning': 'open', 789 'wf_transition_admitted': 'remain', 783 790 'fields': 784 791 ('study_course', … … 789 796 ) 790 797 }, 791 #only temporarily changed to import admitted students 792 #'PaymentsFolder': 793 # {'id': 'payments', 794 # 'title': 'Payments', 795 # 'wf_transition': 'open', 796 # 'fields': 797 # () 798 # }, 798 799 'PaymentsFolder': 800 {'id': 'payments', 801 'title': 'Payments', 802 'wf_transition_returning': 'open', 803 'wf_transition_admitted': 'open', 804 'fields': 805 () 806 }, 799 807 } 800 808 ###) … … 837 845 d[zu] = mapping[von] 838 846 sub_doc.edit(mapping = d) 839 new_state = f2t[pt]['wf_transition'] 840 841 #only temporarily changed to import admitted students 842 #if new_state != "remain": 843 # self.portal_workflow.doActionFor(sub_obj,new_state,dest_container=sub_obj) 847 848 new_state = f2t[pt]['wf_transition_admitted'] 849 if new_state != "remain": 850 self.portal_workflow.doActionFor(sub_obj,new_state,dest_container=sub_obj) 844 851 wfaction = 'admit' 845 852
Note: See TracChangeset for help on using the changeset viewer.