Index: WAeUP_SRP/trunk/skins/waeup_utilities/createReturningStudent.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_utilities/createReturningStudent.py	(revision 1566)
+++ WAeUP_SRP/trunk/skins/waeup_utilities/createReturningStudent.py	(revision 1567)
@@ -17,5 +17,5 @@
 students_folder = context.portal_url.getPortalObject().campus.students
 import logging
-logger = logging.getLogger('createReturningStudent')
+logger = logging.getLogger('Skins.createReturningStudent')
 
 if not matric_no:
@@ -30,5 +30,5 @@
     student_brain = res[0]
     sid,jamb_reg_no = context.waeup_tool.createOne(students_folder,student_brain,'?')
-    logger.info('"%s","Created Student","%s", "%s" ' % (member,sid,matric_no))
+    logger.info('%s creates student %s %s' % (member,sid,matric_no))
     return "Student MatricNo %s, StudentId %s (JAMBRegNo %s) created" % (matric_no,sid,jamb_reg_no)
 
@@ -36,5 +36,5 @@
 count = 1
 total = 0
-logger.info('"%s","Create Students start"' % (member))
+logger.info('%s started createReturningStudent"' % (member))
 letters = ('ABCDEFGHKLMNPQRSTUVWXYZ')
 lc = 0
@@ -42,14 +42,13 @@
     res = context.students_catalog(matric_no = matric_no)
     if len(res) == 1:
-        #logger.info('"Student already exists","%s"' % (matric_no))
         continue
     elif len(res) > 1:
-        logger.info('"Student with multiple entries","%s","%s" ' % (matric_no,len(res)))
+        logger.info('Student %s with multiple entries (%s)' % (matric_no,len(res)))
+        # fix at the beginning
         ids = [r.id for r in res if not r.id.startswith('A')]
-        #from Products.zdb import set_trace;set_trace()
         for id in ids:
             context.students_catalog.deleteRecord(id)
         students_folder.manage_delObjects(ids)
-        logger.info('"deleted students","%s" ' % " ".join(ids))
+        logger.info('Student objects deleted: %s' % " ".join(ids))
         continue
     student = context.returning_import(matric_no=matric_no)[0]
@@ -59,9 +58,9 @@
         lc = 0
     context.waeup_tool.createOne(students_folder,student,letter)
-    logger.info('"Student created","%s"' % (matric_no))
+    logger.info('Student created: %s' % (matric_no))
     count += 1
     if count > 10:
-        logger.info('"%s","Committed Students","%s", "%s" ' % (member,count,total))
+        logger.info('%s committed students %s, %s' % (member,count,total))
         total += count
         count = 1
-logger.info('"%s","Create Students finish","%s"' % (member,total))
+logger.info('createReturningStudent finished (%s)' % (total))
Index: WAeUP_SRP/trunk/skins/waeup_utilities/deleteStudentByMatricNo.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_utilities/deleteStudentByMatricNo.py	(revision 1566)
+++ WAeUP_SRP/trunk/skins/waeup_utilities/deleteStudentByMatricNo.py	(revision 1567)
@@ -1,3 +1,3 @@
-## Script (Python) "search_pins"
+## Script (Python) "deleteStudentByMatricNo"
 ##bind container=container
 ##bind context=context
@@ -12,5 +12,5 @@
 """
 import logging
-logger = logging.getLogger('DeleteStudentByMatricNo')
+logger = logging.getLogger('Skins.deleteStudentByMatricNo')
 
 request = REQUEST
@@ -26,7 +26,7 @@
 if str(member) not in ('admin','joachim') or matric_no is None:
     return
-    
-    
-# remove from students_catalog    
+
+
+# remove from students_catalog
 
 res = st_cat(matric_no=matric_no)
Index: WAeUP_SRP/trunk/skins/waeup_utilities/fixLevelForNewStudents.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_utilities/fixLevelForNewStudents.py	(revision 1566)
+++ WAeUP_SRP/trunk/skins/waeup_utilities/fixLevelForNewStudents.py	(revision 1567)
@@ -1,3 +1,3 @@
-## Script (Python) "search_pins"
+## Script (Python) "fixLevelForNewStudents"
 ##bind container=container
 ##bind context=context
@@ -23,5 +23,5 @@
 setheader = request.RESPONSE.setHeader
 import logging
-logger = logging.getLogger('fixLevelForNewStudents')
+logger = logging.getLogger('Skins.fixLevelForNewStudents')
 
 def rwrite(s):
@@ -53,5 +53,5 @@
 count_full = 0
 commit_count = 0
-logger.info("started for %s students" % len(res))
+logger.info("Started for %s students" % len(res))
 to_change = {}
 for sbrain in res:
@@ -92,5 +92,5 @@
     if commit_count > 1000:
         context.waeup_tool.doCommit()
-        logger.info("committing %s transactions total %s" % (commit_count,count))
+        logger.info("Committing %s transactions, total %s" % (commit_count,count))
         commit_count = 0
     rwrite("%s: %s %s %s <br />" % (count,sbrain.id,entry_mode,level))
@@ -98,3 +98,3 @@
     students_cat.modifyRecord(**to_change[entry])
 rwrite("finished")
-logger.info("finished  %s students" % count)
+logger.info("Finished  %s students" % count)
Index: WAeUP_SRP/trunk/skins/waeup_utilities/fixReservedBeds.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_utilities/fixReservedBeds.py	(revision 1567)
+++ WAeUP_SRP/trunk/skins/waeup_utilities/fixReservedBeds.py	(revision 1567)
@@ -0,0 +1,45 @@
+##parameters=REQUEST
+# $Id: fixReservedBeds.py 1447 2007-02-20 13:41:26Z joachim $
+"""
+process the the accommodation reservation
+"""
+import DateTime
+current = DateTime.DateTime()
+request = context.REQUEST
+pr = context.portal_registration
+wftool = context.portal_workflow
+lt = context.portal_layouts
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+acco_cat = context.portal_accommodation
+import logging
+logger = logging.getLogger('Skins.fixReservedBed')
+students = context.portal_url.getPortalObject().campus.students
+hostels = context.portal_url.getPortalObject().campus.accommodation.objectItems()
+acco_id = "accommodation_%s" % context.getSessionId()
+logger.info('%s starts fixReservedBeds' % (member))
+#from Products.zdb import set_trace;set_trace()
+for h_id,h in hostels:
+    h_doc = h.getContent()
+    reserved = context.reservedRoomsVoc(doc=h_doc)
+    for hr,hrv in reserved:
+        for k,v in context.getAccoHallBeds(doc=h_doc):
+            bid = "%s_%s_%s" % (h_id,hr,k)
+            res = acco_cat(bed = bid)
+            if not res:
+                continue
+            bed = res[0]
+            if not bed.student:
+                continue
+            student_obj = getattr(students,bed.student)
+            if acco_id in student_obj.objectIds():
+                acco_doc = getattr(student_obj, acco_id).getContent()
+                if acco_doc.bed != bid:
+                    acco_cat.modifyRecord(bed=bid,student = '')
+                    logger.info('"%s","removed allocation of %s for","%s"' % (member,bid,bed.student))
+logger.info('%s finishes fixReservedBeds' % (member))
+return request.RESPONSE.redirect("%s" % context.absolute_url())
+
+
+
+
Index: WAeUP_SRP/trunk/skins/waeup_utilities/reindexCoursesCatalog.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_utilities/reindexCoursesCatalog.py	(revision 1566)
+++ WAeUP_SRP/trunk/skins/waeup_utilities/reindexCoursesCatalog.py	(revision 1567)
@@ -1,3 +1,3 @@
-## Script (Python) "search_pins"
+## Script (Python) "reindexCourseCatalog"
 ##bind container=container
 ##bind context=context
@@ -23,5 +23,5 @@
 setheader = request.RESPONSE.setHeader
 import logging
-logger = logging.getLogger('reindexCourseCatalog')
+logger = logging.getLogger('Skins.reindexCourseCatalog')
 
 def rwrite(s):
@@ -51,5 +51,5 @@
 count_full = 0
 commit_count = 0
-logger.info("reindexing of courses_catalog started for %s courses" % len(courses))
+logger.info("Reindexing of courses_catalog started for %s courses" % len(courses))
 for course_brain in courses:
     course_doc = course_brain.getObject().getContent()
@@ -72,7 +72,7 @@
     if commit_count > 1000:
         context.waeup_tool.doCommit()
-        logger.info("committing %s transactions total %s" % (commit_count,count))
+        logger.info("Committing %s transactions, total %s" % (commit_count,count))
         rwrite("%s: committed %s <br />" % (count,commit_count))
         commit_count = 0
 rwrite("finished")
-logger.info("finished  reindexing %s courses" % count)
+logger.info("Reindexing finished (%s courses)" % count)
Index: WAeUP_SRP/trunk/skins/waeup_utilities/removeResults2.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_utilities/removeResults2.py	(revision 1566)
+++ WAeUP_SRP/trunk/skins/waeup_utilities/removeResults2.py	(revision 1567)
@@ -1,3 +1,3 @@
-## Script (Python) "search_pins"
+## Script (Python) "removeResults2"
 ##bind container=container
 ##bind context=context
@@ -13,5 +13,5 @@
 """
 import logging
-logger = logging.getLogger('removeResults2')
+logger = logging.getLogger('Skins.removeResults2')
 
 request = REQUEST
@@ -43,8 +43,8 @@
         to_del.append(r.key)
         rwrite(r.matric_no + " " + r.Level +"  " + r.CosCode + "<br />")
-logger.info('"%s", "start to delete %s results"' % (member,len(to_del)))
+logger.info('%s starts to delete %s results' % (member,len(to_del)))
 for uid in to_del:
     rcat.deleteRecord(uid)
-logger.info('"%s", "finished with deletion of %s results"' % (member,len(to_del)))
+logger.info('%s finished deletion of %s results' % (member,len(to_del)))
 rwrite("Done")
 
Index: WAeUP_SRP/trunk/skins/waeup_utilities/unpay.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_utilities/unpay.py	(revision 1566)
+++ WAeUP_SRP/trunk/skins/waeup_utilities/unpay.py	(revision 1567)
@@ -13,6 +13,9 @@
 """
 import logging
-logger = logging.getLogger('EPayment.Unpay')
+logger = logging.getLogger('Skins.unpay')
 import DateTime
+
+pm = context.portal_membership
+member = pm.getAuthenticatedMember()
 
 request = context.REQUEST
@@ -27,5 +30,5 @@
 #wftool.doActionFor(student,'return')
 wftool.doActionFor(student,'clear_and_validate')
-logger.info('"%s", "reset to state returning"' % student_id)
+logger.info('%s resets %s to state returning' % (member,student_id))
 
 return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
