Index: /WAeUP_SRP/base/skins/waeup_utilities/ti_507_resolve.py
===================================================================
--- /WAeUP_SRP/base/skins/waeup_utilities/ti_507_resolve.py	(revision 3360)
+++ /WAeUP_SRP/base/skins/waeup_utilities/ti_507_resolve.py	(revision 3361)
@@ -38,10 +38,10 @@
 count = 0
 found = 0
-commit_after = 10000
+commit_after = 100000
 certificates = context.getCertificatesDict()
 students = context.students_catalog()
 wrong = []
 missing_courses = []
-wrong_modes = []
+wrong_modes = {}
 for student in students:
     count += 1
@@ -53,15 +53,18 @@
                 logger.info('missing course %s' % student.course)
             continue
-        entry_mode = student.entry_mode    
-        if entry_mode != certificate.get('study_mode','xxx'): 
+        entry_mode = student.entry_mode
+        study_mode = certificate.get('study_mode','xxx') 
+        if entry_mode != study_mode: 
+            w_count =  wrong_modes.get((entry_mode,study_mode),0)
+            if w_count == 0:
+                logger.info('%s != %s' % (student.entry_mode,
+                                          study_mode))
+            w_count += 1
+            wrong_modes[(entry_mode,study_mode)] = w_count
             wrong += student.id,
-            if student.entry_mode not in wrong_modes:
-                wrong_modes += student.entry_mode,
-                logger.info('%s != %s' % (student.entry_mode,
-                                          certificates[student.course]['study_mode']))
     if wrong and not (len(wrong) % commit_after):
         logger.info('found %d wrong of %d' % (len(wrong),count))
-        
-logger.info('wrong modes %s' % (', '.join(wrong_modes)))
+for k,v in wrong_modes.items():
+    logger.info('wrong mode %s counted %d' % (k,v))
 logger.info('missing courses %s' % (', '.join(missing_courses)))
 logger.info('found %d wrong of %d' % (len(wrong),count))
