Changeset 1250 for WAeUP_SRP/trunk
- Timestamp:
- 9 Jan 2007, 17:19:20 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/WAeUPTool.py
r1198 r1250 71 71 ###) 72 72 73 security.declareProtected(ModifyPortalContent,'getCredential') 74 def getCredential(self,student_id): 75 "return a student password" 76 student_entry = getattr(self.portal_directories.students,student_id,None) 77 if student_entry is None: 78 return None 79 else: 80 return student_entry.password 81 73 82 security.declareProtected(ModifyPortalContent,'createOne') ###( 74 83 def createOne(self,students_folder,student_brain,letter,commit=False): … … 157 166 logger.info(em) 158 167 level = student.Level 168 validlevel = False 159 169 try: 160 170 int(level) 171 validlevel = True 161 172 except: 162 173 em = '"%(matric_no)s","invalid Level","%(Level)s"' % student 163 174 logger.info(em) 175 if not validlevel: 176 erg = self.results_import(matric_no = student.matric_no) 177 level = 'xxx' 178 if erg: 179 level = erg[0].Level 180 try: 181 int(level) 182 em = '"%s","fixed Level from results_import","%s"' % (student.matric_no,erg[0].Level) 183 logger.info(em) 184 validlevel = True 185 except: 186 em = '"%s","invalid Level in results_import","%s"' % (student.matric_no,erg[0].Level) 187 logger.info(em) 164 188 matric_no = student.matric_no 165 189 sid = student_id
Note: See TracChangeset for help on using the changeset viewer.