Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py	(revision 13223)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py	(revision 13224)
@@ -391,5 +391,6 @@
 @grok.subscribe(IApplicant, grok.IObjectRemovedEvent)
 def handle_applicant_removed(applicant, event):
-    """If an applicant is removed a message is logged.
+    """If an applicant is removed a message is logged, passport images are
+    deleted and the global role is unset.
     """
     comment = 'Application record removed'
@@ -402,6 +403,10 @@
         # an applicants subcontainer
         return
-    # Remove also any passport image.
+    # Remove any passport image.
     file_store = getUtility(IExtFileStore)
     file_store.deleteFileByContext(applicant)
+    # Remove global role
+    role_manager = IPrincipalRoleManager(grok.getSite())
+    role_manager.unsetRoleForPrincipal(
+        'waeup.Applicant', applicant.applicant_id)
     return
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/student.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/student.py	(revision 13223)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/student.py	(revision 13224)
@@ -486,4 +486,8 @@
     # update CSV files
     update_student_deletion_csvs(student, del_dir)
+
+    # remove global role
+    role_manager = IPrincipalRoleManager(grok.getSite())
+    role_manager.unsetRoleForPrincipal('waeup.Student', student.student_id)
     return
 
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py	(revision 13223)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py	(revision 13224)
@@ -560,5 +560,5 @@
             student.matric_number = matric_number
         except MatNumNotInSource:
-            return _('Matriculation number exists.'), None
+            return _('Matriculation number %s exists.' % matric_number), None
         notify(grok.ObjectModifiedEvent(student))
         self.increaseMatricInteger(student)
