Changeset 710 for WAeUP_SRP/trunk/Students.py
- Timestamp:
- 16 Oct 2006, 22:30:16 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r708 r710 28 28 if letter not in ('ABCDEFGIHKLMNOPQRSTUVWXY'): 29 29 letter= r.choice('ABCDEFGHKLMNPQRSTUVWXY') 30 return "%c%d" % (letter,r.randint(99999,1000000)) 30 students = context.portal_catalog(meta_type = "StudentsFolder")[-1] 31 sid = "%c%d" % (letter,r.randint(99999,1000000)) 32 while hasattr(students, sid): 33 sid = "%c%d" % (letter,r.randint(99999,1000000)) 34 return sid 31 35 #return "%c%d" % (r.choice('ABCDEFGHKLMNPQRSTUVWXY'),r.randint(99999,1000000)) 32 36
Note: See TracChangeset for help on using the changeset viewer.