Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py	(revision 11618)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py	(revision 11619)
@@ -519,6 +519,6 @@
         next_integer = grok.getSite()['configuration'].next_matric_integer
         if next_integer == 0:
-            return None
-        return unicode(next_integer)
+            return _('Matriculation number cannot be set.'), None
+        return None, unicode(next_integer)
 
     def setMatricNumber(self, student):
@@ -535,5 +535,5 @@
         This method is tested but not used in the base package. It can
         be used in custom packages by adding respective views
-        and by customizing _composeMatricNumber according to the
+        and by customizing constructMatricNumber according to the
         university's matriculation number construction rules.
 
@@ -544,7 +544,7 @@
         if student.certcode is None:
             return _('No certificate assigned.'), None
-        matric_number = self.constructMatricNumber(student)
-        if not matric_number:
-            return _('Matriculation number cannot be set.'), None
+        error, matric_number = self.constructMatricNumber(student)
+        if error:
+            return error, None
         try:
             student.matric_number = matric_number
