Changeset 2453 for WAeUP_SRP/base
- Timestamp:
- 27 Oct 2007, 15:26:28 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_utilities/fixReturningSession.py
r2452 r2453 33 33 #logger.info('') 34 34 35 query = Eq('review_state','returning') & In('session',('2006/2007','06' ))35 query = Eq('review_state','returning') & In('session',('2006/2007','06','6')) 36 36 brains = aq_students(query) 37 37 total = len(brains) 38 38 logger.info('editet %d students with session 06 and returning' % total) 39 39 count = 0 40 commit_after = 10 40 commit_after = 100 41 41 42 42 for brain in brains: … … 46 46 logger.info("Committing %s transactions, total %s" % (commit_after,count)) 47 47 try: 48 study_course_doc = getattr(getattr(students,brain.id),'study_course').getContent().edit(mapping = { "current_session": '05'}) 49 study_course_doc.edit(mapping = { "current_session": '05'}) 48 study_course_doc = getattr(getattr(students,brain.id),'study_course').getContent() 49 study_course_doc.edit(mapping = { "current_session": '05', 50 "current_level": '000'}) 50 51 rwrite('found %s , %s ,%s, %s' % (brain.id, 51 52 study_course_doc.current_session,
Note: See TracChangeset for help on using the changeset viewer.