Changeset 1255 for WAeUP_SRP/trunk
- Timestamp:
- 10 Jan 2007, 00:24:40 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/WAeUPTool.py
r1250 r1255 168 168 validlevel = False 169 169 try: 170 int(level) 170 il = int(level) + 100 171 level = "%s" % il 171 172 validlevel = True 172 173 except: … … 179 180 level = erg[0].Level 180 181 try: 181 int(level) 182 il = int(level) + 100 183 level = "%s" % il 182 184 em = '"%s","fixed Level from results_import","%s"' % (student.matric_no,erg[0].Level) 183 185 logger.info(em) -
WAeUP_SRP/trunk/skins/waeup_student/getAccommodationInfo.py
r1249 r1255 58 58 ) 59 59 s_brain = res[0] 60 info['error'] = None 60 61 info['matric_no']=s_brain.matric_no 61 62 info['jamb_reg_no']=s_brain.jamb_reg_no … … 100 101 #from Products.zdb import set_trace; set_trace() 101 102 certificate = c_brain.getObject().getContent() 102 if int(s_brain.level) +100 == int(certificate.end_level): 103 try: 104 certlevel = int(certificate.end_level) 105 except: 106 info["error"] = '"no end_level for","%s"' % c_brain.getId 107 return info 108 try: 109 studentlevel = int(s_brain.level) + 100 110 except: 111 info["error"] = '"no level for","%s"' % s_brain.getId 112 return info 113 if studentlevel >= certlevel: 103 114 bt = "fi" 104 115 d['sex'] = 'male' -
WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py
r1183 r1255 53 53 button = button 54 54 ) 55 if psm == 'invalid': 55 if psm == 'invalid' or info['error'] is not None: 56 member_id = str(context.portal_membership.getAuthenticatedMember()) 57 logger.info('"%s", %s' % (member_id,info['error'] )) 58 if psm == 'invalid': 59 psm = "please correct your input" 60 else: 61 psm = "Error in Data, unable to reserve bed." 56 62 return context.accommodation_pin_edit_form(rendered = res, 57 psm = "Please correct your input!",58 63 #psm = "%s, %s" % (psm,ds), 59 64 mode = mode, -
WAeUP_SRP/trunk/skins/waeup_utilities/createReturningStudent.py
r1253 r1255 19 19 logger = logging.getLogger('createReturningStudent') 20 20 21 #if str(member) not in ("admin","joachim"):22 # return "not possible"23 24 25 #defined in WAeUPTool.py26 27 # def createOne(student_brain):28 # sid = context.waeup_tool.generateStudentId('?')29 # students_folder.invokeFactory('Student', sid)30 # student = getattr(students_folder,sid)31 # wftool.doActionFor(student,'return')32 # student.manage_setLocalRoles(sid, ['Owner',])33 # jamb_reg_no = student_brain.Entryregno,34 # context.students_catalog.addRecord(id = sid,35 # matric_no = matric_no,36 # jamb_reg_no = jamb_reg_no,37 # sex = student_brain.Sex == "F",38 # name = "%s %s %s" % (student_brain.Firstname,39 # student_brain.Middlename,40 # student_brain.Lastname)41 # )42 # return sid,jamb_reg_no43 44 21 if not matric_no: 45 22 return "No MatricNo" … … 52 29 return "MatricNo %s not found in Returning Table" % matric_no 53 30 student_brain = res[0] 54 sid,jamb_reg_no = context.waeup_tool.createOne(student _brain)31 sid,jamb_reg_no = context.waeup_tool.createOne(students_folder,student_brain,'?') 55 32 logger.info('"%s","Created Student","%s", "%s" ' % (member,sid,matric_no)) 56 33 return "Student MatricNo %s, StudentId %s Jamb %s created" % (matric_no,sid,jamb_reg_no) … … 66 43 continue 67 44 if count > 100: 68 context.waeup_tool.createOne(student ,commit=True)45 context.waeup_tool.createOne(students_folder,student,'Z',commit=True) 69 46 logger.info('"%s","Commited Students","%s", "%s" ' % (member,count,total)) 70 47 total += count 71 48 count = 1 49 if total > 500: 50 break 72 51 else: 73 context.waeup_tool.createOne(student) 74 count += 1 52 for letter in ('ABCDEFGHKLMNPQRSTUVWXY'): 53 context.waeup_tool.createOne(students_folder,student,letter) 54 count += 1 75 55 logger.info('"%s","Create Students finish","%s"' % (member,total))
Note: See TracChangeset for help on using the changeset viewer.