Changeset 3812 for WAeUP_SRP/trunk
- Timestamp:
- 11 Dec 2008, 07:24:16 (16 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/WAeUPTool.py
r3807 r3812 380 380 def generateStudentId(self,letter): ###( 381 381 import random 382 logger = logging.getLogger('WAeUPTool.generateStudentId') 382 383 r = random 383 ##if letter not in ('ABCDEFGIHKLMNOPQRSTUVWXY'):384 384 if letter == '?': 385 385 letter= r.choice('ABCDEFGHKLMNPQRSTUVWXY') 386 386 sid = "%c%d" % (letter,r.randint(99999,1000000)) 387 387 students = self.portal_url.getPortalObject().campus.students 388 # while hasattr(students,sid):389 # sid = "%c%d" % (letter,r.randint(99999,1000000))390 while self.students_catalog(id = sid):388 while self.students_catalog(id = sid) or self.waeup_tool.picturePathExists(sid): 389 if self.waeup_tool.picturePathExists(sid): 390 logger.info('picture path %s exists' % sid) 391 391 sid = "%c%d" % (letter,r.randint(99999,1000000)) 392 392 return sid … … 1263 1263 pictures = [picture[:picture.rfind('_')] for picture in os.listdir(picture_path)] 1264 1264 return set(ids).issubset(set(pictures)) 1265 ###) 1266 1267 security.declarePublic('picturePathExists') ###( 1268 def picturePathExists(self, student_id=None): 1269 """check if picture path exists in the filesystem""" 1270 if student_id is None: 1271 student_id = self.getStudentId() 1272 if student_id is None: 1273 return False 1274 picture_path = getImagesDir(student_id) 1275 if os.path.exists(picture_path): 1276 return True 1277 return False 1265 1278 ###) 1266 1279 -
WAeUP_SRP/trunk/skins/waeup_fceoyo/getSchoolFee.py
r3761 r3812 14 14 15 15 16 ARTS = ('CRS','ISS','MUS','SOS','THA','PES' )16 ARTS = ('CRS','ISS','MUS','SOS','THA','PES','ECO','GEO') 17 17 18 18 # SCS = ('BIO','HEC','MAT','ARB','ISC','IGB','YOR','HAU','ENG ','FRE','PHY ','CSC','PHE','AGE','FAA','BED','HEC')
Note: See TracChangeset for help on using the changeset viewer.