- Timestamp:
- 7 Nov 2007, 22:56:44 (17 years ago)
- Location:
- WAeUP_SRP/base
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r2563 r2575 640 640 641 641 security.declareProtected(ModifyPortalContent,'admitOneStudent') ###( 642 def admitOneStudent(self,brain ):642 def admitOneStudent(self,brain,entry_session): 643 643 "create Datastructure for an admitted Student" 644 644 #import pdb;pdb.set_trace() … … 655 655 students_folder.invokeFactory('Student', student_id) 656 656 student_object = getattr(students_folder,student_id) 657 password = pin_parts[2] 658 self.makeStudentMember(student_id,password = password) 657 #password = pin_parts[2] 658 #self.makeStudentMember(student_id,password = password) 659 self.makeStudentMember(student_id) 659 660 student_object.manage_setLocalRoles(student_id, ['Owner',]) 660 661 #logger.info("creating %s reg_no %s" % (student_id,brain.reg_no)) … … 664 665 student_object.invokeFactory('StudentApplication','application') 665 666 application = student_object.application 666 self.portal_workflow.doActionFor(application,'open',dest_container=application)667 #self.portal_workflow.doActionFor(application,'open',dest_container=application) 667 668 da = {'Title': 'Application Data'} 668 669 da['jamb_reg_no'] = brain.reg_no 669 da['entry_mode'] = brain.entry_mode 670 da['jamb_lastname'] = brain.lastname 670 671 671 sex = 'M' 672 672 if brain.sex: 673 673 sex = 'F' 674 674 da['jamb_sex'] = sex 675 da['app_ac_pin'] = brain.pin 676 state_lga = brain.lga.split('_') 677 da['state_lga'] = state_lga[0] 678 da['jamb_lga'] = state_lga[-1] 679 #da['jamb_score'] = brain.???? 675 #da['app_ac_pin'] = brain.pin 676 #if brain.lga: 677 # state_lga = brain.lga.split('_') 678 # da['state_lga'] = state_lga[0] 679 # da['jamb_lga'] = state_lga[-1] 680 da['state_lga'] = brain.jamb_lga 681 da['jamb_lga'] = brain.jamb_state 682 da['jamb_score'] = brain.aggregate 680 683 da['app_email'] = brain.email 681 684 da['app_mobile'] = brain.phone 685 if brain.entry_mode: 686 da['entry_mode'] = brain.entry_mode 687 elif brain.screening_type == 'pume': 688 da['entry_mode'] = 'ume_ft' 689 elif brain.screening_type == 'pde': 690 da['entry_mode'] = 'de_ft' 691 else: 692 da['entry_mode'] = brain.screening_type 693 da['entry_session'] = entry_session 694 da['jamb_lastname'] = brain.lastname 695 da['jamb_middlename'] = brain.middlenames # different field names! 696 da['firstname'] = brain.firstname 697 da['screening_application_date'] = brain.application_date 698 da['date_of_birth'] = brain.date_of_birth 699 da['jamb_first_cos'] = brain.course1 700 da['jamb_second_cos'] = brain.course2 701 da['course3'] = brain.course3 702 da['screening_type'] = brain.screening_type 703 da['screening_score'] = brain.screening_score 704 da['screening_date'] = brain.screening_date 705 da['hq_type'] = brain.hq_type 706 da['hq_grade'] = brain.hq_grade 707 da['aos'] = brain.aos 708 682 709 application.getContent().edit(mapping=da) 683 self.portal_workflow.doActionFor(application,'close',dest_container=application)710 #self.portal_workflow.doActionFor(application,'close',dest_container=application) 684 711 # 685 712 # personal … … 687 714 student_object.invokeFactory('StudentPersonal','personal') 688 715 personal = student_object.personal 689 self.portal_workflow.doActionFor(personal,'open',dest_container=personal)716 #self.portal_workflow.doActionFor(personal,'open',dest_container=personal) 690 717 dp = {'Title': 'Personal Data'} 691 718 dp['sex'] = brain.sex … … 693 720 dp['phone'] = brain.phone 694 721 dp['lastname'] = brain.lastname 722 dp['middlename'] = brain.middlenames # different field names! 723 dp['firstname'] = brain.firstname 695 724 personal.getContent().edit(mapping=dp) 696 725 # … … 699 728 student_object.invokeFactory('StudentClearance','clearance') 700 729 clearance = student_object.clearance 701 self.portal_workflow.doActionFor(clearance,'open',dest_container=clearance)730 #self.portal_workflow.doActionFor(clearance,'open',dest_container=clearance) 702 731 dc = {'Title': 'Clearance/Eligibility Record'} 703 732 dc['lga'] = brain.lga 704 733 clearance.getContent().edit(mapping=dc) 705 self.portal_workflow.doActionFor(clearance,'close',dest_container=clearance)734 #self.portal_workflow.doActionFor(clearance,'close',dest_container=clearance) 706 735 # 707 736 # study Course … … 709 738 student_object.invokeFactory('StudentStudyCourse','study_course') 710 739 studycourse = student_object.study_course 711 self.portal_workflow.doActionFor(studycourse,'open',dest_container=studycourse)740 #self.portal_workflow.doActionFor(studycourse,'open',dest_container=studycourse) 712 741 dsc = {} 713 742 dsc['study_course'] = brain.course_admitted 714 743 dsc['current_verdict'] = '' 715 dsc['current_mode'] = brain.entry_mode 744 dsc['current_mode'] = da['entry_mode'] 745 if da['entry_mode'].startswith('de'): 746 dsc['current_level'] = '200' 747 else: 748 dsc['current_level'] = '100' 749 dsc['current_session'] = entry_session 716 750 studycourse.getContent().edit(mapping=dsc) 717 751 # -
WAeUP_SRP/base/skins/waeup_student/admitStudents.py
r2540 r2575 22 22 return 23 23 24 entry_session = '07' 24 25 25 26 import logging … … 36 37 response.write("%s<br>\n\r" % s) 37 38 38 brains = aq_applicants(In('status',('admitted'),)) 39 brains = aq_applicants(In('status',('admitted'),)) 39 40 total = len(brains) 40 41 logger.info("found %d students" % (total)) … … 51 52 logger.info("Committing %s transactions, total %s" % (commit_after,count)) 52 53 cocount += 1 53 if cocount > 3:54 if cocount > 1: 54 55 break 55 56 brain = aq_applicants(Eq('reg_no',reg_no))[0] 56 57 #logger.info("start creating objects of student %s" % (brain.reg_no)) 57 sid = d['student_id'] = context.waeup_tool.admitOneStudent(brain )58 sid = d['student_id'] = context.waeup_tool.admitOneStudent(brain,entry_session) 58 59 if sid is not None: 59 60 d['reg_no'] = reg_no … … 63 64 else: 64 65 logger.info("could not create objects of student %s with pin " % (reg_no,brain.pin)) 65 66 66 67 msg = "finished admitting %d students" % (admitted) 67 68 logger.info(msg) -
WAeUP_SRP/base/skins/waeup_student/application_edit_form.pt
r1783 r2575 7 7 layout_mode='edit', 8 8 schema_id = 'student_application', 9 layout_id = 'student_application _fe',9 layout_id = 'student_application', 10 10 request=request, 11 11 use_session=True,); -
WAeUP_SRP/base/skins/waeup_student/application_slip.pt
r2288 r2575 12 12 tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'], 13 13 layout_mode='view_slip', 14 layout_id='student_application _fe')"14 layout_id='student_application')" 15 15 /> 16 16 </span>
Note: See TracChangeset for help on using the changeset viewer.