Ignore:
Timestamp:
3 Nov 2007, 15:27:54 (17 years ago)
Author:
joachim
Message:

find moved results faster, add mass_(create,edit)_applicant

File:
1 edited

Legend:

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

    r2513 r2514  
    4747cocount = 0
    4848commit_after = 20
     49moved_sids = context.course_results.uniqueValuesFor('student_id')
    4950for brain in brains:
    5051    count += 1   
    51     already_moved = aq_results(Eq('student_id',brain.id))
    52     if len(already_moved) > 0:
     52    if brain.id in moved_sids:
    5353        continue
    5454    try:
     
    7171            context.waeup_tool.doCommit()
    7272            logger.info("Committing %s transactions, total %s" % (commit_after,count))
    73             #cocount += 1
    74             #if cocount > 3:
    75             #    break
     73            cocount += 1
     74            if cocount > 2:
     75                break
    7676
    7777msg = "finished moving results of %d students" % (moved)
Note: See TracChangeset for help on using the changeset viewer.