Index: main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 9531)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 9532)
@@ -1224,8 +1224,15 @@
     @action(_('Add course ticket'))
     def addCourseTicket(self, **data):
+        students_utils = getUtility(IStudentsUtils)
         ticket = createObject(u'waeup.CourseTicket')
         course = data['course']
         ticket.automatic = False
         ticket.carry_over = False
+        max_credits = students_utils.maxCreditsExceeded(self.context, course)
+        if max_credits:
+            self.flash(_(
+                'Total credits exceed ${a}.',
+                mapping = {'a': max_credits}))
+            return
         try:
             self.context.addCourseTicket(ticket, course)
@@ -2249,4 +2256,5 @@
     @action(_('Add course ticket'))
     def addCourseTicket(self, **data):
+        students_utils = getUtility(IStudentsUtils)
         # Safety belt
         if self.context.student.state != PAID:
@@ -2256,4 +2264,10 @@
         ticket.automatic = False
         ticket.carry_over = False
+        max_credits = students_utils.maxCreditsExceeded(self.context, course)
+        if max_credits:
+            self.flash(_(
+                'Your total credits exceed ${a}.',
+                mapping = {'a': max_credits}))
+            return
         try:
             self.context.addCourseTicket(ticket, course)
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py	(revision 9531)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py	(revision 9532)
@@ -464,4 +464,5 @@
     certcode = Attribute('The certificate code of the study course')
     is_current_level = Attribute('Is this level the current level of the student?')
+    total_credits = Attribute('Total of all ticket credits in this study level.')
 
     level_session = schema.Choice(
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py	(revision 9531)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py	(revision 9532)
@@ -59,4 +59,11 @@
 
     @property
+    def total_credits(self):
+        total = 0
+        for ticket in self.values():
+            total += ticket.credits
+        return total
+
+    @property
     def is_current_level(self):
         try:
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 9531)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 9532)
@@ -725,4 +725,9 @@
         self.browser.getControl("Add course ticket").click()
         self.browser.getControl(name="form.course").value = ['COURSE1']
+        self.course.credits = 100
+        self.browser.getControl("Add course ticket").click()
+        self.assertMatches(
+            '...Total credits exceed 58...', self.browser.contents)
+        self.course.credits = 10
         self.browser.getControl("Add course ticket").click()
         self.assertTrue('Successfully added' in self.browser.contents)
@@ -1873,4 +1878,9 @@
         self.browser.getControl("Add course ticket").click()
         self.browser.getControl(name="form.course").value = ['COURSE1']
+        self.course.credits = 100
+        self.browser.getControl("Add course ticket").click()
+        self.assertMatches(
+            '...Your total credits exceed 58...', self.browser.contents)
+        self.course.credits = 10
         self.browser.getControl("Add course ticket").click()
         self.assertMatches('...The ticket exists...',
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py	(revision 9531)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py	(revision 9532)
@@ -573,4 +573,12 @@
         return pdf_stream
 
+    TOTAL_CREDITS = 58
+
+    def maxCreditsExceeded(self, studylevel, course):
+        if self.TOTAL_CREDITS and \
+            studylevel.total_credits + course.credits > self.TOTAL_CREDITS:
+            return self.TOTAL_CREDITS
+        return 0
+
     VERDICTS_DICT = {
         '0': _('(not yet)'),
