Index: /WAeUP_SRP/trunk/skins/waeup_utilities/ti_188_resolve.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_utilities/ti_188_resolve.py	(revision 1680)
+++ /WAeUP_SRP/trunk/skins/waeup_utilities/ti_188_resolve.py	(revision 1681)
@@ -43,4 +43,5 @@
 count = 0
 ok_count = 0
+reg_count = 0
 nyl_count = 0
 wrong_count = 0
@@ -69,4 +70,8 @@
         code = 'xxx'
         comment = ""
+        dict['review_state'] = ''
+        sres = context.portal_catalog(id = sbrain.id)
+        if sres:
+            dict['review_state'] = sres[0].review_state
         if sbrain.level == '':
             code = 'nyl'
@@ -78,9 +83,12 @@
             study_course = getObject(student,'study_course')
             level = getObject(study_course,sbrain.level)
-            if level is not None:
-                code = 'nok_cr'
+            if level is not None: 
                 cr_count += 1
-                comment = "%(level)s deleted" % dict 
-                ##study_course.manage_delObjects((sbrain.level,))
+                if dict['review_state'] == "school_fee_paid":
+                    code = 'nok_cr'
+                    comment = "%(level)s deleted" % dict 
+                    ##study_course.manage_delObjects((sbrain.level,))
+                elif dict['review_state'] != "school_fee_paid":
+                    reg_count += 1
             comment = comment + " level in students_catalog modified to %s" % lc
             ##context.students_catalog.modifyRecord(id = sbrain.id,level=lc,)
@@ -91,8 +99,9 @@
         dict['ok_count'] = ok_count
         dict['cr_count'] = cr_count
+        dict['reg_count'] = reg_count
         dict['wrong_count'] = wrong_count
         dict['code'] = code
         dict['comment'] = comment
-        rwrite('"%(count)d:%(ok_count)d:%(nyl_count)d:%(wrong_count)d:%(cr_count)d","%(code)s","%(id)s","%(name)s","%(level)s","%(level_res)s","%(comment)s"' % dict)
+        rwrite('"%(count)d:%(ok_count)d:%(nyl_count)d:%(wrong_count)d:%(cr_count)d:%(reg_count)d","%(code)s","%(id)s","%(name)s","%(level)s","%(level_res)s","%(review_state)s","%(comment)s"' % dict)
 
-rwrite("total: %(count)d<br> correct: %(ok_count)d<br> level == '': %(nyl_count)d<br> wrong: %(wrong_count)d<br> level created: %(cr_count)d" % dict )
+rwrite("total: %(count)d<br> correct: %(ok_count)d<br> level == '': %(nyl_count)d<br> wrong: %(wrong_count)d<br> level created: %(cr_count)d<br> courses registered: %(reg_count)d" % dict )
