Index: main/waeup.aaue/trunk/src/waeup/aaue/students/studylevel.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/studylevel.py	(revision 18145)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/studylevel.py	(revision 18158)
@@ -22,10 +22,13 @@
 import grok
 import pytz
+import pytz
+import decimal
 from datetime import datetime
 from zope.component.interfaces import IFactory
-from zope.component import createObject
+from zope.component import createObject, getUtility
 from zope.interface import implementedBy
 from waeup.kofa.utils.helpers import attrs_to_fields
-from waeup.kofa.interfaces import RETURNING, VALIDATED, REGISTERED, PAID
+from waeup.kofa.interfaces import (
+    RETURNING, VALIDATED, REGISTERED, PAID, IKofaUtils)
 from waeup.kofa.students.browser import TicketError
 from waeup.kofa.students.studylevel import (
@@ -196,4 +199,7 @@
         end_level = getattr(certificate, 'end_level', None)
         study_mode = getattr(certificate, 'study_mode', None)
+        value = decimal.Decimal(str(self.cumulative_params[0]))
+        cgpa = round(value,2)
+        #cgpa = self.cumulative_params[0]
         is_dp = False
         if study_mode and study_mode.startswith('dp'):
@@ -223,28 +229,28 @@
             if self.cumulative_params[1] < 60:
                 return 'FRNS'
-            if self.cumulative_params[0] < failed_limit:
+            if cgpa < failed_limit:
                 return 'Fail'
             dummy, repeat = divmod(self.level, 100)
-            if self.cumulative_params[0] < 5.1 and repeat == 20:
+            if cgpa < 5.1 and repeat == 20:
                 # Irrespective of the CGPA of a student, if the He/She has
                 # 3rd Extension, such student will be graduated with a "Pass".
                 return 'Pass'
-            if self.cumulative_params[0] < 1.5:
+            if cgpa < 1.5:
                 if is_dp:
                     return 'Fail'
                 return 'Pass'
-            if self.cumulative_params[0] < 2.4:
+            if cgpa < 2.4:
                 if is_dp:
                     return 'Pass'
                 return '3s_rd_s'
-            if self.cumulative_params[0] < 3.5:
+            if cgpa < 3.5:
                 if is_dp:
                     return 'Merit'
                 return '2s_2_s'
-            if self.cumulative_params[0] < 4.5:
+            if cgpa < 4.5:
                 if is_dp:
                     return 'Credit'
                 return '2s_1_s'
-            if self.cumulative_params[0] < 5.1:
+            if cgpa < 5.1:
                 if is_dp:
                     return 'Distinction'
@@ -262,7 +268,7 @@
             # credits taken below limit
             return 'Probation'
-        if self.cumulative_params[0] < failed_limit:
+        if cgpa < failed_limit:
             return 'Probation'
-        if self.cumulative_params[0] < 5.1:
+        if cgpa < 5.1:
             return 'Proceed'
         return 'N/A'
