Changeset 2456 for WAeUP_SRP/base/skins/waeup_utilities
- Timestamp:
- 28 Oct 2007, 07:09:46 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_utilities/fixReturningSession.py
r2454 r2456 27 27 students = context.portal_url.getPortalObject().campus.students 28 28 #from string import Template 29 def rwrite(s):30 response.setHeader('Content-type','text/html; charset=ISO-8859-15')31 response.write("%s<br>\n\r" % s)29 #def rwrite(s): 30 # response.setHeader('Content-type','text/html; charset=ISO-8859-15') 31 # response.write("%s<br>\n\r" % s) 32 32 33 33 #logger.info('') … … 36 36 brains = aq_students(query) 37 37 total = len(brains) 38 logger.info(' editet %d students with session 06 andstate returning' % total)38 logger.info('started editing %d students with session 06 in state returning' % total) 39 39 count = 0 40 40 commit_after = 100 … … 48 48 study_course_doc = getattr(getattr(students,brain.id),'study_course').getContent() 49 49 study_course_doc.edit(mapping = { "current_session": '05', 50 "current_level": '000'}) 51 rwrite('found %s , %s ,%s, %s' % (brain.id, 50 "current_level": ''}) 51 #rwrite('found %s , %s ,%s, %s' % (brain.id, 52 # study_course_doc.current_session, 53 # brain.matric_no, 54 # brain.name)) 55 logger.info("Session and level of %s (%s, %s, %s) changed from ('%s', '%s') to ('%s', '%s')" % (brain.id, 56 brain.matric_no, 57 brain.name, 58 brain.review_state, 59 brain.session, 60 brain.level, 52 61 study_course_doc.current_session, 53 brain.matric_no,54 brain.name))62 study_course_doc.current_level, 63 )) 55 64 except: 56 rwrite('>>>> not found %s study_course' % (brain.id)) 65 #rwrite('>>>> not found %s study_course' % (brain.id)) 66 pass 67 logger.info('finished editing %d students with session 06 in state returning' % total) 57 68 69 return
Note: See TracChangeset for help on using the changeset viewer.