Changeset 2453 for WAeUP_SRP/base


Ignore:
Timestamp:
27 Oct 2007, 15:26:28 (17 years ago)
Author:
joachim
Message:

new

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_utilities/fixReturningSession.py

    r2452 r2453  
    3333#logger.info('')
    3434
    35 query = Eq('review_state','returning') & In('session',('2006/2007','06'))
     35query = Eq('review_state','returning') & In('session',('2006/2007','06','6'))
    3636brains = aq_students(query)
    3737total = len(brains)
    3838logger.info('editet %d students with session 06 and returning' % total)
    3939count = 0
    40 commit_after = 10
     40commit_after = 100
    4141
    4242for brain in brains:
     
    4646        logger.info("Committing %s transactions, total %s" % (commit_after,count))
    4747    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'})
    5051        rwrite('found %s , %s ,%s, %s' % (brain.id,
    5152                                          study_course_doc.current_session,
Note: See TracChangeset for help on using the changeset viewer.