Index: /WAeUP_SRP/trunk/skins/waeup_utilities/remove_all_accommodation_objects.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_utilities/remove_all_accommodation_objects.py	(revision 5787)
+++ /WAeUP_SRP/trunk/skins/waeup_utilities/remove_all_accommodation_objects.py	(revision 5787)
@@ -0,0 +1,47 @@
+## Script (Python) "remove_all_accommodation_objects"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+if str(member) not in ('admin'):
+    return
+
+import logging
+import DateTime
+logger = logging.getLogger('Skins.remove_all_accommodation_objects')
+from Products.AdvancedQuery import Eq, Between, Le,In
+aq_portal = context.portal_catalog_real.evalAdvancedQuery
+wf = context.portal_workflow
+
+logger.info('start')
+accommodation_brains = context.portal_catalog.search({'meta_type': "StudentAccommodation"})
+num_objects = len(accommodation_brains)
+logger.info("found %d StudentAccommodation objects" % num_objects)
+students_folder = context.portal_url.getPortalObject().campus.students
+
+for i in xrange(num_objects):
+    #set_trace()
+    data = {}
+    a_brain = accommodation_brains[i]
+    pl = a_brain.getPath().split('/')
+    student_id = pl[-2]    
+    student_folder = getattr(students_folder,student_id)
+    student_folder.manage_delObjects(a_brain.id)
+    logger.info("%s/%s removed" % (pl[-2],pl[-1]))
+
+logger.info("finished")
