Index: main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/studylevel.py
===================================================================
--- main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/studylevel.py	(revision 18234)
+++ main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/studylevel.py	(revision 18235)
@@ -54,4 +54,41 @@
         return total
 
+    @property
+    def cumulative_params(self):
+        """Calculate the cumulative gpa and other cumulative parameters
+        for this level.
+        All levels below this level are taken under consideration
+        (including repeating levels).
+        This method is used for level reports and meanwhile also
+        for session results presentations.
+        """
+        credits_passed = 0
+        total_credits = 0
+        total_credits_counted = 0
+        total_credits_weighted = 0
+        cgpa = 0.0
+        if self.__parent__:
+            for level in self.__parent__.values():
+                if level.level > self.level:
+                    continue
+                credits_passed += level.passed_params[2]
+                total_credits += level.total_credits
+                gpa_params = level.gpa_params
+                total_credits_counted += gpa_params[1]
+                total_credits_weighted += gpa_params[2]
+            if total_credits_counted:
+                cgpa = total_credits_weighted/total_credits_counted
+
+            # Unidel special
+            # the ticket is still open
+
+            # Override cgpa if value has been imported
+            # (not implemented in base package)
+            imported_cgpa = getattr(self, 'imported_cgpa', None)
+            if imported_cgpa:
+                cgpa = imported_cgpa
+        return (cgpa, total_credits_counted, total_credits_weighted,
+               total_credits, credits_passed)
+
 CustomStudentStudyLevel = attrs_to_fields(
     CustomStudentStudyLevel, omit=['total_credits', 'gpa',
Index: main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/tests/test_utils.py
===================================================================
--- main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/tests/test_utils.py	(revision 18235)
+++ main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/tests/test_utils.py	(revision 18235)
@@ -0,0 +1,37 @@
+# -*- coding: utf-8 -*-
+import grok
+from waeup.kofa.testing import FunctionalTestCase
+from hurry.workflow.interfaces import IWorkflowState
+from zope.component import getUtility, createObject
+from waeup.kofa.students.interfaces import IStudentsUtils
+from waeup.kofa.students.studylevel import StudentStudyLevel
+from waeup.kofa.students.tests.test_browser import StudentsFullSetup
+from kofacustom.unidel.testing import FunctionalLayer
+
+class StudentsUtilsTests(StudentsFullSetup):
+
+    layer = FunctionalLayer
+
+    def test_warnCreditsOOR(self):
+        students_utils = getUtility(IStudentsUtils)
+        studylevel = StudentStudyLevel()
+        studylevel.level = 620
+        self.student['studycourse'].addStudentStudyLevel(self.certificate,
+            studylevel)
+        warning = students_utils.warnCreditsOOR(studylevel)
+        self.assertEqual(warning, 'Minimum credits not reached.')
+        courseticket = createObject('waeup.CourseTicket')
+        courseticket.code = 'ANYCODE'
+        courseticket.title = u'Any TITLE'
+        courseticket.credits = 1
+        courseticket.score = 66
+        courseticket.semester = 1
+        courseticket.dcode = u'ANYDCODE'
+        courseticket.fcode = u'ANYFCODE'
+        self.student['studycourse']['620']['COURSE1'] = courseticket
+        warning = students_utils.warnCreditsOOR(studylevel)
+        self.assertEqual(warning, 'Minimum credits not reached.')
+        courseticket.credits = 2
+        warning = students_utils.warnCreditsOOR(studylevel)
+        self.assertEqual(warning, None)
+        return
Index: main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/utils.py
===================================================================
--- main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/utils.py	(revision 18234)
+++ main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/utils.py	(revision 18235)
@@ -56,5 +56,16 @@
             #    if studylevel.level == 400 and studylevel.total_credits < 29:
             #        return _('Minimum credits not reached.')
-            if studylevel.level in (300, 400):
+            # Spillover students must register at least 2 credits
+            end_level = 999
+            certificate = getattr(studylevel.__parent__, 'certificate', None)
+            if certificate is not None:
+                end_level = int(certificate.end_level)
+            level,repeat = divmod(studylevel.level, 100)
+            level = level * 100
+            repeat = repeat//10
+            if level > end_level and repeat:
+                if studylevel.total_credits < 2:
+                    return _('Minimum credits not reached.')
+            elif studylevel.level in (300, 400):
                 if studylevel.total_credits < 27:
                     return _('Minimum credits not reached.')
