Changeset 2576 for WAeUP_SRP/base
- Timestamp:
- 8 Nov 2007, 07:55:07 (17 years ago)
- Location:
- WAeUP_SRP/base
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r2575 r2576 640 640 641 641 security.declareProtected(ModifyPortalContent,'admitOneStudent') ###( 642 def admitOneStudent(self,brain,entry_session ):642 def admitOneStudent(self,brain,entry_session,pin_password): 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) 659 self.makeStudentMember(student_id) 657 if pin_password: 658 password = pin_parts[2] 659 self.makeStudentMember(student_id,password = password) 660 else: 661 self.makeStudentMember(student_id) 660 662 student_object.manage_setLocalRoles(student_id, ['Owner',]) 661 663 #logger.info("creating %s reg_no %s" % (student_id,brain.reg_no)) … … 668 670 da = {'Title': 'Application Data'} 669 671 da['jamb_reg_no'] = brain.reg_no 670 672 671 673 sex = 'M' 672 674 if brain.sex: … … 706 708 da['hq_grade'] = brain.hq_grade 707 709 da['aos'] = brain.aos 708 710 709 711 application.getContent().edit(mapping=da) 710 712 #self.portal_workflow.doActionFor(application,'close',dest_container=application) … … 721 723 dp['lastname'] = brain.lastname 722 724 dp['middlename'] = brain.middlenames # different field names! 723 dp['firstname'] = brain.firstname 725 dp['firstname'] = brain.firstname 724 726 personal.getContent().edit(mapping=dp) 725 727 # -
WAeUP_SRP/base/skins/waeup_student/admitStudents.py
r2575 r2576 23 23 24 24 entry_session = '07' 25 pin_password = False 25 26 26 27 import logging … … 56 57 brain = aq_applicants(Eq('reg_no',reg_no))[0] 57 58 #logger.info("start creating objects of student %s" % (brain.reg_no)) 58 sid = d['student_id'] = context.waeup_tool.admitOneStudent(brain,entry_session )59 sid = d['student_id'] = context.waeup_tool.admitOneStudent(brain,entry_session,pin_password) 59 60 if sid is not None: 60 61 d['reg_no'] = reg_no … … 63 64 admitted += 1 64 65 else: 65 logger.info("could not create 66 logger.info("could not create objects of student %s with pin " % (reg_no,brain.pin)) 66 67 67 68 msg = "finished admitting %d students" % (admitted) -
WAeUP_SRP/base/skins/waeup_student/check_admission.py
r2407 r2576 22 22 pr = context.portal_registration 23 23 24 res,psm,ds = lt.renderLayout('student_application _fe',24 res,psm,ds = lt.renderLayout('student_application', 25 25 'student_application', 26 26 context,
Note: See TracChangeset for help on using the changeset viewer.