Changeset 1781 for WAeUP_SRP/trunk/WAeUPTool.py
- Timestamp:
- 13 May 2007, 17:38:27 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/WAeUPTool.py
r1775 r1781 218 218 d[field] = dict.get(field,'') 219 219 sub_doc.edit(mapping = d) 220 new_state = f2t[pt]['wf_ state']220 new_state = f2t[pt]['wf_transition'] 221 221 if new_state != "remain": 222 222 self.portal_workflow.doActionFor(sub_obj,new_state,dest_container=sub_obj) … … 605 605 data = {} 606 606 607 # format of the first file sent fromTayo607 # format of the first file sent by Tayo 608 608 #data['datetime'] = date = DateTime.DateTime(pay_transaction['Date']) 609 609 #data['student_id'] = student_id = pay_transaction['Payer ID'] … … 612 612 #data['amount'] = amount = pay_transaction['Amount'] 613 613 614 # format of the second file sent fromTayo614 # format of the second file sent by Tayo 615 615 data['datetime'] = date = 0 616 616 data['student_id'] = student_id = pay_transaction['Payer ID'] … … 652 652 ###) 653 653 654 655 # all workflow transitions refer to students in state returning 654 656 student_field2types = { ###( 655 657 'StudentApplication': 656 658 {'id': 'application', 657 659 'title': 'Application Data', 658 'wf_ state': 'close',660 'wf_transition': 'close', 659 661 'fields': 660 662 ('jamb_reg_no', … … 669 671 {'id': 'pume', 670 672 'title': 'Pume Data', 671 'wf_ state': 'close',673 'wf_transition': 'close', 672 674 'fields': 673 675 ('pume_score', … … 677 679 {'id': 'clearance', 678 680 'title': 'Clearance Data', 679 'wf_ state': 'close',681 'wf_transition': 'close', 680 682 'fields': 681 683 ('matric_no', … … 687 689 {'id': 'personal', 688 690 'title': 'Personal Data', 689 'wf_ state': 'open',691 'wf_transition': 'open', 690 692 'fields': 691 693 ('firstname', … … 701 703 {'id': 'study_course', 702 704 'title': 'Study Course', 703 'wf_ state': 'open',705 'wf_transition': 'open', 704 706 'fields': 705 707 ('study_course', … … 713 715 {'id': 'payments', 714 716 'title': 'Payments', 715 'wf_ state': 'open',717 'wf_transition': 'open', 716 718 'fields': 717 719 () … … 723 725 security.declareProtected(ModifyPortalContent,'importStudent') ###( 724 726 def importStudent(self,dict): 725 "create a students data"726 logger = logging.getLogger('WAeUPTool.import _student')727 "create a students record due import" 728 logger = logging.getLogger('WAeUPTool.importStudent') 727 729 students_folder = self.portal_url.getPortalObject().campus.students 728 730 jamb_reg_no = dict.get('jamb_reg_no',None) … … 748 750 sub_obj = getattr(student_obj,f2t[pt]['id']) 749 751 sub_doc = sub_obj.getContent() 750 #self.portal_workflow.doActionFor(sub_obj,'open',dest_container=sub_obj)751 752 d['Title'] = f2t[pt]['title'] 752 753 for field in f2t[pt]['fields']: 753 754 d[field] = dict.get(field,'') 754 755 sub_doc.edit(mapping = d) 755 new_state = f2t[pt]['wf_ state']756 new_state = f2t[pt]['wf_transition'] 756 757 if new_state != "remain": 757 758 self.portal_workflow.doActionFor(sub_obj,new_state,dest_container=sub_obj) … … 764 765 security.declareProtected(ModifyPortalContent,'importEditStudent') ###( 765 766 def importEditStudent(self,dict): 766 "edit a students data"767 logger = logging.getLogger('WAeUPTool. create_student')767 "edit a students record due import" 768 logger = logging.getLogger('WAeUPTool.importEditStudent') 768 769 students_folder = self.portal_url.getPortalObject().campus.students 769 770 sid = dict.get('id',None) … … 804 805 sub_obj = getattr(student_obj,f2t[pt]['id']) 805 806 sub_doc = sub_obj.getContent() 806 self.portal_workflow.doActionFor(sub_obj,'open',dest_container=sub_obj)807 # self.portal_workflow.doActionFor(sub_obj,'open',dest_container=sub_obj) 807 808 d['Title'] = f2t[pt]['title'] 808 809 for field in f2t[pt]['fields']: 809 810 d[field] = dict.get(field,'') 810 811 sub_doc.edit(mapping = d) 811 # new_state = f2t[pt]['wf_ state']812 # new_state = f2t[pt]['wf_transition'] 812 813 # if new_state != "remain": 813 814 # self.portal_workflow.doActionFor(sub_obj,new_state,dest_container=sub_obj)
Note: See TracChangeset for help on using the changeset viewer.