Changeset 1485
- Timestamp:
- 24 Feb 2007, 18:24:57 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_utilities/fixLevelForNewStudents.py
r1484 r1485 12 12 list Students for ClearanceOfficers 13 13 """ 14 try: 15 from Products.zdb import set_trace 16 except: 17 def set_trace(): 18 pass 14 19 15 20 request = context.REQUEST … … 17 22 response = request.RESPONSE 18 23 setheader = request.RESPONSE.setHeader 24 import logging 25 logger = logging.getLogger('fixLevelForNewStudents') 19 26 20 27 def rwrite(s): … … 41 48 query = Eq('level','100') 42 49 res = aq_students(query) 50 set_trace() 43 51 count = 0 52 logger.info("started for %s students" % len(res)) 44 53 for sbrain in res: 45 54 student_obj = getattr(students,sbrain.id) … … 63 72 continue 64 73 student_obj.study_course.getContent().edit(mapping={'current_level': level, 65 74 'current_verdict': 'N/A'}) 66 75 count += 1 76 if count > 10: 77 break 67 78 rwrite("%s: %s %s %s <br />" % (count,sbrain.id,entry_mode,level)) 68 79 rwrite("finished") 80 logger.info("finished %s students" % count)
Note: See TracChangeset for help on using the changeset viewer.