Changeset 2540
- Timestamp:
- 5 Nov 2007, 18:47:31 (17 years ago)
- Location:
- WAeUP_SRP/base
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r2528 r2540 641 641 if brain.status != "admitted": 642 642 logger.info('status of %s is %s' % (brain.reg_no,brain.status)) 643 return 643 644 pin_parts = brain.pin.split('-') 644 645 if len(pin_parts) != 3: 645 646 logger.info('invalid pin %s for %s' % (brain.pin,brain.reg_no)) 646 student_id = self.generateStudentId(letter) 647 return 648 student_id = self.generateStudentId('?') 647 649 students_folder.invokeFactory('Student', student_id) 648 650 student_object = getattr(students_folder,student_id) 649 651 password = pin_parts[2] 650 652 self.makeStudentMember(student_id,password = password) 651 student .manage_setLocalRoles(sid, ['Owner',])652 logger.info("creating %s reg_no %s" % (student_id,brain.reg_no))653 student_object.manage_setLocalRoles(student_id, ['Owner',]) 654 #logger.info("creating %s reg_no %s" % (student_id,brain.reg_no)) 653 655 # 654 656 # application 655 657 # 656 student_obj .invokeFactory('StudentApplication','application')657 application = student_obj .application658 student_object.invokeFactory('StudentApplication','application') 659 application = student_object.application 658 660 self.portal_workflow.doActionFor(application,'open',dest_container=application) 659 661 da = {'Title': 'Application Data'} … … 661 663 da['entry_mode'] = brain.entry_mode 662 664 da['jamb_lastname'] = brain.lastname 663 da['jamb_sex'] = brain.sex 664 da['jamb_lga'] = brain.lga 665 sex = 'M' 666 if brain.sex: 667 sex = 'F' 668 da['jamb_sex'] = sex 669 da['app_ac_pin'] = brain.pin 670 state_lga = brain.lga.split('_') 671 da['state_lga'] = state_lga[0] 672 da['jamb_lga'] = state_lga[-1] 673 #da['jamb_score'] = brain.???? 665 674 da['app_email'] = brain.email 666 da['app_mobile'] = brain.phone _nr675 da['app_mobile'] = brain.phone 667 676 application.getContent().edit(mapping=da) 668 677 self.portal_workflow.doActionFor(application,'close',dest_container=application) … … 670 679 # personal 671 680 # 672 student_obj .invokeFactory('StudentPersonal','personal')673 personal = student_obj .personal681 student_object.invokeFactory('StudentPersonal','personal') 682 personal = student_object.personal 674 683 self.portal_workflow.doActionFor(personal,'open',dest_container=personal) 675 684 dp = {'Title': 'Personal Data'} 676 685 dp['sex'] = brain.sex 677 686 dp['email'] = brain.email 678 dp['phone'] = brain.phone _nr687 dp['phone'] = brain.phone 679 688 dp['lastname'] = brain.lastname 680 689 personal.getContent().edit(mapping=dp) … … 682 691 # clearance 683 692 # 684 student_obj .invokeFactory('StudentClearance','clearance')685 clearance = student_obj .clearance693 student_object.invokeFactory('StudentClearance','clearance') 694 clearance = student_object.clearance 686 695 self.portal_workflow.doActionFor(clearance,'open',dest_container=clearance) 687 696 dc = {'Title': 'Clearance/Eligibility Record'} … … 692 701 # study Course 693 702 # 694 student_obj .invokeFactory('StudentStudyCourse','study_course')695 studycourse = student_obj .study_course703 student_object.invokeFactory('StudentStudyCourse','study_course') 704 studycourse = student_object.study_course 696 705 self.portal_workflow.doActionFor(studycourse,'open',dest_container=studycourse) 697 706 dsc = {} … … 702 711 # 703 712 # payments folder 704 student_obj .invokeFactory('PaymentsFolder','payments')705 payments = getattr(student_obj ,'payments')713 student_object.invokeFactory('PaymentsFolder','payments') 714 payments = getattr(student_object,'payments') 706 715 dpay = {} 707 716 dpay['Title'] = 'Payments' 708 717 payments.getContent().edit(mapping=dpay) 709 wftool.doActionFor(payments,'open')718 self.portal_workflow.doActionFor(payments,'open') 710 719 return student_id 711 720 ###)
Note: See TracChangeset for help on using the changeset viewer.