Index: WAeUP_SRP/base/skins/waeup_utilities/moveCourseResults.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_utilities/moveCourseResults.py	(revision 2508)
+++ WAeUP_SRP/base/skins/waeup_utilities/moveCourseResults.py	(revision 2513)
@@ -40,5 +40,5 @@
 #logger.info('')
 
-brains = aq_students(In('review_state',('courses_registered','courses_validated'))) 
+brains = aq_students(In('review_state',('courses_registered','courses_validated')))
 total = len(brains)
 logger.info("found %d students" % (total))
@@ -46,13 +46,7 @@
 moved = 0
 cocount = 0
-commit_after = 5
+commit_after = 20
 for brain in brains:
-    count += 1
-    if moved and not moved % commit_after:
-        context.waeup_tool.doCommit()
-        logger.info("Committing %s transactions, total %s" % (commit_after,count))
-        cocount += 1
-        #if cocount > 3:
-        #    break
+    count += 1    
     already_moved = aq_results(Eq('student_id',brain.id))
     if len(already_moved) > 0:
@@ -67,12 +61,19 @@
         continue
     if not results:
-        pass
+        continue
         #rwrite('no result objects in %s/study_course/%s' % (brain.id,brain.level))
     else:
-        logger.info("moving  results of student %s" % (brain.id))
+        #logger.info("moving  results of student %s" % (brain.id))
         context.course_results.moveResultsHere(study_level,brain.id)
         moved += 1
         logger.info("moved  results of student %s" % (brain.id))
-msg = "finished moving  results of %d students" % (moved)
+        if moved and not moved % commit_after:
+            context.waeup_tool.doCommit()
+            logger.info("Committing %s transactions, total %s" % (commit_after,count))
+            #cocount += 1
+            #if cocount > 3:
+            #    break
+
+msg = "finished moving results of %d students" % (moved)
 logger.info(msg)
 #rwrite(msg)
