Index: /WAeUP_SRP/trunk/skins/waeup_utilities/deleteStudentByMatricNo.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_utilities/deleteStudentByMatricNo.py	(revision 1383)
+++ /WAeUP_SRP/trunk/skins/waeup_utilities/deleteStudentByMatricNo.py	(revision 1384)
@@ -26,4 +26,8 @@
 if str(member) not in ('admin','joachim') or matric_no is None:
     return
+    
+    
+# remove from students_catalog    
+
 res = st_cat(matric_no=matric_no)
 if len(res) != 1:
@@ -31,13 +35,15 @@
     logger.info(msg)
     return msg
+else:
+    stbrain = res[0]
+    student_id = stbrain.id
+    st_cat.deleteRecord(student_id)
+    msg = "Student with matric_no %s and student_id %s removed from students_catalog" % (matric_no,student_id)
+    output = []
+    logger.info(msg)
+    output.append(msg)
 
-stbrain = res[0]
-#from Products.zdb import set_trace;set_trace()
-student_id = stbrain.id
-st_cat.deleteRecord(student_id)
-msg = "Student with matric_no %s and student_id %s removed from returning_import" % (matric_no,student_id)
+# remove from returning_import
 
-res_deleted = []
-output = []
 res_ret = ret_imp(matric_no=matric_no)
 if len(res_ret) != 1:
@@ -49,4 +55,8 @@
 logger.info(msg)
 output.append(msg)
+
+# remove from results_import
+
+res_deleted = []
 res_res = res_imp(matric_no=matric_no)
 if len(res_res) > 0:
@@ -59,4 +69,7 @@
 output.append(msg)
 logger.info(msg)
+
+# remove from directory
+
 if hasattr(stdir, student_id):
     stdir.deleteEntry(student_id)
@@ -66,4 +79,7 @@
 output.append(msg)
 logger.info(msg)
+
+# remove objects
+
 if hasattr(students,student_id):
     students.manage_delObjects((student_id),)
@@ -73,3 +89,5 @@
 output.append(msg)
 logger.info(msg)
+
 return "\n".join(output)
+
