Index: /WAeUP_SRP/trunk/Academics.py
===================================================================
--- /WAeUP_SRP/trunk/Academics.py	(revision 1570)
+++ /WAeUP_SRP/trunk/Academics.py	(revision 1571)
@@ -51,5 +51,5 @@
     def importLocalRoles(self,portal_type): ###(
         name = '%sLocalRoles' % portal_type
-        logger = logging.getLogger('Import.%s' % name)
+        logger = logging.getLogger('Academics.AcademicsFolder.importLocalRoles')
         current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
         logger.info('Start importing %(name)s to %(name)s_%(current)s.csv' % vars())
@@ -74,5 +74,5 @@
                         member_id = r.split(':')[1]
                         odict[obj_id].manage_setLocalRoles(member_id, roles_dict[r])
-                        logger.info('importing role for %s %s %s' % (obj_id, member_id,roles_dict[r]))
+                        logger.info('Importing role for %s %s %s' % (obj_id, member_id,roles_dict[r]))
 
 ###)
@@ -87,5 +87,5 @@
         name = 'Faculties'
         no_import = False
-        logger = logging.getLogger('Import.%s_csv' % name)
+        logger = logging.getLogger('Academics.AcademicsFolder.loadFacultiesFromCSV')
         logger.info('Start loading from %s.csv' % name)
         academics = self.portal_catalog({'meta_type': 'AcademicsFolder'})[-1].getObject()
@@ -134,5 +134,5 @@
         name = 'Departments'
         no_import = False
-        logger = logging.getLogger('Import.Departments')
+        logger = logging.getLogger('Academics.AcademicsFolder.loadDepartmentsFromCSV')
         fields = ("code",
                   "review_state",
@@ -191,5 +191,5 @@
         name = 'Courses'
         no_import = False
-        logger = logging.getLogger('Import.Courses')
+        logger = logging.getLogger('Academics.AcademicsFolder.loadCoursesFromCSV')
         fields = ("code",
                   "review_state",
@@ -296,5 +296,5 @@
         wf = self.portal_workflow
         no_import_list = []
-        logger = logging.getLogger('Import.Certificates')
+        logger = logging.getLogger('Academics.AcademicsFolder.loadCertificatesFromCSV')
         fields = ("code",
                   "review_state",
@@ -374,9 +374,8 @@
         """install Certificate Courses from CSV values"""
         #return
-        logger = logging.getLogger('Import.CertificateCourses')
+        logger = logging.getLogger('Academics.AcademicsFolder.loadCertificateCoursesFromCSV')
         name = 'CertificateCourses'
         wf = self.portal_workflow
         no_import_list = []
-        logger = logging.getLogger('Import.CertificateCourses')
         fields = ("code",
                   "review_state",
@@ -446,5 +445,5 @@
                 continue
             l.invokeFactory('CertificateCourse',course_code)
-            logger.info('Creating CertificateCourse %(code)s in certificate %(certificate_code)s Level %(level)s' % cert_course)
+            logger.info('Creating CertificateCourse %(code)s in Certificate %(certificate_code)s StudyLevel %(level)s' % cert_course)
             cc = getattr(l,course_code)
             semester = 'first'
@@ -492,5 +491,5 @@
     def exportLocalRoles(self,portal_type): ###(
         name = '%sLocalRoles' % portal_type
-        logger = logging.getLogger('Export.%s' % name)
+        logger = logging.getLogger('Academics.AcademicsFolder.exportLocalRoles')
         current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
         logger.info('Start exporting %(name)s to %(name)s_%(current)s.csv' % vars())
@@ -505,5 +504,5 @@
             for (groupname, roles) in obj.get_local_group_roles():
                 lr[ 'group:' + group ] = [x for x in roles]
-            logger.info('exporting %s %s ' % (obj.id, lr))
+            logger.info('Exporting %s %s ' % (obj.id, lr))
             export.append('"%s","%s"' % (obj.getId(),lr))
         open("%s/import/%s-%s.csv" % (i_home,name,current),"w+").write('\n'.join(export))
@@ -519,5 +518,5 @@
         name = 'Faculties'
         no_import = False
-        logger = logging.getLogger('Export.%s' % name)
+        logger = logging.getLogger('Academics.AcademicsFolder.exportFacultiesToCSV')
         current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
         logger.info('Start exporting %(name)s to %(name)s_%(current)s.csv' % vars())
@@ -526,5 +525,5 @@
         export.append('"code","review_state","title","title_prefix","college_code","degree_grade","bank_code"')
         for obj in objects:
-            logger.info('exporting %s %s ' % (obj.id, obj.title))
+            logger.info('Exporting %s %s ' % (obj.id, obj.title))
             obj_d = obj.getContent()
             di = {}
@@ -552,5 +551,5 @@
         name = 'Departments'
         no_import = False
-        logger = logging.getLogger('Export.%s' % name)
+        logger = logging.getLogger('Academics.AcademicsFolder.exportDepartmentsToCSV')
         current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
         logger.info('Start exporting %(name)s to %(name)s_%(current)s.csv' % vars())
@@ -570,5 +569,5 @@
                     di['review_state'] = self.portal_workflow.getInfoFor(department,'review_state','no_state')
                     export.append('"%(code)s","%(review_state)s","%(title)s","%(title_prefix)s","%(faculty_code)s"' % di)
-                    logger.info('exporting %s %s ' % (department.id, department.title))
+                    logger.info('Exporting %s %s ' % (department.id, department.title))
                 except:
                     logger.info('could not export %s %s ' % (department.id, department.title))
@@ -584,5 +583,5 @@
         name = 'Courses'
         no_import = False
-        logger = logging.getLogger('Export.%s' % name)
+        logger = logging.getLogger('Academics.AcademicsFolder.exportCoursesToCSV')
         current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
         logger.info('Start exporting %(name)s to %(name)s_%(current)s.csv' % vars())
@@ -614,5 +613,5 @@
                     di['review_state'] = self.portal_workflow.getInfoFor(course,'review_state','no_state')
                     export.append(dataline % di)
-                    logger.info('exporting %s %s ' % (course.id, course.title))
+                    logger.info('Exporting %s %s ' % (course.id, course.title))
                     continue
         open("%s/import/%s-%s.csv" % (i_home,name,current),"w+").write('\n'.join(export))
@@ -626,5 +625,5 @@
         name = 'Certificates'
         no_import = False
-        logger = logging.getLogger('Export.%s' % name)
+        logger = logging.getLogger('Academics.AcademicsFolder.exportCertificatesToCSV')
         current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
         logger.info('Start exporting %(name)s to %(name)s_%(current)s.csv' % vars())
@@ -668,5 +667,5 @@
                     try:
                         export.append(dataline % di)
-                        logger.info('exporting %s %s ' % (certificate.id, certificate.title))
+                        logger.info('Exporting %s %s ' % (certificate.id, certificate.title))
                     except:
                         logger.info('could not export %s %s ' % (certificate.id, certificate.title))
@@ -682,5 +681,5 @@
         name = 'CertificateCourses'
         no_import = False
-        logger = logging.getLogger('Export.%s' % name)
+        logger = logging.getLogger('Academics.AcademicsFolder.exportCertificateCoursesToCSV')
         current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
         logger.info('Start exporting %(name)s to %(name)s_%(current)s.csv' % vars())
@@ -714,7 +713,7 @@
                                     try:
                                         export.append(dataline % di)
-                                        logger.info('exporting %s %s ' % (certificate.id, certificate.title))
+                                        logger.info('Exporting %s %s ' % (certificate.id, certificate.title))
                                     except:
-                                        logger.info('could not export %s %s ' % (certificate.id, certificate.title))
+                                        logger.info('Could not export %s %s ' % (certificate.id, certificate.title))
                                         continue
         open("%s/import/%s-%s.csv" % (i_home,name,current),"w+").write('\n'.join(export))
Index: /WAeUP_SRP/trunk/Accommodation.py
===================================================================
--- /WAeUP_SRP/trunk/Accommodation.py	(revision 1570)
+++ /WAeUP_SRP/trunk/Accommodation.py	(revision 1571)
@@ -107,5 +107,5 @@
         no_import = []
         imported = []
-        logger = logging.getLogger('Import.%s' % name)
+        logger = logging.getLogger('Accommodation.AccoFolder.importReservedBeds')
         try:
             beds = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
@@ -169,5 +169,5 @@
                     no_import.append( format_error % bed)
                     continue
-                halls[hall] = hall_doc = hall_object.getContent() 
+                halls[hall] = hall_doc = hall_object.getContent()
             bid = "%(hall)s_%(block)s_%(room)s_%(bed)s" % bed
             res = accommodation(bed = bid)
@@ -201,5 +201,5 @@
                     acco_doc.edit(mapping={'bed': bid})
                     member = self.portal_membership.getAuthenticatedMember()
-                    logger.info('"%s","changed reserved bed %s for","%s"' % (member,bid,sid))
+                    logger.info('%s changed reserved bed %s for %s' % (member,bid,sid))
             accommodation.modifyRecord(bed = bid, student = sid)
             imported.append( format % bed)
@@ -227,5 +227,5 @@
         return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
 
-        
+
 InitializeClass(AccoFolder)
 
@@ -256,5 +256,5 @@
 InitializeClass(AccoHall)
 
-    
+
 def addAccoHall(container, id, REQUEST=None, **kw):
     """Add a AccoHall."""
Index: /WAeUP_SRP/trunk/ScratchCards.py
===================================================================
--- /WAeUP_SRP/trunk/ScratchCards.py	(revision 1570)
+++ /WAeUP_SRP/trunk/ScratchCards.py	(revision 1571)
@@ -37,5 +37,5 @@
         """import PinBatch"""
         name = "PINS"
-        logger = logging.getLogger('Import.%s' % name)
+        logger = logging.getLogger('Students.ScratchCardBatchesFolder.importPinBatch')
         logger.info('Start loading from %s.csv' % name)
         pins_section = self.portal_url.getPortalObject().campus.pins
@@ -66,5 +66,5 @@
             dict['no_of_pins'] = n - 1
             batch.getContent().edit(mapping=dict)
-            logger.info('Added %s with %d Pins' % (bid,n-1))
+            logger.info('%s with %d PINs added' % (bid,n-1))
         return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
     ###)
@@ -140,5 +140,5 @@
             return unused[-max_pins:]
         return unused
-    
+
     security.declareProtected(View,"getUsedPins")
     def getUsedPins(self):
Index: /WAeUP_SRP/trunk/Students.py
===================================================================
--- /WAeUP_SRP/trunk/Students.py	(revision 1570)
+++ /WAeUP_SRP/trunk/Students.py	(revision 1571)
@@ -82,290 +82,5 @@
     security = ClassSecurityInfo()
 
-    security.declareProtected(ModifyPortalContent,"loadFullTimeStudentsFromCSV")###(
-    def loadFullTimeStudentsFromCSV(self):
-        """load Fulltime Studentdata from CSV values"""
-        import transaction
-        import random
-        tr_count = 0
-        name = 'short_full_time'
-        no_import = False
-        if not no_import:
-            no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
-            no_import.write('"MatricNo","EntryRegNo","CurrentSession","StudentLevel","fullname","FirstName","MiddleName","Lastname","FormerSurname","Sex","Nationality","State","LGA","PermanentAddress","PermanentAddressCity","CampusAddress","PhoneNumber","Emailaddress","Mode","CourseMajor","Faculty","Dept"\n')
-        logger = logging.getLogger('Import.%s' % name)
-        logger.info('Start loading from %s.csv' % name)
-        pwlist  = []
-        pwlist.append('"student_id","firstname","middlename","lastname","matric_no","jamb_reg_no","access_code"')
-        pwl_template = Template('"$student_id","$firstname","$middlename","$lastname","$matric_no","$jamb_reg_no","$access_code"')
-        students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject()
-        try:
-            students = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
-        except:
-            logger.error('Error reading %s.csv' % name)
-            return
-        l = self.portal_catalog({'meta_type': "StudentClearance",})
-        matrics = []
-        for s in l:
-            matrics.append(s.getObject().getContent().matric_no)
-        print matrics
-        l = self.portal_catalog({'meta_type': "Certificate"})
-        certs = {}
-        for c in l:
-            ca,ac,fa,dep_id,co,certcode = c.relative_path.split('/')
-            cid = "%(dep_id)s_%(certcode)s" % vars()
-            certs[cid] = c.getObject()
-        for student in students:
-            logger.info('processing "%(MatricNo)s","%(EntryRegNo)s","%(CurrentSession)s","%(StudentLevel)s","%(fullname)s","%(FirstName)s","%(MiddleName)s","%(Lastname)s","%(FormerSurname)s","%(Sex)s","%(Nationality)s","%(State)s","%(LGA)s","%(PermanentAddress)s","%(PermanentAddressCity)s","%(CampusAddress)s","%(PhoneNumber)s","%(Emailaddress)s","%(Mode)s","%(CourseMajor)s","%(Faculty)s","%(Dept)s"\n' % student)
-            sid = student.get('MatricNo')
-            if sid == "":
-                em = 'Empty MatricNo\n'
-                logger.info(em)
-                no_import.write(em)
-                no_import.write('"%(MatricNo)s","%(EntryRegNo)s","%(CurrentSession)s","%(StudentLevel)s","%(fullname)s","%(FirstName)s","%(MiddleName)s","%(Lastname)s","%(FormerSurname)s","%(Sex)s","%(Nationality)s","%(State)s","%(LGA)s","%(PermanentAddress)s","%(PermanentAddressCity)s","%(CampusAddress)s","%(PhoneNumber)s","%(Emailaddress)s","%(Mode)s","%(CourseMajor)s","%(Faculty)s","%(Dept)s"\n' % student)
-                continue
-            certcode = makeCertificateCode(student.get('CourseMajor'))
-            dep_id = student.get('Dept')
-            fac_id = student.get('Faculty')
-            cid = "%(dep_id)s_%(certcode)s" % vars()
-            if cid not in certs.keys():
-                em = 'Certificate with ID %s %s not found\n' % (certcode, student.get('CourseMajor'))
-                logger.info(em)
-                no_import.write(em)
-                no_import.write('"%(MatricNo)s","%(EntryRegNo)s","%(CurrentSession)s","%(StudentLevel)s","%(fullname)s","%(FirstName)s","%(MiddleName)s","%(Lastname)s","%(FormerSurname)s","%(Sex)s","%(Nationality)s","%(State)s","%(LGA)s","%(PermanentAddress)s","%(PermanentAddressCity)s","%(CampusAddress)s","%(PhoneNumber)s","%(Emailaddress)s","%(Mode)s","%(CourseMajor)s","%(Faculty)s","%(Dept)s"\n' % student)
-                continue
-            certificate_doc = certs[cid].getContent()
-            level = student.get('StudentLevel')
-            try:
-                int(level)
-            except:
-                em = 'Student with ID %(MatricNo)s StudentLevel is empty\n' % student
-                logger.info(em)
-                no_import.write(em)
-                no_import.write('"%(MatricNo)s","%(EntryRegNo)s","%(CurrentSession)s","%(StudentLevel)s","%(fullname)s","%(FirstName)s","%(MiddleName)s","%(Lastname)s","%(FormerSurname)s","%(Sex)s","%(Nationality)s","%(State)s","%(LGA)s","%(PermanentAddress)s","%(PermanentAddressCity)s","%(CampusAddress)s","%(PhoneNumber)s","%(Emailaddress)s","%(Mode)s","%(CourseMajor)s","%(Faculty)s","%(Dept)s"\n' % student)
-                continue
-            matric_no = student.get('MatricNo')
-            if matric_no not in matrics:
-                matrics.append(matric_no)
-                sid = self.generateStudentId(student.get('Lastname')[0])
-                #self.log('Creating Faculty %(id)s = %(Title)s' % faculty)
-                students_folder.invokeFactory('Student', sid)
-                logger.info('%(tr_count)s: Creating Student with ID %(sid)s Matric_no %(matric_no)s ' % vars())
-                student_obj = getattr(self,sid)
-                access_code = "%d" % random.randint(1000000000,9999999999)
-                student_obj.getContent().makeStudentMember(sid,access_code,)
-                pwl_dict = {'student_id': sid,'access_code':access_code}
-                student_obj.invokeFactory('StudentApplication','application')
-                application = student_obj.application
-                da = {'Title': 'Application Data'}
-                student_obj.invokeFactory('StudentPersonal','personal')
-                da['jamb_reg_no'] = student.get('EntryRegNo')
-                personal = student_obj.personal
-                dp = {'Title': 'Personal Data'}
-                student_obj.invokeFactory('StudentClearance','clearance')
-                clearance = student_obj.clearance
-                dc = {'Title': 'Clearance/Eligibility Record'}
-                dc['matric_no'] = matric_no
-                state = student.get('State')
-                lga = student.get('LGA')
-                if state and lga:
-                    lga =  state + ' / ' + lga
-                else:
-                    lga = "None"
-                dc['lga'] = lga
-                dc['nationality'] = student.get('Nationality')
-                dc['email'] = student.get('Emailaddress')
-                dp['firstname'] = student.get('FirstName')
-                dp['middlename'] = student.get('MiddleName')
-                dp['lastname'] = student.get('Lastname')
-                dp['former_surname'] = student.get('FormerSurname')
-                dp['sex'] = student.get('Sex') == 'F'
-                dp['perm_address'] = student.get('PermanentAddress')
-                dp['perm_city'] = student.get('PermanentAddressCity')
-                dp['campus_address'] = student.get('CampusAddress')
-                dp['phone'] = student.get('PhoneNumber')
-                application.getContent().edit(mapping=da)
-                personal.getContent().edit(mapping=dp)
-                clearance.getContent().edit(mapping=dc)
-                #
-                # Study Course
-                #
-                student_obj.invokeFactory('StudentStudyCourse','study_course')
-                studycourse = student_obj.study_course
-                dsc = {}
-                from_certificate = ['title',
-                                   'max_elect',
-                                   'max_pass',
-                                   'n_core',
-                                   'nr_years',
-                                   'probation_credits',
-                                   'promotion_credits',
-                                   'start_level',
-                                  ]
-                for f in from_certificate:
-                    dsc[f] = getattr(certificate_doc,f)
-                dsc['faculty'] = fac_id
-                dsc['department'] = dep_id
-                dsc['study_course'] = certcode
-                css = student.get('CurrentSession') or '2004-2005'
-                cs = int(css.split('-')[0]) - 2000
-                cl = int(student.get('StudentLevel') or '100')/100
-                dsc['entry_session'] = "200%s" % (cs - cl)
-                dsc['clr_ac_pin'] = access_code
-                studycourse.getContent().edit(mapping=dsc)
-                #
-                # Level
-                #
-##                l = getattr(studycourse,level,None)
-##                if 0 and l is None:
-##                    #self.log('Creating Department %(DeptCode)s = %(Description)s' % dep)
-##                    logger.info('Creating Level %(StudentLevel)s for %(fullname)s' % student)
-##                    studycourse.invokeFactory('StudentStudyLevel', level)
-##                    l = getattr(studycourse, level)
-##                    certificate = certs[certcode]
-##                    cert_level = getattr(certificate,level,None)
-##                    if cert_level is None:
-##                        logger.info('Level %(level)s not in %(certcode)s' % vars())
-##                    l.getContent().edit(mapping={'Title': "Level %s" % level})
-            else:
-                em = 'Student with ID %(MatricNo)s %(fullname)s already exists\n' % student
-                logger.info(em)
-                no_import.write(em)
-                no_import.write('"%(MatricNo)s","%(EntryRegNo)s","%(CurrentSession)s","%(StudentLevel)s","%(fullname)s","%(FirstName)s","%(MiddleName)s","%(Lastname)s","%(FormerSurname)s","%(Sex)s","%(Nationality)s","%(State)s","%(LGA)s","%(PermanentAddress)s","%(PermanentAddressCity)s","%(CampusAddress)s","%(PhoneNumber)s","%(Emailaddress)s","%(Mode)s","%(CourseMajor)s","%(Faculty)s","%(Dept)s"\n' % student)
-                continue
-            if tr_count > MAX_TRANS:
-                transaction.commit()
-                em = 'Transaction commited\n' % student
-                logger.info(em)
-                tr_count = 0
-            tr_count += 1
-            pwl_dict.update(dc)
-            pwl_dict.update(da)
-            pwl_dict.update(dp)
-            wftool = self.portal_workflow
-            pwlist.append(pwl_template.substitute(pwl_dict))
-            wftool.doActionFor(student_obj,'clear_and_validate')
-            student_obj.manage_setLocalRoles(sid, ['Owner',])
-            wftool.doActionFor(application,'close')
-            application.manage_setLocalRoles(sid, ['Owner',])
-            wftool.doActionFor(clearance,'close')
-            clearance.manage_setLocalRoles(sid, ['Owner',])
-            wftool.doActionFor(personal,'close')
-            personal.manage_setLocalRoles(sid, ['Owner',])
-            wftool.doActionFor(studycourse,'close_for_edit')
-            studycourse.manage_setLocalRoles(sid, ['Owner',])
-        open("%s/import/pwlist-%s.csv" % (i_home,name),"w+").write('\n'.join(pwlist))
-        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
-    ###)
-
-    security.declareProtected(ModifyPortalContent,"loadPumeResultsFromCSV")###(
-    def loadPumeResultsFromCSV(self):
-        """load Fulltime Studentdata from CSV values into pumeresults catalog"""
-        import transaction
-        import random
-##        csv_d = {'jamb_reg_no': "RegNumber", ###(
-##                 'status': "Admission Status",
-##                 'name': "Name",
-##                 'score': "Score",
-##                 'sex': "Sex",
-##                 'faculty': "Faculty",
-##                 'department': "Dept",
-##                 'course': "Course",
-##                 'course_code_org': "Course Code",
-##                 }
-###)
-        csv_d = {'jamb_reg_no': "JAMBRegno",
-                 'name': "Name",
-                 'score': "Score",
-                 'sex': "Sex",
-                 'course': "Course",
-                 'faculty': "Faculty",
-                 'department': "Dept",
-                 'course_code_org': "Course Code",
-                 'status': "Admission Status",
-                 'result_type': None,
-                 }
-        csv_fields = [f[1] for f in csv_d.items() if f[1]]
-        tr_count = 0
-        total = 0
-        #name = 'pup_new'
-        name = 'pup_update'
-        update = name.endswith('update')
-        no_import = []
-        ok_import = []
-        ok_import.append('%s' % ','.join(['"%s"' % fn for fn in csv_d.keys()]))
-        no_import.append('%s' % ','.join(['"%s"' % fn for fn in csv_fields]))
-        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
-        ok_import_name = "%s/import/%s_imported_%s.csv" % (i_home,name,current)
-        #open(ok_import_name,"w").write('\n'.join(no_import))
-        no_import_name = "%s/import/%s_not_imported_%s.csv" % (i_home,name,current)
-        #open(no_import_name,"w").write('\n'.join(no_import))
-        logger = logging.getLogger('Import.%s' % name)
-        starttime = DateTime.now()
-        logger.info('Start loading from %s.csv' % name)
-        try:
-            result = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
-        except:
-            logger.error('Error reading %s.csv' % name)
-            return
-        pume = self.portal_pumeresults
-        format = ','.join(['"%%(%s)s"' % fn for fn in csv_fields])
-        import_format = ','.join(['"%%(%s)s"' % fn for fn in csv_d.keys()])
-        eduplicate = '%s,"duplicate"' % format
-        einvalidjamb = '%s,"invalid JambRegNo"' % format
-        added = 'added ,%s' % format
-        #from pdb import set_trace;set_trace()
-        for jamb in result:
-            dict = {}
-            for f,fn in csv_d.items():
-                dict[f] = jamb.get(csv_d[f])
-            dict['result_type'] = 'DE'
-            jnr = jamb.get(csv_d['jamb_reg_no'])
-            if not checkJambNo(jnr):
-                logger.info(einvalidjamb % jamb)
-                dd = {}
-                for f,fn in csv_d.items():
-                    dd[fn] = getattr(data,f)
-                    no_import.append(eduplicate % dd)
-                    no_import.append(eduplicate % jamb)
-                continue
-            res = pume(jamb_reg_no=jnr)
-            if len(res) > 0:
-                if update:
-                    try:
-                        pume.modifyRecord(**dict)
-                    except ValueError:
-                        logger.info(eduplicate % jamb)
-                        continue
-                    except KeyError:
-                        pume.addRecord(**dict)
-                        logger.info(added % jamb)
-                        continue
-                else:
-                    data = res[0]
-                    if data.name != jamb.get(csv_d['name']):
-                        #set_trace()
-                        logger.info(eduplicate % jamb)
-                        #em = 'Student with REG-NO %(jamb_reg_no)s already exists\n' % dict
-                        #logger.info(em)
-                        dd = {}
-                        for f,fn in csv_d.items():
-                            dd[fn] = getattr(data,f)
-                        no_import.append(eduplicate % dd)
-                        no_import.append(eduplicate % jamb)
-                    continue
-            try:
-                pume.addRecord(**dict)
-                ok_import.append(import_format % dict)
-            except ValueError:
-                logger.info(eduplicate % jamb)
-                #em = 'Student with REG-NO %(jamb_reg_no)s already exists\n' % dict
-                #logger.info(em)
-                no_import.append(eduplicate % jamb)
-        logger.info('End loading from %s.csv' % name)
-        if len(no_import) > 1:
-            open(no_import_name,"w+").write('\n'.join(no_import))
-        open(ok_import_name,"w+").write('\n'.join(ok_import))
-        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
-    ###)
+
 
     security.declareProtected(ModifyPortalContent,"createDEStudents")###(
@@ -405,6 +120,6 @@
         no_certificate = "no certificate %s" % format
         open("%s/import/%s_not_imported.csv" % (i_home,name),"w").write('\n'.join(no_import))
-        logger = logging.getLogger('Import.%s' % name)
-        logger.info('start loading from %s.csv' % name)
+        logger = logging.getLogger('Students.StudentsFolder.createDEStudents')
+        logger.info('Start loading from %s.csv' % name)
         l = self.portal_catalog({'meta_type': "Certificate"})
         certs = {}
@@ -418,5 +133,5 @@
             return
         for jamb in result:
-            jamb['Error'] = "Processing "
+            jamb['Error'] = "Processing"
             logger.info(format % jamb)
             jamb_reg_no = jamb.get(csv_d['jamb_reg_no'])
@@ -624,6 +339,6 @@
         no_certificate = "no certificate %s" % format
         open("%s/import/%s_not_imported.csv" % (i_home,name),"w").write('\n'.join(no_import))
-        logger = logging.getLogger('Import.%s' % name)
-        logger.info('start loading from %s.csv' % name)
+        logger = logging.getLogger('Students.StudentsFolder.createNewStudents')
+        logger.info('Start loading from %s.csv' % name)
         l = self.portal_catalog({'meta_type': "Certificate"})
         certs = {}
@@ -829,5 +544,5 @@
         no_import = []
         imported = []
-        logger = logging.getLogger('Import.%s' % name)
+        logger = logging.getLogger('Students.StudentsFolder.importReturningStudents')
         try:
             returning = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
@@ -849,5 +564,5 @@
             if start:
                 start = False
-                logger.info('start loading from %s.csv' % name)
+                logger.info('Start loading from %s.csv' % name)
                 s = ','.join(['"%s"' % fn for fn in student.keys()])
                 imported.append(s)
@@ -922,5 +637,6 @@
         for k,v in verdicts_voc.items():
             rverdicts[v.upper()] = k
-        logger = logging.getLogger('fixVerdicts')
+        rverdicts['STUDENT ON PROBATION'] = 'C'
+        logger = logging.getLogger('Students.StudentsFolder.fixVerdicts')
         try:
             verdicts = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
@@ -933,5 +649,5 @@
             if start:
                 start = False
-                logger.info('start loading from %s.csv' % name)
+                logger.info('Start loading from %s.csv' % name)
                 s = ','.join(['"%s"' % fn for fn in verdict.keys()])
                 no_import.append('%s,"Error"' % s)
@@ -957,14 +673,14 @@
                         no_import.append( format_error % verdict)
                         continue
-                try:
-                    st_cat.modifyRecord(id = student_id,
+                st_cat.modifyRecord(id = student_id,
                                     verdict=verdict_code)
-                except KeyError:
-                    student['Error'] = "Not found in students_catalog"
-                    no_import.append( format_error % student)
-                    continue
+
                 dsc = {}
                 dsc['current_verdict'] = verdict_code
                 study_course.getContent().edit(mapping=dsc)
+            else:
+                student['Error'] = "Not found in students_catalog"
+                no_import.append( format_error % student)
+                continue
             tr_count += 1
             if tr_count > 1000:
@@ -1017,5 +733,5 @@
         st_cat = self.students_catalog
         no_import = []
-        logger = logging.getLogger('getEntryMode.%s' % name)
+        logger = logging.getLogger('Students.StudentsFolder.fixEntryModeForReturning')
         try:
             returning = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
@@ -1027,5 +743,5 @@
             if start:
                 start = False
-                logger.info('start loading from %s.csv' % name)
+                logger.info('Start loading from %s.csv' % name)
                 s = ','.join(['"%s"' % fn for fn in student.keys()])
                 no_import.append('%s,"Error"' % s)
@@ -1120,5 +836,5 @@
         no_import = []
         imported = []
-        logger = logging.getLogger('Import.%s' % name)
+        logger = logging.getLogger('Students.StudentsFolder.updateReturningStudents')
         try:
             returning = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
@@ -1139,5 +855,5 @@
             if start:
                 start = False
-                logger.info('start loading from %s.csv' % name)
+                logger.info('Start loading from %s.csv' % name)
                 s = ','.join(['"%s"' % fn for fn in student.keys()])
                 imported.append(s)
@@ -1214,5 +930,5 @@
         no_import = []
         imported = []
-        logger = logging.getLogger('Import.%s' % name)
+        logger = logging.getLogger('Students.StudentsFolder.importResults')
         try:
             results = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
@@ -1233,5 +949,5 @@
             if start:
                 start = False
-                logger.info('start loading from %s.csv' % name)
+                logger.info('Start loading from %s.csv' % name)
                 s = ','.join(['"%s"' % fn for fn in result.keys()])
                 imported.append(s)
@@ -1339,5 +1055,5 @@
         open("%s/import/%s_not_imported.csv" % (i_home,name),"w").write(
                     '\n'.join(no_import))
-        logger = logging.getLogger('Import.%s' % name)
+        logger = logging.getLogger('Students.StudentsFolder.updateStudyCourse')
         logger.info('Start loading from %s.csv' % name)
         l = self.portal_catalog({'meta_type': "Certificate"})
@@ -1354,7 +1070,7 @@
                                      'SearchableText': jamb_reg_no })
             if not res:
-                em = 'Student with RegNo %s does not exists\n' % jamb_reg_no
+                em = 'Student with jamb_reg_no %s does not exists\n' % jamb_reg_no
                 logger.info(em)
-                jamb['Error'] = "Student not exists"
+                jamb['Error'] = "Student does not exist"
                 no_import.append(format % jamb)
                 continue
@@ -1398,363 +1114,6 @@
     ###)
 
-    security.declareProtected(ModifyPortalContent,"OLDloadPumeResultsFromCSV")###(
-    def OLDloadPumeResultsFromCSV(self):
-        """load Fulltime Studentdata from CSV values"""
-        import transaction
-        import random
-        wftool = self.portal_workflow
-        students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject()
-        csv_d = {'jamb_reg_no': "JAMBRegno",
-                 'jamb_lastname': "Name",
-                 'pume_options': "Options",
-                 'session': "Session",
-                 'days': "Days",
-                 'response': "Responce",
-                 'wrong': "Wrong",
-                 'pume_eng_score': "EngScore",
-                 'pume_gen_score': "GenScore",
-                 'pume_tot_score': "Score",
-                 'batch': "Batch",
-                 'serial': "SerialNo",
-                 'jamb_score': "JambScore",
-                 'omitted':"Omitted",
-                 'search_key': "SearchKey",
-                 'jamb_sex': "Sex",
-                 'fac1': "Fac1",
-                 'fac2': "Fac2",
-                 'jamb_first_cos': "CourseofStudy",
-                 'stud_status':"StudStatus",
-                 'registered': "Registered",
-                 'jamb_state': "State",
-                 'eng_fail': "EngFail",
-                 'gen_fail': "GenFail",
-                 'un_ans_eng': "UnAnsEng",
-                 'un_ans_eng': "UnAnsGen",
-                 'total_ans': "TotalUnAns",
-                 'dept': "Dept",
-                 'jamb_second_cos': "Course2",
-                 'jamb_third_cos': "course3",
-                 }
-        csv_fields = [f[1] for f in csv_d.items()]
-        tr_count = 0
-        name = 'pume_results'
-        no_import = []
-        s = ','.join(['"%s"' % fn for fn in csv_fields])
-        no_import.append('%s\n' % s)
-        logger = logging.getLogger('Import.%s' % name)
-        logger.info('Start loading from %s.csv' % name)
-        try:
-            result = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
-        except:
-            logger.error('Error reading %s.csv' % name)
-            return
-        for jamb in result:
-            format = ','.join(['"%%(%s)s"' % fn for fn in csv_fields])
-            processing = "processing %s" % format
-            logger.info(processing % jamb)
-            jamb_reg_no = jamb.get(csv_d['jamb_reg_no'])
-            #import pdb;pdb.set_trace()
-            res = self.portal_catalog({'portal_type': "StudentApplication",
-                                     'jamb_reg_no': jamb_reg_no })
-            if res:
-                em = 'Student with REG-NO %s already exists\n' % jamb_reg_no
-                logger.info(em)
-                no_import.append(em)
-                no_import.append(format % jamb)
-                continue
-            cert_id = jamb.get(csv_d['jamb_first_cos']).upper()
-            res = self.portal_catalog({'portal_type': "Certificate",
-                                     'id': cert_id })
-            if len(res) < 1:
-                em = 'No Certificate with ID %s \n' % cert_id
-                logger.info(em)
-                no_import.append(em)
-                no_import.append(format % jamb)
-                continue
-            cert = res[0].getObject()
-            cert_path = res[0].getPath()
-            cert_doc = cert.getContent()
-            jamb_name = jamb.get(csv_d['jamb_lastname'])
-            jamb_name.replace('>','')
-            names = jamb_name.split()
-            letter = names[-1][0].upper()
-            sid = self.generateStudentId(letter)
-            not_created = True
-            while not_created:
-                try:
-                    students_folder.invokeFactory('Student', sid)
-                    not_created = False
-                except BadRequest:
-                    sid = self.generateStudentId(letter)
-            logger.info('%(tr_count)s: Creating Student with ID %(sid)s REG-NO %(jamb_reg_no)s ' % vars())
-            student = getattr(self,sid)
-            student.manage_setLocalRoles(sid, ['Owner',])
-            student.invokeFactory('StudentClearance','clearance')
-            #wftool.doActionFor(student.clearance,'open')
-            dp = {'Title': 'Clearance/Eligibility Record'}
-            student.clearance.manage_setLocalRoles(sid, ['Owner',])
-            student.invokeFactory('StudentPume','pume')
-            dp = {'Title': 'Pume Data'}
-            student.invokeFactory('StudentApplication','application')
-            da = {'Title': 'Application Data'}
-            da["jamb_lastname"] = jamb_name
-            da_fields = ('jamb_reg_no',
-                         'jamb_sex',
-                         'jamb_state',
-                         'jamb_score',
-                         'jamb_first_cos',
-                         'jamb_sex',
-                         'jamb_state',
-                         'jamb_first_cos',
-                         'jamb_second_cos',
-                         )
-            for f in da_fields:
-                da[f] = jamb.get(csv_d[f])
-            app = student.application
-            app.getContent().edit(mapping=da)
-            app.manage_setLocalRoles(sid, ['Owner',])
-            #wftool.doActionFor(app,'close')
-            dp_fields = (
-                         'pume_eng_score',
-                         'pume_gen_score',
-                         'pume_tot_score',
-                         )
-            for f in dp_fields:
-                dp[f] = float(jamb.get(csv_d[f]))
-            pume = student.pume
-            pume.getContent().edit(mapping=dp)
-            #wftool.doActionFor(pume,'close')
-            pume.manage_setLocalRoles(sid, ['Owner',])
-            #
-            # Study Course
-            #
-            student.invokeFactory('StudentStudyCourse','study_course')
-            study_course = student.study_course
-            dsc = {}
-            from_certificate = ['title',
-                               'max_elect',
-                               'max_pass',
-                               'n_core',
-                               'nr_years',
-                               'probation_credits',
-                               'promotion_credits',
-                               'start_level',
-                              ]
-            for f in from_certificate:
-                dsc[f] = getattr(cert_doc,f)
-            cpl = cert_path.split('/')
-            dsc['faculty'] = cpl[-4]
-            dsc['department'] = cpl[-3]
-            dsc['study_course'] = cert_id
-            dsc['entry_session'] = jamb.get(csv_d['session'])
-            study_course.getContent().edit(mapping=dsc)
-            student.getContent().createSubObjects()
-            if dp['pume_tot_score']>49:
-                wftool.doActionFor(student,'pume_pass')
-                wftool.doActionFor(student,'admit')
-            else:
-                wftool.doActionFor(student,'pume_fail')
-                wftool.doActionFor(student,'reject_admission')
-            if len(no_import) > 1:
-                open("%s/import/%s_not_imported.csv" % (i_home,name),"w").write(
-                     '\n'.join(no_import))
-        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
-    ###)
-
-    security.declareProtected(ModifyPortalContent,"loadFullTimeStudentsResultsFromCSV") ###(
-    def loadFullTimeStudentsResultsFromCSV(self):
-        """load Fulltime Studentdata from CSV values"""
-        #return
-        level_wf_actions = {}
-        level_wf_actions["SUCCESSFUL STUDENT"] = "pass_A"
-        level_wf_actions["STUDENT WITH CARRYOVER COURSES"] = "pass_B"
-        level_wf_actions["STUDENT FOR PROBATION"] = "probate_C"
-        level_wf_actions["STUDENT ON PROBATION/TRANSFER"] = "reject_D"
-        import transaction
-        wftool = self.portal_workflow
-        tr_count = 0
-        name = 'short_full_time_results_2004_2005'
-        no_import = False
-        if not no_import:
-            no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
-            no_import.write('"Matnumber","CosCode","Ansbook","CosStuatus","Session","Mat_Cos","Score","CarryLevel","Grade","Weight","Semster","Verdict","Level","id","GPA"\n')
-        logger = logging.getLogger('import.%s' % name)
-        logger.info('Start loading from %s.csv' % name)
-        students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject()
-        try:
-            results = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
-        except:
-            logger.error('Error reading %s.csv' % name)
-            return
-        l = self.portal_catalog({'meta_type': "Course"})
-        courses = {}
-        for c in l:
-            courses[c.id] = c.getObject()
-        level_changed = False
-        student_changed = False
-        sid = ''
-        #import pdb;pdb.set_trace()
-        for result in results:
-            temp_sid = result.get('Matnumber')
-            if temp_sid != sid:
-                student_changed = True
-                res = self.portal_catalog({'meta_type': "StudentClearance",
-                                         'SearchableText': temp_sid })
-                if not res:
-                    em = 'Student with ID %(Matnumber)s not found\n' % result
-                    logger.info(em)
-                    no_import.write(em)
-                    no_import.write('"%(Matnumber)s","%(CosCode)s","%(Ansbook)s","%(CosStuatus)s","%(Session)s","%(Mat_Cos)s","%(Score)s","%(CarryLevel)s","%(Grade)s","%(Weight)s","%(Semster)s","%(Verdict)s","%(Level)s","%(id)s","%(GPA)s"\n' % result)
-                    continue
-                elif len(res) > 1:
-                    em = 'More than one Student with ID %(Matnumber)s found\n' % result
-                    logger.info(em)
-                    no_import.write(em)
-                    no_import.write('"%(Matnumber)s","%(CosCode)s","%(Ansbook)s","%(CosStuatus)s","%(Session)s","%(Mat_Cos)s","%(Score)s","%(CarryLevel)s","%(Grade)s","%(Weight)s","%(Semster)s","%(Verdict)s","%(Level)s","%(id)s","%(GPA)s"\n' % result)
-                    continue
-                sid = temp_sid
-                sf = res[0].getObject().aq_parent
-                sc = getattr(sf,'study_course')
-                level = ''
-            else:
-                student_changed = False
-            course = result.get('CosCode')
-            if course not in courses.keys():
-                em = 'Course with ID %(CosCode)s not found\n' % result
-                logger.info(em)
-                no_import.write(em)
-                no_import.write('"%(Matnumber)s","%(CosCode)s","%(Ansbook)s","%(CosStuatus)s","%(Session)s","%(Mat_Cos)s","%(Score)s","%(CarryLevel)s","%(Grade)s","%(Weight)s","%(Semster)s","%(Verdict)s","%(Level)s","%(id)s","%(GPA)s"\n' % result)
-                continue
-            course_doc = courses[course].getContent()
-            temp_level = result.get('Level')
-            student_id = sf.getId()
-            result['StudentId'] = student_id
-            if temp_level != level:
-                try:
-                    int(temp_level)
-                except:
-                    em = 'Result with ID %(Matnumber)s Course %(CosCode)s Level is empty\n' % result
-                    logger.info(em)
-                    no_import.write(em)
-                    no_import.write('"%(Matnumber)s","%(CosCode)s","%(Ansbook)s","%(CosStuatus)s","%(Session)s","%(Mat_Cos)s","%(Score)s","%(CarryLevel)s","%(Grade)s","%(Weight)s","%(Semster)s","%(Verdict)s","%(Level)s","%(id)s","%(GPA)s"\n' % result)
-                    continue
-                level_changed = True
-                if 'dlev' in vars().keys():
-                    wftool.doActionFor(l,level_wf_actions[dlev['verdict']])
-                level = temp_level
-                l = getattr(sc,level,None)
-                if l is None:
-                    logger.info('Creating Level %(Level)s for %(StudentId)s %(Matnumber)s' % result)
-                    sc.invokeFactory('StudentStudyLevel', level)
-                    l = getattr(sc, level)
-                    l.manage_setLocalRoles(student_id, ['Owner',])
-            else:
-                level_changed = False
-            cr = getattr(l,course,None)
-            if cr is None:
-                logger.info('Creating Course %(CosCode)s for %(StudentId)s %(Matnumber)s in Level %(Level)s' % result)
-                l.invokeFactory('StudentCourseResult',course)
-            cr = getattr(l,course)
-            dcr = {}
-            from_course = ['title',
-                           'credits',
-                           'passmark',
-                           ]
-            for f in from_course:
-                dcr[f] = getattr(course_doc,f)
-            dlev = {}
-            dcr['ansbook'] = result.get('Ansbook')
-            dcr['semester'] = getInt(result.get('Semster'))
-            dcr['status'] = result.get('CosStuatus')
-            dcr['score'] = getInt(result.get('Score'))
-            dlev['session'] = result.get('Session')
-            dcr['carry_level'] = result.get('CarryLevel')
-            dcr['grade'] = result.get('Grade')
-            dcr['weight'] = result.get('Weight')
-            dlev['verdict'] = result.get('Verdict')
-            dcr['import_id'] = result.get('id')
-            gpa = result.get('GPA').replace(',','.')
-            dlev['imported_gpa'] = getFloat(gpa)
-            cr.getContent().edit(mapping = dcr)
-            cr.manage_setLocalRoles(student_id, ['Owner',])
-            l.getContent().edit(mapping = dlev)
-            if tr_count > MAX_TRANS:
-                transaction.commit()
-                tr_count = 0
-            tr_count += 1
-            wftool.doActionFor(cr,'close')
-        wftool.doActionFor(l,level_wf_actions[dlev['verdict']])
-        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
-
-###)
-
-    security.declareProtected(ModifyPortalContent,"loadJAMBFromCSV")###(
-    def loadJAMBFromCSV(self):
-        """load JAMB data from CSV values"""
-        #return
-        students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject()
-        import transaction
-        tr_count = 0
-        name = 'SampleJAMBDataII'
-        wftool = self.portal_workflow
-        no_import = False
-        if not no_import:
-            no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
-            no_import.write('REG-NO,NAME,SEX,STATE,LGA,ENG-SCORE,SUBJ1,SUBJ1-SCORE,SUBJ2,SUBJ2-SCORE,SUBJ3,SUBJ3-SCORE,AGGREGATE,UNIV1,FACULTY1,COURSE1,UNIV2,FACULTY2,COURSE2')
-        logger = logging.getLogger('Import.%s' % name)
-        logger.info('Start loading from %s.csv' % name)
-        try:
-            result = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
-        except:
-            logger.error('Error reading %s.csv' % name)
-            return
-        for jamb in result:
-            logger.info('processing %(REG-NO)s,%(NAME)s,%(SEX)s,%(STATE)s,%(LGA)s,%(ENG-SCORE)s,%(SUBJ1)s,%(SUBJ1-SCORE)s,%(SUBJ2)s,%(SUBJ2-SCORE)s,%(SUBJ3)s,%(SUBJ3-SCORE)s,%(AGGREGATE)s,%(UNIV1)s,%(FACULTY1)s,%(COURSE1)s,%(UNIV2)s,%(FACULTY2)s,%(COURSE2)s\n' % jamb)
-            jamb_reg_no = jamb.get('REG-NO')
-            res = self.portal_catalog({'meta_type': "StudentApplication",
-                                     'jamb_reg_no': jamb_reg_no })
-            if res:
-                em = 'Student with REG-NO %(REG-NO)s already exists\n' % jamb
-                logger.info(em)
-                no_import.write(em)
-                no_import.write('%(REG-NO)s,%(NAME)s,%(SEX)s,%(STATE)s,%(LGA)s,%(ENG-SCORE)s,%(SUBJ1)s,%(SUBJ1-SCORE)s,%(SUBJ2)s,%(SUBJ2-SCORE)s,%(SUBJ3)s,%(SUBJ3-SCORE)s,%(AGGREGATE)s,%(UNIV1)s,%(FACULTY1)s,%(COURSE1)s,%(UNIV2)s,%(FACULTY2)s,%(COURSE2)s\n' % jamb)
-                continue
-            jamb_name = jamb.get("NAME")
-            jamb_name.replace('>','')
-            names = jamb_name.split()
-            letter = names[-1][0].upper()
-            sid = self.generateStudentId(letter)
-            not_created = True
-            while not_created:
-                try:
-                    students_folder.invokeFactory('Student', sid)
-                    not_created = False
-                except BadRequest:
-                    sid = self.generateStudentId(letter)
-            logger.info('%(tr_count)s: Creating Student with ID %(sid)s REG-NO %(jamb_reg_no)s ' % vars())
-            student = getattr(self,sid)
-            student.manage_setLocalRoles(sid, ['Owner',])
-            student.invokeFactory('StudentApplication','application')
-            da = {'Title': 'Application Data'}
-            da["jamb_reg_no"] = jamb.get("REG-NO")
-            da["jamb_lastname"] = jamb_name
-            da["jamb_sex"] = jamb.get("SEX")
-            da["jamb_state"] = jamb.get("STATE")
-            da["jamb_lga"] = jamb.get("LGA")
-            da["jamb_score"] = jamb.get("AGGREGATE")
-            da["jamb_first_cos"] = jamb.get("COURSE1")
-            da["jamb_second_cos"] = jamb.get("COURSE2")
-            da["jamb_first_uni"] = jamb.get("UNIV1")
-            da["jamb_second_uni"] = jamb.get("UNIV2")
-            app = student.application
-            app_doc = app.getContent()
-            app_doc.edit(mapping=da)
-            #wftool.doActionFor(app,'open',dest_container=app)
-            app.manage_setLocalRoles(sid, ['Owner',])
-            student.getContent().createSubObjects()
-        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
-    ###)
-
- 
+
+
     security.declareProtected(View,"fixOwnership")
     def fixOwnership(self):
Index: /WAeUP_SRP/trunk/Students.unused_methods.txt
===================================================================
--- /WAeUP_SRP/trunk/Students.unused_methods.txt	(revision 1571)
+++ /WAeUP_SRP/trunk/Students.unused_methods.txt	(revision 1571)
@@ -0,0 +1,645 @@
+    security.declareProtected(ModifyPortalContent,"loadFullTimeStudentsFromCSV")###(
+    def loadFullTimeStudentsFromCSV(self):
+        """load Fulltime Studentdata from CSV values"""
+        import transaction
+        import random
+        tr_count = 0
+        name = 'short_full_time'
+        no_import = False
+        if not no_import:
+            no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
+            no_import.write('"MatricNo","EntryRegNo","CurrentSession","StudentLevel","fullname","FirstName","MiddleName","Lastname","FormerSurname","Sex","Nationality","State","LGA","PermanentAddress","PermanentAddressCity","CampusAddress","PhoneNumber","Emailaddress","Mode","CourseMajor","Faculty","Dept"\n')
+        logger = logging.getLogger('Import.%s' % name)
+        logger.info('Start loading from %s.csv' % name)
+        pwlist  = []
+        pwlist.append('"student_id","firstname","middlename","lastname","matric_no","jamb_reg_no","access_code"')
+        pwl_template = Template('"$student_id","$firstname","$middlename","$lastname","$matric_no","$jamb_reg_no","$access_code"')
+        students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject()
+        try:
+            students = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
+        except:
+            logger.error('Error reading %s.csv' % name)
+            return
+        l = self.portal_catalog({'meta_type': "StudentClearance",})
+        matrics = []
+        for s in l:
+            matrics.append(s.getObject().getContent().matric_no)
+        print matrics
+        l = self.portal_catalog({'meta_type': "Certificate"})
+        certs = {}
+        for c in l:
+            ca,ac,fa,dep_id,co,certcode = c.relative_path.split('/')
+            cid = "%(dep_id)s_%(certcode)s" % vars()
+            certs[cid] = c.getObject()
+        for student in students:
+            logger.info('processing "%(MatricNo)s","%(EntryRegNo)s","%(CurrentSession)s","%(StudentLevel)s","%(fullname)s","%(FirstName)s","%(MiddleName)s","%(Lastname)s","%(FormerSurname)s","%(Sex)s","%(Nationality)s","%(State)s","%(LGA)s","%(PermanentAddress)s","%(PermanentAddressCity)s","%(CampusAddress)s","%(PhoneNumber)s","%(Emailaddress)s","%(Mode)s","%(CourseMajor)s","%(Faculty)s","%(Dept)s"\n' % student)
+            sid = student.get('MatricNo')
+            if sid == "":
+                em = 'Empty MatricNo\n'
+                logger.info(em)
+                no_import.write(em)
+                no_import.write('"%(MatricNo)s","%(EntryRegNo)s","%(CurrentSession)s","%(StudentLevel)s","%(fullname)s","%(FirstName)s","%(MiddleName)s","%(Lastname)s","%(FormerSurname)s","%(Sex)s","%(Nationality)s","%(State)s","%(LGA)s","%(PermanentAddress)s","%(PermanentAddressCity)s","%(CampusAddress)s","%(PhoneNumber)s","%(Emailaddress)s","%(Mode)s","%(CourseMajor)s","%(Faculty)s","%(Dept)s"\n' % student)
+                continue
+            certcode = makeCertificateCode(student.get('CourseMajor'))
+            dep_id = student.get('Dept')
+            fac_id = student.get('Faculty')
+            cid = "%(dep_id)s_%(certcode)s" % vars()
+            if cid not in certs.keys():
+                em = 'Certificate with ID %s %s not found\n' % (certcode, student.get('CourseMajor'))
+                logger.info(em)
+                no_import.write(em)
+                no_import.write('"%(MatricNo)s","%(EntryRegNo)s","%(CurrentSession)s","%(StudentLevel)s","%(fullname)s","%(FirstName)s","%(MiddleName)s","%(Lastname)s","%(FormerSurname)s","%(Sex)s","%(Nationality)s","%(State)s","%(LGA)s","%(PermanentAddress)s","%(PermanentAddressCity)s","%(CampusAddress)s","%(PhoneNumber)s","%(Emailaddress)s","%(Mode)s","%(CourseMajor)s","%(Faculty)s","%(Dept)s"\n' % student)
+                continue
+            certificate_doc = certs[cid].getContent()
+            level = student.get('StudentLevel')
+            try:
+                int(level)
+            except:
+                em = 'Student with ID %(MatricNo)s StudentLevel is empty\n' % student
+                logger.info(em)
+                no_import.write(em)
+                no_import.write('"%(MatricNo)s","%(EntryRegNo)s","%(CurrentSession)s","%(StudentLevel)s","%(fullname)s","%(FirstName)s","%(MiddleName)s","%(Lastname)s","%(FormerSurname)s","%(Sex)s","%(Nationality)s","%(State)s","%(LGA)s","%(PermanentAddress)s","%(PermanentAddressCity)s","%(CampusAddress)s","%(PhoneNumber)s","%(Emailaddress)s","%(Mode)s","%(CourseMajor)s","%(Faculty)s","%(Dept)s"\n' % student)
+                continue
+            matric_no = student.get('MatricNo')
+            if matric_no not in matrics:
+                matrics.append(matric_no)
+                sid = self.generateStudentId(student.get('Lastname')[0])
+                #self.log('Creating Faculty %(id)s = %(Title)s' % faculty)
+                students_folder.invokeFactory('Student', sid)
+                logger.info('%(tr_count)s: Creating Student with ID %(sid)s Matric_no %(matric_no)s ' % vars())
+                student_obj = getattr(self,sid)
+                access_code = "%d" % random.randint(1000000000,9999999999)
+                student_obj.getContent().makeStudentMember(sid,access_code,)
+                pwl_dict = {'student_id': sid,'access_code':access_code}
+                student_obj.invokeFactory('StudentApplication','application')
+                application = student_obj.application
+                da = {'Title': 'Application Data'}
+                student_obj.invokeFactory('StudentPersonal','personal')
+                da['jamb_reg_no'] = student.get('EntryRegNo')
+                personal = student_obj.personal
+                dp = {'Title': 'Personal Data'}
+                student_obj.invokeFactory('StudentClearance','clearance')
+                clearance = student_obj.clearance
+                dc = {'Title': 'Clearance/Eligibility Record'}
+                dc['matric_no'] = matric_no
+                state = student.get('State')
+                lga = student.get('LGA')
+                if state and lga:
+                    lga =  state + ' / ' + lga
+                else:
+                    lga = "None"
+                dc['lga'] = lga
+                dc['nationality'] = student.get('Nationality')
+                dc['email'] = student.get('Emailaddress')
+                dp['firstname'] = student.get('FirstName')
+                dp['middlename'] = student.get('MiddleName')
+                dp['lastname'] = student.get('Lastname')
+                dp['former_surname'] = student.get('FormerSurname')
+                dp['sex'] = student.get('Sex') == 'F'
+                dp['perm_address'] = student.get('PermanentAddress')
+                dp['perm_city'] = student.get('PermanentAddressCity')
+                dp['campus_address'] = student.get('CampusAddress')
+                dp['phone'] = student.get('PhoneNumber')
+                application.getContent().edit(mapping=da)
+                personal.getContent().edit(mapping=dp)
+                clearance.getContent().edit(mapping=dc)
+                #
+                # Study Course
+                #
+                student_obj.invokeFactory('StudentStudyCourse','study_course')
+                studycourse = student_obj.study_course
+                dsc = {}
+                from_certificate = ['title',
+                                   'max_elect',
+                                   'max_pass',
+                                   'n_core',
+                                   'nr_years',
+                                   'probation_credits',
+                                   'promotion_credits',
+                                   'start_level',
+                                  ]
+                for f in from_certificate:
+                    dsc[f] = getattr(certificate_doc,f)
+                dsc['faculty'] = fac_id
+                dsc['department'] = dep_id
+                dsc['study_course'] = certcode
+                css = student.get('CurrentSession') or '2004-2005'
+                cs = int(css.split('-')[0]) - 2000
+                cl = int(student.get('StudentLevel') or '100')/100
+                dsc['entry_session'] = "200%s" % (cs - cl)
+                dsc['clr_ac_pin'] = access_code
+                studycourse.getContent().edit(mapping=dsc)
+                #
+                # Level
+                #
+##                l = getattr(studycourse,level,None)
+##                if 0 and l is None:
+##                    #self.log('Creating Department %(DeptCode)s = %(Description)s' % dep)
+##                    logger.info('Creating Level %(StudentLevel)s for %(fullname)s' % student)
+##                    studycourse.invokeFactory('StudentStudyLevel', level)
+##                    l = getattr(studycourse, level)
+##                    certificate = certs[certcode]
+##                    cert_level = getattr(certificate,level,None)
+##                    if cert_level is None:
+##                        logger.info('Level %(level)s not in %(certcode)s' % vars())
+##                    l.getContent().edit(mapping={'Title': "Level %s" % level})
+            else:
+                em = 'Student with ID %(MatricNo)s %(fullname)s already exists\n' % student
+                logger.info(em)
+                no_import.write(em)
+                no_import.write('"%(MatricNo)s","%(EntryRegNo)s","%(CurrentSession)s","%(StudentLevel)s","%(fullname)s","%(FirstName)s","%(MiddleName)s","%(Lastname)s","%(FormerSurname)s","%(Sex)s","%(Nationality)s","%(State)s","%(LGA)s","%(PermanentAddress)s","%(PermanentAddressCity)s","%(CampusAddress)s","%(PhoneNumber)s","%(Emailaddress)s","%(Mode)s","%(CourseMajor)s","%(Faculty)s","%(Dept)s"\n' % student)
+                continue
+            if tr_count > MAX_TRANS:
+                transaction.commit()
+                em = 'Transaction commited\n' % student
+                logger.info(em)
+                tr_count = 0
+            tr_count += 1
+            pwl_dict.update(dc)
+            pwl_dict.update(da)
+            pwl_dict.update(dp)
+            wftool = self.portal_workflow
+            pwlist.append(pwl_template.substitute(pwl_dict))
+            wftool.doActionFor(student_obj,'clear_and_validate')
+            student_obj.manage_setLocalRoles(sid, ['Owner',])
+            wftool.doActionFor(application,'close')
+            application.manage_setLocalRoles(sid, ['Owner',])
+            wftool.doActionFor(clearance,'close')
+            clearance.manage_setLocalRoles(sid, ['Owner',])
+            wftool.doActionFor(personal,'close')
+            personal.manage_setLocalRoles(sid, ['Owner',])
+            wftool.doActionFor(studycourse,'close_for_edit')
+            studycourse.manage_setLocalRoles(sid, ['Owner',])
+        open("%s/import/pwlist-%s.csv" % (i_home,name),"w+").write('\n'.join(pwlist))
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"loadPumeResultsFromCSV")###(
+    def loadPumeResultsFromCSV(self):
+        """load Fulltime Studentdata from CSV values into pumeresults catalog"""
+        import transaction
+        import random
+##        csv_d = {'jamb_reg_no': "RegNumber", ###(
+##                 'status': "Admission Status",
+##                 'name': "Name",
+##                 'score': "Score",
+##                 'sex': "Sex",
+##                 'faculty': "Faculty",
+##                 'department': "Dept",
+##                 'course': "Course",
+##                 'course_code_org': "Course Code",
+##                 }
+###)
+        csv_d = {'jamb_reg_no': "JAMBRegno",
+                 'name': "Name",
+                 'score': "Score",
+                 'sex': "Sex",
+                 'course': "Course",
+                 'faculty': "Faculty",
+                 'department': "Dept",
+                 'course_code_org': "Course Code",
+                 'status': "Admission Status",
+                 'result_type': None,
+                 }
+        csv_fields = [f[1] for f in csv_d.items() if f[1]]
+        tr_count = 0
+        total = 0
+        #name = 'pup_new'
+        name = 'pup_update'
+        update = name.endswith('update')
+        no_import = []
+        ok_import = []
+        ok_import.append('%s' % ','.join(['"%s"' % fn for fn in csv_d.keys()]))
+        no_import.append('%s' % ','.join(['"%s"' % fn for fn in csv_fields]))
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        ok_import_name = "%s/import/%s_imported_%s.csv" % (i_home,name,current)
+        #open(ok_import_name,"w").write('\n'.join(no_import))
+        no_import_name = "%s/import/%s_not_imported_%s.csv" % (i_home,name,current)
+        #open(no_import_name,"w").write('\n'.join(no_import))
+        logger = logging.getLogger('Import.%s' % name)
+        starttime = DateTime.now()
+        logger.info('Start loading from %s.csv' % name)
+        try:
+            result = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
+        except:
+            logger.error('Error reading %s.csv' % name)
+            return
+        pume = self.portal_pumeresults
+        format = ','.join(['"%%(%s)s"' % fn for fn in csv_fields])
+        import_format = ','.join(['"%%(%s)s"' % fn for fn in csv_d.keys()])
+        eduplicate = '%s,"duplicate"' % format
+        einvalidjamb = '%s,"invalid JambRegNo"' % format
+        added = 'added ,%s' % format
+        #from pdb import set_trace;set_trace()
+        for jamb in result:
+            dict = {}
+            for f,fn in csv_d.items():
+                dict[f] = jamb.get(csv_d[f])
+            dict['result_type'] = 'DE'
+            jnr = jamb.get(csv_d['jamb_reg_no'])
+            if not checkJambNo(jnr):
+                logger.info(einvalidjamb % jamb)
+                dd = {}
+                for f,fn in csv_d.items():
+                    dd[fn] = getattr(data,f)
+                    no_import.append(eduplicate % dd)
+                    no_import.append(eduplicate % jamb)
+                continue
+            res = pume(jamb_reg_no=jnr)
+            if len(res) > 0:
+                if update:
+                    try:
+                        pume.modifyRecord(**dict)
+                    except ValueError:
+                        logger.info(eduplicate % jamb)
+                        continue
+                    except KeyError:
+                        pume.addRecord(**dict)
+                        logger.info(added % jamb)
+                        continue
+                else:
+                    data = res[0]
+                    if data.name != jamb.get(csv_d['name']):
+                        #set_trace()
+                        logger.info(eduplicate % jamb)
+                        #em = 'Student with REG-NO %(jamb_reg_no)s already exists\n' % dict
+                        #logger.info(em)
+                        dd = {}
+                        for f,fn in csv_d.items():
+                            dd[fn] = getattr(data,f)
+                        no_import.append(eduplicate % dd)
+                        no_import.append(eduplicate % jamb)
+                    continue
+            try:
+                pume.addRecord(**dict)
+                ok_import.append(import_format % dict)
+            except ValueError:
+                logger.info(eduplicate % jamb)
+                #em = 'Student with REG-NO %(jamb_reg_no)s already exists\n' % dict
+                #logger.info(em)
+                no_import.append(eduplicate % jamb)
+        logger.info('End loading from %s.csv' % name)
+        if len(no_import) > 1:
+            open(no_import_name,"w+").write('\n'.join(no_import))
+        open(ok_import_name,"w+").write('\n'.join(ok_import))
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+
+    security.declareProtected(ModifyPortalContent,"OLDloadPumeResultsFromCSV")###(
+    def OLDloadPumeResultsFromCSV(self):
+        """load Fulltime Studentdata from CSV values"""
+        import transaction
+        import random
+        wftool = self.portal_workflow
+        students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject()
+        csv_d = {'jamb_reg_no': "JAMBRegno",
+                 'jamb_lastname': "Name",
+                 'pume_options': "Options",
+                 'session': "Session",
+                 'days': "Days",
+                 'response': "Responce",
+                 'wrong': "Wrong",
+                 'pume_eng_score': "EngScore",
+                 'pume_gen_score': "GenScore",
+                 'pume_tot_score': "Score",
+                 'batch': "Batch",
+                 'serial': "SerialNo",
+                 'jamb_score': "JambScore",
+                 'omitted':"Omitted",
+                 'search_key': "SearchKey",
+                 'jamb_sex': "Sex",
+                 'fac1': "Fac1",
+                 'fac2': "Fac2",
+                 'jamb_first_cos': "CourseofStudy",
+                 'stud_status':"StudStatus",
+                 'registered': "Registered",
+                 'jamb_state': "State",
+                 'eng_fail': "EngFail",
+                 'gen_fail': "GenFail",
+                 'un_ans_eng': "UnAnsEng",
+                 'un_ans_eng': "UnAnsGen",
+                 'total_ans': "TotalUnAns",
+                 'dept': "Dept",
+                 'jamb_second_cos': "Course2",
+                 'jamb_third_cos': "course3",
+                 }
+        csv_fields = [f[1] for f in csv_d.items()]
+        tr_count = 0
+        name = 'pume_results'
+        no_import = []
+        s = ','.join(['"%s"' % fn for fn in csv_fields])
+        no_import.append('%s\n' % s)
+        logger = logging.getLogger('Import.%s' % name)
+        logger.info('Start loading from %s.csv' % name)
+        try:
+            result = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
+        except:
+            logger.error('Error reading %s.csv' % name)
+            return
+        for jamb in result:
+            format = ','.join(['"%%(%s)s"' % fn for fn in csv_fields])
+            processing = "processing %s" % format
+            logger.info(processing % jamb)
+            jamb_reg_no = jamb.get(csv_d['jamb_reg_no'])
+            #import pdb;pdb.set_trace()
+            res = self.portal_catalog({'portal_type': "StudentApplication",
+                                     'jamb_reg_no': jamb_reg_no })
+            if res:
+                em = 'Student with REG-NO %s already exists\n' % jamb_reg_no
+                logger.info(em)
+                no_import.append(em)
+                no_import.append(format % jamb)
+                continue
+            cert_id = jamb.get(csv_d['jamb_first_cos']).upper()
+            res = self.portal_catalog({'portal_type': "Certificate",
+                                     'id': cert_id })
+            if len(res) < 1:
+                em = 'No Certificate with ID %s \n' % cert_id
+                logger.info(em)
+                no_import.append(em)
+                no_import.append(format % jamb)
+                continue
+            cert = res[0].getObject()
+            cert_path = res[0].getPath()
+            cert_doc = cert.getContent()
+            jamb_name = jamb.get(csv_d['jamb_lastname'])
+            jamb_name.replace('>','')
+            names = jamb_name.split()
+            letter = names[-1][0].upper()
+            sid = self.generateStudentId(letter)
+            not_created = True
+            while not_created:
+                try:
+                    students_folder.invokeFactory('Student', sid)
+                    not_created = False
+                except BadRequest:
+                    sid = self.generateStudentId(letter)
+            logger.info('%(tr_count)s: Creating Student with ID %(sid)s REG-NO %(jamb_reg_no)s ' % vars())
+            student = getattr(self,sid)
+            student.manage_setLocalRoles(sid, ['Owner',])
+            student.invokeFactory('StudentClearance','clearance')
+            #wftool.doActionFor(student.clearance,'open')
+            dp = {'Title': 'Clearance/Eligibility Record'}
+            student.clearance.manage_setLocalRoles(sid, ['Owner',])
+            student.invokeFactory('StudentPume','pume')
+            dp = {'Title': 'Pume Data'}
+            student.invokeFactory('StudentApplication','application')
+            da = {'Title': 'Application Data'}
+            da["jamb_lastname"] = jamb_name
+            da_fields = ('jamb_reg_no',
+                         'jamb_sex',
+                         'jamb_state',
+                         'jamb_score',
+                         'jamb_first_cos',
+                         'jamb_sex',
+                         'jamb_state',
+                         'jamb_first_cos',
+                         'jamb_second_cos',
+                         )
+            for f in da_fields:
+                da[f] = jamb.get(csv_d[f])
+            app = student.application
+            app.getContent().edit(mapping=da)
+            app.manage_setLocalRoles(sid, ['Owner',])
+            #wftool.doActionFor(app,'close')
+            dp_fields = (
+                         'pume_eng_score',
+                         'pume_gen_score',
+                         'pume_tot_score',
+                         )
+            for f in dp_fields:
+                dp[f] = float(jamb.get(csv_d[f]))
+            pume = student.pume
+            pume.getContent().edit(mapping=dp)
+            #wftool.doActionFor(pume,'close')
+            pume.manage_setLocalRoles(sid, ['Owner',])
+            #
+            # Study Course
+            #
+            student.invokeFactory('StudentStudyCourse','study_course')
+            study_course = student.study_course
+            dsc = {}
+            from_certificate = ['title',
+                               'max_elect',
+                               'max_pass',
+                               'n_core',
+                               'nr_years',
+                               'probation_credits',
+                               'promotion_credits',
+                               'start_level',
+                              ]
+            for f in from_certificate:
+                dsc[f] = getattr(cert_doc,f)
+            cpl = cert_path.split('/')
+            dsc['faculty'] = cpl[-4]
+            dsc['department'] = cpl[-3]
+            dsc['study_course'] = cert_id
+            dsc['entry_session'] = jamb.get(csv_d['session'])
+            study_course.getContent().edit(mapping=dsc)
+            student.getContent().createSubObjects()
+            if dp['pume_tot_score']>49:
+                wftool.doActionFor(student,'pume_pass')
+                wftool.doActionFor(student,'admit')
+            else:
+                wftool.doActionFor(student,'pume_fail')
+                wftool.doActionFor(student,'reject_admission')
+            if len(no_import) > 1:
+                open("%s/import/%s_not_imported.csv" % (i_home,name),"w").write(
+                     '\n'.join(no_import))
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"loadFullTimeStudentsResultsFromCSV") ###(
+    def loadFullTimeStudentsResultsFromCSV(self):
+        """load Fulltime Studentdata from CSV values"""
+        #return
+        level_wf_actions = {}
+        level_wf_actions["SUCCESSFUL STUDENT"] = "pass_A"
+        level_wf_actions["STUDENT WITH CARRYOVER COURSES"] = "pass_B"
+        level_wf_actions["STUDENT FOR PROBATION"] = "probate_C"
+        level_wf_actions["STUDENT ON PROBATION/TRANSFER"] = "reject_D"
+        import transaction
+        wftool = self.portal_workflow
+        tr_count = 0
+        name = 'short_full_time_results_2004_2005'
+        no_import = False
+        if not no_import:
+            no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
+            no_import.write('"Matnumber","CosCode","Ansbook","CosStuatus","Session","Mat_Cos","Score","CarryLevel","Grade","Weight","Semster","Verdict","Level","id","GPA"\n')
+        logger = logging.getLogger('import.%s' % name)
+        logger.info('Start loading from %s.csv' % name)
+        students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject()
+        try:
+            results = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
+        except:
+            logger.error('Error reading %s.csv' % name)
+            return
+        l = self.portal_catalog({'meta_type': "Course"})
+        courses = {}
+        for c in l:
+            courses[c.id] = c.getObject()
+        level_changed = False
+        student_changed = False
+        sid = ''
+        #import pdb;pdb.set_trace()
+        for result in results:
+            temp_sid = result.get('Matnumber')
+            if temp_sid != sid:
+                student_changed = True
+                res = self.portal_catalog({'meta_type': "StudentClearance",
+                                         'SearchableText': temp_sid })
+                if not res:
+                    em = 'Student with ID %(Matnumber)s not found\n' % result
+                    logger.info(em)
+                    no_import.write(em)
+                    no_import.write('"%(Matnumber)s","%(CosCode)s","%(Ansbook)s","%(CosStuatus)s","%(Session)s","%(Mat_Cos)s","%(Score)s","%(CarryLevel)s","%(Grade)s","%(Weight)s","%(Semster)s","%(Verdict)s","%(Level)s","%(id)s","%(GPA)s"\n' % result)
+                    continue
+                elif len(res) > 1:
+                    em = 'More than one Student with ID %(Matnumber)s found\n' % result
+                    logger.info(em)
+                    no_import.write(em)
+                    no_import.write('"%(Matnumber)s","%(CosCode)s","%(Ansbook)s","%(CosStuatus)s","%(Session)s","%(Mat_Cos)s","%(Score)s","%(CarryLevel)s","%(Grade)s","%(Weight)s","%(Semster)s","%(Verdict)s","%(Level)s","%(id)s","%(GPA)s"\n' % result)
+                    continue
+                sid = temp_sid
+                sf = res[0].getObject().aq_parent
+                sc = getattr(sf,'study_course')
+                level = ''
+            else:
+                student_changed = False
+            course = result.get('CosCode')
+            if course not in courses.keys():
+                em = 'Course with ID %(CosCode)s not found\n' % result
+                logger.info(em)
+                no_import.write(em)
+                no_import.write('"%(Matnumber)s","%(CosCode)s","%(Ansbook)s","%(CosStuatus)s","%(Session)s","%(Mat_Cos)s","%(Score)s","%(CarryLevel)s","%(Grade)s","%(Weight)s","%(Semster)s","%(Verdict)s","%(Level)s","%(id)s","%(GPA)s"\n' % result)
+                continue
+            course_doc = courses[course].getContent()
+            temp_level = result.get('Level')
+            student_id = sf.getId()
+            result['StudentId'] = student_id
+            if temp_level != level:
+                try:
+                    int(temp_level)
+                except:
+                    em = 'Result with ID %(Matnumber)s Course %(CosCode)s Level is empty\n' % result
+                    logger.info(em)
+                    no_import.write(em)
+                    no_import.write('"%(Matnumber)s","%(CosCode)s","%(Ansbook)s","%(CosStuatus)s","%(Session)s","%(Mat_Cos)s","%(Score)s","%(CarryLevel)s","%(Grade)s","%(Weight)s","%(Semster)s","%(Verdict)s","%(Level)s","%(id)s","%(GPA)s"\n' % result)
+                    continue
+                level_changed = True
+                if 'dlev' in vars().keys():
+                    wftool.doActionFor(l,level_wf_actions[dlev['verdict']])
+                level = temp_level
+                l = getattr(sc,level,None)
+                if l is None:
+                    logger.info('Creating Level %(Level)s for %(StudentId)s %(Matnumber)s' % result)
+                    sc.invokeFactory('StudentStudyLevel', level)
+                    l = getattr(sc, level)
+                    l.manage_setLocalRoles(student_id, ['Owner',])
+            else:
+                level_changed = False
+            cr = getattr(l,course,None)
+            if cr is None:
+                logger.info('Creating Course %(CosCode)s for %(StudentId)s %(Matnumber)s in Level %(Level)s' % result)
+                l.invokeFactory('StudentCourseResult',course)
+            cr = getattr(l,course)
+            dcr = {}
+            from_course = ['title',
+                           'credits',
+                           'passmark',
+                           ]
+            for f in from_course:
+                dcr[f] = getattr(course_doc,f)
+            dlev = {}
+            dcr['ansbook'] = result.get('Ansbook')
+            dcr['semester'] = getInt(result.get('Semster'))
+            dcr['status'] = result.get('CosStuatus')
+            dcr['score'] = getInt(result.get('Score'))
+            dlev['session'] = result.get('Session')
+            dcr['carry_level'] = result.get('CarryLevel')
+            dcr['grade'] = result.get('Grade')
+            dcr['weight'] = result.get('Weight')
+            dlev['verdict'] = result.get('Verdict')
+            dcr['import_id'] = result.get('id')
+            gpa = result.get('GPA').replace(',','.')
+            dlev['imported_gpa'] = getFloat(gpa)
+            cr.getContent().edit(mapping = dcr)
+            cr.manage_setLocalRoles(student_id, ['Owner',])
+            l.getContent().edit(mapping = dlev)
+            if tr_count > MAX_TRANS:
+                transaction.commit()
+                tr_count = 0
+            tr_count += 1
+            wftool.doActionFor(cr,'close')
+        wftool.doActionFor(l,level_wf_actions[dlev['verdict']])
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+
+###)
+
+    security.declareProtected(ModifyPortalContent,"loadJAMBFromCSV")###(
+    def loadJAMBFromCSV(self):
+        """load JAMB data from CSV values"""
+        #return
+        students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject()
+        import transaction
+        tr_count = 0
+        name = 'SampleJAMBDataII'
+        wftool = self.portal_workflow
+        no_import = False
+        if not no_import:
+            no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
+            no_import.write('REG-NO,NAME,SEX,STATE,LGA,ENG-SCORE,SUBJ1,SUBJ1-SCORE,SUBJ2,SUBJ2-SCORE,SUBJ3,SUBJ3-SCORE,AGGREGATE,UNIV1,FACULTY1,COURSE1,UNIV2,FACULTY2,COURSE2')
+        logger = logging.getLogger('Import.%s' % name)
+        logger.info('Start loading from %s.csv' % name)
+        try:
+            result = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
+        except:
+            logger.error('Error reading %s.csv' % name)
+            return
+        for jamb in result:
+            logger.info('processing %(REG-NO)s,%(NAME)s,%(SEX)s,%(STATE)s,%(LGA)s,%(ENG-SCORE)s,%(SUBJ1)s,%(SUBJ1-SCORE)s,%(SUBJ2)s,%(SUBJ2-SCORE)s,%(SUBJ3)s,%(SUBJ3-SCORE)s,%(AGGREGATE)s,%(UNIV1)s,%(FACULTY1)s,%(COURSE1)s,%(UNIV2)s,%(FACULTY2)s,%(COURSE2)s\n' % jamb)
+            jamb_reg_no = jamb.get('REG-NO')
+            res = self.portal_catalog({'meta_type': "StudentApplication",
+                                     'jamb_reg_no': jamb_reg_no })
+            if res:
+                em = 'Student with REG-NO %(REG-NO)s already exists\n' % jamb
+                logger.info(em)
+                no_import.write(em)
+                no_import.write('%(REG-NO)s,%(NAME)s,%(SEX)s,%(STATE)s,%(LGA)s,%(ENG-SCORE)s,%(SUBJ1)s,%(SUBJ1-SCORE)s,%(SUBJ2)s,%(SUBJ2-SCORE)s,%(SUBJ3)s,%(SUBJ3-SCORE)s,%(AGGREGATE)s,%(UNIV1)s,%(FACULTY1)s,%(COURSE1)s,%(UNIV2)s,%(FACULTY2)s,%(COURSE2)s\n' % jamb)
+                continue
+            jamb_name = jamb.get("NAME")
+            jamb_name.replace('>','')
+            names = jamb_name.split()
+            letter = names[-1][0].upper()
+            sid = self.generateStudentId(letter)
+            not_created = True
+            while not_created:
+                try:
+                    students_folder.invokeFactory('Student', sid)
+                    not_created = False
+                except BadRequest:
+                    sid = self.generateStudentId(letter)
+            logger.info('%(tr_count)s: Creating Student with ID %(sid)s REG-NO %(jamb_reg_no)s ' % vars())
+            student = getattr(self,sid)
+            student.manage_setLocalRoles(sid, ['Owner',])
+            student.invokeFactory('StudentApplication','application')
+            da = {'Title': 'Application Data'}
+            da["jamb_reg_no"] = jamb.get("REG-NO")
+            da["jamb_lastname"] = jamb_name
+            da["jamb_sex"] = jamb.get("SEX")
+            da["jamb_state"] = jamb.get("STATE")
+            da["jamb_lga"] = jamb.get("LGA")
+            da["jamb_score"] = jamb.get("AGGREGATE")
+            da["jamb_first_cos"] = jamb.get("COURSE1")
+            da["jamb_second_cos"] = jamb.get("COURSE2")
+            da["jamb_first_uni"] = jamb.get("UNIV1")
+            da["jamb_second_uni"] = jamb.get("UNIV2")
+            app = student.application
+            app_doc = app.getContent()
+            app_doc.edit(mapping=da)
+            #wftool.doActionFor(app,'open',dest_container=app)
+            app.manage_setLocalRoles(sid, ['Owner',])
+            student.getContent().createSubObjects()
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
Index: /WAeUP_SRP/trunk/WAeUPTables.py
===================================================================
--- /WAeUP_SRP/trunk/WAeUPTables.py	(revision 1570)
+++ /WAeUP_SRP/trunk/WAeUPTables.py	(revision 1571)
@@ -142,6 +142,6 @@
         rec = records[0]
         self.modifyRecord(bed=rec.bed,student=student_id)
-        s_logger = logging.getLogger('Accommodation.SearchAndReserveBed')
-        s_logger.info("%s reserved bed %s" % (student_id,rec.bed))
+        s_logger = logging.getLogger('WAeUPTables.AccommodationTable.searchAndReserveBed')
+        s_logger.info('%s reserved bed %s' % (student_id,rec.bed))
         return 1,rec.bed
 
Index: /WAeUP_SRP/trunk/WAeUPTool.py
===================================================================
--- /WAeUP_SRP/trunk/WAeUPTool.py	(revision 1570)
+++ /WAeUP_SRP/trunk/WAeUPTool.py	(revision 1571)
@@ -109,5 +109,5 @@
         student_entry = getattr(self.portal_directories.students,student_id,None)
         if student_entry is None:
-            return 
+            return
         setattr(student_entry,'password',password)
     ###)
@@ -288,5 +288,5 @@
         "create Datastructure for a returning Student"
         #import pdb;pdb.set_trace()
-        logger = logging.getLogger('Student.CreateData')
+        logger = logging.getLogger('WAeUPTool.makeStudentData')
         students_folder = self.portal_url.getPortalObject().campus.students
         res = self.students_catalog(id=student_id)
@@ -296,5 +296,5 @@
         if res:
             student = res[0]
-        logger.info('"%s", "creating Datastructure"' % student_id)
+        logger.info('%s creating Datastructure' % student_id)
         s_results = self.results_import(matric_no = st.matric_no)
         lnr = self.getLevelFromResultsCosCode(s_results)
@@ -404,5 +404,5 @@
         "create the StudyLevel for a returning Student"
         #import pdb;pdb.set_trace()
-        logger = logging.getLogger('Student.CreateLevel')
+        logger = logging.getLogger('WAeUPTool.makeStudentLevel')
         students_folder = self.portal_url.getPortalObject().campus.students
         res = self.students_catalog(id=student_id)
@@ -415,5 +415,5 @@
         if res:
             results = res
-        logger.info('"%s", "creating Level", "%s"' % (student_id,level))
+        logger.info('%s creating Level %s' % (student_id,level))
         #
         # Level
Index: /WAeUP_SRP/trunk/Widgets.py
===================================================================
--- /WAeUP_SRP/trunk/Widgets.py	(revision 1570)
+++ /WAeUP_SRP/trunk/Widgets.py	(revision 1571)
@@ -343,5 +343,5 @@
     def validate(self, datastructure, **kw):
         """Validate datastructure and update datamodel."""
-        logger = logging.getLogger('Secret.Validate')
+        logger = logging.getLogger('Widgets.SecretWidget.validate')
         valid = CPSStringWidget.validate(self, datastructure, **kw)
         #import pdb;pdb.set_trace()
@@ -370,8 +370,8 @@
             name = " ".join(cvs)
             if not found:
-                logger.info('"%(matric_no)s","mismatch", "%(value)s", "not in","%(name)s"' % vars())
+                logger.info('%(matric_no)s mismatch %(value)s not in %(name)s' % vars())
                 err = 'No Name does match.'
             else:
-                logger.info('"%(matric_no)s","found", "%(value)s", "in","%(name)s"' % vars())
+                logger.info('%(matric_no)s found %(value)s in %(name)s' % vars())
         if err:
             datastructure.setError(widget_id, err)
@@ -392,5 +392,5 @@
         """Validate datastructure and update datamodel."""
         valid = CPSStringWidget.validate(self, datastructure, **kw)
-        logger = logging.getLogger('MatricNo.Validate')
+        logger = logging.getLogger('Widgets.MatricNoWidget.validate')
         #import pdb;pdb.set_trace()
         returning = self.returning_import
@@ -400,6 +400,6 @@
         value = datastructure[widget_id]
         if not valid or not value:
-            err = 'Invalid MatricNo String %s.' % value
-            logger.info('"%s","invalid MatricNo String"' % value)
+            err = 'Invalid matric_no string %s.' % value
+            logger.info('%s invalid matric_no string' % value)
         else:
             value = value.upper()
@@ -408,11 +408,11 @@
                 res = returning(matric_no = value)
                 if len(res) < 1:
-                    logger.info('"%s","MatricNo not found."' % value)
-                    err = 'No Student with MatricNo %s.' % (value)
+                    logger.info('%s matric_no not found' % value)
+                    err = 'No Student with matric_no %s.' % (value)
                     continue
                 datastructure['student'] = res[0]
                 res = results(matric_no = value)
                 if len(res) < 1:
-                    err = 'No Results with MatricNo %s.' % (value)
+                    err = 'No Results with matric_no %s.' % (value)
                     continue
                 datastructure['results'] = res
@@ -436,5 +436,5 @@
         """Validate datastructure and update datamodel."""
         valid = CPSStringWidget.validate(self, datastructure, **kw)
-        logger = logging.getLogger('StudentId.Validate')
+        logger = logging.getLogger('Widgets.StudentIdWidget.validate')
         #import pdb;pdb.set_trace()
         s_cat = self.students_catalog
@@ -443,6 +443,6 @@
         value = datastructure[widget_id]
         if not valid or not value:
-            err = 'Invalid StudentId String %s.' % value
-            logger.info('"%s","invalid StudentId String"' % value)
+            err = 'Invalid id string %s.' % value
+            logger.info('%s invalid id string' % value)
             datastructure['student'] = None
         else:
@@ -450,5 +450,5 @@
             res = s_cat(id = value)
             if not res:
-                logger.info('"%s","StudentId not found."' % value)
+                logger.info('%s id not found' % value)
                 err = 'No Student with StudentId %s.' % (value)
                 datastructure['student'] = None
@@ -699,5 +699,5 @@
     def validate(self, datastructure, **kw): ###(
         """Validate datastructure and update datamodel."""
-        s_logger = logging.getLogger('Pin.Validate')
+        s_logger = logging.getLogger('Widgets.ScratchcardPinWidget.validate')
         widget_id = self.getWidgetId()
         v = datastructure[widget_id]
@@ -718,5 +718,5 @@
             do = 0
             err ='You are not a Student. PIN neither checked nor used.'
-            s_logger.info('"%s","tried to use Scratchcard", "%s"' % (s_id,pin_str))
+            s_logger.info('%s tried to use scratch card %s' % (s_id,pin_str))
         elif len(b) > 1 and b.find('-') > -1:
             do = 0
@@ -729,6 +729,6 @@
         elif len(n) != 10:
             do = 0
-            err = 'Invalid PIN-Number length %d' % len(n)
-            s_logger.info('"%s","Invalid PIN-Number length", "%d"' % (s_id,len(n)))
+            err = 'invalid PIN length %d' % len(n)
+            s_logger.info('%s invalid PIN length %d' % (s_id,len(n)))
         elif self.reference == "":
             ref = s_id
@@ -737,23 +737,23 @@
             if datastructure.errors:
                 do = 0
-                datastructure.setError(widget_id, 'Errors in other data, PIN neither checked nor used.')
-                s_logger.info('"%s", "%s","entered wrong data together with pin", "%s"' % (s_id,ref,pin_str))
+                datastructure.setError(widget_id, 'errors in other data, PIN neither checked nor used')
+                s_logger.info('%s/%s entered wrong data together with PIN %s' % (s_id,ref,pin_str))
         while do:
             ok = pins.searchAndSetRecord(pin,ref,prefix)
             if ok < -2 or ok > 2:
                 err = 'Unknown error, please report!'
-                s_logger.info('"%s","%s", "caused unknown error with pin", "%s"' % (s_id,ref,pin_str))
+                s_logger.info('%s/%s caused unknown error with PIN %s' % (s_id,ref,pin_str))
                 break
             elif ok == -2:
                 err = 'Service already activated but with a different PIN.'
-                s_logger.info('"%s","%s", "repeatedly activated service but with different pin", "%s"' % (s_id,ref,pin_str))
+                s_logger.info('%s/%s repeatedly activated service but with different PIN %s' % (s_id,ref,pin_str))
                 break
             elif ok == -1:
                 err = 'Invalid PIN'
-                s_logger.info('"%s","%s", "entered invalid pin", "%s"' % (s_id,ref,pin_str))
+                s_logger.info('%s/%s entered invalid PIN %s' % (s_id,ref,pin_str))
                 break
             if ok == 0:
-                err = 'PIN already used.'
-                s_logger.info('"%s","%s", "entered used pin", "%s"' % (s_id,ref,pin_str))
+                err = 'PIN already used'
+                s_logger.info('%s/%s entered used PIN %s' % (s_id,ref,pin_str))
                 break
             if ok >= 1:
@@ -762,17 +762,17 @@
                     if self.reference == "jamb_reg_no":
                         err = "You are already logged in."
-                        s_logger.info('"%s","%s", "checked admission though logged in", "%s"' % (s_id,ref,pin_str))
+                        s_logger.info('%s/%s checked admission though logged in %s' % (s_id,ref,pin_str))
                         break
                     if ok == 1:
-                        s_logger.info('"%s","%s", "successfully used pin", "%s"' % (s_id,ref,pin_str))
+                        s_logger.info('%s/%s successfully used PIN %s' % (s_id,ref,pin_str))
                     else:
-                        s_logger.info('"%s","%s", "repeatedly used pin", "%s"' % (s_id,ref,pin_str))
+                        s_logger.info('%s/%s repeatedly used PIN %s' % (s_id,ref,pin_str))
                     break
                 else:
                     student = getStudentByRegNo(self,ref)
-                    s_logger.info('"%s","%s","successfully used pin","%s"' % (s_id,ref,pin_str))
+                    s_logger.info('%s/%s successfully used PIN %s' % (s_id,ref,pin_str))
                 if student is None:
                     err = "Student not found."
-                    s_logger.info('"%s","not found in admission list"' % (ref))
+                    s_logger.info('%s not found in admission list' % (ref))
                     break
                 s_id = student.getId()
@@ -781,18 +781,18 @@
                         if hasattr(self.portal_directories.students,s_id):
                             err = "Please login with your Student Id %s and 10-digit PIN." % s_id
-                            s_logger.info('"%s","%s", "repeatedly checked admission with pin", "%s"' % (s_id,ref,pin_str))
+                            s_logger.info('%s/%s repeatedly checked admission with PIN %s' % (s_id,ref,pin_str))
                             break
                         else:
-                            s_logger.info('"%s","%s","(non-member) repeatedly checked admission with pin", "%s"' % (s_id,ref,pin_str))
+                            s_logger.info('%s/%s (non-member) repeatedly checked admission with PIN %s' % (s_id,ref,pin_str))
                     else:
                         err = "Unknown error" % s_id
-                        s_logger.info('"%s","%s", "repeatedly activated service with pin", "%s"' % (s_id,ref,pin_str))
+                        s_logger.info('%s/%s repeatedly activated service with PIN %s' % (s_id,ref,pin_str))
                         break
                 try:
                     student.getContent().makeStudentMember(s_id,password=pin[4:])
-                    s_logger.info('"%s","%s", "has been created using pin", "%s"' % (s_id,ref,pin_str))
+                    s_logger.info('%s/%s has been created using PIN %s' % (s_id,ref,pin_str))
                 except:
                     err = "Please login with your Student Id %s and 10-digit PIN." % s_id
-                    s_logger.info('"%s","%s", "could not be made a member with pin", "%s"' % (s_id,ref,pin_str))
+                    s_logger.info('%s/%s could not be made a member with PIN %s' % (s_id,ref,pin_str))
                     break
             break
Index: /WAeUP_SRP/trunk/profiles/default/actionicons.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/actionicons.xml	(revision 1570)
+++ /WAeUP_SRP/trunk/profiles/default/actionicons.xml	(revision 1571)
@@ -57,5 +57,9 @@
               action_id="allocate_reserved_bed"
               title="Allocate Reserved Bed" priority="100"
-              icon_expr="bed_list_refresh.gif"/>              
+              icon_expr="bed_list_refresh.gif"/>
+ <action-icon category="object"
+              action_id="release_bed"
+              title="Relase Bed" priority="110"
+              icon_expr="door_out.png"/>   
  <action-icon category="folder" action_id="portlets"
               title="Manage portlets" priority="270"
Index: /WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation.xml	(revision 1570)
+++ /WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation.xml	(revision 1571)
@@ -110,5 +110,5 @@
   </property>
   <property name="hidden_readonly_layout_modes"/>
-  <property name="render_method">formatBed</property>
+  <property name="render_method">getFormattedBed</property>
  </widget>
  <widget name="session" meta_type="String Widget">
Index: /WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation_fe.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation_fe.xml	(revision 1570)
+++ /WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation_fe.xml	(revision 1571)
@@ -79,5 +79,5 @@
   </property>
   <property name="hidden_readonly_layout_modes"/>
-  <property name="render_method">formatBed</property>
+  <property name="render_method">getFormattedBed</property>
  </widget>
  <widget name="session" meta_type="String Widget">
Index: /WAeUP_SRP/trunk/profiles/default/vocabularies/searchable_student_states.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/vocabularies/searchable_student_states.xml	(revision 1570)
+++ /WAeUP_SRP/trunk/profiles/default/vocabularies/searchable_student_states.xml	(revision 1571)
@@ -21,4 +21,3 @@
  <item key="courses_registered" msgid="">courses registered</item>
  <item key="courses_validated" msgid="">courses validated</item>
- <item key="content_addable" msgid="">content addable</item>
 </object>
Index: /WAeUP_SRP/trunk/skins/waeup_default/waeup_edit.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_default/waeup_edit.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_default/waeup_edit.py	(revision 1571)
@@ -17,4 +17,10 @@
 from Products.CPSDocument.utils import getFormUidUrlArg
 
+import logging
+logger = logging.getLogger('Skins.waeup_edit')
+
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+
 # Check flexible controls
 #context.editLayouts(REQUEST=REQUEST)
@@ -25,5 +31,5 @@
 if context.portal_type == "StudentStudyCourse":
     if len(context.objectIds()) > 0:
-        psm = 'Edit of StudyCourse is only possible if there are no levels'
+        psm = 'Edit of StudentStudyCourse is only possible if there are no levels inside!'
         args = getFormUidUrlArg(REQUEST)
         args['portal_status_message'] = psm
@@ -58,4 +64,6 @@
                                                   department = c_path[-3],
                                                   )
+            logger.info('%s edited %s (%s) of %s' % (member,context.id,course,student_id))
+
     elif context.portal_type == "StudentApplication":
         entry_mode = ds.get('entry_mode')
@@ -64,4 +72,5 @@
                                               entry_mode = entry_mode,
                                              )
+        logger.info('%s edited %s of %s' % (member,context.id,student_id))
     elif context.portal_type == "StudentClearance":
         matric_no = ds.get('matric_no')
@@ -70,4 +79,5 @@
                                               matric_no = matric_no,
                                              )
+        logger.info('%s edited %s of %s' % (member,context.id,student_id))                                             
     elif context.portal_type in ("StudentPersonal",):
         name = "%(firstname)s %(middlename)s %(lastname)s" % ds
@@ -81,5 +91,5 @@
         #if ds.get('sex'):
         #    jamb_sex = 'F'
-        # originally imported data must be kept; app_doc should not be changed here  
+        # originally imported data must be kept; app_doc should not be changed here
         #app_doc.edit(mapping={'jamb_lastname': name,
         #                      'jamb_sex': jamb_sex
@@ -91,4 +101,5 @@
                                               sex = ds.get('sex'),
                                              )
+        logger.info('%s edited %s of %s' % (member,context.id,student_id))
     elif context.portal_type == "Course":
         dd = {}
Index: /WAeUP_SRP/trunk/skins/waeup_epayment/pay_online.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_epayment/pay_online.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_epayment/pay_online.py	(revision 1571)
@@ -91,5 +91,5 @@
 info['callback_url'] = "%s/payments/%s/epayment_cb" % (student.absolute_url(),p_id)
 
-logger.info('%(student_id)s initiated online school fee payment, %(type_description)s %(amount)s N' % info)
+logger.info('%(student_id)s initiated online school fee payment' % info)
 payment_fields = (('x_SiteID','site_id'),
                   ('x_Redirect_url','callback_url'),
Index: /WAeUP_SRP/trunk/skins/waeup_epayment/simulate_callback.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_epayment/simulate_callback.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_epayment/simulate_callback.py	(revision 1571)
@@ -10,4 +10,7 @@
 validate = REQUEST.has_key("cpsdocument_edit_button")
 
+import logging
+logger = logging.getLogger('Skins.simulate_callback')
+
 args = {}
 args['x_RespDesc'] = 'Simulated Callback'
@@ -17,4 +20,8 @@
 args['x_ApprAmt'] = REQUEST.get('x_amt')
 
+
+student_id = context.getStudentId()
+logger.info('%s received simulated callback' % student_id)
+
 from urllib import urlencode
 #url = "%s/epayment_cb/?%s" % (context.absolute_url(),urlencode(args))
Index: /WAeUP_SRP/trunk/skins/waeup_student/add_course_result.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/add_course_result.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/add_course_result.py	(revision 1571)
@@ -12,4 +12,8 @@
 add a StudentCourseResult object
 """
+
+import logging
+logger = logging.getLogger('Skins.add_course_result')
+
 from urllib import urlencode
 try:
@@ -23,4 +27,9 @@
 aq_portal = context.portal_catalog.evalAdvancedQuery
 course_id = request.get('course_id')
+
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+
+
 d = context.getCourseInfo(course_id)
 args = {}
@@ -28,11 +37,14 @@
 while True:
     if d['title'] == 'unknown':
-        err = "No such course"
+        err = "No such course!"
+        logger.info('%s tried to add StudentCourseResult object %s for non-existing course' % (member,course_id))
         break
     if context.hasObject(course_id):
-        err = "Course already exists"
+        err = "Course already exists!"
+        logger.info('%s tried to add StudentCourseResult object %s which is already in course list' % (member,course_id))
         break
     if context.hasObject("%s_co" % course_id):
-        err = "Course already exists as carryover course"
+        err = "Course already exists as carryover course!"
+        logger.info('%s tried to add StudentCourseResult object %s which already exists as carryover course' % (member,course_id))
         break
     break
@@ -40,7 +52,10 @@
 if err:
     args['course_id'] = course_id
-    args['error'] = err
+    #args['error'] = err
+    args['portal_status_message'] = err
     url = "%s?%s" % (context.absolute_url(),urlencode(args))
     return request.RESPONSE.redirect(url)
+
+   
 cr_id = context.invokeFactory('StudentCourseResult',course_id)
 #set_trace()
@@ -50,4 +65,7 @@
 context.portal_workflow.doActionFor(cr,'close')
 args['course_id'] = course_id
+
+logger.info('%s added StudentCourseResult object %s' % (member,course_id))   
+
 from urllib import urlencode
 url = "%s?%s" % (context.absolute_url(),urlencode(args))
Index: /WAeUP_SRP/trunk/skins/waeup_student/add_student.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/add_student.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/add_student.py	(revision 1571)
@@ -13,5 +13,5 @@
 acco_cat = context.portal_accommodation
 import logging
-logger = logging.getLogger('Student.Add')
+logger = logging.getLogger('Skins.add_student')
 
 validate = REQUEST.has_key("cpsdocument_edit_button") and\
@@ -67,5 +67,5 @@
 student_rec = context.getFormattedStudentEntry(context.students_catalog(id = sid)[0])
 psm = "Student record with Id %s and Password %s has been created." % (sid,password)
-logger.info('"%s","created student","%s"' % (member,sid))
+logger.info('%s created student %s' % (member,sid))
 return context.add_student_form(rendered = rendered,
                                  #psm = "%s, %s" % (psm,ds),
Index: /WAeUP_SRP/trunk/skins/waeup_student/application_edit.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/application_edit.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/application_edit.py	(revision 1571)
@@ -16,5 +16,5 @@
 current = DateTime.DateTime()
 import logging
-logger = logging.getLogger('Student.Application.Edit')
+logger = logging.getLogger('Skins.application_edit')
 
 # Until ajax posts directly to its own script...
@@ -30,5 +30,5 @@
 
 if info is None:
-    logger.info('"anonymous access","%s"' % REQUEST.get('URL0'))
+    logger.info('Anonymous user tried to access %s"' % REQUEST.get('URL0'))
     return REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
 
@@ -56,5 +56,5 @@
     elif cpsdocument_edit_and_view_button:
         if 1: ## app_doc.passport is not None:
-            logger.info('"%s", "proceeded to start clearance"' % (info['id']))
+            logger.info('%s proceeded to start clearance' % (info['id']))
             action = "/start_clearance"
             base_url = student.absolute_url()
Index: /WAeUP_SRP/trunk/skins/waeup_student/change_password.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/change_password.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/change_password.py	(revision 1571)
@@ -14,5 +14,5 @@
 current = DateTime.DateTime()
 #pr = context.portal_registration
-logger = logging.getLogger('Student.change_password')
+logger = logging.getLogger('Skins.change_password')
 validate = request.has_key("change_password")
 students_dir = context.portal_directories.students
@@ -24,5 +24,5 @@
 requested_id = context.getStudentId()
 if requested_id and not context.isStaff() and member_id != requested_id:
-    logger.info('"%s", "tried to access", "%s"' % (member_id,requested_id))
+    logger.info('%s tried to access %s' % (member_id,requested_id))
     return None
 elif context.isStaff():
@@ -74,4 +74,5 @@
 args['__ac_name'] = student_id
 args['__ac_password'] = password
+logger.info('%s changed password from %s to %s' % (member_id,old_password,password))
 from urllib import urlencode
 url = "%s/logged_in?%s" % (context.absolute_url(),urlencode(args))
Index: /WAeUP_SRP/trunk/skins/waeup_student/clearance_edit.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/clearance_edit.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/clearance_edit.py	(revision 1571)
@@ -16,5 +16,5 @@
 current = DateTime.DateTime()
 import logging
-logger = logging.getLogger('Student.Clearance.Edit')
+logger = logging.getLogger('Skins.clearance_edit')
 request = REQUEST
 
@@ -70,5 +70,5 @@
     if cpsdocument_edit_button or result_edit_button:
         psm = "Content changed!"
-        logger.info('"%s","edited clearance of","%s"' % (member_id,student_id ))
+        logger.info('%s edited clearance of %s' % (member_id,student_id ))
         if clear_doc.clr_ac_pin == "":
             res = context.portal_pins(student=member_id)
@@ -92,8 +92,8 @@
                     missing = True
             if missing:
-                logger.info('"%s","requested clearance with documents missing"' % (student_id))
+                logger.info('%s requested clearance with documents missing' % (student_id))
                 psm = "You have not uploaded all necessary documents to request clearance!"
             else:
-                logger.info('"%s","requested clearance"' % (student_id))
+                logger.info('%s requested clearance' % (student_id))
                 info['clear_doc'].edit(mapping = {'request_date': current,})
                 wftool.doActionFor(info['clear'],'close')
@@ -103,10 +103,10 @@
                     action = "/clearance_view"
         elif acknowledge and info['review_state'] != "clearance_pin_entered":
-            logger.info('"%s","repeatedly requested clearance"' % (student_id))
+            logger.info('%s repeatedly requested clearance' % (student_id))
             psm = "You have already requested clearance!"
         else:
             psm = "You must tick the acknowledgement check box before submission!"
     elif clear_and_validate_button and info['review_state'] == "clearance_requested":
-        logger.info('"%s","cleared","%s"' % (member_id,student_id ))
+        logger.info('%s cleared %s' % (member_id,student_id ))
         #from Products.zdb import set_trace
         #set_trace()
@@ -117,5 +117,5 @@
         psm = "This student is already cleared!"
     elif reject_clearance_button:
-        logger.info('"%s","rejected clearance for","%s"' % (member_id,student_id ))
+        logger.info('%s rejected clearance for %s' % (member_id,student_id ))
         wftool.doActionFor(info['clear'],'open')
         wftool.doActionFor(info['student'],'reject_clearance')
Index: eUP_SRP/trunk/skins/waeup_student/course_result_delete.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/course_result_delete.py	(revision 1570)
+++ 	(revision )
@@ -1,33 +1,0 @@
-## Script (Python) "folder_delete"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=ids=[], REQUEST=None
-##title=
-##
-# $Id$
-"""
-FIXME: add docstring.
-"""
-
-from Products.CMFCore.utils import getToolByName
-here = context
-
-ret_url = here.absolute_url()
-
-message = ''
-if ids:
-    real_ids = []
-    for id in ids:
-        if context.hasObject(id):
-            real_ids.append(id)
-    if real_ids:
-        context.manage_delObjects(real_ids)
-        message = 'portal_status_message=psm_item(s)_deleted'
-else:
-    message = 'portal_status_message=psm_select_at_least_one_document'
-
-if REQUEST is not None:
-    return REQUEST.RESPONSE.redirect(ret_url + '?' + message)
Index: /WAeUP_SRP/trunk/skins/waeup_student/create_level.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/create_level.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/create_level.py	(revision 1571)
@@ -21,5 +21,5 @@
 response = request.RESPONSE
 redirect = response.redirect
-logger = logging.getLogger('Student.create_level')
+logger = logging.getLogger('Skins.create_level')
 mtool = context.portal_membership
 member = mtool.getAuthenticatedMember()
@@ -46,5 +46,5 @@
     level = getattr(context,current_level)
     return response.redirect("%s" % level.absolute_url())
-    
+
 context.invokeFactory('StudentStudyLevel',"%s" % current_level)
 level = getattr(context,"%s" % current_level)
@@ -63,5 +63,5 @@
         c_res = aq_courses(query)
         if not c_res:
-            logger.info('"%s","%s course not found in courses catalog"' % (student.id,co.CosCode))
+            logger.info('%s", course %s not found in courses_catalog' % (student.id,co.CosCode))
             continue
         course_cat_entry = c_res[0]
@@ -73,9 +73,9 @@
                 score = int(co.Score)
             except:
-                logger.info('"%s"," course %s invalid score %s"' % (student.id,
+                logger.info('%s, course %s has invalid score %s"' % (student.id,
                                                                     co.CosCode,
                                                                     co.Score))
                 continue
-            if int(c_res[0].passmark) <= score:  
+            if int(c_res[0].passmark) <= score:
                 continue
             carry_over = True
Index: /WAeUP_SRP/trunk/skins/waeup_student/delete_course_result.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/delete_course_result.py	(revision 1571)
+++ /WAeUP_SRP/trunk/skins/waeup_student/delete_course_result.py	(revision 1571)
@@ -0,0 +1,39 @@
+## Script (Python) "delete_course_result"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=ids=[], REQUEST=None
+##title=
+##
+# $Id: delete_course_result.py 1557 2007-03-15 16:00:27Z joachim $
+"""
+FIXME: add docstring.
+"""
+
+from Products.CMFCore.utils import getToolByName
+here = context
+
+import logging
+logger = logging.getLogger('Skins.delete_course_result')
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+
+ret_url = here.absolute_url()
+
+message = ''
+if ids:
+    real_ids = []
+    for id in ids:
+        if context.hasObject(id):
+            real_ids.append(id)
+    if real_ids:
+        context.manage_delObjects(real_ids)
+        logger.info('%s deleted StudentCourseResult object %s' % (member,id))
+        message = 'portal_status_message=psm_item(s)_deleted'
+else:
+    message = 'portal_status_message=psm_select_at_least_one_document'
+
+if REQUEST is not None:
+    return REQUEST.RESPONSE.redirect(ret_url + '?' + message)
Index: /WAeUP_SRP/trunk/skins/waeup_student/getAccommodationInfo.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/getAccommodationInfo.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/getAccommodationInfo.py	(revision 1571)
@@ -13,5 +13,5 @@
 """
 import logging
-logger = logging.getLogger('Student.Accommodation.Info')
+logger = logging.getLogger('Skins.getAccommodationInfo')
 import DateTime
 
@@ -29,5 +29,5 @@
     requested_id = context.getStudentId()
     if requested_id and not context.isStaff() and member_id != requested_id:
-        logger.info('"%s", "tried to access", "%s"' % (member_id,requested_id))
+        logger.info('%s tried to access %s' % (member_id,requested_id))
         return None
     elif context.isStaff():
@@ -37,5 +37,5 @@
 res = context.students_catalog(id=student_id)
 if len(res) != 1:
-    logger.info('"%s","not found in students_catalog"')
+    logger.info('%s not found in students_catalog' % student_id)
     return None
 
Index: /WAeUP_SRP/trunk/skins/waeup_student/getApplicationInfo.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/getApplicationInfo.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/getApplicationInfo.py	(revision 1571)
@@ -13,5 +13,5 @@
 """
 import logging
-logger = logging.getLogger('Student.Application.Info')
+logger = logging.getLogger('Skins.getApplicationInfo')
 
 request = context.REQUEST
@@ -28,6 +28,7 @@
 requested_id = context.getStudentId()
 if requested_id and not context.isStaff() and member_id != requested_id:
-    logger.info('"%s", "accessed application object of", "%s"' % (member_id,requested_id))
+    logger.info('%s tried to access application object of %s' % (member_id,requested_id))
     student_id = requested_id
+    return None
 elif context.isStaff():
     student_id = requested_id
Index: /WAeUP_SRP/trunk/skins/waeup_student/getClearanceInfo.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/getClearanceInfo.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/getClearanceInfo.py	(revision 1571)
@@ -13,5 +13,5 @@
 """
 import logging
-logger = logging.getLogger('Student.Clearance.Info')
+logger = logging.getLogger('Skins.getClearanceInfo')
 from DateTime import DateTime
 
@@ -30,5 +30,5 @@
 requested_id = context.getStudentId()
 if requested_id and not context.isStaff() and member_id != requested_id:
-    logger.info('"%s", "tried to access", "%s"' % (member_id,requested_id))
+    logger.info('%s tried to access %s' % (member_id,requested_id))
     return None
 elif context.isStaff():
Index: /WAeUP_SRP/trunk/skins/waeup_student/getMemberInfo.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/getMemberInfo.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/getMemberInfo.py	(revision 1571)
@@ -28,6 +28,7 @@
 requested_id = context.getStudentId()
 if requested_id and not context.isStaff() and member_id != requested_id:
-    logger.info('"%s", "accessed personal object of", "%s"' % (member_id,requested_id))
+    logger.info('%s tried to access personal object of %s' % (member_id,requested_id))
     student_id = requested_id
+    return None
 elif context.isStaff():
     student_id = requested_id
Index: /WAeUP_SRP/trunk/skins/waeup_student/getNewStudentStatistics.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/getNewStudentStatistics.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/getNewStudentStatistics.py	(revision 1571)
@@ -13,5 +13,5 @@
 """
 import logging
-logger = logging.getLogger('Student.Statistics')
+logger = logging.getLogger('Skins.getNewStudentStatistics')
 
 try:
@@ -21,5 +21,5 @@
 except:
     evalAdvancedQuery = None
-logger.info('"%s","invoked new statistics"' % context.portal_membership.getAuthenticatedMember())
+logger.info('%s invoked statistics' % context.portal_membership.getAuthenticatedMember())
 l = []
 if not context.isStaff():
@@ -108,5 +108,5 @@
     if total:
         dep['cleared_and_validated_percent'] = "%.0f" % round(cav*100/total)
-        
+
     ora = len([s for s in fac_ids if s in or_ids])
     dep['objection_raised'] = ora
Index: /WAeUP_SRP/trunk/skins/waeup_student/getPersonalInfo.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/getPersonalInfo.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/getPersonalInfo.py	(revision 1571)
@@ -13,5 +13,5 @@
 """
 import logging
-logger = logging.getLogger('Student.Personal.Info')
+logger = logging.getLogger('Skins.getPersonalInfo')
 
 request = context.REQUEST
@@ -28,6 +28,7 @@
 requested_id = context.getStudentId()
 if requested_id and not context.isStaff() and member_id != requested_id:
-    logger.info('"%s", "accessed personal object of", "%s"' % (member_id,requested_id))
+    logger.info('%s tried to access personal object of %s' % (member_id,requested_id))
     student_id = requested_id
+    return None
 elif context.isStaff():
     student_id = requested_id
Index: /WAeUP_SRP/trunk/skins/waeup_student/getRegStatistics.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/getRegStatistics.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/getRegStatistics.py	(revision 1571)
@@ -13,5 +13,5 @@
 """
 import logging
-logger = logging.getLogger('Student.Statistics')
+logger = logging.getLogger('Skins.getRegStatistics')
 
 try:
@@ -21,5 +21,5 @@
 except:
     evalAdvancedQuery = None
-logger.info('"%s","invoked reg statistics"' % context.portal_membership.getAuthenticatedMember())
+logger.info('%s invoked statistics' % context.portal_membership.getAuthenticatedMember())
 l = []
 if not context.isStaff():
@@ -81,5 +81,5 @@
     if total:
         dep['courses_registered_percent'] = "%.0f" % round(creg*100/total)
-        
+
     cval = len([s for s in fac_ids if s in cval_ids])
     dep['courses_validated'] = cval
Index: /WAeUP_SRP/trunk/skins/waeup_student/getRetStudentStatistics.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/getRetStudentStatistics.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/getRetStudentStatistics.py	(revision 1571)
@@ -21,5 +21,5 @@
 except:
     evalAdvancedQuery = None
-logger.info('%s invoked returning statistics' % context.portal_membership.getAuthenticatedMember())
+logger.info('%s invoked statistics' % context.portal_membership.getAuthenticatedMember())
 l = []
 if not context.isStaff():
@@ -59,5 +59,5 @@
     sum_ret += ret
     sum_sfp += sfp
-       
+
     l.append(dep)
 
Index: /WAeUP_SRP/trunk/skins/waeup_student/getSchoolFeePrefix.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/getSchoolFeePrefix.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/getSchoolFeePrefix.py	(revision 1571)
@@ -1,3 +1,3 @@
-## Script (Python) "getMaintenancePrefix"
+## Script (Python) "getSchoolFeePrefix"
 ##bind container=container
 ##bind context=context
@@ -16,6 +16,6 @@
     return None
 
-import logging    
-logger = logging.getLogger('EPayment.getSchoolFeePrefix')    
+import logging
+logger = logging.getLogger('Skins.getSchoolFeePrefix')
 
 student_id = context.getStudentId()
@@ -24,5 +24,5 @@
                                      id = sbrain.course)
 if not res:
-    logger.info('"%s","certificate not found", "%s"' % (student_id,course))
+    logger.info('%s, certificate %s not found' % (student_id,course))
     prefix = "--"
 else:
Index: /WAeUP_SRP/trunk/skins/waeup_student/getSessionResults.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/getSessionResults.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/getSessionResults.py	(revision 1571)
@@ -27,6 +27,6 @@
 if requested_id and not context.isStaff() and member_id != requested_id:
     import logging
-    logger = logging.getLogger('Student.SessionResults.Info')
-    logger.info('"%s", "tried to access", "%s"' % (member_id,requested_id))
+    logger = logging.getLogger('Skins.getSessionResults')
+    logger.info('%s tried to access %s' % (member_id,requested_id))
     return None
 elif context.isStaff():
Index: /WAeUP_SRP/trunk/skins/waeup_student/getStudentBaseInfo.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/getStudentBaseInfo.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/getStudentBaseInfo.py	(revision 1571)
@@ -13,5 +13,5 @@
 """
 import logging
-logger = logging.getLogger('Student.Base.Info')
+logger = logging.getLogger('Skins.getStudentBaseInfo')
 from DateTime import DateTime
 
@@ -29,5 +29,5 @@
 requested_id = context.getStudentId()
 if requested_id and not context.isStaff() and member_id != requested_id:
-    logger.info('"%s", "tried to access", "%s"' % (member_id,requested_id))
+    logger.info('%s tried to access %s' % (member_id,requested_id))
     return None
 elif context.isStaff():
Index: /WAeUP_SRP/trunk/skins/waeup_student/getStudentFolderInfo.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/getStudentFolderInfo.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/getStudentFolderInfo.py	(revision 1571)
@@ -1,3 +1,3 @@
-## Script (Python) "getStudentInfo"
+## Script (Python) "getStudentFolderInfo"
 ##bind container=container
 ##bind context=context
@@ -21,5 +21,5 @@
 
 import logging
-logger = logging.getLogger('Student.Info')
+logger = logging.getLogger('Skins.getStudentFolderInfo')
 
 
@@ -38,5 +38,5 @@
         break
     if member_id != requested_id:
-        logger.info('"%s", "tried to access", "%s"' % (member_id,requested_id))
+        logger.info('%s tried to access %s' % (member_id,requested_id))
         student_id = member_id
         mtool.assertViewable(context)
Index: /WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py	(revision 1571)
@@ -21,5 +21,5 @@
 
 import logging
-logger = logging.getLogger('Student.Info')
+logger = logging.getLogger('Skins.getStudentInfo')
 
 
@@ -42,5 +42,5 @@
             break
         if member_id != requested_id:
-            logger.info('"%s", "tried to access", "%s"' % (member_id,requested_id))
+            logger.info('%s tried to access %s' % (member_id,requested_id))
             student_id = member_id
             mtool.assertViewable(context)
Index: /WAeUP_SRP/trunk/skins/waeup_student/getStudyCourseInfo.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/getStudyCourseInfo.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/getStudyCourseInfo.py	(revision 1571)
@@ -53,5 +53,5 @@
 review_state = wftool.getInfoFor(context,'review_state',None)
 student_review_state = context.getStudentReviewState()
-if review_state != 'content_addable' and context.isStudent() and student_review_state = 'school_fee_paid':
+if review_state != 'content_addable' and student_review_state == 'school_fee_paid': #and context.isStudent():
     wftool.doActionFor(context,'close_for_edit')
 may_register = (student_review_state in ('school_fee_paid',)) and\
Index: /WAeUP_SRP/trunk/skins/waeup_student/getTransferInfo.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/getTransferInfo.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/getTransferInfo.py	(revision 1571)
@@ -1,3 +1,3 @@
-## Script (Python) "getClearanceInfo"
+## Script (Python) "getTransferInfo"
 ##bind container=container
 ##bind context=context
@@ -13,5 +13,5 @@
 """
 import logging
-logger = logging.getLogger('Student.Transfer.Info')
+logger = logging.getLogger('Skins.getTransferInfo')
 from DateTime import DateTime
 
@@ -29,5 +29,5 @@
 requested_id = context.getStudentId()
 if requested_id and not context.isStaff() and member_id != requested_id:
-    logger.info('"%s", "tried to access", "%s"' % (member_id,requested_id))
+    logger.info('%s tried to access %s' % (member_id,requested_id))
     return None
 elif context.isStaff():
Index: /WAeUP_SRP/trunk/skins/waeup_student/personal_edit.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/personal_edit.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/personal_edit.py	(revision 1571)
@@ -16,10 +16,10 @@
 current = DateTime.DateTime()
 import logging
-logger = logging.getLogger('Student.Personal.Edit')
+logger = logging.getLogger('Skins.personal_edit')
 
 info = context.getPersonalInfo()
 
 if info is None:
-    logger.info('"anonymous access","%s"' % REQUEST.get('URL0'))
+    logger.info('Anonymous user tried to access %s' % REQUEST.get('URL0'))
     return REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
 
@@ -53,5 +53,5 @@
                                               sex = ds.get('sex'),
                                              )
-        logger.info('"%s", "edited personal data"' % (info['id']))
+        logger.info('%s edited personal data' % (info['id']))
         #action = ""
         #base_url = student.absolute_url()
Index: /WAeUP_SRP/trunk/skins/waeup_student/raise_objection.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/raise_objection.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/raise_objection.py	(revision 1571)
@@ -14,10 +14,10 @@
 import DateTime
 import logging
-logger = logging.getLogger('Student.Objection')
+logger = logging.getLogger('Skins.raise_objection')
 
 wf = context.portal_workflow
 info = context.getApplicationInfo()
 if not info:
-    logger.info('"%s", "tried to access", "%s"' % (context.portal_membership.getAuthenticatedMember(),context.getStudentId()))
+    logger.info('%s tried to access %s' % (context.portal_membership.getAuthenticatedMember(),context.getStudentId()))
     return context.admission_form()
 current = DateTime.DateTime()
Index: /WAeUP_SRP/trunk/skins/waeup_student/refresh_level.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/refresh_level.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/refresh_level.py	(revision 1571)
@@ -16,4 +16,7 @@
 aq_courses = context.courses_catalog.evalAdvancedQuery
 
+import logging
+logger = logging.getLogger('Skins.refresh_level')
+
 current = DateTime.DateTime()
 request = context.REQUEST
@@ -21,5 +24,5 @@
 response = request.RESPONSE
 redirect = response.redirect
-logger = logging.getLogger('Student.create_level')
+logger = logging.getLogger('Skins.refresh_level')
 mtool = context.portal_membership
 member = mtool.getAuthenticatedMember()
@@ -51,5 +54,5 @@
         c_res = aq_courses(query)
         if not c_res:
-            logger.info('"%s","%s course not found in courses catalog"' % (student.id,co.CosCode))
+            logger.info('%s, course %s not found in courses_catalog' % (student.id,co.CosCode))
             continue
         course_cat_entry = c_res[0]
@@ -60,9 +63,9 @@
                 score = int(co.Score)
             except:
-                logger.info('"%s"," course %s invalid score %s"' % (student.id,
+                logger.info('%s, course %s has invalid score %s' % (student.id,
                                                                     co.CosCode,
                                                                     co.Score))
                 continue
-            if int(c_res[0].passmark) <= score:  
+            if int(c_res[0].passmark) <= score:
                 continue
             carry_over = True
@@ -96,4 +99,5 @@
             course_result.getContent().edit(mapping=d)
 session.set('in_progress','finished')
+logger.info('%s updated course list' % member)
 return
 return response.redirect("%s" % level.absolute_url())
Index: /WAeUP_SRP/trunk/skins/waeup_student/register_courses.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/register_courses.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/register_courses.py	(revision 1571)
@@ -1,3 +1,3 @@
-## Script (Python) "getStudyCourseInfo"
+## Script (Python) "register_courses"
 ##bind container=container
 ##bind context=context
@@ -23,5 +23,5 @@
 member_id = str(member)
 import logging
-logger = logging.getLogger('Student.register_courses')
+logger = logging.getLogger('Skins.register_courses')
 
 wftool = context.portal_workflow
@@ -30,4 +30,4 @@
 student = getattr(students_folder,context.getStudentId())
 wftool.doActionFor(student,'register_courses')
-logger.info('"%s","courses registered"' % student.getId())
+logger.info('%s registered course list' % student.getId())
 return request.RESPONSE.redirect("%s" % context.absolute_url())
Index: /WAeUP_SRP/trunk/skins/waeup_student/reject_courses.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/reject_courses.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/reject_courses.py	(revision 1571)
@@ -1,3 +1,3 @@
-## Script (Python) "getStudyCourseInfo"
+## Script (Python) "reject_courses"
 ##bind container=container
 ##bind context=context
@@ -23,5 +23,5 @@
 member_id = str(member)
 import logging
-logger = logging.getLogger('Student.reject_courses')
+logger = logging.getLogger('Skins.reject_courses')
 
 wftool = context.portal_workflow
@@ -31,4 +31,4 @@
 student = getattr(students_folder,context.getStudentId())
 wftool.doActionFor(student,'reject_courses')
-logger.info('"%s","rejects course list for","%s"' % (member,student.getId()))
+logger.info('%s rejected course list of %s' % (member,student.getId()))
 return request.RESPONSE.redirect("%s" % context.absolute_url())
Index: /WAeUP_SRP/trunk/skins/waeup_student/request_transfer.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/request_transfer.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/request_transfer.py	(revision 1571)
@@ -14,5 +14,5 @@
 import logging
 from urllib import urlencode
-logger = logging.getLogger('Student.Transfer.Request')
+logger = logging.getLogger('Skins_request_transfer')
 import DateTime
 lt = context.portal_layouts
@@ -28,6 +28,7 @@
 requested_id = context.getStudentId()
 if requested_id and not context.isStaff() and member_id != requested_id:
-    logger.info('"%s", "accessed application object of", "%s"' % (member_id,requested_id))
+    logger.info('%s tried to access object of %s' % (member_id,requested_id))
     student_id = requested_id
+    return None
 elif context.isStaff():
     student_id = requested_id
@@ -50,5 +51,5 @@
 
 if paid:
-    logger.info('"%s", "opened (paid) request transfer form of", "%s"' % (member_id,student_id))
+    logger.info('%s opened (paid) request transfer form of %s' % (member_id,student_id))
     return context.request_transfer_form(rendered = None,
                                  psm = None,
@@ -91,4 +92,6 @@
     payments = getattr(student,'payments')
 #from Products.zdb import set_trace; set_trace()
+
+logger.info('%s paid transfer form for %s' % (member_id,student_id))
 info = {}
 order_id = ds.get('pin_n')
Index: /WAeUP_SRP/trunk/skins/waeup_student/search_students.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/search_students.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/search_students.py	(revision 1571)
@@ -13,5 +13,5 @@
 """
 import logging
-logger = logging.getLogger('Search.Timer')
+logger = logging.getLogger('Skins.search_students')
 from DateTime import DateTime
 #
@@ -82,4 +82,5 @@
                  In('localUsersWithRoles', ("user:%s" % member,))
         res = evalAdvancedQuery(query)
+        logger.info('ClearanceOfficer %s initiated student_search' % member)
         faculties = []
         if res:
@@ -107,4 +108,5 @@
                  In('localUsersWithRoles', ("user:%s" % member,))
         res = evalAdvancedQuery(query)
+        logger.info('CourseAdviser %s initiated student_search' % member)
         certificate_level = []
         if res:
@@ -168,4 +170,5 @@
         students_folder = context.portal_url.getPortalObject().campus.students
         if hasattr(students_folder,term.strip()):
+            logger.info('%s searches for student with id %s' % (member,term))
             request.RESPONSE.redirect("%s/%s" % (students_folder.absolute_url(),term))
         return context.search_students_form(rendered = rend,
@@ -176,7 +179,9 @@
     elif what == "department":
         res = context.students_catalog(department=term.strip())
+        logger.info('%s searches for student in department %s' % (member,term))
         search_set = [r.id for r in res]
     elif what == "matric_no":
         res = context.students_catalog(matric_no=term.strip())
+        logger.info('%s searches for student with matric_no %s' % (member,term))
         search_set = [r.id for r in res]
     elif what == "jamb_reg_no":
@@ -184,8 +189,10 @@
         st_u = "%s" % term.strip().upper()
         res = aq_students(In('jamb_reg_no',(st_l,st_u)))
+        logger.info('%s searches for student with jamb_reg_no %s' % (member,term))
         search_set = [r.id for r in res]
     elif what == "name":
         pt = ('StudentPersonal')
         query = In('portal_type',pt) & Eq('SearchableText',"%s*" % term.strip())
+        logger.info('%s searches for student with name %s' % (member,term))
         res = evalAdvancedQuery(query)
         if res:
@@ -201,4 +208,7 @@
     query = Eq('review_state',state)
     review_res = evalAdvancedQuery(query)
+    
+    logger.info('%s searches for students in review_state %s' % (member,state))
+    
     if with_timer:
         end = DateTime().timeTime()
Index: /WAeUP_SRP/trunk/skins/waeup_student/set_access_data.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/set_access_data.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/set_access_data.py	(revision 1571)
@@ -8,5 +8,5 @@
 current = DateTime.DateTime()
 pr = context.portal_registration
-logger = logging.getLogger('Student.SetAccessData')
+logger = logging.getLogger('Skins.set_access_data')
 validate = REQUEST.has_key("cpsdocument_edit_button")
 
@@ -21,5 +21,5 @@
     sid = st_res[0].id
 else:
-    logger.info('"%s","Studentobject does not exist"' % matric_no)
+    logger.info('Student object with matric_no does not exist' % matric_no)
 res,psm,ds = lt.renderLayout(layout_id= 'student_session_results_search',
                       schema_id= 'student_returning',
@@ -53,8 +53,8 @@
         #psm = "You are already registered please log in with your UserId %s" % sid
         psm = ""
-        logger.info('"%s","repeatedly tried to set password"' % sid)
+        logger.info('%s repeatedly tried to set password' % sid)
     except:
         psm = "The system encountered an error. Please try again."
-        logger.info('"%s","set_access error","%s"' % (sid,password))
+        logger.info('%s, makeStudentMember error, password = %s' % (sid,password))
 if psm != '':
     return context.set_access_data_form(rendered = res,
Index: /WAeUP_SRP/trunk/skins/waeup_student/start_clearance.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/start_clearance.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/start_clearance.py	(revision 1571)
@@ -8,5 +8,5 @@
 pr = context.portal_registration
 import logging
-logger = logging.getLogger('Student.Clearance.Start')
+logger = logging.getLogger('Skins.start_clearance')
 
 #type_name = 'Student'
@@ -23,5 +23,5 @@
 if info is None:
     member_id = str(context.portal_membership.getAuthenticatedMember())
-    logger.info('"%s","tried to start clearance for", "%s"' % (member_id,request.get('PATH_INFO').split('/')[-2]))
+    logger.info('%s tried to start clearance for %s' % (member_id,request.get('PATH_INFO').split('/')[-2]))
     return redirect("%s/srp_invalid_access" % context.portal_url())
 app_doc = info['app_doc']
@@ -55,13 +55,13 @@
     psm = "You have already entered a clearance pin!"
     error = True
-    logger.info('"%s", "tried to start clearance though already started"' % (info['id']))
+    logger.info('%s tried to start clearance though already started' % (info['id']))
 elif psm == 'invalid':
     psm = "Please correct your input!"
     error = True
-    logger.info('"%s","entered wrong clearance pin"' % (info['id']))
+    logger.info('%s entered wrong clearance pin' % (info['id']))
 elif app_doc.passport is None:
     #psm = "You must upload your passport picture before you can start the registration process!"
     #error = True
-    logger.info('"%s", "started clearance without passport picture"' % (info['id']))
+    logger.info('%s started clearance without passport picture' % (info['id']))
 if error:
     return context.clearance_pin_form(rendered = res,
@@ -74,5 +74,5 @@
 session.set("clicked","clicked")
 pin = str(ds.get('clr_ac_pin'))
-logger.info('"%s", "started clearance with pin", "%s"' % (info['id'],pin))
+logger.info('%s started clearance with pin %s' % (info['id'],pin))
 wf.doActionFor(info['student'],'enter_clearance_pin')
 wf.doActionFor(info['clear'],'open')
@@ -89,5 +89,5 @@
 
 if info['penalty']:
-    logger.info('"%s","started late clearance"' % (info['id']))
+    logger.info('%s started late clearance' % (info['id']))
 
 return redirect("%s/clearance_edit_form" % info['clear'].absolute_url())
Index: /WAeUP_SRP/trunk/skins/waeup_student/study_level_view.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/study_level_view.pt	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/study_level_view.pt	(revision 1571)
@@ -101,5 +101,5 @@
             <td align="left" valign="top" rowspan="3"></td>
             <td align="left" valign="top">
-                <input type="submit" name="course_result_delete:method" value="Delete selected"
+                <input type="submit" name="delete_course_result:method" value="Delete selected"
                        class="destructive" i18n:attributes="value"
                        tal:attributes="onclick python:'return window.confirm(\'%s\')' %
@@ -127,5 +127,5 @@
                        % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
                        />
-                <input type="submit" name="course_result_delete:method" value="Delete selected"
+                <input type="submit" name="delete_course_result:method" value="Delete selected"
                        class="destructive" i18n:attributes="value"
                        tal:attributes="onclick python:'return window.confirm(\'%s\')' %
@@ -159,5 +159,5 @@
                        />
                 <input tal:condition="python: review_state == 'school_fee_paid'"
-                       type="submit" name="course_result_delete:method" value="Delete selected"
+                       type="submit" name="delete_course_result:method" value="Delete selected"
                        class="destructive" i18n:attributes="value"
                        tal:attributes="onclick python:'return window.confirm(\'%s\')' %
@@ -188,6 +188,4 @@
             <td><input type="text" name="course_id" 
                        tal:attributes="value request/course_id|nothing"/></td>
-            <td tal:condition="request/error|nothing" 
-                tal:content="request/error" />
             <td colspan="2">
               <input type="submit" name="add"
Index: /WAeUP_SRP/trunk/skins/waeup_student/validate_courses.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/validate_courses.py	(revision 1570)
+++ /WAeUP_SRP/trunk/skins/waeup_student/validate_courses.py	(revision 1571)
@@ -1,3 +1,3 @@
-## Script (Python) "getStudyCourseInfo"
+## Script (Python) "validate_courses"
 ##bind container=container
 ##bind context=context
@@ -23,5 +23,5 @@
 member_id = str(member)
 import logging
-logger = logging.getLogger('Student.validate_courses')
+logger = logging.getLogger('Skins.validate_courses')
 
 wftool = context.portal_workflow
@@ -29,4 +29,4 @@
 student = getattr(students_folder,context.getStudentId())
 wftool.doActionFor(student,'validate_courses')
-logger.info('"%s","validated courses for","%s"' % (member,student.getId()))
+logger.info('%s validated course list for %s' % (member,student.getId()))
 return request.RESPONSE.redirect("%s" % context.absolute_url())
