Changeset 3264
- Timestamp:
- 3 Mar 2008, 10:01:52 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r3251 r3264 859 859 students_folder = self.portal_url.getPortalObject().campus.students 860 860 logger = logging.getLogger('WAeUPTool.admitOneStudent') 861 res = self.students_catalog(jamb_reg_no = brain.reg_no) 861 if brain.screening_type in ('cest','sandwich',): 862 reg_no = "%s%s/07" % (brain.course1,brain.serial) 863 else: 864 reg_no = brain.reg_no 865 res = self.students_catalog(jamb_reg_no = reg_no) 862 866 if res: 863 logger.info('student with this reg_no already exists %s with id %s' % ( brain.reg_no,res[0].id))867 logger.info('student with this reg_no already exists %s with id %s' % (reg_no,res[0].id)) 864 868 return 865 869 if brain.status != "admitted": 866 logger.info('status of %s is %s' % ( brain.reg_no,brain.status))870 logger.info('status of %s is %s' % (reg_no,brain.status)) 867 871 return 868 872 pin_parts = brain.pin.split('-') 869 873 if pin_parts and len(pin_parts) != 3: 870 logger.info('invalid pin %s for %s' % (brain.pin, brain.reg_no))874 logger.info('invalid pin %s for %s' % (brain.pin,reg_no)) 871 875 return 872 876 if brain.course_admitted not in self._v_certificates: 873 logger.info('certificate %s not found for %s' % (brain.course_admitted, brain.reg_no))877 logger.info('certificate %s not found for %s' % (brain.course_admitted,reg_no)) 874 878 return 875 879 if brain.sex not in (True,False): 876 logger.info('sex of %s not available' % ( brain.reg_no))880 logger.info('sex of %s not available' % (reg_no)) 877 881 return 878 882 student_id = self.generateStudentId('?') … … 883 887 self.makeStudentMember(student_id,password = password) 884 888 student_object.manage_setLocalRoles(student_id, ['Owner',]) 885 #logger.info("creating %s reg_no %s" % (student_id, brain.reg_no))889 #logger.info("creating %s reg_no %s" % (student_id,reg_no)) 886 890 # 887 891 # application … … 891 895 #self.portal_workflow.doActionFor(application,'open',dest_container=application) 892 896 da = {'Title': 'Application Data'} 893 da['jamb_reg_no'] = brain.reg_no897 da['jamb_reg_no'] = reg_no 894 898 895 899 sex = 'M'
Note: See TracChangeset for help on using the changeset viewer.