Index: /WAeUP_SRP/trunk/PatchCPSSchemasVocabulariesTool.py
===================================================================
--- /WAeUP_SRP/trunk/PatchCPSSchemasVocabulariesTool.py	(revision 1350)
+++ /WAeUP_SRP/trunk/PatchCPSSchemasVocabulariesTool.py	(revision 1350)
@@ -0,0 +1,29 @@
+def getVocabularyFor(self, context, voc_id):
+    """Returns vocabulary for given context."""
+
+    def hasLocalVocContainer(context):
+        if getattr(context, 'hasObject', None) is None:
+            return False
+        return context.hasObject(LOCAL_VOCABULARY_CONTAINER_ID)
+
+    def getLocalVocContainer(context):
+        return context._getOb(LOCAL_VOCABULARY_CONTAINER_ID, None)
+
+    getParentNode = lambda node: getattr(getattr(node, 'aq_inner', None),
+                                         'aq_parent', None)
+
+    if not hasLocalVocContainer(context):
+        parent = getParentNode(context)
+        while parent is not None:
+            if hasLocalVocContainer(parent):
+                return getLocalVocContainer(parent).getVocabulary(voc_id)
+            parent = getParentNode(parent)
+        # no local vocabulary container found for given context
+        globvoc = self._getOb(voc_id, None)
+        if globvoc is None:
+            raise KeyError, 'No vocabulary by id %s' % voc_id
+        return globvoc
+    else:
+        return getLocalVocContainer(context).getVocabulary(voc_id)
+from Products.CPSSchemas.VocabulariesTool import VocabulariesTool
+VocabulariesTool.getVocabularyFor = getVocabularyFor
Index: /WAeUP_SRP/trunk/Students.py
===================================================================
--- /WAeUP_SRP/trunk/Students.py	(revision 1349)
+++ /WAeUP_SRP/trunk/Students.py	(revision 1350)
@@ -996,5 +996,5 @@
             if per is not None:
                 dp = {}
-                dp['perm_address'] = entry_mode
+                dp['perm_address'] = perm_address
                 per_doc.edit(mapping=dp)
             tr_count += 1
Index: /WAeUP_SRP/trunk/__init__.py
===================================================================
--- /WAeUP_SRP/trunk/__init__.py	(revision 1349)
+++ /WAeUP_SRP/trunk/__init__.py	(revision 1350)
@@ -15,4 +15,5 @@
 import PatchCPSSchemasAttributeStorageAdapter
 import PatchCPSSchemasDataModel
+import PatchCPSSchemasVocabulariesTool
 import PatchCPSMembershipTool
 import PatchCPSUserFolderUserFolder
Index: /WAeUP_SRP/trunk/skins/waeup_default/waeup_edit.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_default/waeup_edit.py	(revision 1349)
+++ /WAeUP_SRP/trunk/skins/waeup_default/waeup_edit.py	(revision 1350)
@@ -59,4 +59,6 @@
     elif context.portal_type in ("StudentPersonal",):
         name = "%(firstname)s %(middlename)s %(lastname)s" % ds
+        name = name.strip()
+        name = name.replace('  ',' ')
         student_id = context.getStudentId()
         app_doc = context.application.getContent()
Index: /WAeUP_SRP/trunk/skins/waeup_utilities/deleteStudentByMatricNo.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_utilities/deleteStudentByMatricNo.py	(revision 1349)
+++ /WAeUP_SRP/trunk/skins/waeup_utilities/deleteStudentByMatricNo.py	(revision 1350)
@@ -49,5 +49,5 @@
         res_imp.deleteRecord(r.key)
         res_deleted.append(r.key)
-    msg = "%s deleted" % (','.join(res_deleted))
+    msg = "%s results deleted" % (',\n'.join(res_deleted))
 else:
     msg = "No results to delete for %s" % matric_no
Index: /WAeUP_SRP/trunk/skins/waeup_utilities/fixPermAddress.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_utilities/fixPermAddress.py	(revision 1349)
+++ /WAeUP_SRP/trunk/skins/waeup_utilities/fixPermAddress.py	(revision 1350)
@@ -24,6 +24,6 @@
     return 
 count = 0
+students = retcat()
 #from Products.zdb import set_trace;set_trace()
-students = retcat()
 for sbrain in students:
     sres = scat(matric_no=sbrain.matric_no)
