Index: main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py	(revision 14581)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py	(revision 14585)
@@ -1204,2 +1204,39 @@
         self.assertEqual(self.browser.url,
             'http://localhost/app/applicants/trans2017/register')
+
+    def test_student_course_registration_outstanding(self):
+        self.course = createObject('waeup.Course')
+        self.course.code = 'COURSE2'
+        self.course.semester = 1
+        self.course.credits = 39
+        self.course.passmark = 40
+        self.app['faculties']['fac1']['dep1'].courses.addCourse(
+            self.course)
+        IWorkflowState(self.student).setState('school fee paid')
+        self.browser.open(self.login_path)
+        self.browser.getControl(name="form.login").value = self.student_id
+        self.browser.getControl(name="form.password").value = 'spwd'
+        self.browser.getControl("Login").click()
+        self.browser.open(self.student_path + '/studycourse/add')
+        self.browser.getControl("Create course list now").click()
+        self.assertEqual(self.student['studycourse']['100'].number_of_tickets, 1)
+        self.student['studycourse'].current_level = 200
+        self.browser.getLink("Study Course").click()
+        self.browser.getLink("Add course list").click()
+        self.assertMatches('...Add current level 200 (Year 2)...',
+                           self.browser.contents)
+        self.browser.getControl("Create course list now").click()
+        self.browser.getLink("200").click()
+        self.browser.getLink("Edit course list").click()
+        self.browser.getLink("here").click()
+        self.browser.getControl(name="form.course").value = ['COURSE2']
+        self.browser.getControl("Add course ticket").click()
+        # Carryover COURSE1 in level 200 already has 10 credits
+        self.assertMatches(
+            '...Maximum credits exceeded...', self.browser.contents)
+        # If COURSE1 is outstanding, its credits won't be considered
+        self.student['studycourse']['200']['COURSE1'].outstanding = True
+        self.browser.getControl("Add course ticket").click()
+        self.assertMatches(
+            '...Successfully added COURSE2...', self.browser.contents)
+        return
Index: main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_utils.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_utils.py	(revision 14581)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_utils.py	(revision 14585)
@@ -138,8 +138,15 @@
         return
 
-    def test_maxCredits(self):
-        dummy = object()
-        utils = getUtility(IStudentsUtils)
-        self.assertEqual(utils.maxCredits(dummy), 48)
+    def test_maxCreditsExceeded(self):
+        students_utils = getUtility(IStudentsUtils)
+        studylevel = grok.Container()
+        studylevel.total_credits = 30
+        course = grok.Model()
+        course.credits = 18
+        warning = students_utils.warnCreditsOOR(studylevel, course)
+        self.assertEqual(warning, None)
+        course.credits = 19
+        warning = students_utils.warnCreditsOOR(studylevel, course)
+        self.assertEqual(warning, 'Maximum credits exceeded.')
         return
 
Index: main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py	(revision 14581)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py	(revision 14585)
@@ -445,9 +445,10 @@
         return text
 
-    def maxCredits(self, studylevel):
-        """Return maximum credits.
-
-        """
-        return 48
+    def warnCreditsOOR(self, studylevel, course=None):
+        if course and studylevel.total_credits + course.credits > 48:
+            return  _('Maximum credits exceeded.')
+        elif studylevel.total_credits > 48:
+            return _('Maximum credits exceeded.')
+        return
 
     def getBedCoordinates(self, bedticket):
