Changeset 1781
- Timestamp:
- 13 May 2007, 17:38:27 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 3 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) -
WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py
r1780 r1781 44 44 student = getattr(students,str(member)) 45 45 student_app = getattr(student,'application',None) 46 if request.has_key('returning') and student_app is None: 46 student_per = getattr(student,'personal',None) 47 if request.has_key('returning') and student_app is None: 47 48 email=request.get("email") 48 49 phone=request.get("phone_nr") 49 50 context.waeup_tool.makeStudentData(str(member), 50 email=email,51 phone_nr=phone,52 )53 d = {}54 d['id'] = str(member)55 d['email'] = email56 d['phone'] = phone57 context.students_catalog.modifyRecord(**d)51 email=email, 52 phone_nr=phone, 53 ) 54 #d = {} 55 #d['id'] = str(member) 56 #d['email'] = email 57 #d['phone'] = phone 58 #context.students_catalog.modifyRecord(**d) 58 59 elif student_app is None: 59 60 context.waeup_tool.makeStudentData(str(member)) … … 73 74 logger.info('%s logged in, review_state %s' % (member,s_review_state)) 74 75 app_doc = student_app.getContent() 76 77 if request.has_key('returning'): 78 email=request.get("email") 79 phone=request.get("phone_nr") 80 # should be always closed, however ... 81 if a_review_state != 'opened': 82 wftool.doActionFor(student_app,'open') 83 # should be always opened after import, however ... 84 if p_review_state != 'opened': 85 wftool.doActionFor(student_per,'open') 86 per_doc = student_per.getContent() 87 app_doc.edit(mapping = {'app_email' : email}) 88 per_doc.edit(mapping = {'email' : email, 'phone' : phone}) 89 wftool.doActionFor(student_app,'close') 90 75 91 #from Products.zdb import set_trace;set_trace() 76 92 if load_passport and 'passport' not in app_doc.objectIds(): -
WAeUP_SRP/trunk/skins/waeup_student/getRetStudentStatistics.py
r1763 r1781 22 22 entry_sessions = ('94','95','96','97','98','99','00','01','02','03','04','05') 23 23 24 new_states = ('returning',24 ret_states = ('returning', 25 25 'school_fee_paid', 26 26 'courses_registered', … … 39 39 res = context.students_catalog(entry_session = entry_sessions) 40 40 dict['total'] = len(res) 41 for state in new_states:41 for state in ret_states: 42 42 res = context.students_catalog(entry_session = entry_sessions, review_state = state) 43 43 dict[state] = len(res) … … 55 55 res = context.students_catalog(entry_session = entry_sessions, faculty = f.getId) 56 56 dict['total'] = len(res) 57 for state in new_states:57 for state in ret_states: 58 58 res = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state) 59 59 dict[state] = len(res)
Note: See TracChangeset for help on using the changeset viewer.