Index: main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_utils.py
===================================================================
--- main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_utils.py	(revision 14612)
+++ main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_utils.py	(revision 14617)
@@ -31,5 +31,5 @@
         return
 
-    def test_warnCreditsOOR(self):
+    def disabled_test_warnCreditsOOR_semester_exceeded(self):
         students_utils = getUtility(IStudentsUtils)
         studylevel = grok.Container()
@@ -54,4 +54,20 @@
         return
 
+    def test_warnCreditsOOR(self):
+        students_utils = getUtility(IStudentsUtils)
+        studylevel = grok.Container()
+        studylevel.total_credits = 45
+        course = grok.Model()
+        course.credits = 7
+        warning = students_utils.warnCreditsOOR(studylevel, course)
+        self.assertEqual(warning, None)
+        course.credits = 8
+        warning = students_utils.warnCreditsOOR(studylevel, course)
+        self.assertEqual(warning, 'Maximum credits exceeded.')
+        studylevel.total_credits_s1 = 17
+        warning = students_utils.warnCreditsOOR(studylevel)
+        self.assertEqual(warning, 'Minimum credits in 1st semester not reached.')
+        return
+
     def test_set_payment_details(self):
         self.certificate.end_level = 300
Index: main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py
===================================================================
--- main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py	(revision 14612)
+++ main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py	(revision 14617)
@@ -280,5 +280,5 @@
         # Add session and level specific penalty fee.
         if category == 'schoolfee' and student.current_mode in (
-            'ug_ft', 'de_ft'):
+            'ug_ft', 'de_ft') and student.state != CLEARED:
             amount += academic_session.penalty_ug_ft
         elif category == 'schoolfee' and student.current_mode in (
@@ -361,4 +361,27 @@
         return d
 
+    #def warnCreditsOOR(self, studylevel, course=None):
+    #    """Return message if credits are out of range.
+    #    """
+    #    # adding a course ticket
+    #    if course:
+    #        if course.semester == 1:
+    #            if studylevel.total_credits_s1 + course.credits > 24:
+    #                return _('Maximum credits in 1st semester exceeded.')
+    #        if course.semester == 2:
+    #            if studylevel.total_credits_s2 + course.credits > 24:
+    #                return _('Maximum credits in 2nd semester exceeded.')
+    #    # registering course list
+    #    else:
+    #        if studylevel.total_credits_s1 > 24:
+    #            return _('Maximum credits in 1st semester exceeded.')
+    #        if studylevel.total_credits_s1 < 18:
+    #            return _('Minimum credits in 1st semester not reached.')
+    #        if studylevel.total_credits_s2 > 24:
+    #            return _('Maximum credits in 2nd semester exceeded.')
+    #        if studylevel.total_credits_s2 < 18:
+    #            return _('Minimum credits in 2nd semester not reached.')
+    #    return
+
     def warnCreditsOOR(self, studylevel, course=None):
         """Return message if credits are out of range. 
@@ -366,18 +389,12 @@
         # adding a course ticket
         if course:
-            if course.semester == 1:
-                if studylevel.total_credits_s1 + course.credits > 24:
-                    return _('Maximum credits in 1st semester exceeded.')
-            if course.semester == 2:
-                if studylevel.total_credits_s2 + course.credits > 24:
-                    return _('Maximum credits in 2nd semester exceeded.')
+            if studylevel.total_credits + course.credits > 52:
+                return _('Maximum credits exceeded.')
         # registering course list
         else:
-            if studylevel.total_credits_s1 > 24:
-                return _('Maximum credits in 1st semester exceeded.')
+            if studylevel.total_credits > 52:
+                return _('Maximum credits exceeded.')
             if studylevel.total_credits_s1 < 18:
                 return _('Minimum credits in 1st semester not reached.')
-            if studylevel.total_credits_s2 > 24:
-                return _('Maximum credits in 2nd semester exceeded.')
             if studylevel.total_credits_s2 < 18:
                 return _('Minimum credits in 2nd semester not reached.')
