Index: WAeUP_SRP/trunk_not_used/Academics.py
===================================================================
--- WAeUP_SRP/trunk_not_used/Academics.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/Academics.py	(revision 2226)
@@ -0,0 +1,940 @@
+#-*- mode: python; mode: fold -*-
+from Globals import InitializeClass
+from AccessControl import ClassSecurityInfo
+
+from Products.CMFCore.utils import UniqueObject, getToolByName
+from Products.CMFCore.permissions import View
+from Products.CMFCore.permissions import ModifyPortalContent
+from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder
+#from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument
+from Products.CPSDocument.CPSDocument import CPSDocument
+#from Products.CPSCore.CPSBase import CPSBaseBTreeFolder as BaseBTreeFolder
+#from Products.CPSCore.CPSBase import CPSBaseBTreeDocument as BaseBTreeDocument
+#from Products.CMFCore.DirectoryView import registerDirectory
+
+#registerDirectory('skins', globals())
+#registerDirectory('skins/waeup_default', globals())
+#registerDirectory('skins/waeup_faculty', globals())
+
+import DateTime
+import csv,re
+import logging
+import Globals
+p_home = Globals.package_home(globals())
+i_home = Globals.INSTANCE_HOME
+
+def makeCertificateCode(code): ###(
+    code = code.replace('.','')
+    code = code.replace('(','')
+    code = code.replace(')','')
+    code = code.replace('/','')
+    code = code.replace(' ','')
+    code = code.replace('_','')
+    return code
+
+###)
+
+class AcademicsFolder(CPSDocument): ###(
+    """
+    WAeUP AcademicsFolder containing StudyCourses
+    """
+    meta_type = 'AcademicsFolder'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+    use_catalog_for_folder_contents = True
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        return "Academic Section"
+
+    def importLocalRoles(self,portal_type): ###(
+        name = '%sLocalRoles' % portal_type
+        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())
+        export = []
+        export.append('"code","users"')
+        pm = self.portal_membership
+        #import pdb;pdb.set_trace()
+        try:
+            imp_roles = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
+        except:
+            logger.error('Error reading %s.csv' % name)
+            return
+        odict = {}
+        for f in self.portal_catalog({'meta_type': portal_type}):
+            odict[f.getId] = f.getObject()
+        for role in imp_roles:
+            obj_id = role['code']
+            if obj_id in odict.keys():
+                roles_dict = eval(role['users'])
+                for r in roles_dict.keys():
+                    if r.startswith('user'):
+                        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]))
+
+###)
+
+    security.declareProtected(ModifyPortalContent,"loadFacultiesFromCSV")###(
+    def loadFacultiesFromCSV(self):
+        """install Universityspecific Faculies from CSV values"""
+        #return
+        if self.REQUEST.get('localroles'):
+            self.importLocalRoles('Faculty')
+            return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+        name = 'Faculties'
+        no_import = False
+        logger = logging.getLogger('Academics.AcademicsFolder.loadFacultiesFromCSV')
+        logger.info('Start loading from %s.csv' % name)
+        academics = self.portal_catalog({'meta_type': 'AcademicsFolder'})[-1].getObject()
+        try:
+            faculties = 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': "Faculty"})
+        facs = {}
+        for f in l:
+            facs[f.id] = f.getObject()
+        fields = ("code",
+                  "review_state",
+                  "title",
+                  "title_prefix",
+                  "college_code",
+                  "degree_grade",
+                  "bank_code",
+                  )
+        format = ','.join(['"%%(%s)s"' % fn for fn in fields])
+        for faculty in faculties:
+            processing = "processing %s" % format
+            logger.info(processing % faculty)
+            fid = faculty.get('code')
+            f = facs.get(fid,None)
+            if f is None:
+                #self.log('Creating Faculty %(id)s = %(Title)s' % faculty)
+                logger.info('Creating Faculty with ID %(code)s %(title)s' % faculty)
+                academics.invokeFactory('Faculty', fid)
+                f = getattr(self,fid)
+                d = {'Title': faculty.get('title')}
+            else:
+                d = {}
+            f.getContent().edit(mapping=faculty)
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"loadDepartmentsFromCSV")###(
+    def loadDepartmentsFromCSV(self):
+        """install Universityspecific Faculies from CSV values"""
+        #return
+        if self.REQUEST.get('localroles'):
+            self.importLocalRoles('Department')
+            return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+        name = 'Departments'
+        no_import = False
+        logger = logging.getLogger('Academics.AcademicsFolder.loadDepartmentsFromCSV')
+        fields = ("code",
+                  "review_state",
+                  "title",
+                  "title_prefix",
+                  "faculty_code",
+                  )
+        format = ','.join(['"%%(%s)s"' % fn for fn in fields])
+        try:
+            deps = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
+        except:
+            logger.error('Error reading %s.csv' % name)
+            return
+        no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
+        heading = ','.join(['"%s"' % fn for fn in fields])
+        no_import.write('%s\n' % heading)
+        l = self.portal_catalog({'meta_type': "Faculty"})
+        facs = {}
+        for f in l:
+            facs[f.id] = f.getObject()
+        for dep in deps:
+            processing = "processing %s" % format
+            logger.info(processing % dep)
+            fid = dep['faculty_code']
+            f = facs.get(fid,None)
+            if f is None:
+                logger.info( "No Faculty with ID: %s" % fid)
+                no_import.write( "No Faculty with ID: %s\n" % fid)
+                no_import.write(format % dep + "\n")
+            else:
+                did = dep.get('code')
+                d = getattr(f,did,None)
+                if d is None or d.portal_type == "Faculty":
+                    logger.info('Creating Department %(code)s = %(title)s' % dep)
+                    f.invokeFactory('Department', did)
+                    d = getattr(f,did)
+                    d.invokeFactory('CoursesFolder','courses')
+                    courses = getattr(d,'courses')
+                    dict = {'Title': 'Courses'}
+                    courses.getContent().edit(mapping=dict)
+                    d.invokeFactory('CertificatesFolder','certificates')
+                    certificates = getattr(d,'certificates')
+                    dict = {'Title': 'Certificates'}
+                    certificates.getContent().edit(mapping=dict)
+                d.getContent().edit(mapping=dep)
+
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"loadCoursesFromCSV")###(
+    def loadCoursesFromCSV(self):
+        """install Universityspecific Courses from CSV values"""
+        #return
+        not_allowed =re.compile('[^A-Z0-9]')
+        wf = self.portal_workflow
+        name = 'Courses'
+        no_import = False
+        logger = logging.getLogger('Academics.AcademicsFolder.loadCoursesFromCSV')
+        fields = ("code",
+                  "review_state",
+                  "title",
+                  "faculty_code",
+                  "department_code",
+                  "credits",
+                  "org_code",
+                  "passmark",
+                  "semester",
+                  "session",
+                  )
+        format = ','.join(['"%%(%s)s"' % fn for fn in fields])
+        try:
+            courses = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
+        except:
+            logger.error('Error reading %s.csv' % name)
+            return
+        imported = []
+        not_imported = []
+        heading = ','.join(['"%s"' % fn for fn in fields])
+        imported.append(heading)
+        not_imported.append(heading)
+        #no_import.write('%s\n' % heading)
+        #l = self.portal_catalog({'meta_type': "Faculty"})
+        #facs = {}
+        #for f in l:
+        #    facs[f.id] = f.getObject()
+        dl = self.portal_catalog({'meta_type': "Department"})
+        deps = {}
+        for d in dl:
+            deps[d.id] = d.getObject()
+        cl = self.portal_catalog({'meta_type': "Course"})
+        course_list = [ c.id for c in cl]
+        for course in courses:
+            #processing = "processing %s" % format
+            #logger.info(processing % course)
+            course_id = course.get('code')
+            if not_allowed.search(course_id):
+                msg = ',"Invalid Course Code"'
+                #logger.info(msg)
+                #not_imported.append('"%s",' % msg)
+                not_imported.append(format % course + msg)
+                continue
+            depid = course.get('department_code').upper()
+            if depid in deps.keys():
+                dept= deps.get(depid)
+            else:
+                msg = ',"Department not found"'
+                #logger.info(msg)
+                #not_imported.append('"%s",' % msg)
+                not_imported.append(format % course + msg)
+                continue
+            if course_id in course_list:
+                msg = ',"Multiple Course Code"'
+                #logger.info(msg)
+                #not_imported.append('"%s",' % msg)
+                not_imported.append(format % course + msg)
+                continue
+            level = "%c00" % course_id[-3]
+            course['level'] = level
+            cf = dept.courses
+            c = getattr(cf,course_id,None)
+            #cd_fields = (('code','code'),
+            #             ('faculty','faculty_code'),
+            #             ('department','department_code'),
+            #             ('title','title'),
+            #             ('credits','credits'),
+            #             ('level','level'),
+            #             ('semester','semester'),
+            #             )
+            #cd = {}
+            #for t,f in cd_fields:
+            #    cd[t] = course[f]
+            #import pdb;pdb.set_trace()
+            if c is None:
+                logger.info('Creating Course %(code)s  %(title)s in Department %(department_code)s' % course)
+                cf.invokeFactory('Course', course_id)
+                course_list.append(course_id)
+                imported.append(format % course)
+                c = getattr(cf,course_id)
+                #self.courses_catalog.addRecord(**cd)
+            #else:
+            #    self.courses_catalog.modifyRecord(**cd)
+            c.getContent().edit(mapping=course)
+            review_state = course.get('review_state')
+            if review_state == "checked" and wf.getInfoFor(c,'review_state',None) != 'checked':
+                self.portal_workflow.doActionFor(c,'approve')
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        if len(not_imported) > 1:
+            open("%s/import/%s_%s_not_imported.csv" % (i_home,name,current),"w")\
+                .write('\n'.join(not_imported))
+        open("%s/import/%s_%s_imported.csv" % (i_home,name,current),"w")\
+                .write('\n'.join(imported))
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"loadCertificatesFromCSV")###(
+
+    def loadCertificatesFromCSV(self):
+        """install Universityspecific Certificates from CSV values"""
+        #return
+        name = 'Certificates'
+        wf = self.portal_workflow
+        no_import_list = []
+        logger = logging.getLogger('Academics.AcademicsFolder.loadCertificatesFromCSV')
+        fields = ("code",
+                  "review_state",
+                  "title",
+                  "faculty_code",
+                  "department_code",
+                  "category",
+                  "end_level",
+                  "m_prefix",
+                  "max_elect",
+                  "max_pass",
+                  "n_core",
+                  "nr_years",
+                  "original_code",
+                  "probation_credits",
+                  "promotion_credits",
+                  "start_level",
+                  "admin_status",
+                  )
+        format = ','.join(['"%%(%s)s"' % fn for fn in fields])
+        try:
+            courses = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
+        except:
+            logger.error('Error reading %s.csv' % name)
+            return
+        try:
+            certificates = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
+        except:
+            logger.error('Error reading %s.csv' % name)
+            return
+        f_ids = [f.id for f in self.portal_catalog({'meta_type': "Faculty"})]
+        dl = self.portal_catalog({'meta_type': "Department"})
+        deps = {}
+        for d in dl:
+            deps[d.id] = d.getObject()
+        for certificate in certificates:
+            processing = "processing %s" % format
+            logger.info(processing % certificate)
+            depid = certificate.get('department_code')
+            facid = certificate.get('faculty_code')
+            if facid not in f_ids:
+                msg = 'Faculty %(faculty_code)s for %(code)s %(title)s not found' % certificate
+                logger.info(msg)
+                no_import_list.append(msg)
+                no_import_list.append(format % certificate + "\n")
+                continue
+            if not deps.has_key(depid):
+                msg = 'Department %(department_code)s for %(code)s %(title)s not found' % certificate
+                logger.info(msg)
+                no_import_list.append(msg)
+                no_import_list.append(format % certificate + "\n")
+                continue
+            dep = deps[depid]
+            cf= dep.certificates
+            code = certificate.get('code')
+            certificate_id = code
+            c = getattr(cf,certificate_id,None)
+            if c is None:
+                logger.info('Creating certificate %(code)s  %(title)s in Department %(department_code)s' % certificate)
+                cf.invokeFactory('Certificate', certificate_id)
+                c = getattr(cf,certificate_id)
+            c.getContent().edit(mapping=certificate)
+            review_state = c.get('review_state')
+            if review_state == "checked" and wf.getInfoFor(c,'review_state',None) != 'checked':
+                self.portal_workflow.doActionFor(c,'approve')
+        if no_import_list:
+            no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
+            heading = ','.join(['"%s"' % fn for fn in fields])
+            no_import.write('%s\n' % heading)
+            for line in no_import_list:
+                no_import.write(line)
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"loadCertificateCoursesFromCSV")###(
+    def loadCertificateCoursesFromCSV(self):
+        """install Certificate Courses from CSV values"""
+        #return
+        logger = logging.getLogger('Academics.AcademicsFolder.loadCertificateCoursesFromCSV')
+        name = 'CertificateCourses'
+        wf = self.portal_workflow
+        no_import_list = []
+        fields = ("code",
+                  "review_state",
+                  "faculty_code",
+                  "department_code",
+                  "certificate_code",
+                  "level",
+                  "semester",
+                  "core_or_elective",
+                  )
+        format = ','.join(['"%%(%s)s"' % fn for fn in fields])
+        try:
+            cert_courses = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
+        except:
+            logger.error('Error reading %s.csv' % name)
+            return
+##        d_ids = [d.id for d in self.portal_catalog({'meta_type': "Department"})]
+        c_ids = [c.id for c in self.portal_catalog({'meta_type': "Course"})]
+        l = self.portal_catalog({'meta_type': "Certificate"})
+        certs = {}
+        for f in l:
+            ca,ac,fa,depid,co,code = f.relative_path.split('/')
+##            pid = "%(depid)s_%(code)s" % vars()
+            pid = "%(code)s" % vars()
+            certs[pid] = f.getObject()
+        for cert_course in cert_courses:
+            processing = "processing %s" % format
+            logger.info(processing % cert_course)
+##            depid = cert_course.get('department_code')
+            course_code = cert_course.get('code')
+            code = cert_course.get('certificate_code')
+##            pid = "%(depid)s_%(code)s" % vars()
+            pid = "%(code)s" % vars()
+            if not pid in certs.keys():
+                em = 'CertCode %(certificate_code)s for %(code)s not found\n' % cert_course
+                logger.info(em)
+                #no_import_list.append(em)
+                no_import_list.append(format % cert_course + ',"Certificate"\n')
+                continue
+            certificate = certs[pid]
+            certificate_code = certificate.getId()
+            if course_code not in c_ids:
+                em = 'Course %(code)s for %(certificate_code)s Level %(level)s not found in Courses\n' % cert_course
+                logger.info(em)
+                #no_import_list.append(em)
+                no_import_list.append(format % cert_course + ',"Course"\n')
+                continue
+##            if depid not in d_ids:
+##                em = 'Department %(department_code)s for %(certificate_code)s not found\n' % cert_course
+##                logger.info(em)
+##                #no_import_list.append(em)
+##                no_import_list.append(format % cert_course + ',"Department"\n')
+##                continue
+            level = cert_course.get('level')
+            l = getattr(certificate,level,None)
+            if l is None:
+                logger.info('Creating Level %(level)s in certificate %(certificate_code)s' % cert_course)
+                certificate.invokeFactory('StudyLevel', level)
+                l = getattr(certificate, level)
+                l.getContent().edit(mapping={'Title': "Level %s" % level})
+            certificate.orderObjects('id')
+            if hasattr(l,course_code):
+                msg = 'Duplicate %(code)s in Level %(level)s' % cert_course
+                logger.info(msg)
+                #no_import_list.append(msg + "\n")
+                no_import_list.append(format % cert_course + ',"duplicate"\n')
+                continue
+            l.invokeFactory('CertificateCourse',course_code)
+            logger.info('Creating CertificateCourse %(code)s in Certificate %(certificate_code)s StudyLevel %(level)s' % cert_course)
+            cc = getattr(l,course_code)
+            #semester = 'first'
+            #try:
+            #    sem = int(cert_course.get('semester'))
+            #    cert_course['semester'] = ('first','second')[sem - 1]
+            #except:
+            #    pass
+            cert_course['core_or_elective'] = cert_course['core_or_elective'] in ("TRUE","True")
+            cc.getContent().edit(mapping=cert_course)
+            review_state = cc.get('review_state')
+            if review_state == "checked" and wf.getInfoFor(cc,'review_state',None) != 'checked':
+                self.portal_workflow.doActionFor(cc,'approve')
+        if no_import_list:
+            no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
+            heading = ','.join(['"%s"' % fn for fn in fields])
+            no_import.write('%s\n' % heading)
+            for line in no_import_list:
+                no_import.write(line)
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+
+    security.declareProtected(ModifyPortalContent,"yamlDumpFaculties")###(
+    def yamlDumpFaculties(self):
+        """dump Faculies to Yaml"""
+        #return
+        import yaml
+        logger = logging.getLogger('dumpfaculties')
+        logger.info('Start dumping Faculties')
+        academics = self.portal_catalog({'meta_type': 'AcademicsFolder'})[-1].getObject()
+        l = self.portal_catalog({'meta_type': "Faculty"})
+        facs = {}
+        for f in l:
+            facs[f.id] = f.getObject()
+        for fid in facs.keys():
+            faculty = facs.get(fid).aq_self
+            logger.info('dumping %s %s ' % (faculty.id, faculty.title))
+            print yaml.dump(faculty)
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+
+    ###)
+
+
+    def exportLocalRoles(self,portal_type): ###(
+        name = '%sLocalRoles' % portal_type
+        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())
+        objects = [f.getObject() for f in self.portal_catalog({'meta_type': portal_type})]
+        export = []
+        export.append('"code","users"')
+        #import pdb;pdb.set_trace()
+        for obj in objects:
+            lr = {}
+            for (username, roles) in obj.get_local_roles():
+                lr[ 'user:' + username ] = [x for x in roles]
+            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))
+            export.append('"%s","%s"' % (obj.getId(),lr))
+        open("%s/export/%s-%s.csv" % (i_home,name,current),"w+").write('\n'.join(export))
+###)
+
+    security.declareProtected(ModifyPortalContent,"exportFacultiesToCSV")###(
+    def exportFacultiesToCSV(self):
+        """export Faculies to CSV"""
+        #return
+        if self.REQUEST.get('localroles'):
+            self.exportLocalRoles('Faculty')
+            return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+        name = 'Faculties'
+        no_import = False
+        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())
+        objects = [f.getObject() for f in self.portal_catalog({'meta_type': 'Faculty'})]
+        export = []
+        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))
+            obj_d = obj.getContent()
+            di = {}
+            di['code'] = obj_d.code
+            di['title'] = obj_d.title
+            di['title_prefix'] = obj_d.title_prefix
+            di['college_code'] = obj_d.college_code
+            di['degree_grade'] = obj_d.degree_grade
+            di['bank_code'] = obj_d.bank_code
+            di['code'] = di['code'] or obj.id
+            di['review_state'] = self.portal_workflow.getInfoFor(obj,'review_state','no_state')
+            export.append('"%(code)s","%(review_state)s","%(title)s","%(title_prefix)s","%(college_code)s","%(degree_grade)s","%(bank_code)s"' % di)
+        open("%s/export/%s-%s.csv" % (i_home,name,current),"w+").write('\n'.join(export))
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"exportDepartmentsToCSV")###(
+    def exportDepartmentsToCSV(self):
+        """export Faculies to CSV"""
+        #return
+        if self.REQUEST.get('localroles'):
+            self.exportLocalRoles('Department')
+            return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+        name = 'Departments'
+        no_import = False
+        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())
+        faculties = [f.getObject() for f in self.portal_catalog({'meta_type': 'Faculty'})]
+        export = []
+        export.append('"code","review_state","title","title_prefix","faculty_code"')
+        #import pdb;pdb.set_trace()
+        for faculty in faculties:
+            di = {}
+            di['faculty_code'] = faculty.id
+            for department in faculty.objectValues():
+                department_d = department.getContent()
+                try:
+                    di['code'] =  department.getId()
+                    di['title'] = department_d.title
+                    di['title_prefix'] = department_d.title_prefix
+                    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))
+                except:
+                    logger.info('could not export %s %s ' % (department.id, department.title))
+                    continue
+        open("%s/export/%s-%s.csv" % (i_home,name,current),"w+").write('\n'.join(export))
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"exportCoursesToCSV")###(
+    def exportCoursesToCSV(self):
+        """export Courses to CSV"""
+        #return
+        name = 'Courses'
+        no_import = False
+        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())
+        faculties = [f.getObject() for f in self.portal_catalog({'meta_type': 'Faculty'})]
+        export = []
+        heading = '"code","review_state","title","faculty_code","department_code",'
+        heading += '"credits","org_code","passmark","semester","session"'
+        dataline = '"%(code)s","%(review_state)s","%(title)s","%(faculty_code)s","%(department_code)s",'
+        dataline += '"%(credits)s","%(org_code)s","%(passmark)s","%(semester)s","%(session)s"'
+        export.append(heading)
+        #import pdb;pdb.set_trace()
+        fields = ("title",
+                  "credits",
+                  "org_code",
+                  "passmark",
+                  "semester",
+                  "session",
+                  )
+        for faculty in faculties:
+            di = {}
+            di['faculty_code'] = faculty.id
+            for department in faculty.objectValues():
+                di['department_code'] = department.id
+                for course in department.courses.objectValues():
+                    di['code'] = course.getId()
+                    course_d = course.getContent()
+                    for f in fields:
+                        di[f] = getattr(course_d,f,None)
+                    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))
+                    continue
+        open("%s/export/%s-%s.csv" % (i_home,name,current),"w+").write('\n'.join(export))
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"exportCertificatesToCSV")###(
+    def exportCertificatesToCSV(self):
+        """export Certificates to CSV"""
+        #return
+        name = 'Certificates'
+        no_import = False
+        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())
+        faculties = [f.getObject() for f in self.portal_catalog({'meta_type': 'Faculty'})]
+        export = []
+        heading = '"code","review_state","title","faculty_code","department_code",'
+        heading += '"category","end_level","m_prefix","max_elect","max_pass",'
+        heading += '"n_core","nr_years","original_code","probation_credits",'
+        heading += '"promotion_credits","start_level","admin_status"'
+        dataline = '"%(code)s","%(review_state)s","%(title)s","%(faculty_code)s","%(department_code)s",'
+        dataline += '"%(category)s","%(end_level)s","%(m_prefix)s","%(max_elect)s","%(max_pass)s",'
+        dataline += '"%(n_core)s","%(nr_years)s","%(original_code)s","%(probation_credits)s",'
+        dataline += '"%(promotion_credits)s","%(start_level)s","%(admin_status)s"'
+        export.append(heading)
+        #import pdb;pdb.set_trace()
+        for faculty in faculties:
+            di = {}
+            di['faculty_code'] = faculty.id
+            for department in faculty.objectValues():
+                di['department_code'] = department.id
+                for certificate in department.certificates.objectValues():
+                    certificate_d = certificate.getContent()
+                    di['code'] = certificate.id
+                    #di['code'] = getattr(certificate_d,'code',None)
+                    di['title'] = getattr(certificate_d,'title',None)
+                    di['category'] = getattr(certificate_d,'category',None)
+                    di['admin_status'] = getattr(certificate_d,'admin_status',None)
+                    di['end_level'] = getattr(certificate_d,'end_level',None)
+                    di['m_prefix'] = getattr(certificate_d,'m_prefix',None)
+                    di['max_elect'] = getattr(certificate_d,'max_elect',None)
+                    di['max_load'] = getattr(certificate_d,'max_load',None)
+                    di['max_pass'] = getattr(certificate_d,'max_pass',None)
+                    di['n_core'] = getattr(certificate_d,'n_core',None)
+                    di['nr_years'] = getattr(certificate_d,'nr_years',None)
+                    di['original_code'] = getattr(certificate_d,'original_code',None)
+                    di['probation_credits'] = getattr(certificate_d,'probation_credits',None)
+                    di['promotion_credits'] = getattr(certificate_d,'promotion_credits',None)
+                    di['start_level'] = getattr(certificate_d,'start_level',None)
+                    di['code'] = di['code'] or certificate.id
+                    di['review_state'] = self.portal_workflow.getInfoFor(certificate,'review_state','no_state')
+                    try:
+                        export.append(dataline % di)
+                        logger.info('Exporting %s %s ' % (certificate.id, certificate.title))
+                    except:
+                        logger.info('could not export %s %s ' % (certificate.id, certificate.title))
+                    continue
+        open("%s/export/%s-%s.csv" % (i_home,name,current),"w+").write('\n'.join(export))
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"exportCertificateCoursesToCSV")###(
+    def exportCertificateCoursesToCSV(self):
+        """export CertificateCourses to CSV"""
+        #return
+        name = 'CertificateCourses'
+        no_import = False
+        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())
+        faculties = [f.getObject() for f in self.portal_catalog({'meta_type': 'Faculty'})]
+        export = []
+        heading = '"code","review_state","faculty_code","department_code",'
+        heading += '"certificate_code","level","semester","core_or_elective"'
+        dataline = '"%(code)s","%(review_state)s","%(faculty_code)s","%(department_code)s",'
+        dataline += '"%(certificate_code)s","%(level)s","%(semester)s","%(core_or_elective)s"'
+        export.append(heading)
+        #import pdb;pdb.set_trace()
+        semesters = ['first','second']
+        for faculty in faculties:
+            di = {}
+            di['faculty_code'] = faculty.id
+            for department in faculty.objectValues():
+                di['department_code'] = department.id
+                for certificate in department.certificates.objectValues():
+                    di['certificate_code'] = certificate.id
+                    for level in certificate.objectValues():
+                        di['level'] = level.id
+                        for sem in semesters:
+                            semester = getattr(level,sem,None)
+                            if semester is not None:
+                                di['semester'] = semesters.index(sem) + 1
+                                for course in semester.objectValues():
+                                    di['code'] = course.getId()
+                                    course_d = course.getContent()
+                                    di['core_or_elective'] = getattr(course_d,'core_or_elective',None)
+                                    di['review_state'] = self.portal_workflow.getInfoFor(course,'review_state','no_state')
+                                    try:
+                                        export.append(dataline % di)
+                                        logger.info('Exporting %s %s ' % (certificate.id, certificate.title))
+                                    except:
+                                        logger.info('Could not export %s %s ' % (certificate.id, certificate.title))
+                                        continue
+        open("%s/export/%s-%s.csv" % (i_home,name,current),"w+").write('\n'.join(export))
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+
+InitializeClass(AcademicsFolder)
+
+def addAcademicsFolder(container, id, REQUEST=None, **kw):
+    """Add a AcademicsFolder."""
+    ob = AcademicsFolder(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
+###)
+
+class Certificate(CPSDocument): ###(
+    """
+    WAeUP Certificate
+    """
+    meta_type = 'Certificate'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    def __init__(self, id, **kw):
+        CPSDocument.__init__(self, id, **kw)
+
+##    security.declareProtected(View,"Title")
+##    def Title(self):
+##        """compose title"""
+##        return "Certificate of %s" % (self.title)
+
+InitializeClass(Certificate)
+
+def addCertificate(container, id, REQUEST=None, **kw):
+    """Add a Certificate."""
+    ob = Certificate(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
+###)
+
+class StudyLevel(CPSDocument): ###(
+    """
+    WAeUP StudyLevel containing the courses and students
+    """
+    meta_type = 'StudyLevel'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        try:
+            return "Level %s" % self.aq_parent.getId()
+        except:
+            return "no Title for %s" % self.getId()
+
+
+InitializeClass(StudyLevel)
+
+def addStudyLevel(container, id, REQUEST=None, **kw):
+    """Add a StudyLevel."""
+    ob = StudyLevel(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
+###)
+
+class CertificateCourse(CPSDocument): ###(
+    """
+    WAeUP CertificateCourse
+    """
+    meta_type = 'CertificateCourse'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    def getCourseEntry(self,cid):
+        res = self.portal_catalog({'meta_type': "Course",
+                                           'id': cid})
+        if res:
+            return res[-1]
+        else:
+            return None
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        #import pdb;pdb.set_trace()
+        ce = self.getCourseEntry(self.aq_parent.getId())
+        #print self.id, self.aq_parent.id
+        if ce:
+            return "%s" % ce.Title
+        return "No such course"
+
+    security.declareProtected(View,"credits")
+    def credits(self):
+        """credits from course"""
+        ce = self.getCourseEntry(self.id)
+        if ce:
+            return "%s" % ce.credits
+        return "0"
+
+    security.declareProtected(View,"passmark")
+    def passmark(self):
+        """passmark from course"""
+        ce = self.getCourseEntry(self.id)
+        if ce is not None and hasattr(ce,"passmark"):
+            return ce.passmark
+
+
+    security.declareProtected(View,"coursepath")
+    def coursepath(self):
+        """coursepath from course"""
+        ce = self.getCourseEntry(self.id)
+        if ce:
+            return ce.getPath()
+        return "?"
+
+
+InitializeClass(CertificateCourse)
+
+def addCertificateCourse(container, id, REQUEST=None, **kw):
+    """Add a CertificateCourse."""
+    ob = CertificateCourse(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+###)
+
+class Faculty(CPSDocument): ###(
+    """
+    WAeUP Faculty containing Departments
+    """
+    meta_type = 'Faculty'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+##    def __init__(self, id, **kw):
+##        CPSDocument.__init__(self, id, **kw)
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        return "%s" % (self.title)
+
+
+    security.declareProtected(View,"LongTitle")
+    def LongTitle(self):
+        """compose long_title"""
+        prefix = getattr(self,'title_prefix',None)
+        if prefix is None:
+            prefix = getattr(self,'institution_type','faculty')
+            self.getContent().edit(mapping = {'title_prefix': prefix})
+        itype = self.portal_vocabularies.institution_types_voc.get(prefix,default="Faculty of")
+        return "%s %s" % (itype,self.title)
+
+InitializeClass(Faculty)
+
+def addFaculty(container, id, REQUEST=None, **kw):
+    """Add a Faculty."""
+    ob = Faculty(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
+###)
+
+class Department(CPSDocument): ###(
+    """
+    WAeUP Department containing the courses and students
+    """
+    meta_type = 'Department'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    security.declareProtected(View,"LongTitle")
+    def LongTitle(self):
+        """compose long_title"""
+        prefix = getattr(self,'title_prefix',None)
+        if prefix is None:
+            prefix = getattr(self,'institution_type','department')
+            self.getContent().edit(mapping = {'title_prefix': prefix})
+        itype = self.portal_vocabularies.institution_types_voc.get(prefix,default="Department of")
+        return "%s %s" % (itype,self.title)
+
+InitializeClass(Department)
+
+def addDepartment(container, id, REQUEST=None, **kw):
+    """Add a Department."""
+    object = Department(id, **kw)
+    id = object.getId()
+    container._setObject(id, object)
+##    dep = getattr(container,id).getEditableContent()   #getContent()
+##    dep.invokeFactory('CoursesFolder','Courses')
+##    o = getattr(dep,'Courses')
+##    dict = {'Title': 'Courses'}
+##    o.getContent().edit(mapping=dict)
+##    dep.invokeFactory('CertificatesFolder','Certificates')
+##    o = getattr(dep,'Certificates')
+##    dict = {'Title': 'Certificates'}
+##    o.geetContent().edit(mapping=dict)
+    if REQUEST is not None:
+        url = container.absolute_url()
+        REQUEST.RESPONSE.redirect('%s/manage_main' % url)
+
+###)
+
+class Course(CPSDocument): ###(
+    """
+    WAeUP Course
+    """
+    meta_type = 'Course'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        return self.title
+
+InitializeClass(Course)
+
+def addCourse(container, id, REQUEST=None, **kw):
+    """Add a Course."""
+    ob = Course(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+###)
+
+
Index: WAeUP_SRP/trunk_not_used/Accommodation.py
===================================================================
--- WAeUP_SRP/trunk_not_used/Accommodation.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/Accommodation.py	(revision 2226)
@@ -0,0 +1,263 @@
+#-*- mode: python; mode: fold -*-
+from Globals import InitializeClass
+from AccessControl import ClassSecurityInfo
+
+from Products.CMFCore.utils import UniqueObject, getToolByName
+from Products.CMFCore.permissions import View
+from Products.CMFCore.permissions import ModifyPortalContent
+from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder
+#from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument
+from Products.CPSDocument.CPSDocument import CPSDocument
+from Products.CPSCore.CPSBase import CPSBaseBTreeFolder as BaseBTreeFolder
+from Products.WAeUP_SRP.WAeUPTables import AccommodationTable
+import logging
+import csv,re,os
+import Globals
+import DateTime
+import re
+p_home = Globals.package_home(globals())
+i_home = Globals.INSTANCE_HOME
+
+class AccoFolder(CPSDocument): ###(
+    """
+    WAeUP AccoFolder containing Accommodation halls
+    """
+    meta_type = 'AccoFolder'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        return "Accommodation Section"
+
+    security.declareProtected(ModifyPortalContent,"generateFreeBedsList") ###(
+    def generateFreeBedsList(self):
+        """
+        generate the free Bedslist.
+        """
+        freelist = self.portal_accommodation
+        l = self.portal_catalog({'meta_type': "AccoHall"})
+        halls = []
+        generated = []
+        generated.append('"Bed","BedType","Student"' % vars())
+        beds_generated = []
+        for h in l:
+            halls.append(h.getObject())
+        for hall in halls:
+            #import pdb;pdb.set_trace()
+            h = hall.getContent()
+            hall_gen = {}
+            hall_gen['name'] = hall.Title
+            count = 0
+            reserved = [(r.split('/')[0],int(r.split('/')[1])) for r in re.split(',|\.| ',h.reserved_rooms)
+                                     if r]
+            #for block in range(1,int(h.nr_of_blocks)+1):
+            for block in 'ABCDEFGHIJ'[:int(h.nr_of_blocks)]:
+                sex = 'male'
+                if block in h.blocks_for_female:
+                    sex = 'female'
+                for floor in range(1,int(h.nr_of_floors)+1):
+                    for room in range(1,int(h.rooms_per_floor)+1):
+                        for bed in 'ABCDEFGH'[:int(h.beds_per_room)]:
+                            room_nr = floor*100 + room
+                            bt = 're'
+                            if (block,room_nr) in reserved:
+                                bt = "reserved"
+                            elif not h.special_handling.startswith("no"):
+                                bt = h.special_handling
+                            elif bed in h.beds_for_fresh:
+                                bt = 'fr'
+                            #elif bed in h.beds_for_returning:
+                            #    bt = 're'
+                            elif bed in h.beds_for_final:
+                                bt = 'fi'
+                            if h.special_handling.startswith("no_"):
+                                bt += "_" + h.special_handling[3:]
+                            bt = "%(sex)s_%(bt)s" % vars()
+                            uid = '%s_%s_%d_%s' % (hall.getId(),block,room_nr,bed)
+                            try:
+                                freelist.addRecord(bed = uid, bed_type = bt,hall = hall.getId())
+                                count +=1
+                                generated.append('"%(uid)s","%(bt)s"' % vars())
+                            except ValueError:
+                                #freelist.modifyRecord(bed = uid, bed_type = bt,hall =hall.getId())
+                                pass
+            hall_gen['count']= count
+            beds_generated.append(hall_gen)
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        open("%s/import/bedlist_%s.csv" % (i_home,current),"w+").write('\n'.join(generated))
+        return self.accommodation.acco_folder_view(beds_generated=beds_generated)
+
+###)
+
+    security.declareProtected(ModifyPortalContent,"importReservedBeds")###(
+    def importReservedBeds(self):
+        """load Reserved Beds from CSV"""
+        import transaction
+        import random
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        students_folder = self.portal_url.getPortalObject().campus.students
+        acco_folder = self.portal_url.getPortalObject().campus.accommodation
+        tr_count = 1
+        total = 0
+        name = 'ReservedBeds'
+        accommodation = self.portal_accommodation
+        students_cat = self.students_catalog
+        no_import = []
+        imported = []
+        logger = logging.getLogger('Accommodation.AccoFolder.importReservedBeds')
+        try:
+            beds = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
+        except:
+            logger.error('Error reading %s.csv' % name)
+            return
+        halls = {}
+        start = True
+        for bed in beds:
+            if start:
+                start = False
+                logger.info('start loading from %s.csv' % name)
+                s = ','.join(['"%s"' % fn for fn in bed.keys()])
+                imported.append(s)
+                no_import.append('%s,"Error"' % s)
+                format = ','.join(['"%%(%s)s"' % fn for fn in bed.keys()])
+                format_error = format + ',"%(Error)s"'
+                no_certificate = "no certificate %s" % format
+            matric_no = bed.get('matric_no')
+            jamb_reg_no = bed.get('jamb_reg_no')
+            if matric_no != '':
+                res = students_cat(matric_no = matric_no)
+                if not res:
+                    bed['Error'] = "No such student"
+                    no_import.append( format_error % bed)
+                    continue
+                student = res[0]
+            elif jamb_reg_no != '':
+                res = students_cat(jamb_reg_no = jamb_reg_no)
+                if not res:
+                    bed['Error'] = "No such student"
+                    no_import.append( format_error % bed)
+                    continue
+                student = res[0]
+            else:
+                bed['Error'] = "No such student"
+                no_import.append( format_error % bed)
+                continue
+            sid = student.id
+            names = bed.get('name').split()
+            n = 0
+            for na in names:
+                if na.endswith(','):
+                    names[n] = na[:-1]
+                n += 1
+            s_names = student.name.split()
+            found = False
+            for sn in s_names:
+                if sn.upper() in names:
+                    found = True
+                    break
+            if not found:
+                bed['Error'] = "Name mismatch %s %s" % (str(names),str(s_names))
+                no_import.append( format_error % bed)
+                continue
+            hall = bed.get('hall')
+            if hall not in halls.keys():
+                hall_object = getattr(acco_folder,hall, None)
+                if hall_object is None:
+                    bed['Error'] = "No such hall"
+                    no_import.append( format_error % bed)
+                    continue
+                halls[hall] = hall_doc = hall_object.getContent()
+            bid = "%(hall)s_%(block)s_%(room)s_%(bed)s" % bed
+            res = accommodation(bed = bid)
+            psm = ''
+            while True:
+                if not res:
+                    psm = "No bed with this id"
+                    break
+                bed_brain = res[0]
+                if not bed_brain.bed_type.endswith("reserved"):
+                    psm = "Not a reserved bed"
+                    break
+                if bed_brain.student:
+                    psm = "Bed %s already reserved for %s" % (bid,bed_brain.student)
+                    break
+                if student.sex and not bed.get('block') in hall_doc.blocks_for_female:
+                    psm = "Sex does not match %s" % bid
+                    break
+                break
+            if psm != '':
+                bed['Error'] = psm
+                no_import.append( format_error % bed)
+                continue
+            already = accommodation(student=sid)
+            if already:
+                accommodation.modifyRecord(bed=already[0].bed,student='')
+                student_obj = getattr(students_folder, student.id)
+                acco_id = "accommodation_%s" % self.getSessionId()
+                if acco_id in student_obj.objectIds():
+                    acco_doc = getattr(student_obj, acco_id).getContent()
+                    acco_doc.edit(mapping={'bed': bid})
+                    member = self.portal_membership.getAuthenticatedMember()
+                    logger.info('%s changed reserved bed %s for %s' % (member,bid,sid))
+            accommodation.modifyRecord(bed = bid, student = sid)
+            imported.append( format % bed)
+            tr_count += 1
+            if tr_count > 1000:
+                if len(no_import) > 0:
+                    open("%s/import/%s_not_imported%s.csv" % (i_home,name,current),"a").write(
+                             '\n'.join(no_import) + '\n')
+                    no_import = []
+                open("%s/import/%simported%s.csv" % (i_home,name,current),"a").write(
+                                            '\n'.join(no_import) + "\n")
+                imported = []
+                em = '%d transactions commited total %s\n' % (tr_count,total)
+                transaction.commit()
+                regs = []
+                logger.info(em)
+                total += tr_count
+                tr_count = 0
+        #from pdb import set_trace;set_trace()
+        open("%s/import/%simported%s.csv" % (i_home,name,current),"a").write(
+                                            '\n'.join(imported))
+        open("%s/import/%s_not_imported%s.csv" % (i_home,name,current),"a").write(
+                                                '\n'.join(no_import))
+        logger.info('finished loading from %s.csv' % name)
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+
+
+InitializeClass(AccoFolder)
+
+def addAccoFolder(container, id, REQUEST=None, **kw):
+    """Add a AccoFolder."""
+    ob = AccoFolder(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+###)
+
+class AccoHall(CPSDocument): ###(
+    """
+    WAeUP AccoHall containing Departments
+    """
+    meta_type = 'AccoHall'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    security.declareProtected(View,"Title") ###(
+    def Title(self):
+        """compose title"""
+        content = self.getContent()
+        heading = getattr(content,'heading',None)
+        if heading is None:
+            return self.title
+        return heading
+    ###)
+
+InitializeClass(AccoHall)
+
+
+def addAccoHall(container, id, REQUEST=None, **kw):
+    """Add a AccoHall."""
+    ob = AccoHall(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+###)
Index: WAeUP_SRP/trunk_not_used/CHANGES
===================================================================
--- WAeUP_SRP/trunk_not_used/CHANGES	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/CHANGES	(revision 2226)
@@ -0,0 +1,9 @@
+Requires:
+~~~~~~~~~
+-  Zope 2.9.3
+-  CPS 3.4.0 or higher
+
+New features:
+~~~~~~~~~~~~~
+- Version 1.0 contains the backend module to edit and check 
+  university infrastructure and course data. 
Index: WAeUP_SRP/trunk_not_used/Documents.py
===================================================================
--- WAeUP_SRP/trunk_not_used/Documents.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/Documents.py	(revision 2226)
@@ -0,0 +1,84 @@
+#-*- mode: python; mode: fold -*-
+from Globals import InitializeClass
+from AccessControl import ClassSecurityInfo
+
+from Products.CMFCore.utils import UniqueObject, getToolByName
+from Products.CMFCore.permissions import View
+from Products.CMFCore.permissions import ModifyPortalContent
+from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder
+from Products.CPSDocument.CPSDocument import CPSDocument
+
+
+import DateTime
+import csv,re
+import logging
+import Globals
+p_home = Globals.package_home(globals())
+i_home = Globals.INSTANCE_HOME
+
+
+class DocumentsFolder(CPSDocument): ###(
+    """
+    WAeUP DocumentsFolder containing StudyCourses
+    """
+    meta_type = 'DocumentsFolder'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+    use_catalog_for_folder_contents = True
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        return "Documents Section"
+
+    def exportLocalRoles(self,portal_type): ###(
+        name = '%sLocalRoles' % portal_type
+        logger = logging.getLogger('Documents.DocumentsFolder.exportLocalRoles')
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        logger.info('Start exporting %(name)s to %(name)s_%(current)s.csv' % vars())
+        objects = [f.getObject() for f in self.portal_catalog({'meta_type': portal_type})]
+        export = []
+        export.append('"code","users"')
+        #import pdb;pdb.set_trace()
+        for obj in objects:
+            lr = {}
+            for (username, roles) in obj.get_local_roles():
+                lr[ 'user:' + username ] = [x for x in roles]
+            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))
+            export.append('"%s","%s"' % (obj.getId(),lr))
+        open("%s/import/%s-%s.csv" % (i_home,name,current),"w+").write('\n'.join(export))
+###)
+
+
+InitializeClass(DocumentsFolder)
+
+def addDocumentsFolder(container, id, REQUEST=None, **kw):
+    """Add a DocumentsFolder."""
+    ob = DocumentsFolder(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
+###)
+
+class WAeUPDocument(CPSDocument): ###(
+    """
+    WAeUP Document
+    """
+    meta_type = 'WAeUP Document'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    def __init__(self, id, **kw):
+        CPSDocument.__init__(self, id, **kw)
+
+InitializeClass(WAeUPDocument)
+
+def addWAeUPDocument(container, id, REQUEST=None, **kw):
+    """Add a WAeUP Document."""
+    ob = WAeUPDocument(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
+###)
+
+
Index: WAeUP_SRP/trunk_not_used/Extensions/SetupDemoDB.py
===================================================================
--- WAeUP_SRP/trunk_not_used/Extensions/SetupDemoDB.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/Extensions/SetupDemoDB.py	(revision 2226)
@@ -0,0 +1,55 @@
+#-*- mode: python; mode: fold -*-
+# (C) Copyright 2005 The WAeUP group  <http://www.waeup.org>
+# Author: Joachim Schmitz (js@aixtraware.de)
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# $Id$
+"""
+remove Data from live db to make a demodb
+"""
+import random
+import transaction
+import logging
+logger = logging.getLogger('Extension.SetupDemoDB.removeStudents')
+
+def removeStudents(self):
+    "remove nearly all students to form a lightweight demodb"
+    context = self.uniben
+    wftool = context.portal_workflow
+    mtool = context.portal_membership
+    member = mtool.getAuthenticatedMember()
+    roles = member.getRolesInContext(context)
+    stdir = context.portal_directories.students
+    #students_catalog = context.students_catalog
+    students = context.portal_url.getPortalObject().campus.students
+    step = 5
+    #all = students_catalog()
+    all=students.objectIds()
+    todel = (len(all)/10)
+    sample = random.sample(all,todel)
+    logger.info("starting to delete %d students" % todel)
+    for i in range(0,len(sample),step):
+        ids = [b  for b in sample[i:i + step]]
+        logger.info("deleting students %s" % (ids))
+        for sid in ids:
+            if hasattr(stdir, sid):
+                stdir.deleteEntry(sid)
+        try:
+            students.manage_delObjects(ids)
+        except:
+            logger.info("error deleting %s" % (ids))
+        logger.info("deleted %d students %s" % (step,ids))
+        transaction.commit()
Index: WAeUP_SRP/trunk_not_used/Extensions/install.py.260905
===================================================================
--- WAeUP_SRP/trunk_not_used/Extensions/install.py.260905	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/Extensions/install.py.260905	(revision 2226)
@@ -0,0 +1,54 @@
+from Products.CPSInstaller.CPSInstaller import CPSInstaller
+from Products.CMFCore.CMFCorePermissions import View
+
+
+WAEUP_SKINS = { 'waeup_student' : 'Products/WAeUP/skins/waeup_student',
+                  }
+
+WAEUP_TYPES = { 'Student':
+                    { 'typeinfo_name': 'WAeUP: Student (Student)',
+                      'add_meta_type': 'Factory-based Type Information',
+                    },
+                  }
+
+WAEUP_ACTIONS = ( { 'tool'      : 'portal_actions',
+                        'id'        : 'jambadmission',
+                        'name'      : 'action_jambadmission',
+                        'action'    : 'string:${portal_url}/jambadmission_input_form',
+                        'permission': (View, ),
+                        'condition' : '',
+                        'category'  : 'global',
+                        'visible'   : 1,
+                      },
+                    )
+
+
+def install(self):
+    product_name = "WAeUP"
+    installer = CPSInstaller(self, product_name)
+    installer.log("Starting %(product_name)s install" % vars() )
+
+    installer.log("Verifying %(product_name)s permissions" % vars())
+    installer.verifySkins(WAEUP_SKINS)
+    installer.resetSkinCache()
+
+    installer.log("Verifying %(product_name)s schemas" % vars())
+    installer.verifySchemas(self.WAeUPSchemas())
+
+    installer.log("Verifying %(product_name)s layouts" % vars())
+    installer.verifyLayouts(self.WAeUPLayouts())
+    installer.verifyPortalTypes(WAEUP_TYPES)
+
+##    installer.log("Verifying %(product_name)s types" % vars())
+##    installer.verifyContentTypes(WAEUP_TYPES)
+
+    installer.log("Verifying %(product_name)s actions" % vars())
+    installer.verifyActions(WAEUP_ACTIONS) 
+    
+    # This installs the *.po files in the i18n directory of the WAeUPStudent
+    # product.
+    installer.log("Installing translations")
+    
+    installer.finalize()
+    installer.log("End of specific %(product_name)s install" % vars())
+    return installer.logResult()
Index: WAeUP_SRP/trunk_not_used/Extensions/updateDirectories.py
===================================================================
--- WAeUP_SRP/trunk_not_used/Extensions/updateDirectories.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/Extensions/updateDirectories.py	(revision 2226)
@@ -0,0 +1,95 @@
+from zLOG import LOG, DEBUG, INFO
+import re
+
+def update(self):
+
+    _log = []
+    def pr(bla, _log=_log):
+        if bla == 'flush':
+            return '\n'.join(_log)
+        _log.append(bla)
+        if (bla):
+            LOG('csvupdate:', INFO, bla)
+
+    pr("Directories update - started")
+    pr("")
+
+    portal = self.portal_url.getPortalObject()
+
+    csv_dir_name = 'csv'
+    csv_dir = getattr(portal,csv_dir_name)
+
+    members_file = 'Utilisateurs.csv'
+
+    try:
+        members_data = str(portal.restrictedTraverse("%s/%s" % (csv_dir_name, members_file)))
+    except KeyError:
+        members_data = ""
+        pr(" Warning: file %s not found. Directory members was not updated." % members_file)
+
+    if members_data:
+        members = []
+        pr("Updating Members directory")
+        member_schema_fields = ['id', 'password', 'givenName', 'sn', 'email', 'groups', 'roles']
+        lines = members_data.splitlines()
+       
+        CSV_SEPARATOR = ';'
+
+        for line in lines:
+            # Some items might contain the csv separator...
+            # Try to handle this gracefully, detecting separator
+            # followed by a space.
+           
+            member_items = line.split(CSV_SEPARATOR)
+
+            if member_items and not (len(member_items) == 1):
+                member_data = {}
+                for field in member_schema_fields:
+                    try:
+                        raw_field = member_items.pop(0).strip()
+                    except IndexError:
+                        raw_field = ''
+                        member_data['bad_entry'] = 1
+                    # Many fields are enclosed in double quotes 
+                    if raw_field and raw_field[0] == '"' and raw_field[-1] == '"':
+                        raw_field = raw_field[1:-1]
+                    member_data[field] = raw_field
+
+                member_data['confirm'] = member_data['password']
+                member_data['roles'] = member_data['roles'].capitalize()
+                if member_data['roles'] == 'Manager':
+                    member_data['roles'] = ('Manager', 'Member')
+                else:
+                    member_data['roles'] = ('Member',)
+                member_data['groups'] = tuple(member_data['groups'].split(','))
+
+                if not member_data.has_key('bad_entry'):
+                    # declare user as member of the portal
+                    members.append(member_data)
+                else:
+                    pr("** Bad entry detected **")
+                    pr("A data field might contain the csv separator not followed by a space.")
+                    pr("The id of this entry was %s."%member_data['id'])
+                    pr("The entry will NOT be added to the members directory.")
+
+
+        # create members in member directory
+        directory = portal.portal_directories.members
+        for member in members:
+            m_id = member.get('id')
+            pr('Directories update: checking entry '+m_id)
+            if not directory.hasEntry(m_id):
+                # member login does not exist, create
+                pr('Directories update:  creating entry '+m_id)
+                for gr in member['groups']:
+                    if not portal.portal_directories.groups.hasEntry(gr):
+                         portal.portal_directories.groups.createEntry({'group':gr})
+                directory.createEntry(member)
+            else:
+                # member login already exists
+                pr('Directories update:  entry '+m_id+' exists')
+    
+    pr("")
+    pr("Directories update - end")
+
+    return pr("flush")
Index: WAeUP_SRP/trunk_not_used/LICENSE.GPL
===================================================================
--- WAeUP_SRP/trunk_not_used/LICENSE.GPL	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/LICENSE.GPL	(revision 2226)
@@ -0,0 +1,225 @@
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
Index: WAeUP_SRP/trunk_not_used/LICENSE.txt
===================================================================
--- WAeUP_SRP/trunk_not_used/LICENSE.txt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/LICENSE.txt	(revision 2226)
@@ -0,0 +1,15 @@
+  Copyright 2005 WAeUP Group
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
Index: WAeUP_SRP/trunk_not_used/PatchBasicWidgetsCPSStringWidget.py
===================================================================
--- WAeUP_SRP/trunk_not_used/PatchBasicWidgetsCPSStringWidget.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/PatchBasicWidgetsCPSStringWidget.py	(revision 2226)
@@ -0,0 +1,5 @@
+#-*- mode: python; mode: fold -*-
+from Products.CPSSchemas.BasicWidgets import CPSStringWidget
+from Products.CPSSchemas.BasicWidgets import CPSEmailWidget
+CPSStringWidget.display_width = 30
+CPSEmailWidget.display_width = 30
Index: WAeUP_SRP/trunk_not_used/PatchBasicWidgetsUnprepare.py
===================================================================
--- WAeUP_SRP/trunk_not_used/PatchBasicWidgetsUnprepare.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/PatchBasicWidgetsUnprepare.py	(revision 2226)
@@ -0,0 +1,9 @@
+def unprepare(self, datastructure):
+    # Remove costly things already stored from the datastructure
+    try:
+        del datastructure[self.getWidgetId()]
+    except KeyError:
+        # unprepare may be called several times
+        pass
+from Products.CPSSchemas.BasicWidgets import CPSFileWidget
+CPSFileWidget.unprepare = unprepare
Index: WAeUP_SRP/trunk_not_used/PatchCPSDefaultImportExport.py
===================================================================
--- WAeUP_SRP/trunk_not_used/PatchCPSDefaultImportExport.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/PatchCPSDefaultImportExport.py	(revision 2226)
@@ -0,0 +1,75 @@
+from Products.CPSDocument.exportimport import importCPSObjects
+from Products.CMFCore.utils import getToolByName
+from zope.app import zapi
+from Products.GenericSetup.interfaces import INode
+import Products
+
+# Patch to allow the roots importer to create CMF objects.
+# Only for CPS 3.4.1. In 3.4.2 and later this should be fixed.
+
+def _initObjects(self, node):
+    for child in node.childNodes:
+        if child.nodeName != 'object':
+            continue
+        if child.hasAttribute('deprecated'):
+            continue
+        parent = self.context
+
+        obj_id = str(child.getAttribute('name'))
+        if child.hasAttribute('remove'):
+            parent._delObject(obj_id)
+            continue
+
+        if obj_id not in parent.objectIds():
+            portal_type = str(child.getAttribute('portal_type'))
+            if portal_type:
+                wftool = getToolByName(parent, 'portal_workflow')
+                wftool.invokeFactoryFor(parent, portal_type, obj_id)
+            else:
+                meta_type = str(child.getAttribute('meta_type'))
+                __traceback_info__ = obj_id, meta_type
+                for mt_info in Products.meta_types:
+                    if mt_info['name'] == meta_type:
+                        parent._setObject(obj_id, mt_info['instance'](obj_id))
+                        break
+                else:
+                    raise ValueError("unknown meta_type '%s'" % meta_type)
+                        
+
+        if child.hasAttribute('insert-before'):
+            insert_before = child.getAttribute('insert-before')
+            if insert_before == '*':
+                parent.moveObjectsToTop(obj_id)
+            else:
+                try:
+                    position = parent.getObjectPosition(insert_before)
+                    if parent.getObjectPosition(obj_id) < position:
+                        position -= 1
+                    parent.moveObjectToPosition(obj_id, position)
+                except ValueError:
+                    pass
+        elif child.hasAttribute('insert-after'):
+            insert_after = child.getAttribute('insert-after')
+            if insert_after == '*':
+                parent.moveObjectsToBottom(obj_id)
+            else:
+                try:
+                    position = parent.getObjectPosition(insert_after)
+                    if parent.getObjectPosition(obj_id) < position:
+                        position -= 1
+                    parent.moveObjectToPosition(obj_id, position+1)
+                except ValueError:
+                    pass
+
+        obj = getattr(self.context, obj_id)
+        if child.hasAttribute('Title'):
+            print "set title",obj_id 
+            obj.title = child.getAttribute('Title')
+        
+        importer = zapi.queryMultiAdapter((obj, self.environ), INode)
+        if importer:
+            importer.node = child
+
+from Products.CPSDefault.exportimport import RootXMLAdapter
+RootXMLAdapter._initObjects = _initObjects
+
Index: WAeUP_SRP/trunk_not_used/PatchCPSMembershipTool.py
===================================================================
--- WAeUP_SRP/trunk_not_used/PatchCPSMembershipTool.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/PatchCPSMembershipTool.py	(revision 2226)
@@ -0,0 +1,8 @@
+#-*- mode: python; mode: fold -*-
+from Products.CPSCore.CPSMembershipTool import CPSMembershipTool
+CPSMembershipTool.roles_managing_local_roles = ('WorkspaceManager', 
+                                                'SectionManager',
+                                                'SectionOfficer',
+                                                )
+
+
Index: WAeUP_SRP/trunk_not_used/PatchCPSSchemasAttributeStorageAdapter.py
===================================================================
--- WAeUP_SRP/trunk_not_used/PatchCPSSchemasAttributeStorageAdapter.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/PatchCPSSchemasAttributeStorageAdapter.py	(revision 2226)
@@ -0,0 +1,6 @@
+def _getContentUrl(self, object, field_id, file_name):
+    return '%s/%s' % (
+        object.aq_parent.absolute_url(), field_id)
+    
+from Products.CPSSchemas.StorageAdapter import AttributeStorageAdapter
+AttributeStorageAdapter._getContentUrl = _getContentUrl
Index: WAeUP_SRP/trunk_not_used/PatchCPSSchemasDataModel.py
===================================================================
--- WAeUP_SRP/trunk_not_used/PatchCPSSchemasDataModel.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/PatchCPSSchemasDataModel.py	(revision 2226)
@@ -0,0 +1,18 @@
+def _commitData(self):
+    """Compute dependent fields and write data into object."""
+
+    # Compute dependent fields.
+    data = self.data
+    for schema in self._schemas:
+        for field_id, field in schema.items():
+            if self.isDirty(field_id):
+                #LOG("DataModel", TRACE, "Computing field '%s'" % (field_id,))
+                field.computeDependantFields(self._schemas, data,
+                                             context=self._context)
+
+    # Call the adapters to store the data.
+    for adapter in self._adapters:
+        adapter.setData(data)
+
+from Products.CPSSchemas.DataModel import DataModel
+DataModel._commitData = _commitData
Index: WAeUP_SRP/trunk_not_used/PatchCPSSchemasVocabulariesTool.py
===================================================================
--- WAeUP_SRP/trunk_not_used/PatchCPSSchemasVocabulariesTool.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/PatchCPSSchemasVocabulariesTool.py	(revision 2226)
@@ -0,0 +1,30 @@
+from Products.CPSSchemas.VocabulariesTool import LOCAL_VOCABULARY_CONTAINER_ID
+def getVocabularyFor(self, context, voc_id):
+    """Returns vocabulary for given context."""
+
+    def hasLocalVocContainer(context):
+        if getattr(context, 'hasObject', None) is None:
+            return False
+        return context.hasObject(LOCAL_VOCABULARY_CONTAINER_ID)
+
+    def getLocalVocContainer(context):
+        return context._getOb(LOCAL_VOCABULARY_CONTAINER_ID, None)
+
+    getParentNode = lambda node: getattr(getattr(node, 'aq_inner', None),
+                                         'aq_parent', None)
+
+    if not hasLocalVocContainer(context):
+        parent = getParentNode(context)
+        while parent is not None:
+            if hasLocalVocContainer(parent):
+                return getLocalVocContainer(parent).getVocabulary(voc_id)
+            parent = getParentNode(parent)
+        # no local vocabulary container found for given context
+        globvoc = self._getOb(voc_id, None)
+        if globvoc is None:
+            raise KeyError, 'No vocabulary by id %s' % voc_id
+        return globvoc
+    else:
+        return getLocalVocContainer(context).getVocabulary(voc_id)
+from Products.CPSSchemas.VocabulariesTool import VocabulariesTool
+VocabulariesTool.getVocabularyFor = getVocabularyFor
Index: WAeUP_SRP/trunk_not_used/PatchCPSStackingDirectoryStorageAdapter.py
===================================================================
--- WAeUP_SRP/trunk_not_used/PatchCPSStackingDirectoryStorageAdapter.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/PatchCPSStackingDirectoryStorageAdapter.py	(revision 2226)
@@ -0,0 +1,54 @@
+# (C) Copyright 2004 Nuxeo SARL <http://nuxeo.com>
+# Author: Georges Racinet <gracinet@nuxeo.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# $Id: utils.py 35055 2006-04-10 15:51:21Z gracinet $
+
+from Products.CMFCore.utils import getToolByName
+from Products.CPSDirectory.BaseDirectory import ConfigurationError
+
+def _setData(self, data, **kw):
+    """Set data to the entry, from a mapping."""
+
+    # TODO : this code should be placed in parent class
+    # and used by all StorageAdapter descendants
+    data = self._setDataDoProcess(data, **kw)
+
+    if not self._creation:
+        # XXX Note: if we attempt to change the backing id here, we get
+        # a KeyError. Unless an entry with the new backing id already
+        # exists,
+        # in which case, it would be overwritten...
+        # An explicit test would be better.
+        old_entry, b_dir = self._dir._getEntryFromBacking(self._id)
+        b_dir._editEntry(data)
+    else:
+        dir_id = self._dir.creation_dir
+        if "Student" in data.get('roles'):
+            dir_id = "students"
+        if not dir_id:
+            raise ValueError("Creation not allowed (no backing directory)")
+
+        dtool = getToolByName(self._dir, 'portal_directories')
+        try:
+            b_dir = getattr(dtool, dir_id)
+        except AttributeError:
+            raise ConfigurationError("No backing directory '%s'" % dir_id)
+
+        b_dir._createEntry(data)
+
+from Products.CPSDirectory.StackingDirectory import StackingStorageAdapter
+StackingStorageAdapter._setData = _setData
Index: WAeUP_SRP/trunk_not_used/PatchCPSUserFolderUserFolder.py
===================================================================
--- WAeUP_SRP/trunk_not_used/PatchCPSUserFolderUserFolder.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/PatchCPSUserFolderUserFolder.py	(revision 2226)
@@ -0,0 +1,194 @@
+from AccessControl import ClassSecurityInfo
+from ExtensionClass import Base
+from Acquisition import Implicit
+from Acquisition import aq_base, aq_parent, aq_inner
+import re
+security = ClassSecurityInfo()
+
+def getCertificateObject(self,st_entry):
+    try:
+        return getattr(getattr(getattr(self.portal_url.getPortalObject().campus.academics,st_entry.faculty),
+                               st_entry.department).certificates,st_entry.course)
+    except:
+        return None
+
+security.declarePublic('getRolesInContext')
+def getRolesInContext(self, object):
+    """Get the list of roles assigned to the user.
+    This includes local roles assigned in the context of
+    the passed in object.
+    Knows about local roles blocking (roles starting with '-').
+    """
+    name = self.getUserName()
+    roles = self.getRoles()
+    # deal with groups
+    groups = self.getComputedGroups()
+    # end groups
+    local = {}
+    stop_loop = 0
+    real_object = object
+    object = aq_inner(object)
+    while 1:
+        # Collect all roles info
+        lrd = {}
+        local_roles = getattr(object, '__ac_local_roles__', None)
+        if local_roles:
+            if callable(local_roles):
+                local_roles = local_roles() or {}
+            for r in local_roles.get(name, ()):
+                if r:
+                    lrd[r] = None
+        local_group_roles = getattr(object, '__ac_local_group_roles__', None)
+        if local_group_roles:
+            if callable(local_group_roles):
+                local_group_roles = local_group_roles() or {}
+            for g in groups:
+                for r in local_group_roles.get(g, ()):
+                    if r:
+                        lrd[r] = None
+        lr = lrd.keys()
+        # Positive role assertions
+        for r in lr:
+            if r[0] != '-':
+                if not local.has_key(r):
+                    local[r] = 1 # acquired role
+        # Negative (blocking) role assertions
+        for r in lr:
+            if r[0] == '-':
+                r = r[1:]
+                if not r:
+                    # role '-' blocks all acquisition
+                    stop_loop = 1
+                    break
+                if not local.has_key(r):
+                    local[r] = 0 # blocked role
+        if stop_loop:
+            break
+        if hasattr(object, 'aq_parent'):
+            object = aq_inner(object.aq_parent)
+            continue
+        if hasattr(object, 'im_self'):
+            object = aq_inner(object.im_self)
+            continue
+        break
+    roles = list(roles)
+    for r, v in local.items():
+        if v: # only if not blocked
+            roles.append(r)
+    ## patch to assign dynamic roles for WAeUP
+    while 1:
+        #if self.isStudent():
+        #    break
+        # if re.match(r'\D\d\d\d\d\d\d',name):
+        #    break
+        #if len(name) != 7:
+        #    break
+        #try:
+        #    int(name[1:])
+        #except:
+        #    break
+        o = ord(name[1])
+        if o >= 48 and o <= 57:
+            break
+        groups = self.portal_membership.getAuthenticatedMember().getGroups()
+        if not ("ClearanceOfficers" in groups or "CourseAdvisers" in groups):
+            break
+        if callable(real_object) and hasattr(real_object,'im_self'):
+            real_object = real_object.im_self
+
+        if real_object is None:
+            break
+        if hasattr(real_object,'portal_type') and\
+                   real_object.portal_type not in ("Student",
+                                                   "StudentClearance",
+                                                   "StudentStudyLevel",
+                                                   "StudentCourseResult",
+                                                  ):
+            break
+
+        # don't test if it is not a proxy
+        #if real_object.portal_type == real_object.meta_type:
+        #    break
+
+        # can be later simplified by replacing by students_catalog values - Henrik
+        # getattr works always because of acquisition ?! Henrik
+        # sc = getattr(real_object,'study_course',None)
+        # if sc is None:
+        #     break
+        # sc_obj = sc.getContent()
+        # cert_id = sc_obj.study_course
+        # res_cert = self.portal_catalog(id = cert_id)
+        # if len(res_cert) != 1:
+        #     break
+        # certificate_brain = res_cert[0]
+        # certificate_obj = certificate_brain.getObject()
+        # cert_path = certificate_brain.getPath().split('/')
+        # fac_id = cert_path[-4]
+        # dep_id = cert_path[-3]
+        # temporary self-healing function
+        # deprecated after reindexing the students_catalog
+        student_id = self.getStudentId()
+        res = self.students_catalog(id=student_id)
+        if len(res) != 1:
+            break
+        st_entry = res[0]
+        # if st_entry.faculty != fac_id or\
+        #    st_entry.department != dep_id or\
+        #    st_entry.course != cert_id:
+        #        self.students_catalog.modifyRecord(id = student_id,
+        #                                         faculty = fac_id,
+        #                                         department = dep_id,
+        #                                         course = cert_id
+        #                                         )
+        if real_object.portal_type in ("StudentStudyLevel","StudentCourseResult"):
+            # res_cert = self.portal_catalog(id = st_entry.course)
+            # if len(res_cert) != 1:
+            #     break
+            # certificate_brain = res_cert[0]
+            # certificate_obj = certificate_brain.getObject()
+            certificate_obj = getCertificateObject(self,st_entry)
+            if certificate_obj is None:
+                #from pdb import set_trace;set_trace()
+                break
+            if real_object.meta_type.endswith('Folder'): # it is a proxy
+                object = real_object
+            else:
+                object = real_object.aq_parent
+            if real_object.portal_type == "StudentStudyLevel":
+                level = object.getId()
+            elif real_object.portal_type == "StudentCourseResult":
+                level = object.aq_parent.getId()
+            context_obj = getattr(certificate_obj,level,None)
+            if context_obj is None:
+                #from pdb import set_trace;set_trace()
+                break
+            allowed = set(('CourseAdviser', 'SectionManager'))
+        elif real_object.portal_type == "Student" and "CourseAdvisers" in groups:
+            #we need some special processing since CourseAdvisers are only
+            #specified per StudyLevel
+            certificate_obj = getCertificateObject(self,st_entry)
+            if certificate_obj is None:
+                #from pdb import set_trace;set_trace()
+                break
+            allowed = set(('CourseAdviser', 'SectionManager'))
+            for context_obj in certificate_obj.objectValues():
+                dynamic_roles = set(self.getRolesInContext(context_obj))
+                intersect = dynamic_roles & allowed
+                if intersect:
+                    roles.extend(list(intersect))
+            break
+        else:
+            res = self.portal_catalog(portal_type="Department",id=st_entry.department)
+            allowed = set(('ClearanceOfficer', 'SectionManager'))
+            if len(res) != 1:
+                break
+            context_obj = res[0].getObject()
+        dynamic_roles = set(self.getRolesInContext(context_obj))
+        intersect = dynamic_roles & allowed
+        if intersect:
+            roles.extend(list(intersect))
+        break
+    return roles
+
+from Products.CPSUserFolder.CPSUserFolder import CPSUser
+CPSUser.getRolesInContext = getRolesInContext
Index: WAeUP_SRP/trunk_not_used/PatchCPSWorkflowWorkflowDefinition.py
===================================================================
--- WAeUP_SRP/trunk_not_used/PatchCPSWorkflowWorkflowDefinition.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/PatchCPSWorkflowWorkflowDefinition.py	(revision 2226)
@@ -0,0 +1,183 @@
+import logging
+from ZODB.loglevels import TRACE
+
+from AccessControl import ClassSecurityInfo
+from AccessControl import getSecurityManager
+from Acquisition import aq_parent
+from Acquisition import aq_inner
+from Globals import InitializeClass
+
+from Products.CMFCore.utils import getToolByName
+from Products.CMFCore.WorkflowCore import ObjectMoved
+from Products.CMFCore.WorkflowCore import ObjectDeleted
+from Products.CMFCore.WorkflowCore import WorkflowException
+
+from Products.DCWorkflow.DCWorkflow import DCWorkflowDefinition
+from Products.DCWorkflow.Transitions import TRIGGER_USER_ACTION
+
+#from expression import CPSStateChangeInfo as StateChangeInfo
+#from expression import createExprContext
+
+#from zope.interface import implements
+#from Products.CPSWorkflow.interfaces import ICPSWorkflowDefinition
+
+from Products.CPSCore.ProxyBase import ProxyBase
+from Products.CPSCore.EventServiceTool import getEventService
+
+#from constants import TRANSITION_FLAGS_EXPORT
+
+#
+# Backwards compatibility with CPS3 <= 3.2.x
+# Importing transition flags from here before.
+#
+
+from Products.CPSWorkflow.transitions import *
+from Products.CPSWorkflow.states import *
+
+
+logger = logging.getLogger('CPSWorkflow.workflow')
+security = ClassSecurityInfo()
+
+security.declarePrivate('updateStackDefinitionsRoleMappingFor')
+def updateStackDefinitionsRoleMappingsFor(self, ob, **kw):
+    """Update local roles for delegatees that are within workflow stacks
+    """
+    current_wf_var_id = kw.get('current_wf_var_id', '')
+
+    wftool = getToolByName(self, 'portal_workflow')
+    stackdefs = wftool.getStackDefinitionsFor(ob)
+
+    changed = 0
+
+    #
+    # First save the former local roles maping They will be
+    # overriden if defined on the state just after.  For the other
+    # ones, we need to keep the flrm's since the stackdef might be
+    # defined on another state further within the process
+    # definition or called by a stack flaged transition.
+    #
+    tdef = kw.get('tdef')
+    history = wftool.getHistoryOf(self.id, ob)
+    if history is not None:
+        try:
+            former_status = history[-2]
+        except IndexError:
+            # Virgin instance ;)
+            pass
+        else:
+            sflrm = former_status.get('sflrm', {})
+            for k, v in sflrm.items():
+                wftool.updateFormerLocalRoleMappingForStack(ob, self.id,
+                                                            k, v)
+
+    #
+    # Let's ask the stack definition for the list of local roles
+    #
+
+    for stackdef in stackdefs.keys():
+
+        # Update only the variable on wich the transition just applied
+        if not stackdef == current_wf_var_id:
+            continue
+
+        ds = wftool.getInfoFor(ob, stackdef, self.id)
+        former_mapping = wftool.getFormerLocalRoleMappingForStack(
+            ob, self.id, stackdef)
+        mapping = stackdefs[stackdef]._getLocalRolesMapping(ds)
+
+        #
+        # First remove associated local roles to the ones who are not
+        # supposed to have any (not a single one)
+        #
+
+        for id in former_mapping.keys():
+            old_local_roles = former_mapping[id]
+
+            # Remove all previous local roles in this case
+            if id not in mapping.keys():
+                roles_to_remove = old_local_roles
+
+            # Remove only local roles that are only within the
+            # previous mapping
+            else:
+                roles_to_remove = []
+                for old_role in old_local_roles:
+                    if old_role not in mapping[id]:
+                        roles_to_remove.append(old_role)
+
+
+            # Check that no other stack distributes currently this role
+            # to the current member
+            roles_to_keep = ()
+            for old_local_role in roles_to_remove:
+                stacks = wftool.getStacks(ob)
+                for stack_id, stack in stacks.items():
+                    if stack_id != current_wf_var_id:
+                        # The current transition is already
+                        # executed on ob thus we can take the
+                        # former mapping for this other given
+                        if (old_local_role in
+                            wftool.getFormerLocalRoleMappingForStack(
+                            ob, self.id, stack_id).get(id, ())):
+                            roles_to_keep += (old_local_role,)
+
+            # Do the actual job to remove absolete roles
+            for old_local_role in roles_to_remove:
+
+                # Don't remove those already managed by another stack
+                if old_local_role in roles_to_keep:
+                    continue
+
+                if not id.startswith('group:'):
+                    current_roles = list(
+                        ob.get_local_roles_for_userid(userid=id))
+                    new_roles = [role for role in current_roles
+                                 if role != old_local_role]
+                    ob.manage_delLocalRoles(userids=[id])
+                    if new_roles:
+                        ob.manage_setLocalRoles(id, new_roles)
+                else:
+                    id = id[len('group:'):]
+                    current_roles = list(
+                        ob.get_local_roles_for_groupid(groupid=id))
+                    new_roles = [role for role in current_roles
+                                 if role != old_local_role]
+                    ob.manage_delLocalGroupRoles(groupids=[id])
+                    if new_roles:
+                        ob.manage_setLocalGroupRoles(id, new_roles)
+
+            # Update ?
+            if roles_to_remove:
+                changed = 1
+
+        #
+        # Add local roles to member / groups within the mapping if
+        # they don't have the roles already in their merged local roles
+        #
+
+        for id in mapping.keys():
+            changed = 1
+            local_roles = mapping[id]
+            if not id.startswith('group:'):
+                current_roles = ob.get_local_roles_for_userid(userid=id)
+                new_roles = list(current_roles)
+                for role in local_roles:
+                    if role not in new_roles:
+                        new_roles.append(role)
+                ob.manage_setLocalRoles(id, new_roles)
+            else:
+                id = id[len('group:'):]
+                current_roles = ob.get_local_roles_for_groupid(groupid=id)
+                new_roles = list(current_roles)
+                for role in local_roles:
+                    if role not in new_roles:
+                        new_roles.append(role)
+                ob.manage_setLocalGroupRoles(id, new_roles)
+
+        # Update the former local role mapping
+        wftool.updateFormerLocalRoleMappingForStack(ob, self.id, stackdef,
+                                                    mapping)
+    return changed
+
+from Products.CPSWorkflow.workflow import WorkflowDefinition
+WorkflowDefinition.updateStackDefinitionsRoleMappingsFor = updateStackDefinitionsRoleMappingsFor
Index: WAeUP_SRP/trunk_not_used/PatchCatalogToolXMLAdapter.py
===================================================================
--- WAeUP_SRP/trunk_not_used/PatchCatalogToolXMLAdapter.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/PatchCatalogToolXMLAdapter.py	(revision 2226)
@@ -0,0 +1,58 @@
+#from Products.CMFCore.utils import getToolByName
+#from zope.app import zapi
+#from Products.GenericSetup.interfaces import INode
+#import Products
+
+def _importNode(self, node):
+    """Import the object from the DOM node.
+    """
+    na = node.attributes.items()
+    something_changed = False
+    new_indexes = []
+    new_columns = []
+    meta_type = na[0][1]
+    name = na[1][1]
+    if self.environ.shouldPurge():
+        self._purgeProperties()
+        self._purgeObjects()
+        self._purgeIndexes()
+        self._purgeColumns()
+    columns = []
+    for col in self._extractColumns()._get_childNodes():
+        columns.append(col.attributes.items()[0][1])
+    inds = {}
+    for ind in self._extractIndexes()._get_childNodes():
+        inds[ind.attributes.items()[1][1]] = ind.attributes.items()[0][1]
+    if meta_type in ('CMF Catalog',"WAeUP Table"):
+        for ch in node._get_childNodes():
+            if ch.nodeName in ('index',):
+                cha = ch.attributes.items()
+                iname = cha[1][1]
+                itype = cha[0][1]
+                if iname in inds.keys() and inds[iname] == itype:
+                    continue
+                new_indexes.append(iname)
+                something_changed = True
+            elif ch.nodeName in ('column',):
+                cha = ch.attributes.items()
+                iname = cha[0][1]
+                if iname in columns:
+                    continue
+                new_columns.append(iname)
+                something_changed = True
+            else:
+                continue
+    if something_changed :
+        self._logger.info("Catalog tool %s cleared."  % na[1][1])
+        self._logger.info("%s modified." % na[1][1])
+        self._initProperties(node)
+        self._initObjects(node)
+        if new_indexes and len(self.context()) == 0: #disable creation of new indexes if records in the table
+            self._initIndexes(node)
+        self._initColumns(node)
+        #self._refreshCatalog()
+
+    self._logger.info("Catalog tool %s imported."  % na[1][1])
+    
+from Products.CPSCore.exportimport.catalog import CatalogToolXMLAdapter
+CatalogToolXMLAdapter._importNode = _importNode
Index: WAeUP_SRP/trunk_not_used/PatchExtendedWidgetsCPSDateTimeWidget.py
===================================================================
--- WAeUP_SRP/trunk_not_used/PatchExtendedWidgetsCPSDateTimeWidget.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/PatchExtendedWidgetsCPSDateTimeWidget.py	(revision 2226)
@@ -0,0 +1,64 @@
+#-*- mode: python; mode: fold -*-
+import re
+from DateTime.DateTime import DateTime
+from Products.CPSSchemas.ExtendedWidgets import CPSDateTimeWidget
+CPSDateTimeWidget.time_hour_default = '00'
+
+def validate(self, datastructure, **kw):
+    """Validate datastructure and update datamodel."""
+    datamodel = datastructure.getDataModel()
+    field_id = self.fields[0]
+    widget_id = self.getWidgetId()
+    if datastructure.has_key(widget_id + '_date'):
+        date = datastructure[widget_id + '_date'].strip()
+    else:
+        date = datastructure[widget_id].strip()
+    if datastructure.has_key(widget_id + '_hour'):
+        hour = datastructure[widget_id + '_hour'].strip()
+    else:
+        hour = self.time_hour_default
+    if datastructure.has_key(widget_id + '_minute'):
+        minute = datastructure[widget_id + '_minute'].strip()
+    else:
+        minute = self.time_minutes_default
+
+    if not (date):
+        if self.is_required:
+            datastructure[widget_id] = ''
+            datastructure.setError(widget_id, 'cpsschemas_err_required')
+            return 0
+        else:
+            datamodel[field_id] = None
+            return 1
+    # import pdb;pdb.set_trace()
+    if self.view_format.startswith('iso8601'):
+        if re.match(r'^[0-9]+-[0-9]{2}-[0-9]{2}', date) is not None:
+            y, m, d = date.split('-')
+        else:
+            datastructure.setError(widget_id, 'cpsschemas_err_date')
+            return 0
+    else:
+        if re.match(r'^[0-9]?[0-9]/[0-9]?[0-9]/[0-9]{2,4}$', date) is not None:
+            d, m, y = date.split('/') # always use d/m/y
+            # locale = self.translation_service.getSelectedLanguage()
+            # if False and locale in ('en', 'hu'): 
+            #     m, d, y = date.split('/')
+            # else:
+        else:
+            datastructure.setError(widget_id, 'cpsschemas_err_date')
+            return 0
+
+    try:
+        v = DateTime(int(y), int(m), int(d), int(hour), int(minute))
+    except (ValueError, TypeError, DateTime.DateTimeError,
+            DateTime.SyntaxError, DateTime.DateError):
+        datastructure.setError(widget_id, 'cpsschemas_err_date')
+        return 0
+    else:
+        datastructure[widget_id] = v
+        datamodel[field_id] = v
+        return 1
+    
+
+CPSDateTimeWidget.validate = validate
+
Index: WAeUP_SRP/trunk_not_used/PatchFasterSessionData.py
===================================================================
--- WAeUP_SRP/trunk_not_used/PatchFasterSessionData.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/PatchFasterSessionData.py	(revision 2226)
@@ -0,0 +1,3 @@
+from Products.faster.sessiondata import CBSessionDataContainer
+from Products.faster.appendict import AppendOnlyDict
+CBSessionDataContainer._BUCKET_TYPE = AppendOnlyDict
Index: WAeUP_SRP/trunk_not_used/PatchLocalizerMessageCatalog_gettext.py
===================================================================
--- WAeUP_SRP/trunk_not_used/PatchLocalizerMessageCatalog_gettext.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/PatchLocalizerMessageCatalog_gettext.py	(revision 2226)
@@ -0,0 +1,50 @@
+from types import StringType, UnicodeType
+from AccessControl import ClassSecurityInfo
+from Products.Localizer.Utils import charsets, get_language_name, lang_negotiator
+security = ClassSecurityInfo()
+security.declarePublic('gettext')
+# set default for add = 0
+_marker = []
+def gettext(self, message, lang=None, add=0, default=_marker):
+    """Returns the message translation from the database if available.
+
+    If add=1, add any unknown message to the database.
+    If a default is provided, use it instead of the message id
+    as a translation for unknown messages.
+    """
+
+    if type(message) not in (StringType, UnicodeType):
+        raise TypeError, 'only strings can be translated.'
+
+    message = message.strip()
+
+    if default is _marker:
+        default = message
+
+    # Add it if it's not in the dictionary
+    if add and not self._messages.has_key(message) and message:
+        self._messages[message] = PersistentMapping()
+
+    # Get the string
+    if self._messages.has_key(message):
+        m = self._messages[message]
+
+        if lang is None:
+            # Builds the list of available languages
+            # should the empty translations be filtered?
+            available_languages = list(self._languages)
+
+            # Get the language!
+            lang = lang_negotiator(available_languages)
+
+            # Is it None? use the default
+            if lang is None:
+                lang = self._default_language
+
+        if lang is not None:
+            return m.get(lang) or default
+
+    return default
+from Products.Localizer.MessageCatalog import MessageCatalog
+MessageCatalog.gettext = gettext
+
Index: WAeUP_SRP/trunk_not_used/PatchQueueCatalogProcessQueue.py
===================================================================
--- WAeUP_SRP/trunk_not_used/PatchQueueCatalogProcessQueue.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/PatchQueueCatalogProcessQueue.py	(revision 2226)
@@ -0,0 +1,59 @@
+import sets
+import logging
+from Products.QueueCatalog.CatalogEventQueue import CatalogEventQueue, EVENT_TYPES, ADDED_EVENTS
+from Products.QueueCatalog.CatalogEventQueue import ADDED, CHANGED, CHANGED_ADDED, REMOVED
+from Products.QueueCatalog.CatalogEventQueue import SAFE_POLICY, ALTERNATIVE_POLICY
+from Products.QueueCatalog.QueueCatalog import cataloged
+from ZODB.POSException import ConflictError
+from ZEO.Exceptions import ClientDisconnected
+logger = logging.getLogger('event.QueueCatalog')
+
+def _process_queue(self, queue, limit):
+    """Process a single queue"""
+    catalog = self.getZCatalog()
+
+    if self.getProcessAllIndexes():
+        #idxs = None
+        idxs = catalog.indexes()
+    else:
+        cat_indexes = sets.Set(catalog.indexes())
+        immediate_indexes = sets.Set(self._immediate_indexes)
+        if not immediate_indexes or immediate_indexes==cat_indexes:
+            idxs = catalog.indexes() # do all of 'em
+        else:
+            idxs = list(cat_indexes - immediate_indexes)
+    events = queue.process(limit)
+    count = 0
+
+    for uid, (t, event) in events.items():
+        if event is REMOVED:
+            try:
+                if cataloged(catalog, uid):
+                    catalog.uncatalog_object(uid)
+            except (ConflictError, ClientDisconnected):
+                logger.error('conflict-error uncataloging object', exc_info=True)
+            except:
+                logger.error('error uncataloging object', exc_info=True)
+        else:
+            # add or change
+            if event is CHANGED and not cataloged(catalog, uid):
+                continue
+            # Note that the uid may be relative to the catalog.
+            obj = catalog.unrestrictedTraverse(uid, None)
+            if obj is not None:
+                immediate_metadata = self.getImmediateMetadataUpdate()
+                try:
+                    catalog.catalog_object(
+                        obj, uid, idxs=idxs,
+                        update_metadata=not immediate_metadata)
+                except (ConflictError, ClientDisconnected):
+                    logger.error('conflict-error uncataloging object', exc_info=True)
+                    #raise
+                except:
+                    logger.error('error cataloging object', exc_info=True)
+
+        count = count + 1
+
+    return count
+from Products.QueueCatalog.QueueCatalog import QueueCatalog 
+QueueCatalog._process_queue = _process_queue
Index: WAeUP_SRP/trunk_not_used/PatchRenderActionIcon.py
===================================================================
--- WAeUP_SRP/trunk_not_used/PatchRenderActionIcon.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/PatchRenderActionIcon.py	(revision 2226)
@@ -0,0 +1,44 @@
+from Products.CMFCore.utils import getToolByName
+
+ACTIONICON_RAMCACHE_ID = 'actioncons'
+IMG_TAG = '<img src="%s" width="%s" height="%s" alt="%s" />'
+
+def renderActionIcon(self, category=None, action_id=None,
+                     base_url='', alt=''):
+    """Renders the action's icon"""
+
+    if category is None or action_id is None:
+        return None
+
+    aitool = getToolByName(self, 'portal_actionicons', None)
+    if aitool is None:
+        return None
+
+    cache = self.getCache(ACTIONICON_RAMCACHE_ID)
+    # compute the cache index
+    index = (action_id, category, base_url, alt)
+
+    img_tag = cache.getEntry(index)
+    # the icon is not in the cache
+    if img_tag is None:
+        icon_path = aitool.queryActionIcon(category=category,
+            action_id=action_id)
+        if not icon_path:
+            return
+
+
+
+        # fall back to the icon path specified in CMFActionIcons
+        img = self.unrestrictedTraverse(icon_path, default=None)
+        if img is None:
+            return None
+        img_tag = IMG_TAG % (icon_path,
+                             getattr(img, 'width', 0),
+                             getattr(img, 'height', 0),
+                             alt)
+        if cache is not None:
+            cache.setEntry(index, img_tag)
+    return img_tag
+
+from Products.CPSPortlets.PortletsTool import PortletsTool
+PortletsTool.renderActionIcon = renderActionIcon
Index: WAeUP_SRP/trunk_not_used/PatchZCatalogCatalogUpdateMetadata.py
===================================================================
--- WAeUP_SRP/trunk_not_used/PatchZCatalogCatalogUpdateMetadata.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/PatchZCatalogCatalogUpdateMetadata.py	(revision 2226)
@@ -0,0 +1,42 @@
+from BTrees.IOBTree import IOBTree
+from random import randint
+def updateMetadata(self, object, uid):
+    """ Given an object and a uid, update the column data for the
+    uid with the object data iff the object has changed """
+    data = self.data
+    index = self.uids.get(uid, None)
+    newDataRecord = self.recordify(object)
+
+    if index is None:
+        if type(data) is IOBTree:
+            # New style, get random id
+
+            index=getattr(self, '_v_nextid', 0)
+            if index % 4000 == 0:
+                index = randint(-2000000000, 2000000000)
+            while not data.insert(index, newDataRecord):
+                index = randint(-2000000000, 2000000000)
+
+            # We want ids to be somewhat random, but there are
+            # advantages for having some ids generated
+            # sequentially when many catalog updates are done at
+            # once, such as when reindexing or bulk indexing.
+            # We allocate ids sequentially using a volatile base,
+            # so different threads get different bases. This
+            # further reduces conflict and reduces churn in
+            # here and it result sets when bulk indexing.
+            self._v_nextid=index+1
+        else:
+            if data:
+                # find the next available unique id
+                index = data.keys()[-1] + 1
+            else:
+                index=0
+            # meta_data is stored as a tuple for efficiency
+            data[index] = newDataRecord
+    else:
+        #if True or data.get(index, 0) != newDataRecord:
+        data[index] = newDataRecord
+    return index
+from Products.ZCatalog.Catalog import Catalog
+Catalog.updateMetadata = updateMetadata
Index: WAeUP_SRP/trunk_not_used/PatchZODBConnectionOpen.py
===================================================================
--- WAeUP_SRP/trunk_not_used/PatchZODBConnectionOpen.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/PatchZODBConnectionOpen.py	(revision 2226)
@@ -0,0 +1,61 @@
+from ZODB.Connection import Connection
+from time import time
+import transaction
+
+global_reset_counter = 0
+
+def open(self, transaction_manager=None, mvcc=True, synch=True,
+            delegate=True):
+    """Register odb, the DB that this Connection uses.
+
+    This method is called by the DB every time a Connection
+    is opened.  Any invalidations received while the Connection
+    was closed will be processed.
+
+    If the global module function resetCaches() was called, the
+    cache will be cleared.
+
+    Parameters:
+    odb: database that owns the Connection
+    mvcc: boolean indicating whether MVCC is enabled
+    transaction_manager: transaction manager to use.  None means
+        use the default transaction manager.
+    synch: boolean indicating whether Connection should
+    register for afterCompletion() calls.
+    """
+
+    # TODO:  Why do we go to all the trouble of setting _db and
+    # other attributes on open and clearing them on close?
+    # A Connection is only ever associated with a single DB
+    # and Storage.
+
+    self._opened = time()
+    self._synch = synch
+    self._mvcc = mvcc and not self._version
+    if transaction_manager is None:
+        transaction_manager = transaction.manager
+
+    self.transaction_manager = transaction_manager
+
+    # js 28-5-2007 always call _flush_invalidations 
+    self._flush_invalidations()
+    if self._reset_counter != global_reset_counter:
+        # New code is in place.  Start a new cache.
+        self._resetCache()
+    # else:
+    #     import pdb; pdb.set_trace()
+    #     self._flush_invalidations()
+
+    if synch:
+        transaction_manager.registerSynch(self)
+
+    if self._cache is not None:
+        self._cache.incrgc() # This is a good time to do some GC
+
+    if delegate:
+        # delegate open to secondary connections
+        for connection in self.connections.values():
+            if connection is not self:
+                connection.open(transaction_manager, mvcc, synch, False)
+
+Connection.open = open
Index: WAeUP_SRP/trunk_not_used/PatchZODBDirectory_searchEntries.py
===================================================================
--- WAeUP_SRP/trunk_not_used/PatchZODBDirectory_searchEntries.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/PatchZODBDirectory_searchEntries.py	(revision 2226)
@@ -0,0 +1,82 @@
+# (C) Copyright 2004 Nuxeo SARL <http://nuxeo.com>
+# Author: Georges Racinet <gracinet@nuxeo.com>
+# Patched by Joachim Schmitz <js@aixtraware.de>
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# $Id: utils.py 35055 2006-04-10 15:51:21Z gracinet $
+
+from zLOG import LOG, DEBUG, TRACE
+from copy import deepcopy
+from AccessControl import ClassSecurityInfo
+from Products.CPSSchemas.StorageAdapter import AttributeStorageAdapter
+from Products.CPSDirectory.utils import QueryMatcher
+security = ClassSecurityInfo()
+
+
+security.declarePrivate('_searchEntries')
+def _searchEntries(self, return_fields=None, **kw):
+    """Search for entries in the directory.
+    """
+    if self.ZCacheable_isCachingEnabled():
+        keyset = {'return_fields' : return_fields}
+        keyset.update(kw)
+        LOG('ZODBDirectory._searchEntries', TRACE,
+            "Searching cache for %s" % (keyset,))
+        from_cache = self.ZCacheable_get(keywords=keyset)
+        if from_cache is not None:
+            LOG('ZODBDirectory._searchEntries', TRACE, " -> results=%s" %
+                (from_cache[:20],))
+            return deepcopy(from_cache)
+    else:
+        keyset = None
+
+    matcher = QueryMatcher(kw, accepted_keys=self._getFieldIds(),
+                           substring_keys=self.search_substring_fields)
+
+    # Compute needed fields from object.
+    # All fields we need to return.
+    field_ids_d, return_fields = self._getSearchFields(return_fields)
+    # Add all fields the search is made on.
+    field_ids = matcher.getKeysSet().union(field_ids_d)
+
+    # Do the search.
+    schema = self._getUniqueSchema()
+    adapter = AttributeStorageAdapter(schema, None,
+                                      field_ids=list(field_ids))
+    res = []
+    for id, ob in self.objectItems():
+        if getattr(ob,'homeless',False):
+            continue
+        adapter.setContextObject(ob)
+        entry = adapter.getData()
+        adapter.finalizeDefaults(entry)
+        if not matcher.match(entry):
+            continue
+        # Compute result to return.
+        if return_fields is None:
+            res.append(id)
+        else:
+            d = {}
+            for key in return_fields:
+                d[key] = entry[key]
+            res.append((id, d))
+
+    if keyset is not None:
+        LOG('ZODBDirectory._searchEntries', TRACE, "Putting in cache")
+        self.ZCacheable_set(res, keywords=keyset)
+
+    return deepcopy(res)
+from Products.CPSDirectory.ZODBDirectory import  ZODBDirectory
+ZODBDirectory._searchEntries = _searchEntries
Index: WAeUP_SRP/trunk_not_used/Payment.py
===================================================================
--- WAeUP_SRP/trunk_not_used/Payment.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/Payment.py	(revision 2226)
@@ -0,0 +1,68 @@
+#-*- mode: python; mode: fold -*-
+from Globals import InitializeClass
+from AccessControl import ClassSecurityInfo
+
+from Products.CMFCore.utils import UniqueObject, getToolByName
+from Products.CMFCore.permissions import View
+from Products.CMFCore.permissions import ModifyPortalContent
+from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder
+#from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument
+from Products.CPSDocument.CPSDocument import CPSDocument
+from Products.CPSCore.CPSBase import CPSBaseBTreeFolder as BaseBTreeFolder
+from Products.WAeUP_SRP.WAeUPTables import AccommodationTable
+import Globals
+import DateTime
+import re
+p_home = Globals.package_home(globals())
+i_home = Globals.INSTANCE_HOME
+
+class PaymentsFolder(CPSDocument): ###(
+    """
+    WAeUP PaymentsFolder containing Paymentsmmodation halls
+    """
+    meta_type = 'PaymentsFolder'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        return "Payments"
+
+InitializeClass(PaymentsFolder)
+
+def addPaymentsFolder(container, id, REQUEST=None, **kw):
+    """Add a PaymentsFolder."""
+    ob = PaymentsFolder(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+###)
+
+class Payment(CPSDocument): ###(
+    """
+    WAeUP Payment containing Departments
+    """
+    meta_type = 'Payment'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    security.declareProtected(View,"Title") ###(
+    def Title(self):
+        """compose title"""
+        content = self.getContent()
+        description = getattr(content,'type_description','')
+        d = getattr(content,'date','')
+        #pay_date = "%s/%s/%s %s:%s:%s" %(d[:2],d[2:4],d[4:6],d[6:8],d[8:10],d[10:])
+        pay_date = d.strftime("%d/%m/%y %H:%M:%S")
+        amount = getattr(content,'amount','')
+        if not (description or pay_date or amount):
+            return self.getId()
+        return "%(description)s, Naira %(amount)s, %(pay_date)s" % vars()
+    ###)
+
+InitializeClass(Payment)
+
+def addPayment(container, id, REQUEST=None, **kw):
+    """Add a Payment."""
+    ob = Payment(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+###)
Index: WAeUP_SRP/trunk_not_used/README.txt
===================================================================
--- WAeUP_SRP/trunk_not_used/README.txt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/README.txt	(revision 2226)
@@ -0,0 +1,7 @@
+This is the Student Registration Portal (SRP) Product for the West African e-University Project (WAeUP).
+
+You'll find further information in the documentation section of the WAeUP svn repository:
+
+https://svn.waeup.org/repos/WAeUP_Doc
+
+test
Index: WAeUP_SRP/trunk_not_used/ScratchCards.py
===================================================================
--- WAeUP_SRP/trunk_not_used/ScratchCards.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/ScratchCards.py	(revision 2226)
@@ -0,0 +1,183 @@
+#-*- mode: python; mode: fold -*-
+# $Id$
+from Globals import InitializeClass
+from AccessControl import ClassSecurityInfo
+from AccessControl.SecurityManagement import newSecurityManager
+from zExceptions import BadRequest
+from Products.CMFCore.utils import UniqueObject, getToolByName
+from Products.CMFCore.permissions import View
+from Products.CMFCore.permissions import ModifyPortalContent
+from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder
+#from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument
+from Products.CPSDocument.CPSDocument import CPSDocument
+import DateTime
+import Globals
+import logging
+import os,csv,re
+import Globals
+MAX_TRANS = 1000
+p_home = Globals.package_home(globals())
+i_home = Globals.INSTANCE_HOME
+
+class ScratchCardBatchesFolder(CPSDocument): ###(
+    """
+    WAeUP Student container for the various student data
+    """
+    meta_type = 'ScratchCardBatchesFolder'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        return "Pin Batches"
+
+    security.declareProtected(ModifyPortalContent,"importPinBatch") ###(
+    def importPinBatch(self):
+        """import PinBatch"""
+        name = "PINS"
+        logger = logging.getLogger('Students.ScratchCardBatchesFolder.importPinBatch')
+        logger.info('Start loading from %s.csv' % name)
+        pins_section = self.portal_url.getPortalObject().campus.pins
+        p_pins = self.portal_pins
+        base_dir = "%s/import/pins" % (i_home)
+        files = os.listdir(base_dir)
+        for fn in files:
+            pins = csv.DictReader(open("%s/%s" % (base_dir,fn),"rb"))
+            n = 0
+            for pin in pins:
+                if n == 0:
+                    bid = "%(Serial)s_%(Pin)s" % pin
+                    pins_section.invokeFactory('ScratchCardBatch', bid)
+                    batch = getattr(pins_section,bid)
+                    dict = {}
+                    prefix = pin['Serial']
+                    dict['prefix'] = pin['Serial']
+                    batch_no = pin['Pin']
+                    dict['batch_no'] = int(batch_no)
+                    dict['cost'] = float(pin['Cost'])
+                    dict['sold_by'] = pin['Sold']
+                    #import pdb;pdb.set_trace()
+                    n += 1
+                    continue
+                puid = "".join(pin['Pin'].split('-'))
+                p_pins.addRecord(pin=puid,serial=n,student="",prefix_batch="%s%s" % (prefix, batch_no))
+                n += 1
+            dict['no_of_pins'] = n - 1
+            batch.getContent().edit(mapping=dict)
+            logger.info('%s with %d PINs added' % (bid,n-1))
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+InitializeClass(ScratchCardBatchesFolder)
+
+def addScratchCardBatchesFolder(container, id, REQUEST=None, **kw):
+    """Add a Students personal data."""
+    ob = ScratchCardBatchesFolder(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
+###)
+
+from Products.WAeUP_SRP.WAeUPTables import PinTable
+
+class ScratchCardBatch(CPSDocument): ###(
+    """
+    WAeUP Student container for the various student data
+    """
+    meta_type = 'ScratchCardBatch'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        doc = self.getContent()
+        return "Pin Batch %s BatchNo %d" % (doc.prefix, doc.batch_no)
+
+    security.declareProtected(ModifyPortalContent,"makePins") ###(
+    def makePins(self):
+        """generate Pins"""
+        batch = self.getContent()
+        nr = batch.no_of_pins
+        prefix = batch.prefix
+        sold = batch.sold_by
+        cost = batch.cost
+        import random
+        r = random
+        b_no = batch.batch_no
+        #import pdb;pdb.set_trace()
+        generated = []
+        generated.append('"Serial","Pin","Sold","Cost"' % vars())
+        generated.append('"%(prefix)s","%(b_no)d","%(sold)s","%(cost)f"' % vars())
+        pins = self.portal_pins
+        for i in range(1,nr+1):
+            ri = r.randint(1000000000,9999999999)
+            pin = "%s%d%d" % (prefix,b_no,ri)
+            while len(pins.searchResults({'pin': pin})) > 0:
+                ri = r.randint(1000000000,9999999999)
+                pin = "%s%d%d" % (prefix,b_no,ri)
+            pins.addRecord(pin=pin,
+                           serial=i,
+                           student="",
+                           cost = cost,
+                           prefix_batch="%s%d" % (prefix, b_no))
+            generated.append('"%(i)d","%(prefix)s-%(b_no)d-%(ri)d"' % vars())
+        print '\n'.join(generated)
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        open("%s/import/%s-%s-%s.csv" % (i_home,prefix,b_no,current),"w+").write('\n'.join(generated))
+    ###)
+
+
+    security.declareProtected(ModifyPortalContent,"getUnusedPins")
+    def getUnusedPins(self):
+        """return a list of unused Pins"""
+        max_pins = 10
+        #import pdb;pdb.set_trace()
+        pins_cat = self.portal_pins
+        doc = self.getContent()
+        unused = [{'pin': p.pin,
+              'serial': p.serial,
+              } for p in pins_cat.searchResults(prefix_batch = "%s%d"
+                                               % (doc.prefix,doc.batch_no),
+                                               ) if not p.student]
+        if len(unused) > max_pins:
+            return unused[-max_pins:]
+        return unused
+
+    security.declareProtected(View,"getUsedPins")
+    def getUsedPins(self):
+        """return a list of used Pins"""
+        #import pdb;pdb.set_trace()
+        pins_cat = self.portal_pins
+        doc = self.getContent()
+        used = [{'pin': p.pin,
+              'prefix_batch': p.prefix_batch,
+              'serial': p.serial,
+              'student': p.student,
+              } for p in pins_cat.searchResults(prefix_batch = "%s%d"
+                                               % (doc.prefix,doc.batch_no),
+                                               ) if p.student]
+        return used
+
+    security.declareProtected(View,"getNumberOfUsedPins")
+    def getNumberOfUsedPins(self):
+        """return the number of used Pins"""
+        #import pdb;pdb.set_trace()
+        pins_cat = self.portal_pins
+        doc = self.getContent()
+        used = [{'pin': p.pin,
+              'serial': p.serial,
+              'student': p.student,
+              } for p in pins_cat.searchResults(prefix_batch = "%s%d"
+                                               % (doc.prefix,doc.batch_no),
+                                               ) if p.student]
+        return len(used)
+
+InitializeClass(ScratchCardBatch)
+
+def addScratchCardBatch(container, id, REQUEST=None, **kw):
+    """Add a Students personal data."""
+    ob = ScratchCardBatch(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
+###)
Index: WAeUP_SRP/trunk_not_used/Students.py
===================================================================
--- WAeUP_SRP/trunk_not_used/Students.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/Students.py	(revision 2226)
@@ -0,0 +1,1692 @@
+#-*- mode: python; mode: fold -*-
+# $Id$
+from string import Template
+from Globals import InitializeClass
+from AccessControl import ClassSecurityInfo
+from AccessControl.SecurityManagement import newSecurityManager
+from zExceptions import BadRequest
+from Products.ZCatalog.ZCatalog import ZCatalog
+from Products.CMFCore.utils import UniqueObject, getToolByName
+from Products.CMFCore.permissions import View
+from Products.CMFCore.permissions import ModifyPortalContent
+from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder
+#from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument
+from Products.CPSDocument.CPSDocument import CPSDocument
+from Products.CPSCore.CPSBase import CPSBaseBTreeFolder as BaseBTreeFolder
+from Products.CPSCore.CPSMembershipTool import CPSUnrestrictedUser
+from Products.WAeUP_SRP.Academics import makeCertificateCode
+
+from Products.AdvancedQuery import Eq, Between, Le,In
+import DateTime
+import logging
+import csv,re,os
+import Globals
+p_home = Globals.package_home(globals())
+i_home = Globals.INSTANCE_HOME
+MAX_TRANS = 1000
+from urllib import urlencode
+
+import DateTime
+#import PIL.Image
+from StringIO import StringIO
+
+def makeCertificateCode(code): ###(
+    code = code.replace('.','')
+    code = code.replace('(','')
+    code = code.replace(')','')
+    code = code.replace('/','')
+    code = code.replace(' ','')
+    code = code.replace('_','')
+    return code
+
+###)
+
+def response_write(response,s): ###(
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    while s.find('<') > -1:
+        s = s.replace('<','&lt;')
+    while s.find('>') > -1:
+        #from pdb import set_trace;set_trace()
+        s = s.replace('>','&gt;')
+    response.write("%s<br>\n" % s)
+
+###)
+
+def getInt(s): ###(
+    try:
+        return int(s)
+    except:
+        return 0
+
+def getFloat(s):
+    try:
+        return float(s)
+    except:
+        return 0.0
+
+###)
+
+def getStudentByRegNo(self,reg_no): ###(
+    """search student by JAMB Reg No and return StudentFolder"""
+    res = self.students_catalog(jamb_reg_no = reg_no.upper())
+    if len(res) == 1:
+        return getattr(self.portal_url.getPortalObject().campus.students,res[0].id)
+    else:
+        return None
+    # don't search in portal_catalog
+    # search = ZCatalog.searchResults(self.portal_catalog_real,{'meta_type': 'StudentApplication',
+    #                               'SearchableText': reg_no,
+    #                               })
+    # if len(search) < 1:
+    #     return None
+    # return search[0].getObject().aq_parent
+
+###)
+
+def checkJambNo(jnr): ###(
+    try:
+        if len(jnr) != 10:
+            return False
+    except:
+        return False
+    try:
+        int(jnr[:8])
+        return True
+    except:
+        return False
+
+###)
+
+def formatLGA(lga,voc=None):
+    if voc is not None:
+        if voc.has_key(lga):
+            state,lga = voc[lga].split(' / ')
+        elif lga.find(' / ') > -1:
+            state,lga = lga.split(' / ')
+        else:
+            state,lga = "",lga
+    return state.upper(),lga.upper()
+
+class StudentsFolder(CPSDocument): ###(
+    """
+    WAeUP container for the various WAeUP containers data
+    """
+    meta_type = 'StudentsFolder'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    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_d = {'jamb_reg_no': "reg_no",
+                 'name': "fullname",
+                 'score': "pume_score",
+                 'sex': "sex",
+                 'course': "study_course",
+                 'course_code_org': "study_course",
+                 'status': "admission_status",
+                 'result_type': "entry_mode",
+                 }
+
+        csv_fields = [f[1] for f in csv_d.items() if f[1]]
+        tr_count = 0
+        total = 0
+        #name = 'pup_new'
+        #name = 'pup_update'
+        name = 'Admitted_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('Students.loadPumeResultsFromCSV')
+        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
+        eoriginal = '%s,"original"' % format
+        einvalidjamb = '%s,"invalid JambRegNo"' % format
+        added = 'added ,%s' % format
+        #from pdb import set_trace;set_trace()
+        for jamb in result:
+            if not jamb.get(csv_d['score']):
+                logger.info('Student %s has no pume_score' % jamb.get(csv_d['jamb_reg_no']))
+                continue
+            dict = {}
+            for f,fn in csv_d.items():
+                dict[f] = jamb.get(csv_d[f])
+            dict['result_type'] = 'CEST'
+            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)
+                    # Can not happen, but anyway...
+                    except ValueError:
+                        logger.info(eduplicate % jamb)
+                        continue
+                    # Can not happen, but anyway...
+                    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(eoriginal % dd)
+                        no_import.append(eduplicate % jamb)
+                    continue
+            else:
+                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,"createStudents")###(
+    def createStudents(self):
+        """
+        load addmitted Studentdata from CSV values and create Studentobjects.
+        This is the current method to create new addmitted Students.
+        Before running the eventservice for the students_catalog must be disabled.
+        """
+        import transaction
+        import random
+        #from pdb import set_trace
+        wftool = self.portal_workflow
+        #students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject()
+        students_folder = self.portal_url.getPortalObject().campus.students
+        levels =       {'ume_ft':'100',
+                        'de_ft': '200',
+                        'ug_pt': '100',
+                        'de_pt': '200',
+                        'pg_ft': '700',
+                        'pg_pt': '700',
+                        'dp_pt': '100',
+                        'dp_ft': '100',
+                        }
+        csv_d = {'jamb_reg_no': "reg_no",
+                 'entry_mode': 'entry_mode',
+                 'jamb_firstname': "firstname",
+                 'jamb_middlename': "middlename",
+                 'jamb_lastname': "lastname",
+                 'jamb_sex': "sex",
+                 'jamb_state': "state",
+                 'birthday': "date_of_birth",
+                 'app_email': "email",
+                 'study_course': "study_course",
+                 'perm_address': "address",
+                 'admission_status': "admission_status",
+                 }
+        csv_fields = [f[1] for f in csv_d.items()]
+        tr_count = 0
+        total = 0
+        #name = 'pume_results'
+        name = 'Admitted_update'
+        no_import = []
+        s = ','.join(['"%s"' % fn for fn in csv_fields])
+        no_import.append('"Error",%s' % s)
+        format = '"%(Error)s",' + ','.join(['"%%(%s)s"' % fn for fn in csv_fields])
+        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('Students.StudentsFolder.createStudents')
+        logger.info('Start loading from %s.csv' % name)
+        certs = {}
+        try:
+            results = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
+        except:
+            logger.error('Error reading %s.csv' % name)
+            return
+        for result in results:
+            if not result.get(csv_d['admission_status']).startswith('Admitted'):
+                continue
+            #result['Error'] = "Processing "
+            #logger.info(format % result)
+            jamb_reg_no = result.get(csv_d['jamb_reg_no'])
+            res = self.students_catalog(jamb_reg_no = jamb_reg_no)
+            if res:
+                em = 'Student with RegNo %s already exists\n' % jamb_reg_no
+                logger.info(em)
+                result['Error'] = "Student exists"
+                no_import.append(format % result)
+                continue
+            cert_id = makeCertificateCode(result.get(csv_d['study_course']))
+            if cert_id not in certs.keys():
+                res = self.portal_catalog(meta_type = "Certificate",id = cert_id)
+                if not res:
+                    em = 'No Certificate with ID %s \n' % cert_id
+                    logger.info(em)
+                    result['Error'] = "No Certificate %s" % cert_id
+                    no_import.append( format % result)
+                    continue
+                cert = res[0]
+                cert_path = cert.getPath().split('/')
+                certificate = certs[cert_id] = {'faculty': cert_path[-4],
+                                     'department': cert_path[-3]}
+            cert_doc = certs[cert_id]
+            catalog_entry = {}
+            catalog_entry['jamb_reg_no'] = jamb_reg_no
+            firstname = result.get(csv_d['jamb_firstname'])
+            middlename = result.get(csv_d['jamb_middlename'])
+            lastname = result.get(csv_d['jamb_lastname'])
+            if len(firstname) < 3\
+               and len(middlename) < 3\
+               and len(lastname) < 3:
+                em = 'Student Names to short \n'
+                logger.info(em)
+                result['Error'] = "Names to short"
+                no_import.append( format % result)
+                continue
+            perm_address = result.get(csv_d['perm_address'])
+            sid = self.generateStudentId('x')
+            students_folder.invokeFactory('Student', sid)
+            catalog_entry['id'] = sid
+            tr_count += 1
+            logger.info('%(total)s+%(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_firstname"] = firstname
+            da["jamb_middlename"] = middlename
+            da["jamb_lastname"] = lastname
+            catalog_entry['entry_session'] = da["entry_session"] = self.getSessionId()[-2:]
+            catalog_entry['sex'] = sex = result.get(csv_d['jamb_sex']).startswith('F')
+            da_fields = ('jamb_reg_no',
+                         'jamb_sex',
+                         'jamb_state',
+                         'entry_mode',
+                         'app_email',
+                         )
+            for f in da_fields:
+                da[f] = result.get(csv_d[f])
+            catalog_entry['email'] = da['app_email']
+            catalog_entry['entry_mode'] = da['entry_mode']
+            app = student.application
+            app_doc = app.getContent()
+            app.getContent().edit(mapping=da)
+            picture ="%s/import/pictures/%s.jpg" % (i_home,jamb_reg_no)
+            app.manage_setLocalRoles(sid, ['Owner',])
+
+            picture_id = da['jamb_reg_no'].replace('/','_')
+            file = None
+            for ext in ('jpg','JPG'):
+                picture ="%s/import/pictures_admitted_latest/%s.%s" % (i_home,picture_id,ext)
+                if os.path.exists(picture):
+                    file = open(picture)
+                    break
+            if file is not None:
+
+                ## file conversion does not work
+                #img = PIL.Image.open(file)
+                #img.thumbnail((150,200),
+                #              resample=PIL.Image.ANTIALIAS)
+                #outfile = StringIO()
+                #img.save(outfile, format=img.format)
+
+                outfile = file.read()
+                app_doc.manage_addFile('passport',
+                                       file=outfile,
+                                       title="%s.jpg" % jamb_reg_no)
+            #wftool.doActionFor(app,'close')
+            dp = {}
+            dp['firstname'] = firstname
+            dp['middlename'] = middlename
+            dp['lastname'] = lastname
+            dp['email'] = da['app_email']
+            dp['sex'] = sex
+            dp['perm_address'] = perm_address
+            catalog_entry['name'] = "%(firstname)s %(middlename)s %(lastname)s" % dp
+            student.invokeFactory('StudentPersonal','personal')
+            per = student.personal
+            per_doc = per.getContent()
+            per_doc.edit(mapping = dp)
+            per.manage_setLocalRoles(sid, ['Owner',])
+            wftool.doActionFor(student,'pume_pass')
+            wftool.doActionFor(student,'admit')
+            #
+            # Clearance
+            #
+            student.invokeFactory('StudentClearance','clearance')
+            #wftool.doActionFor(student.clearance,'open')
+            clearance = student.clearance
+            dc = {'Title': 'Clearance/Eligibility Record'}
+            clearance = student.clearance
+            date_str = result.get(csv_d['birthday'])
+            try:
+                date = DateTime.DateTime(date_str)
+            except:
+                #import pdb;pdb.set_trace()
+                date = None
+            dc['birthday'] = date
+            clearance.getContent().edit(mapping=dc)
+            clearance.manage_setLocalRoles(sid, ['Owner',])
+            #
+            # Study Course
+            #
+            student.invokeFactory('StudentStudyCourse','study_course')
+            study_course = student.study_course
+            dsc = {}
+            catalog_entry['level'] = dsc['current_level'] = levels.get(da['entry_mode'],'100')
+            #catalog_entry['level'] = dsc['current_level'] = '100'  # Attention: not for DE students
+            catalog_entry['session'] = dsc['current_session'] = da['entry_session']
+            catalog_entry['mode'] = dsc['current_mode'] = da['entry_mode']
+            catalog_entry['course'] = dsc['study_course'] = cert_id
+            catalog_entry['faculty'] = certificate['faculty']
+            catalog_entry['department'] = certificate['department']
+            catalog_entry['verdict'] = dsc['current_verdict'] = 'N/A'
+            catalog_entry['review_state'] = self.portal_workflow.getInfoFor(student,'review_state',None)
+            study_course.getContent().edit(mapping=dsc)
+            #import pdb;pdb.set_trace()
+            self.students_catalog.addRecord(**catalog_entry)
+            if tr_count > 100:
+                if len(no_import) > 0:
+                    open("%s/import/%s_not_imported.csv" % (i_home,name),"a").write(
+                             '\n'.join(no_import) + "\n")
+                    no_import = []
+                em = '%d transactions commited\n' % tr_count
+                transaction.commit()
+                logger.info(em)
+                total += tr_count
+                tr_count = 0
+        open("%s/import/%s_not_imported.csv" % (i_home,name),"a").write(
+                                                '\n'.join(no_import))
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"transferStudents")###(
+    def transferStudents(self,filename):
+        """
+        load Interfaculty transferStudents Studentdata from CSV values.
+        """
+        import transaction
+        import random
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        pm = self.portal_membership
+        member = pm.getAuthenticatedMember()
+        logger = logging.getLogger('Students.StudentsFolder.transferStudents')
+        #students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject()
+        students_folder = self.portal_url.getPortalObject().campus.students
+        csv_fields = ('old_matric_no',
+                      'matric_no',
+                      'study_course',
+                      'current_mode',
+                      'current_level',
+                      )
+        tr_count = 0
+        total = 0
+        total_imported = 0
+        total_not_imported = 0
+        imported = []
+        not_imported = []
+        certs = {}
+        try:
+            results = csv.DictReader(open("%s/import/%s.csv" % (i_home,filename),"rb"))
+        except:
+            logger.error('Error reading %s.csv' % filename)
+            return
+        start = True
+        for result in results:
+            total += 1
+            if start:
+                start = False
+                logger.info('%s starts import from %s.csv' % (member,filename))
+                import_keys = [k for k in result.keys() if not k.startswith('ignore')]
+                diff2schema = set(import_keys).difference(set(csv_fields))
+                if diff2schema:
+                    em = "not ignorable key(s) %s found in heading" % diff2schema
+                    return em
+                s = ','.join(['"%s"' % fn for fn in import_keys])
+                open("%s/import/%s_not_imported%s.csv" % (i_home,filename,current),"a").write(s + ',"Error"'+ '\n')
+                s = '"id",' + s
+                open("%s/import/%s_imported%s.csv" % (i_home,filename,current),"a").write(s + '\n')
+                format = ','.join(['"%%(%s)s"' % fn for fn in import_keys])
+                format_error = format + ',"%(Error)s"'
+                format = '"%(id)s",'+ format
+            old_matric_no = result.get('old_matric_no')
+            res = self.students_catalog(matric_no = old_matric_no)
+            result['id'] = "None"
+            if not res:
+                em = 'Student with matric_no %s not found' % old_matric_no
+                logger.info(em)
+                result['Error'] = "Student does not exist"
+                not_imported.append(format_error % result)
+                total_not_imported += 1
+                continue
+            student_brain = res[0]
+            student_object = getattr(students_folder,student_brain.id)
+            result['id'] = student_brain.id
+            cert_id = makeCertificateCode(result.get('study_course'))
+            if cert_id not in certs.keys():
+                res = self.portal_catalog(meta_type = "Certificate",id = cert_id)
+                if not res:
+                    em = 'No certificate with ID %s \n' % cert_id
+                    logger.info(em)
+                    result['Error'] = "No Certificate %s" % cert_id
+                    not_imported.append( format_error % result)
+                    total_not_imported += 1
+                    continue
+                cert = res[0]
+                cert_path = cert.getPath().split('/')
+                certificate = certs[cert_id] = {'faculty': cert_path[-4],
+                                     'department': cert_path[-3]}
+            cert_doc = certs[cert_id]
+            clearance = getattr(student_object,'clearance',None)
+            if clearance is None:
+                em = 'Student has no clearance object'
+                logger.info('%s (%s) %s' % (student_brain.id, old_matric_no, em))
+                result['Error'] = em
+                not_imported.append( format_error % result)
+                total_not_imported += 1
+                continue
+            clearance_doc = clearance.getContent()
+            study_course = student_object.study_course
+            study_course_doc = study_course.getContent()
+            old_study_course = study_course_doc.study_course
+            old_current_level = study_course_doc.current_level
+            current_level = result.get('current_level',None)
+            new_study_course = result.get('study_course',None)
+            try:
+                icl = int(current_level)
+            except:
+                em = 'Invalid new level %s' % current_level
+                logger.info(em)
+                result['Error'] = em
+                not_imported.append( format_error % result)
+                total_not_imported += 1
+                continue
+            if icl == int(old_current_level) and old_study_course == new_study_course:
+                em = 'Already transferred'
+                logger.info('%s (%s) %s' % (student_brain.id, old_matric_no, em))
+                result['Error'] = em
+                not_imported.append( format_error % result)
+                total_not_imported += 1
+                continue
+            if study_course.objectIds():
+                em = 'Already registered level %s for %s, but is supposed to study %s at level %s' % (old_current_level,old_study_course,new_study_course,current_level)
+                logger.info('%s (%s) %s' % (student_brain.id, old_matric_no, em))
+                result['Error'] = em
+                not_imported.append( format_error % result)
+                total_not_imported += 1
+                continue
+            #from pdb import set_trace; set_trace()
+            cd = {}
+            matric_no_history = getattr(clearance_doc,'matric_no_history',[])
+            if not matric_no_history:
+                matric_no_history = []
+            matric_no_history.append(old_matric_no)
+            cd['matric_no_history'] = matric_no_history
+            cd['matric_no'] = result.get('matric_no')
+            clearance_doc.edit(mapping = cd)
+            dsc = {}
+            study_course_history = getattr(study_course_doc,'study_course_history',[])
+            if not study_course_history:
+                study_course_history = []
+            study_course_history.append(old_study_course)
+            dsc['study_course_history'] = study_course_history
+            dsc['study_course'] = new_study_course
+            dsc['current_level'] = current_level
+            dsc['current_mode'] = result.get('current_mode')
+            study_course_doc.edit(mapping=dsc)
+            imported.append( format % result)
+            tr_count += 1
+            total_imported += 1
+            if tr_count > 1000:
+                if len(not_imported) > 0:
+                    open("%s/import/%s_not_imported%s.csv" % (i_home,filename,current),"a").write(
+                             '\n'.join(not_imported) + '\n')
+                    not_imported = []
+                if len(imported) > 0:
+                    open("%s/import/%s_imported%s.csv" % (i_home,filename,current),"a").write(
+                             '\n'.join(imported) + '\n')
+                    imported = []
+                em = '%d transactions committed\n' % (tr_count)
+                transaction.commit()
+                regs = []
+                logger.info(em)
+                tr_count = 0
+        if len(imported) > 0:
+            open("%s/import/%s_imported%s.csv" % (i_home,filename,current),"a").write(
+                                                '\n'.join(imported))
+        if len(not_imported) > 0:
+            open("%s/import/%s_not_imported%s.csv" % (i_home,filename,current),"a").write(
+                                                '\n'.join(not_imported))
+        em = "Imported: %d, not imported: %d of total %d" % (total_imported,total_not_imported,total)
+        logger.info(em)
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"importReturningStudents")###(
+    def importReturningStudents(self):
+        """load Returning Studentdata from CSV values"""
+        import transaction
+        import random
+        #from pdb import set_trace
+        wftool = self.portal_workflow
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        #students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject()
+        students_folder = self.portal_url.getPortalObject().campus.students
+        tr_count = 1
+        total = 0
+        #name = 'pume_results'
+        name = 'Returning'
+        table = self.returning_import
+        no_import = []
+        imported = []
+        logger = logging.getLogger('Students.StudentsFolder.importReturningStudents')
+        try:
+            returning = 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': "Certificate"})
+        certs = {}
+        cert_docs = {}
+        for f in l:
+            certs[f.getId] = f.getObject().getContent()
+        start = True
+        res = table()
+        regs = []
+        if len(res) > 0:
+            regs = [s.matric_no for s in res]
+        #import pdb;pdb.set_trace()
+        for student in returning:
+            if start:
+                start = False
+                logger.info('Start loading from %s.csv' % name)
+                s = ','.join(['"%s"' % fn for fn in student.keys()])
+                imported.append(s)
+                no_import.append('%s,"Error"' % s)
+                format = ','.join(['"%%(%s)s"' % fn for fn in student.keys()])
+                format_error = format + ',"%(Error)s"'
+                no_certificate = "no certificate %s" % format
+            student['matric_no'] = matric_no = student.get('matric_no').upper()
+            student['Mode_of_Entry'] = entry_mode = student.get('Mode of Entry').upper()
+            student['Permanent_Address'] = perm_address = student.get('Permanent Address')
+            if matric_no == '':
+                student['Error'] = "Empty matric_no"
+                no_import.append( format_error % student)
+                continue
+            if matric_no in regs or self.returning_import(matric_no = matric_no):
+                student['Error'] = "Duplicate"
+                no_import.append( format_error % student)
+                continue
+            cert_id = makeCertificateCode(student.get('Coursemajorcode'))
+            if cert_id not in certs.keys():
+                student['Error'] = "No Certificate %s" % cert_id
+                no_import.append( format_error % student)
+                continue
+            try:
+                table.addRecord(**student)
+            except ValueError:
+                student['Error'] = "Duplicate"
+                no_import.append( format_error % student)
+                continue
+            regs.append(student.get('matric_no'))
+            imported.append(format % student)
+            tr_count += 1
+            if tr_count > 1000:
+                if len(no_import) > 0:
+                    open("%s/import/%s_not_imported%s.csv" % (i_home,name,current),"a").write(
+                             '\n'.join(no_import) + '\n')
+                    no_import = []
+                open("%s/import/%simported%s.csv" % (i_home,name,current),"a").write(
+                                            '\n'.join(no_import) + "\n")
+                imported = []
+                em = '%d transactions commited total %s\n' % (tr_count,total)
+                transaction.commit()
+                regs = []
+                logger.info(em)
+                total += tr_count
+                tr_count = 0
+        open("%s/import/%simported%s.csv" % (i_home,name,current),"a").write(
+                                            '\n'.join(imported))
+        open("%s/import/%s_not_imported%s.csv" % (i_home,name,current),"a").write(
+                                                '\n'.join(no_import))
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"fixAllNames")###(
+    def fixAllNames(self):
+        "fix all students names"
+        import transaction
+        response = self.REQUEST.RESPONSE
+        logger = logging.getLogger('fixAllNames')
+        logger.info('Start')
+        students = self.portal_catalog(portal_type='Student')
+        count = 0
+        total = 0
+        for student in students:
+            scat_res = self.students_catalog(id = student.getId)
+            if not scat_res:
+                self.students_catalog.addRecord(id = student.getId)
+                scat_res = self.students_catalog(id = student.getId)
+            student_entry = scat_res[0]
+            old_new = self.fixName(student,student_entry)
+            count += 1
+            response_write(response,'"%d","%s",%s' % (count + total,student_entry.id,old_new))
+            if count > 2000:
+                transaction.commit()
+                logger.info("%d transactions commited" % count)
+                total += count
+                count = 0
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"fixName")###(
+    def fixName(self,student_brain, student_entry):
+        "fix the name of a student"
+        fix = "first"
+        if student_entry.get('name_fixed',None) == fix:
+            return "Name already fixed"
+        student_id = student_entry.id
+        new_student = student_entry.jamb_reg_no.startswith('6')
+        student_obj = student_brain.getObject()
+        personal = getattr(student_obj,'personal',None)
+        invalid = ''
+        if personal is None:
+            return '"%s","Returning","%s","%s"' % (invalid,student_entry.name,"not logged in")
+        per_doc = personal.getContent()
+        old_first = per_doc.firstname
+        old_middle = per_doc.middlename
+        old_last = per_doc.lastname
+        new_first = ''
+        new_middle = ''
+        new_last = ''
+        if new_student:
+            if not old_first and not old_middle and old_last:
+                new_names = [n.capitalize() for n in old_last.split()]
+                if len(new_names) > 1:
+                    old_first = new_names[0]
+                    old_last = new_names[-1]
+                    old_middle = ' '.join(new_names[1:-1])
+                else:
+                    old_last = new_names[0]
+                    old_first = ''
+                    old_middle = ''
+            if old_first:
+                new_first = old_first
+            if old_middle:
+                new_middle = old_middle
+            if old_last:
+                new_last = old_last
+            if old_first.find('<') != -1 or\
+               old_first.find('>') != -1 or\
+               old_middle.find('<') != -1 or\
+               old_middle.find('>') != -1 or\
+               old_last.find('<') != -1 or\
+               old_last.find('>') != -1:
+                   invalid = "invalid characters"
+        else:
+            new_first = old_first
+            if new_first.strip() == '-':
+                new_first = ''
+            new_middle = old_middle
+            if new_middle.strip() == '-':
+                new_middle = ''
+            new_last = old_last
+            if new_last.strip() == '-':
+                new_last = ''
+        name = "%(new_first)s %(new_middle)s %(new_last)s" % vars()
+        if new_student:
+            text = "New"
+        else:
+            text = "Returning"
+        old_new = '"%s","%s","%s","%s"' % (invalid,text,
+                                           student_entry.name,
+                                           name)
+        if not invalid:
+            self.students_catalog.modifyRecord(id = student_id,
+                                      name_fixed = fix,
+                                      name = name)
+            per_doc.edit(mapping = {'firstname' : new_first,
+                                'middlename' : new_middle,
+                                'lastname' : new_last,
+                                })
+        return old_new
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"updateReturningStudents")###(
+    def updateReturningStudents(self):
+        """load and overwrite Returning Student Data from CSV values"""
+        import transaction
+        import random
+        #from pdb import set_trace
+        wftool = self.portal_workflow
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        #students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject()
+        students_folder = self.portal_url.getPortalObject().campus.students
+        tr_count = 1
+        total = 0
+        #name = 'pume_results'
+        name = 'Returning_update'
+        table = self.returning_import
+        no_import = []
+        imported = []
+        logger = logging.getLogger('Students.StudentsFolder.updateReturningStudents')
+        try:
+            returning = 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': "Certificate"})
+        certs = {}
+        cert_docs = {}
+        for f in l:
+            certs[f.getId] = f.getObject().getContent()
+        start = True
+        res = table()
+        regs = []
+        if len(res) > 0:
+            regs = [s.matric_no for s in res]
+        for student in returning:
+            if start:
+                start = False
+                logger.info('Start loading from %s.csv' % name)
+                s = ','.join(['"%s"' % fn for fn in student.keys()])
+                imported.append(s)
+                no_import.append('%s,"Error"' % s)
+                format = ','.join(['"%%(%s)s"' % fn for fn in student.keys()])
+                format_error = format + ',"%(Error)s"'
+                no_certificate = "no certificate %s" % format
+            matric_no = student.get('matric_no').upper()
+            student['matric_no'] = matric_no
+            if matric_no == '':
+                student['Error'] = "Empty matric_no"
+                no_import.append( format_error % student)
+                continue
+#            if matric_no in regs or self.returning_import(matric_no = matric_no):
+#                student['Error'] = "Duplicate"
+#                no_import.append( format_error % student)
+#                continue
+#            cert_id = makeCertificateCode(student.get('Coursemajorcode'))
+#            if cert_id not in certs.keys():
+#                student['Error'] = "No Certificate %s" % cert_id
+#                no_import.append( format_error % student)
+#                continue
+            try:
+                table.modifyRecord(**student)
+            except KeyError:
+                #import pdb;pdb.set_trace()
+                student['Error'] = "no Student found to update"
+                no_import.append( format_error % student)
+                continue
+            #s = self.students_catalog(matric_no=matric_no)
+            #if s:
+            #    level = "%s" % (int(student.get('Level')) + 100)
+            #    self.students_catalog.modifyRecord(id = s[0].id,
+            #                                           level=level)
+
+            regs.append(student.get('matric_no'))
+            imported.append(format % student)
+            tr_count += 1
+            if tr_count > 1000:
+                if len(no_import) > 0:
+                    open("%s/import/%s_not_imported%s.csv" % (i_home,name,current),"a").write(
+                             '\n'.join(no_import) + '\n')
+                    no_import = []
+                open("%s/import/%simported%s.csv" % (i_home,name,current),"a").write(
+                                            '\n'.join(no_import) + "\n")
+                imported = []
+                em = '%d transactions commited total %s\n' % (tr_count,total)
+                transaction.commit()
+                regs = []
+                logger.info(em)
+                total += tr_count
+                tr_count = 0
+        open("%s/import/%simported%s.csv" % (i_home,name,current),"a").write(
+                                            '\n'.join(imported))
+        open("%s/import/%s_not_imported%s.csv" % (i_home,name,current),"a").write(
+                                                '\n'.join(no_import))
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"exportStudents")###(
+    def exportStudents(self):
+        """export Studentsdata to a file"""
+        member = self.portal_membership.getAuthenticatedMember()
+        logger = logging.getLogger('Students.exportStudents')
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        students_folder = self.portal_url.getPortalObject().campus.students
+        export_file = "%s/export/students_%s.csv" % (i_home,current)
+
+        from Products.AdvancedQuery import Eq, Between, Le,In,MatchRegexp
+        aq_students = self.students_catalog.evalAdvancedQuery
+        toexport = {'students_catalog': ("id",
+                                         "matric_no",
+                                         "jamb_reg_no",
+                                         "name",
+                                         "review_state",
+                                         "entry_session",
+                                         "session",
+                                         "entry_mode",
+                                         "mode",
+                                         "verdict",
+                                         "sex",
+                                         "email",
+                                         "phone",
+                                         "faculty",
+                                         "department",
+                                         "course",
+                                         "level",
+                                        ),
+                    'personal': ('firstname',
+                                 'middlename',
+                                 'lastname',
+                                 'perm_address',
+                                 ),
+                    'clearance': ('state',  # is not an attribute of clearance but is needed for splitting lga
+                                  'lga',
+                                 )
+                  }
+        res_list = []
+        lines = []
+        fields = []
+        with_lga = False
+        for k in toexport.keys():
+            for f in toexport[k]:
+                if f == 'lga' :
+                    with_lga = True
+                fields.append(f)
+        headline = ','.join(fields).replace('level','current_level')
+        open(export_file,"a").write(headline +'\n')
+        format = '"%(' + ')s","%('.join(fields) + ')s"'
+        query = In('review_state',('cleared_and_validated',
+                                'clearance_requested',
+                                'school_fee_paid',
+                                'courses_registered',
+                                'courses_validated'))
+        #query = In('review_state',('clearance_requested'))
+        students = aq_students(query)
+        nr2export = len(students)
+        logger.info('%s starts exportStudents, %s student records to export' % (member,nr2export))
+        chunk = 1000
+        total = 0
+        start = DateTime.DateTime().timeTime()
+        start_chunk = DateTime.DateTime().timeTime()
+        ## alternative method slightly slower
+        # student_recs = {}
+        # for s in students:
+        #      student_recs[s.id] = s
+        # catalog_recs = {}
+        # brains = self.portal_catalog(portal_type = 'Student')
+        # for cat_rec in brains:
+        #     sid = cat_rec.getId
+        #     catalog_recs[sid] = cat_rec
+        # #import pdb;pdb.set_trace()
+        # start = DateTime.DateTime().timeTime()
+        # start_chunk = DateTime.DateTime().timeTime()
+        # for student in students:
+        #     if student.id not in student_recs.keys():
+        #         continue
+        #     not_all = False
+        #     d = self.getFormattedStudentEntry(student_recs[student.id])
+        #     student_obj = catalog_recs[student.id].getObject()
+        for student in students:
+            not_all = False
+            d = self.getFormattedStudentEntry(student)
+            student_obj = getattr(students_folder,student.id)
+            for k in toexport.keys()[1:]:
+                try:
+                    object = getattr(student_obj,k)
+                    object_doc = object.getContent()
+                except:
+                    logger.info('%s %s record not found' % (student.id,k))
+                    not_all = True
+                    continue
+                for f in toexport[k]:
+                    d[f] = getattr(object_doc,f,'')
+            if not_all:
+                continue
+            if with_lga:
+                d['state'],d['lga'] = formatLGA(d['lga'],voc = self.portal_vocabularies.local_gov_areas)
+            lines.append(format % d)
+            total += 1
+            if total and not total % chunk or total == len(students):
+                open(export_file,"a").write('\n'.join(lines) +'\n')
+                anz = len(lines)
+                logger.info("wrote %(anz)d  total written %(total)d" % vars())
+                end_chunk = DateTime.DateTime().timeTime()
+                duration = end_chunk-start_chunk
+                per_record = duration/anz
+                till_now = end_chunk - start
+                avarage_per_record = till_now/total
+                estimated_end = DateTime.DateTime(start + avarage_per_record * nr2export)
+                estimated_end = estimated_end.strftime("%H:%M:%S")
+                logger.info('%(duration)4.1f, %(per_record)4.3f,end %(estimated_end)s' % vars())
+                start_chunk = DateTime.DateTime().timeTime()
+                lines = []
+        end = DateTime.DateTime().timeTime()
+        logger.info('total time %6.2f m' % ((end-start)/60))
+        filename, extension = os.path.splitext(export_file)
+        from subprocess import call
+        msg = "wrote %(total)d records to %(export_file)s" % vars()
+        try:
+            retcode = call('gzip %s' % (export_file),shell=True)
+            if retcode == 0:
+                msg = "wrote %(total)d records to %(export_file)s.gz" % vars()
+        except OSError, e:
+            retcode = -99
+            logger.info("zip failed with %s" % e)
+        logger.info(msg)
+        args = {'portal_status_message': msg}
+        #url = self.REQUEST.get('URL1') + '?' + urlencode(args)
+        url = self.REQUEST.get('URL2')
+        return self.REQUEST.RESPONSE.redirect(url)
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"dumpStudentsCatalog")###(
+    def dumpStudentsCatalog(self):
+        """dump all data in students_catalog to a csv"""
+        member = self.portal_membership.getAuthenticatedMember()
+        logger = logging.getLogger('Students.dumpStudentsCatalog')
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        export_file = "%s/export/students_catalog_%s.csv" % (i_home,current)
+        res_list = []
+        lines = []
+        fields = []
+        for f in self.students_catalog.schema():
+            fields.append(f)
+        fields.append('state')
+        headline = ','.join(fields)
+        #open(export_file,"a").write(headline +'\n')
+        out = open(export_file,"wb")
+        out.write(headline +'\n')
+        out.close()
+        out = open(export_file,"a")
+        csv_writer = csv.DictWriter(out,fields,)
+        format = '"%(' + ')s","%('.join(fields) + ')s"'
+        students = self.students_catalog()
+        nr2export = len(students)
+        logger.info('%s starts dumpStudentsCatalog, %s student records to export' % (member,nr2export))
+        chunk = 2000
+        total = 0
+        start = DateTime.DateTime().timeTime()
+        start_chunk = DateTime.DateTime().timeTime()
+        for student in students:
+            not_all = False
+            d = self.getFormattedStudentEntry(student)
+            d['state'],d['lga'] = formatLGA(d['lga'],voc = self.portal_vocabularies.local_gov_areas)
+            #lines.append(format % d)
+            lines.append(d)
+            total += 1
+            if total and not total % chunk or total == len(students):
+                #open(export_file,"a").write('\n'.join(lines) +'\n')
+                csv_writer.writerows(lines)
+                anz = len(lines)
+                logger.info("wrote %(anz)d  total written %(total)d" % vars())
+                end_chunk = DateTime.DateTime().timeTime()
+                duration = end_chunk-start_chunk
+                per_record = duration/anz
+                till_now = end_chunk - start
+                avarage_per_record = till_now/total
+                estimated_end = DateTime.DateTime(start + avarage_per_record * nr2export)
+                estimated_end = estimated_end.strftime("%H:%M:%S")
+                logger.info('%(duration)4.1f, %(per_record)4.3f,end %(estimated_end)s' % vars())
+                start_chunk = DateTime.DateTime().timeTime()
+                lines = []
+        end = DateTime.DateTime().timeTime()
+        logger.info('total time %6.2f m' % ((end-start)/60))
+        filename, extension = os.path.splitext(export_file)
+        from subprocess import call
+        msg = "wrote %(total)d records to %(export_file)s" % vars()
+        try:
+            retcode = call('gzip %s' % (export_file),shell=True)
+            if retcode == 0:
+                msg = "wrote %(total)d records to %(export_file)s.gz" % vars()
+        except OSError, e:
+            retcode = -99
+            logger.info("zip failed with %s" % e)
+        logger.info(msg)
+        args = {'portal_status_message': msg}
+        #url = self.REQUEST.get('URL1') + '?' + urlencode(args)
+        url = self.REQUEST.get('URL2')
+        return self.REQUEST.RESPONSE.redirect(url)
+    ###)
+
+
+    security.declareProtected(ModifyPortalContent,"importResults")###(
+    def importResults(self):
+        """load Returning Students Results from CSV"""
+        import transaction
+        import random
+        #from pdb import set_trace
+        wftool = self.portal_workflow
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        #students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject()
+        students_folder = self.portal_url.getPortalObject().campus.students
+        tr_count = 1
+        total = 0
+        #name = 'pume_results'
+        name = 'Results'
+        table = self.results_import
+        no_import = []
+        imported = []
+        logger = logging.getLogger('Students.StudentsFolder.importResults')
+        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 = [f.getId for f in l]
+        start = True
+        res = table()
+        regs = []
+        if len(res) > 0:
+            regs = [s.key for s in res]
+        no_course = []
+        no_course_list = []
+        course_count = 0
+        for result in results:
+            if start:
+                start = False
+                logger.info('Start loading from %s.csv' % name)
+                s = ','.join(['"%s"' % fn for fn in result.keys()])
+                imported.append(s)
+                no_import.append('%s,"Error"' % s)
+                format = ','.join(['"%%(%s)s"' % fn for fn in result.keys()])
+                format_error = format + ',"%(Error)s"'
+                no_certificate = "no certificate %s" % format
+            course_id = result.get('CosCode')
+            if not course_id:
+                course_id = 'N/A'
+                result['CosCode'] = course_id
+            matric_no = result.get('matric_no').upper()
+            result['matric_no'] = matric_no
+            key = matric_no+course_id
+            if matric_no == '':
+                result['Error'] = "Empty matric_no"
+                no_import.append( format_error % result)
+                continue
+            if key in regs or self.results_import(key = key):
+                result['Error'] = "Duplicate"
+                no_import.append( format_error % result)
+                continue
+            if course_id not in courses:
+                if course_id not in no_course:
+                    course_count +=1
+                    no_course.append(course_id)
+                    no_course_list.append('"%s"' % course_id)
+                    #result['Error'] = "No Course"
+                    #logger.info(format_error % result)
+
+            result['key'] = key
+            try:
+                table.addRecord(**result)
+            except ValueError:
+                #import pdb;pdb.set_trace()
+                result['Error'] = "Duplicate"
+                no_import.append( format_error % result)
+                continue
+
+            regs.append(key)
+            imported.append(format % result)
+            tr_count += 1
+            if tr_count > 1000:
+                if len(no_import) > 0:
+                    open("%s/import/%s_not_imported%s.csv" % (i_home,name,current),"a").write(
+                             '\n'.join(no_import)+'\n')
+                    no_import = []
+                open("%s/import/%simported%s.csv" % (i_home,name,current),"a").write(
+                                            '\n'.join(imported) + '\n')
+                imported = []
+                if no_course_list:
+                    open("%s/import/%sno_courses%s.csv" % (i_home,name,current),"a").write(
+                                            '\n'.join(no_course_list) + '\n')
+                    no_course_list = []
+                transaction.commit()
+                regs = []
+                total += tr_count
+                em = '%d transactions totally comitted, %s courses not found ' % (total,course_count)
+                logger.info(em)
+                tr_count = 0
+        open("%s/import/%simported%s.csv" % (i_home,name,current),"a").write(
+                                            '\n'.join(imported))
+        open("%s/import/%s_not_imported%s.csv" % (i_home,name,current),"a").write(
+                                                '\n'.join(no_import))
+        if no_course_list:
+            open("%s/import/%sno_courses%s.csv" % (i_home,name,current),"a").write(
+                                    '\n'.join(no_course_list))
+        em = '%d transactions totally committed, %s courses not found ' % (total,course_count)
+        logger.info(em)
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"updateStudyCourse")###(
+    def updateStudyCourse(self):
+        """update StudyCourse from CSV values"""
+        import transaction
+        import random
+        from pdb import set_trace
+        wftool = self.portal_workflow
+        #students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject()
+        students_folder = self.portal_url.getPortalObject().campus.students
+        csv_d = {'jamb_reg_no': "RegNumber",
+                 'jamb_lastname': "Name",
+                 'session': "Session",
+                 'pume_tot_score': "PUME SCORE",
+                 'jamb_score': "JambScore",
+                 'jamb_sex': "Sex",
+                 'jamb_state': "State",
+##                 'jamb_first_cos': "AdminCourse",
+                 'faculty': "AdminFaculty",
+                 'course_code': "AdmitCoscode",
+                 'stud_status':"AdmitStatus",
+                 'department': "AdmitDept",
+                 'jamb_lga': "LGA",
+                 'app_email': "email",
+                 'app_mobile': "PhoneNumbers",
+                 }
+        csv_fields = [f[1] for f in csv_d.items()]
+        tr_count = 0
+        total = 0
+        #name = 'pume_results'
+        name = 'StudyCourseChange'
+        no_import = []
+        s = ','.join(['"%s"' % fn for fn in csv_fields])
+        no_import.append('"Error",%s' % s)
+        format = '"%(Error)s",' + ','.join(['"%%(%s)s"' % fn for fn in csv_fields])
+        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('Students.StudentsFolder.updateStudyCourse')
+        logger.info('Start loading from %s.csv' % name)
+        l = self.portal_catalog({'meta_type': "Certificate"})
+        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:
+            jamb['Error'] = "Processing "
+            logger.info(format % jamb)
+            jamb_reg_no = jamb.get(csv_d['jamb_reg_no'])
+            res = self.portal_catalog({'portal_type': "StudentApplication",
+                                     'SearchableText': jamb_reg_no })
+            if not res:
+                em = 'Student with jamb_reg_no %s does not exists\n' % jamb_reg_no
+                logger.info(em)
+                jamb['Error'] = "Student does not exist"
+                no_import.append(format % jamb)
+                continue
+            sid = res[0].getPath().split('/')[-2]
+            cert_id = makeCertificateCode(jamb.get(csv_d['course_code']))
+            res = self.portal_catalog(portal_type = "Certificate", id = cert_id)
+            if not res:
+                em = 'No Certificate with ID %s \n' % cert_id
+                logger.info(em)
+                jamb['Error'] = "No Certificate %s" % cert_id
+                no_import.append( format % jamb)
+                continue
+            cert_brain = res[0]
+            catalog_entry = {}
+            student = getattr(self,sid)
+            #
+            # Study Course
+            #
+            study_course = student.study_course
+            dsc = {}
+            cert_pl = cert_brain.getPath().split('/')
+            catalog_entry['id'] = sid
+            catalog_entry['faculty'] = cert_pl[-4]
+            catalog_entry['department'] = cert_pl[-3]
+            catalog_entry['course'] = cert_id
+            dsc['study_course'] = cert_id
+            study_course.getContent().edit(mapping=dsc)
+            self.students_catalog.modifyRecord(**catalog_entry)
+            if tr_count > 10:
+                if len(no_import) > 1:
+                    open("%s/import/%s_not_imported.csv" % (i_home,name),"w+").write(
+                             '\n'.join(no_import))
+                    no_import = []
+                em = '%d transactions commited\n' % tr_count
+                transaction.commit()
+                logger.info(em)
+                total += tr_count
+                tr_count = 0
+            tr_count += 1
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+    security.declareProtected(View,"fixOwnership") ###(
+    def fixOwnership(self):
+        """fix Ownership"""
+        for s in self.portal_catalog(meta_type = 'Student'):
+            student = s.getObject()
+            sid = s.getId
+            import pdb;pdb.set_trace()
+            student.application.manage_setLocalRoles(sid, ['Owner',])
+            student.personal.manage_setLocalRoles(sid, ['Owner',])
+    ###)
+
+    security.declareProtected(View,"Title") ###(
+    def Title(self):
+        """compose title"""
+        return "Student Section"
+    ###)
+
+    def generateStudentId(self,letter,students = None): ###(
+        import random
+        r = random
+        if students is None:
+            students = self.portal_url.getPortalObject().campus.students
+        if letter not in ('ABCDEFGIHKLMNOPQRSTUVWXY'):
+            letter= r.choice('ABCDEFGHKLMNPQRSTUVWXY')
+        sid = "%c%d" % (letter,r.randint(99999,1000000))
+        while hasattr(students, sid):
+            sid = "%c%d" % (letter,r.randint(99999,1000000))
+        return sid
+        #return "%c%d" % (r.choice('ABCDEFGHKLMNPQRSTUVWXY'),r.randint(99999,1000000))
+    ###)
+
+InitializeClass(StudentsFolder)
+
+def addStudentsFolder(container, id, REQUEST=None, **kw): ###(
+    """Add a Student."""
+    ob = StudentsFolder(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+    ###)
+
+###)
+
+class Student(CPSDocument): ###(
+    """
+    WAeUP Student container for the various student data
+    """
+    meta_type = 'Student'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        reg_nr = self.getId()[1:]
+        data = getattr(self,'personal',None)
+        if data:
+            content = data.getContent()
+            return "%s %s %s" % (content.firstname,content.middlename,content.lastname)
+        data = getattr(self,'application',None)
+        if data:
+            content = data.getContent()
+            return "%s" % (content.jamb_lastname)
+        return self.title
+
+    security.declarePrivate('makeStudentMember') ###(
+    def makeStudentMember(self,sid,password='uNsEt'):
+        """make the student a member"""
+        membership = self.portal_membership
+        membership.addMember(sid,
+                             password ,
+                             roles=('Member',
+                                     'Student',
+                                     ),
+                             domains='',
+                             properties = {'memberareaCreationFlag': False,
+                                           'homeless': True},)
+        member = membership.getMemberById(sid)
+        self.portal_registration.afterAdd(member, sid, password, None)
+        self.manage_setLocalRoles(sid, ['Owner',])
+
+###)
+
+    security.declareProtected(View,'createSubObjects') ###(
+    def createSubObjects(self):
+        """make the student a member"""
+        dp = {'Title': 'Personal Data'}
+        app_doc = self.application.getContent()
+        names = app_doc.jamb_lastname.split()
+        if len(names) == 3:
+            dp['firstname'] = names[0].capitalize()
+            dp['middlename'] = names[1].capitalize()
+            dp['lastname'] = names[2].capitalize()
+        elif len(names) == 2:
+            dp['firstname'] = names[0].capitalize()
+            dp['lastname'] = names[1].capitalize()
+        else:
+            dp['lastname'] = app_doc.jamb_lastname
+        dp['sex'] = app_doc.jamb_sex == 'F'
+        dp['lga'] = "%s/%s" % (app_doc.jamb_state,app_doc.jamb_lga )
+        proxy = self.aq_parent
+        proxy.invokeFactory('StudentPersonal','personal')
+        per = proxy.personal
+        per_doc = per.getContent()
+        per_doc.edit(mapping = dp)
+        per.manage_setLocalRoles(proxy.getId(), ['Owner',])
+        #self.portal_workflow.doActionFor(per,'open',dest_container=per)
+
+###)
+
+InitializeClass(Student)
+
+def addStudent(container, id, REQUEST=None, **kw):
+    """Add a Student."""
+    ob = Student(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
+###)
+
+class StudentAccommodation(CPSDocument): ###(
+    """
+    WAeUP Student container for the various student data
+    """
+    meta_type = 'StudentAccommodation'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        content = self.getContent()
+        #return "Accommodation Data for %s %s" % (content.firstname,content.lastname)
+        return "Accommodation Data for Session %s" % content.session
+
+
+InitializeClass(StudentAccommodation)
+
+def addStudentAccommodation(container, id, REQUEST=None, **kw):
+    """Add a Students personal data."""
+    ob = StudentAccommodation(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
+###)
+
+class StudentPersonal(CPSDocument): ###(
+    """
+    WAeUP Student container for the various student data
+    """
+    meta_type = 'StudentPersonal'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        content = self.getContent()
+        #return "Personal Data for %s %s" % (content.firstname,content.lastname)
+        return "Personal Data"
+
+
+InitializeClass(StudentPersonal)
+
+def addStudentPersonal(container, id, REQUEST=None, **kw):
+    """Add a Students personal data."""
+    ob = StudentPersonal(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
+###)
+
+class StudentClearance(CPSDocument): ###(
+    """
+    WAeUP Student container for the various student data
+    """
+    meta_type = 'StudentClearance'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        content = self.getContent()
+        #return "Clearance/Eligibility Record for %s %s" % (content.firstname,content.lastname)
+        return "Clearance/Eligibility Record"
+
+
+InitializeClass(StudentClearance)
+
+def addStudentClearance(container, id, REQUEST=None, **kw):
+    """Add a Students personal data."""
+    ob = StudentClearance(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
+###)
+
+class StudentStudyLevel(CPSDocument): ###(
+    """
+    WAeUP Student container for the various student data
+    """
+    meta_type = 'StudentStudyLevel'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        return "Level %s" % self.aq_parent.getId()
+
+    def create_course_results(self,cert_id,current_level): ###(
+        "create all courses in a level"
+        aq_portal = self.portal_catalog.evalAdvancedQuery
+        res = self.portal_catalog(portal_type="Certificate", id = cert_id)
+        l = []
+        import transaction
+        if res:
+            cert = res[0]
+            path = cert.getPath()
+            query = Eq("path","%s/%s" % (path,current_level)) &\
+                    Eq('portal_type','CertificateCourse')
+            courses = aq_portal(query)
+            #from pdb import set_trace;set_trace()
+            self_proxy = self.aq_parent
+            for c in courses:
+                d = self.getCourseInfo(c.getId)
+                cr_id = self_proxy.invokeFactory('StudentCourseResult',c.getId)
+                course_result = getattr(self_proxy,cr_id)
+                self.portal_workflow.doActionFor(course_result,'open')
+                d['core_or_elective'] = getattr(c.getObject().getContent(),'core_or_elective')
+                course_result.getContent().edit(mapping=d)
+                #transaction.commit()
+    ###)
+
+InitializeClass(StudentStudyLevel)
+
+def addStudentStudyLevel(container, id, REQUEST=None, **kw):
+    """Add a Students personal data."""
+    ob = StudentStudyLevel(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
+###)
+
+class StudentStudyCourse(CPSDocument): ###(
+    """
+    WAeUP Student container for the various student data
+    """
+    meta_type = 'StudentStudyCourse'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        content = self.getContent()
+        return "Study Course"
+
+
+InitializeClass(StudentStudyCourse)
+
+def addStudentStudyCourse(container, id, REQUEST=None, **kw):
+    """Add a Students personal data."""
+    ob = StudentStudyCourse(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
+###)
+
+class StudentApplication(CPSDocument): ###(
+    """
+    WAeUP Student container for the various student data
+    """
+    meta_type = 'StudentApplication'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        return "Application Data"
+
+
+InitializeClass(StudentApplication)
+
+def addStudentApplication(container, id, REQUEST=None, **kw):
+    """Add a Students eligibility data."""
+    ob = StudentApplication(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+###)
+
+class StudentPume(CPSDocument): ###(
+    """
+    WAeUP Student container for the various student data
+    """
+    meta_type = 'StudentPume'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        return "PUME Results"
+
+
+InitializeClass(StudentPume)
+
+def addStudentPume(container, id, REQUEST=None, **kw):
+    """Add a Students PUME data."""
+    ob = StudentPume(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+###)
+
+##class StudentSemester(CPSDocument): ###(
+##    """
+##    WAeUP StudentSemester containing the courses and students
+##    """
+##    meta_type = 'StudentSemester'
+##    portal_type = meta_type
+##    security = ClassSecurityInfo()
+##
+##InitializeClass(StudentSemester)
+##
+##def addStudentSemester(container, id, REQUEST=None, **kw):
+##    """Add a StudentSemester."""
+##    ob = StudentSemester(id, **kw)
+##    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+##
+#####)
+
+##class Semester(CPSDocument): ###(
+##    """
+##    WAeUP Semester containing the courses and students
+##    """
+##    meta_type = 'Semester'
+##    portal_type = meta_type
+##    security = ClassSecurityInfo()
+##
+##InitializeClass(Semester)
+##
+##def addSemester(container, id, REQUEST=None, **kw):
+##    """Add a Semester."""
+##    ob = Semester(id, **kw)
+##    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+##
+#####)
+
+class StudentCourseResult(CPSDocument): ###(
+    """
+    WAeUP StudentCourseResult
+    """
+    meta_type = 'StudentCourseResult'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    def getCourseEntry(self,cid):
+        res = self.portal_catalog({'meta_type': "Course",
+                                           'id': cid})
+        if res:
+            return res[-1]
+        else:
+            return None
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        cid = self.aq_parent.getId()
+        ce = self.getCourseEntry(cid)
+        if ce:
+            return "%s" % ce.Title
+        return "No course with id %s" % cid
+
+InitializeClass(StudentCourseResult)
+
+def addStudentCourseResult(container, id, REQUEST=None, **kw):
+    """Add a StudentCourseResult."""
+    ob = StudentCourseResult(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+###)
+
+# Backward Compatibility StudyLevel
+
+from Products.WAeUP_SRP.Academics import StudyLevel
+
+from Products.WAeUP_SRP.Academics import addStudyLevel
+
Index: WAeUP_SRP/trunk_not_used/Students.unused_methods.txt
===================================================================
--- WAeUP_SRP/trunk_not_used/Students.unused_methods.txt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/Students.unused_methods.txt	(revision 2226)
@@ -0,0 +1,1453 @@
+    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'))
+    ###)
+
+
+    security.declareProtected(ModifyPortalContent,"importPreviousSessionStudents")###(
+    def importPreviousSessionStudents(self):
+        """load and create previous session students from CSV"""
+        import transaction
+        import random
+        wftool = self.portal_workflow
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        students_folder = self.portal_url.getPortalObject().campus.students
+        tr_count = 1
+        total = 0
+        #name = 'pume_results'
+        name = 'Previous'
+        keys = self.portal_schemas.import_student.keys()
+        keys += self.portal_schemas.import_student_level_data.keys()
+        not_imported = []
+        imported = []
+        certificates = {}
+        logger = logging.getLogger('Students.StudentsFolder.importPreviousSessionStudents')
+        try:
+            records = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
+        except:
+            logger.error('Error reading %s.csv' % name)
+            return
+        start = True
+        for record in records:
+            if start:
+                start = False
+                logger.info('Start loading from %s.csv' % name)
+                false_keys = [k for k in record.keys() if k not in keys]
+                right_keys = [k for k in record.keys() if k in keys]
+                if false_keys:
+                    logger.info('Fields %s not in schema' % false_keys)
+                s = ','.join(['"%s"' % k for k in right_keys])
+                imported.append(s)
+                not_imported.append('%s,"error"' % s)
+                format = ','.join(['"%%(%s)s"' % k for k in right_keys])
+                format_error = format + ',"%(error)s"'
+            study_course = makeCertificateCode(record.get('study_course'))
+            matric_no = record.get('matric_no')
+            student_res = self.students_catalog(matric_no = matric_no)
+            if student_res:
+                record['error'] = "Student exists"
+                not_imported.append(format_error % record)
+                continue
+            if study_course not in certificates.keys():
+                cert_res = self.portal_catalog(portal_type='Certificate',
+                                                   id = study_course)
+                if not cert_res:
+                    record['error'] = "No such studycourse"
+                    not_imported.append(format_error % record)
+                    continue
+                certificates[cert_res[0].id] = cert_res[0]
+            sid = self.generateStudentId('x',students_folder)
+            students_folder.invokeFactory('Student', sid)
+            #from pdb import set_trace;set_trace()
+            record['student_id'] = sid
+            student = getattr(self,sid)
+            student.manage_setLocalRoles(sid, ['Owner',])
+            student.invokeFactory('StudentApplication','application')
+            app = student.application
+            app_doc = app.getContent()
+            dict = {'Title': 'Application Data'}
+            dict["jamb_lastname"] = "%(firstname)s %(lastname)s %(middlename)s" % record
+            r2d = [
+                   ('entry_mode','entry_mode'),
+                   ('sex','jamb_sex'),
+                   ('jamb_score','jamb_score'),
+                   ('jamb_reg_no','jamb_reg_no'),
+                   ]
+            for r,d in r2d:
+                dict[d] = record[r]
+            app_doc.edit(mapping=dict)
+            app.manage_setLocalRoles(sid, ['Owner',])
+            wftool.doActionFor(app,'close')
+            record['sex'] = record['sex'] == 'F'
+            student.invokeFactory('StudentPersonal','personal')
+            dict = {}
+            r2d = [('firstname','firstname'),
+                   ('middlename','middlename'),
+                   ('lastname','lastname'),
+                   ('sex','sex'),
+                   ('email','email'),
+                   ('phone','phone'),
+                   ('address','perm_address'),
+                   ]
+            for r,d in r2d:
+                dict[d] = record[r]
+            per = student.personal
+            per_doc = per.getContent()
+            per_doc.edit(mapping = dict)
+            per.manage_setLocalRoles(sid, ['Owner',])
+            #
+            # Clearance
+            #
+            student.invokeFactory('StudentClearance','clearance')
+            #wftool.doActionFor(student.clearance,'open')
+            clearance = getattr(student,'clearance')
+            dict = {'Title': 'Clearance/Eligibility Record'}
+            clearance.getContent().edit(mapping = dict)
+            student.clearance.manage_setLocalRoles(sid, ['Owner',])
+            #
+            # Study Course
+            #
+            student.invokeFactory('StudentStudyCourse','study_course')
+            study_course = student.study_course
+            dict = {}
+            r2d = [('session','current_session'),
+                   ('level','current_level'),
+                   ('verdict','current_verdict'),
+                   ('study_course','study_course'),
+                   ]
+            for r,d in r2d:
+                dict[d] = record[r]
+            study_course.getContent().edit(mapping=dict)
+            #
+            # Study Level
+            #
+            level = record['level']
+            study_course.invokeFactory('StudentStudyLevel',level)
+            study_level = getattr(study_course,level)
+            dict = {}
+            r2d = [('session','session'),
+                   ('level','code'),
+                   ('verdict','verdict'),
+                   ]
+            for r,d in r2d:
+                dict[d] = record[r]
+            study_level.getContent().edit(mapping=dict)
+            wftool.doActionFor(student,'return')
+            imported.append(format % record)
+            tr_count += 1
+            record['tr_count'] = tr_count
+            record['total'] = total
+            logger.info('%(total)s+%(tr_count)s: Creating Student %(student_id)s %(matric_no)s %(jamb_reg_no)s' % record)
+            if tr_count > 1000:
+                if len(not_imported) > 0:
+                    open("%s/import/%s_not_imported%s.csv" % (i_home,name,current),"a").write(
+                             '\n'.join(not_imported)+'\n')
+                    not_imported = []
+                open("%s/import/%simported%s.csv" % (i_home,name,current),"a").write(
+                                            '\n'.join(imported) + '\n')
+                imported = []
+                em = '%d transactions commited total %s' % (tr_count,total)
+                transaction.commit()
+                logger.info(em)
+                regs = []
+                total += tr_count
+                tr_count = 0
+        open("%s/import/%simported%s.csv" % (i_home,name,current),"a").write(
+                                            '\n'.join(imported))
+        open("%s/import/%s_not_imported%s.csv" % (i_home,name,current),"a").write(
+                                                '\n'.join(not_imported))
+        em = '%d transactions commited total %d' % (tr_count,total)
+        logger.info(em)
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+    
+    
+        security.declareProtected(ModifyPortalContent,"createDEStudents")###(
+    def createDEStudents(self):
+        """load Fulltime Studentdata from CSV values"""
+        import transaction
+        import random
+        #from pdb import set_trace
+        wftool = self.portal_workflow
+        students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject()
+        csv_d = {'jamb_reg_no': "RegNumber",
+                 'jamb_lastname': "Name",
+                 'session': "Session",
+                 'pume_tot_score': "PUDE SCORE",
+                 ##'jamb_score': "JambScore",
+                 'entry_mode': "EntryMode",
+                 'jamb_sex': "Sex",
+                 'jamb_state': "State",
+                 'jamb_first_cos': "AdminCourse",
+                 'faculty': "AdminFaculty",
+                 'course_code': "AdmitCoscode",
+                 'stud_status':"AdmitStatus",
+                 'department': "AdmitDept",
+                 'jamb_lga': "LGA",
+                 'app_email': "email",
+                 'app_mobile': "PhoneNumbers",
+                 }
+        csv_fields = [f[1] for f in csv_d.items()]
+        tr_count = 0
+        total = 0
+        #name = 'pume_results'
+        name = 'DE_Admitted'
+        no_import = []
+        s = ','.join(['"%s"' % fn for fn in csv_fields])
+        no_import.append('"Error",%s' % s)
+        format = '"%(Error)s",' + ','.join(['"%%(%s)s"' % fn for fn in csv_fields])
+        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('Students.StudentsFolder.createDEStudents')
+        logger.info('Start loading from %s.csv' % name)
+        l = self.portal_catalog({'meta_type': "Certificate"})
+        certs = {}
+        cert_docs = {}
+        for f in l:
+            certs[f.getId] = f.getObject().getContent()
+        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:
+            jamb['Error'] = "Processing"
+            logger.info(format % jamb)
+            jamb_reg_no = jamb.get(csv_d['jamb_reg_no'])
+            res = self.portal_catalog({'portal_type': "StudentApplication",
+                                     'SearchableText': jamb_reg_no })
+            if res:
+                em = 'Student with RegNo %s already exists\n' % jamb_reg_no
+                logger.info(em)
+                jamb['Error'] = "Student exists"
+                no_import.append(format % jamb)
+                continue
+            cert_id = makeCertificateCode(jamb.get(csv_d['course_code']))
+            if cert_id not in certs.keys():
+                em = 'No Certificate with ID %s \n' % cert_id
+                logger.info(em)
+                jamb['Error'] = "No Certificate %s" % cert_id
+                no_import.append( format % jamb)
+                continue
+            jamb_reg_no =jamb.get(csv_d['jamb_reg_no'])
+            cert_doc = certs[cert_id]
+            catalog_entry = {}
+            catalog_entry['jamb_reg_no'] = jamb_reg_no
+            jamb_name = jamb.get(csv_d['jamb_lastname'])
+            jamb_name.replace('>','')
+            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)
+            catalog_entry['id'] = sid
+            tr_count += 1
+            logger.info('%(total)s+%(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('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',
+                         'entry_mode',
+                         #'jamb_score',
+                         'jamb_first_cos',
+                         'jamb_sex',
+                         'jamb_state',
+                         'jamb_lga',
+                         'app_email',
+                         'app_mobile',
+                         )
+            for f in da_fields:
+                da[f] = jamb.get(csv_d[f])
+            catalog_entry['email'] = jamb.get(csv_d['app_email'])
+            app = student.application
+            app_doc = app.getContent()
+            picture ="%s/import/pictures/%s.jpg" % (i_home,jamb_reg_no)
+            #import pdb;pdb.set_trace()
+            if os.path.exists(picture):
+                file = open(picture)
+                if False:
+                    img = PIL.Image.open(file)
+                    img.thumbnail((150,200),
+                                  resample=PIL.Image.ANTIALIAS)
+                    # We now need a buffer to write to. It can't be the same
+                    # as the inbuffer as the PNG writer will write over itself.
+                    outfile = StringIO()
+                    img.save(outfile, format=img.format)
+                else:
+                    outfile = file.read()
+                app_doc.manage_addFile('passport',
+                                       file=outfile,
+                                       title="%s.jpg" % jamb_reg_no)
+            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',
+                         )
+            dp['pume_tot_score'] = jamb.get(csv_d['pume_tot_score']) or "No Option Shaded"
+            pume = student.pume
+            pume.getContent().edit(mapping=dp)
+            #wftool.doActionFor(pume,'close')
+            pume.manage_setLocalRoles(sid, ['Owner',])
+            #student.getContent().createSubObjects()
+            dp = {}
+            if len(names) == 3:
+                dp['firstname'] = names[0].capitalize()
+                dp['middlename'] = names[1].capitalize()
+                dp['lastname'] = names[2].capitalize()
+            elif len(names) == 2:
+                dp['firstname'] = names[0].capitalize()
+                dp['middlename'] = ''
+                dp['lastname'] = names[1].capitalize()
+            else:
+                dp['firstname'] = ''
+                dp['middlename'] = ''
+                dp['lastname'] = jamb_name
+            dp['sex'] = jamb.get(csv_d['jamb_sex']) == 'F'
+            catalog_entry['sex'] = dp['sex']
+            catalog_entry['name'] = "%(firstname)s %(middlename)s %(lastname)s" % dp
+            student.invokeFactory('StudentPersonal','personal')
+            per = student.personal
+            per_doc = per.getContent()
+            per_doc.edit(mapping = dp)
+            per.manage_setLocalRoles(sid, ['Owner',])
+            if jamb.get(csv_d['stud_status']) == "Admitted":
+                wftool.doActionFor(student,'pume_pass')
+                wftool.doActionFor(student,'admit')
+            else:
+                wftool.doActionFor(student,'pume_fail')
+                wftool.doActionFor(student,'reject_admission')
+                continue
+            #
+            # Clearance
+            #
+            student.invokeFactory('StudentClearance','clearance')
+            #wftool.doActionFor(student.clearance,'open')
+            dp = {'Title': 'Clearance/Eligibility Record'}
+            student.clearance.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)
+            #dsc['faculty'] = jamb.get(csv_d['faculty'])
+            #dsc['department'] = jamb.get(csv_d['department'])
+            catalog_entry['faculty'] = jamb.get(csv_d['faculty'])
+            catalog_entry['department'] = jamb.get(csv_d['department'])
+            catalog_entry['course'] = cert_id
+            #catalog_entry['level'] = getattr(cert_doc,'start_level')
+            catalog_entry['level'] = '200'
+            dsc['study_course'] = cert_id
+            dsc['current_level'] = '200'
+            #dsc['entry_session'] = jamb.get(csv_d['session'])
+            study_course.getContent().edit(mapping=dsc)
+            self.students_catalog.addRecord(**catalog_entry)
+            if tr_count > 10:
+                if len(no_import) > 1:
+                    open("%s/import/%s_not_imported.csv" % (i_home,name),"a").write(
+                             '\n'.join(no_import)+'\n')
+                    no_import = []
+                em = '%d transactions commited\n' % tr_count
+                transaction.commit()
+                logger.info(em)
+                total += tr_count
+                tr_count = 0
+        open("%s/import/%s_not_imported.csv" % (i_home,name),"a").write(
+                                               '\n'.join(no_import))
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"createNewStudents")###(
+    def createNewStudents(self):
+        """load Fulltime Studentdata from CSV values"""
+        import transaction
+        import random
+        #from pdb import set_trace
+        wftool = self.portal_workflow
+        students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject()
+        csv_d = {'jamb_reg_no': "RegNumber",
+                 'jamb_lastname': "Name",
+                 'session': "Session",
+                 'pume_tot_score': "PUME SCORE",
+                 'jamb_score': "JambScore",
+                 'jamb_sex': "Sex",
+                 'jamb_state': "State",
+##                 'jamb_first_cos': "AdminCourse",
+                 'faculty': "AdminFaculty",
+                 'course_code': "AdmitCoscode",
+                 'stud_status':"AdmitStatus",
+                 'department': "AdmitDept",
+                 'jamb_lga': "LGA",
+                 'app_email': "email",
+                 'app_mobile': "PhoneNumbers",
+                 }
+        csv_fields = [f[1] for f in csv_d.items()]
+        tr_count = 0
+        total = 0
+        #name = 'pume_results'
+        name = 'Admitted'
+        no_import = []
+        s = ','.join(['"%s"' % fn for fn in csv_fields])
+        no_import.append('"Error",%s' % s)
+        format = '"%(Error)s",' + ','.join(['"%%(%s)s"' % fn for fn in csv_fields])
+        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('Students.StudentsFolder.createNewStudents')
+        logger.info('Start loading from %s.csv' % name)
+        l = self.portal_catalog({'meta_type': "Certificate"})
+        certs = {}
+        cert_docs = {}
+        for f in l:
+            certs[f.getId] = f.getObject().getContent()
+        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:
+            jamb['Error'] = "Processing "
+            logger.info(format % jamb)
+            jamb_reg_no = jamb.get(csv_d['jamb_reg_no'])
+            res = self.portal_catalog({'portal_type': "StudentApplication",
+                                     'SearchableText': jamb_reg_no })
+            if res:
+                em = 'Student with RegNo %s already exists\n' % jamb_reg_no
+                logger.info(em)
+                jamb['Error'] = "Student exists"
+                no_import.append(format % jamb)
+                continue
+            cert_id = makeCertificateCode(jamb.get(csv_d['course_code']))
+            if cert_id not in certs.keys():
+                em = 'No Certificate with ID %s \n' % cert_id
+                logger.info(em)
+                jamb['Error'] = "No Certificate %s" % cert_id
+                no_import.append( format % jamb)
+                continue
+            res = self.portal_pumeresults(jamb_reg_no = jamb_reg_no)
+            if len(res) == 1:
+                self.portal_pumeresults.modifyRecord(jamb_reg_no = jamb_reg_no,
+                                                     status = jamb.get(csv_d['stud_status']),
+                                                     )
+            jamb_reg_no =jamb.get(csv_d['jamb_reg_no'])
+            cert_doc = certs[cert_id]
+            catalog_entry = {}
+            catalog_entry['jamb_reg_no'] = jamb_reg_no
+            jamb_name = jamb.get(csv_d['jamb_lastname'])
+            jamb_name.replace('>','')
+            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)
+            catalog_entry['id'] = sid
+            tr_count += 1
+            logger.info('%(total)s+%(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('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_lga',
+                         'app_email',
+                         'app_mobile',
+                         )
+            for f in da_fields:
+                da[f] = jamb.get(csv_d[f])
+            catalog_entry['email'] = jamb.get(csv_d['app_email'])
+            app = student.application
+            app_doc = app.getContent()
+            #import pdb;pdb.set_trace()
+            picture ="%s/import/pictures/%s.jpg" % (i_home,picture_id)
+            if os.path.exists(picture):
+                file = open(picture)
+                if False:
+                    img = PIL.Image.open(file)
+                    img.thumbnail((150,200),
+                                  resample=PIL.Image.ANTIALIAS)
+                    # We now need a buffer to write to. It can't be the same
+                    # as the inbuffer as the PNG writer will write over itself.
+                    outfile = StringIO()
+                    img.save(outfile, format=img.format)
+                else:
+                    outfile = file.read()
+                app_doc.manage_addFile('passport',
+                                       file=outfile,
+                                       title="%s.jpg" % jamb_reg_no)
+            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',
+                         )
+            dp['pume_tot_score'] = jamb.get(csv_d['pume_tot_score']) or "No Option Shaded"
+            pume = student.pume
+            pume.getContent().edit(mapping=dp)
+            #wftool.doActionFor(pume,'close')
+            pume.manage_setLocalRoles(sid, ['Owner',])
+            #student.getContent().createSubObjects()
+            dp = {}
+            if len(names) == 3:
+                dp['firstname'] = names[0].capitalize()
+                dp['middlename'] = names[1].capitalize()
+                dp['lastname'] = names[2].capitalize()
+            elif len(names) == 2:
+                dp['firstname'] = names[0].capitalize()
+                dp['middlename'] = ''
+                dp['lastname'] = names[1].capitalize()
+            else:
+                dp['firstname'] = ''
+                dp['middlename'] = ''
+                dp['lastname'] = jamb_name
+            dp['sex'] = jamb.get(csv_d['jamb_sex']) == 'F'
+            catalog_entry['sex'] = dp['sex']
+            catalog_entry['name'] = "%(firstname)s %(middlename)s %(lastname)s" % dp
+            student.invokeFactory('StudentPersonal','personal')
+            per = student.personal
+            per_doc = per.getContent()
+            per_doc.edit(mapping = dp)
+            per.manage_setLocalRoles(sid, ['Owner',])
+            if jamb.get(csv_d['stud_status']) == "Admitted":
+                wftool.doActionFor(student,'pume_pass')
+                wftool.doActionFor(student,'admit')
+            else:
+                wftool.doActionFor(student,'pume_fail')
+                wftool.doActionFor(student,'reject_admission')
+                continue
+            #
+            # Clearance
+            #
+            student.invokeFactory('StudentClearance','clearance')
+            #wftool.doActionFor(student.clearance,'open')
+            dp = {'Title': 'Clearance/Eligibility Record'}
+            student.clearance.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)
+            #dsc['faculty'] = jamb.get(csv_d['faculty'])
+            #dsc['department'] = jamb.get(csv_d['department'])
+            catalog_entry['faculty'] = jamb.get(csv_d['faculty'])
+            catalog_entry['department'] = jamb.get(csv_d['department'])
+            catalog_entry['course'] = cert_id
+            #catalog_entry['level'] = getattr(cert_doc,'start_level')
+            catalog_entry['level'] = '100'
+            dsc['study_course'] = cert_id
+            #dsc['entry_level'] = '100'
+            #dsc['entry_session'] = jamb.get(csv_d['session'])
+            study_course.getContent().edit(mapping=dsc)
+            self.students_catalog.addRecord(**catalog_entry)
+            if tr_count > 10:
+                if len(no_import) > 0:
+                    open("%s/import/%s_not_imported.csv" % (i_home,name),"a").write(
+                             '\n'.join(no_import) + "\n")
+                    no_import = []
+                em = '%d transactions commited\n' % tr_count
+                transaction.commit()
+                logger.info(em)
+                total += tr_count
+                tr_count = 0
+        open("%s/import/%s_not_imported.csv" % (i_home,name),"a").write(
+                                                '\n'.join(no_import))
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+
+    security.declareProtected(ModifyPortalContent,"fixVerdicts")###(
+    def fixVerdicts(self,csv_file=None):
+        """fix wrong uploaded verdicts"""
+        import transaction
+        import random
+        wftool = self.portal_workflow
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        students_folder = self.portal_url.getPortalObject().campus.students
+        tr_count = 1
+        total = 0
+        if csv_file is None:
+            name = 'Verdicts'
+        else:
+            name = csv_file
+        st_cat = self.students_catalog
+        no_import = []
+        verdicts_voc = self.portal_vocabularies.verdicts
+        rverdicts = {}
+        for k,v in verdicts_voc.items():
+            rverdicts[v.upper()] = k
+        rverdicts['STUDENT ON PROBATION'] = 'C'
+        logger = logging.getLogger('Students.StudentsFolder.fixVerdicts')
+        try:
+            verdicts = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
+        except:
+            logger.error('Error reading %s.csv' % name)
+            return
+        start = True
+        #import pdb;pdb.set_trace()
+        for verdict in verdicts:
+            if start:
+                start = False
+                logger.info('Start loading from %s.csv' % name)
+                s = ','.join(['"%s"' % fn for fn in verdict.keys()])
+                no_import.append('%s,"Error"' % s)
+                format = ','.join(['"%%(%s)s"' % fn for fn in verdict.keys()])
+                format_error = format + ',"%(Error)s"'
+            matric_no = verdict.get('MAT NO')
+            if not matric_no:
+                continue
+            matric_no = matric_no.upper()
+            if matric_no == '':
+                continue
+            verdict_code = rverdicts.get(verdict.get('CATEGORY'),None)
+            if verdict_code is None:
+                continue
+            sres = st_cat(matric_no = matric_no)
+            if sres:
+                student_id = sres[0].id
+                student_obj = getattr(students_folder,student_id,None)
+                if student_obj:
+                    study_course = getattr(student_obj,'study_course',None)
+                    if study_course is None:
+                        verdict['Error'] = "Student did not yet log in"
+                        no_import.append( format_error % verdict)
+                        continue
+                st_cat.modifyRecord(id = student_id,
+                                    verdict=verdict_code)
+
+                dsc = {}
+                dsc['current_verdict'] = verdict_code
+                study_course.getContent().edit(mapping=dsc)
+            else:
+                verdict['Error'] = "Not found in students_catalog"
+                no_import.append( format_error % verdict)
+                continue
+            tr_count += 1
+            if tr_count > 1000:
+                if len(no_import) > 0:
+                    open("%s/import/%s_not_imported%s.csv" % (i_home,name,current),"a").write(
+                             '\n'.join(no_import) + '\n')
+                    no_import = []
+                em = '%d transactions commited total %s\n' % (tr_count,total)
+                transaction.commit()
+                regs = []
+                logger.info(em)
+                total += tr_count
+                tr_count = 0
+        open("%s/import/%s_not_imported%s.csv" % (i_home,name,current),"a").write(
+                                                '\n'.join(no_import))
+        total += tr_count
+        em = '%d total transactions commited' % (total)
+        logger.info(em)
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+
+
+    security.declareProtected(ModifyPortalContent,"fixAllEntryModeForReturning")###(
+    def fixAllEntryModeForReturning(self):
+        "read all Returning*.csv"
+        ipath = "%s/import/" % i_home
+        names = os.listdir(ipath)
+        for name in names:
+            head,tail = os.path.splitext(name)
+            if head.startswith('Returning')\
+               and tail == '.csv'\
+               and name.find('imported') < 0:
+                self.fixEntryModeForReturning(csv_file=head)
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"fixEntryModeForReturning")###(
+    def fixEntryModeForReturning(self,csv_file=None):
+        """load Returning Studentdata from CSV values"""
+        import transaction
+        import random
+        wftool = self.portal_workflow
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        students_folder = self.portal_url.getPortalObject().campus.students
+        tr_count = 1
+        total = 0
+        if csv_file is None:
+            name = 'Returning'
+        else:
+            name = csv_file
+        table = self.returning_import
+        st_cat = self.students_catalog
+        no_import = []
+        logger = logging.getLogger('Students.StudentsFolder.fixEntryModeForReturning')
+        try:
+            returning = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
+        except:
+            logger.error('Error reading %s.csv' % name)
+            return
+        start = True
+        for student in returning:
+            if start:
+                start = False
+                logger.info('Start loading from %s.csv' % name)
+                s = ','.join(['"%s"' % fn for fn in student.keys()])
+                no_import.append('%s,"Error"' % s)
+                format = ','.join(['"%%(%s)s"' % fn for fn in student.keys()])
+                format_error = format + ',"%(Error)s"'
+            matric_no = student.get('matric_no')
+            if not matric_no:
+                continue
+            matric_no = matric_no.upper()
+            student['matric_no'] = matric_no
+            if matric_no == '':
+                continue
+            if not table(matric_no = matric_no):
+                student['Error'] = "Not imported yet"
+                no_import.append( format_error % student)
+                continue
+            student_id = None
+            app = None
+            per = None
+            if st_cat(matric_no = matric_no):
+                student_id = st_cat(matric_no = matric_no)[0].id
+                student_obj = getattr(students_folder,student_id,None)
+                if student_obj:
+                    app = getattr(student_obj,'application',None)
+                    if app is not None:
+                        app_doc = app.getContent()
+                    per = getattr(student_obj,'personal',None)
+                    if per is not None:
+                        per_doc = per.getContent()
+            student['Mode_of_Entry'] = entry_mode = student.get('Mode of Entry').upper()
+            student['Permanent_Address'] = perm_address = student.get('Permanent Address')
+            #import pdb;pdb.set_trace()
+            if not entry_mode:
+                student['Error'] = "'Mode of Entry' empty"
+                no_import.append( format_error % student)
+                continue
+            try:
+                table.modifyRecord(matric_no = matric_no,
+                                   Mode_of_Entry = entry_mode,
+                                   Permanent_Address = perm_address)
+            except KeyError:
+                student['Error'] = "Not found in returning_import"
+                no_import.append( format_error % student)
+                continue
+            if student_id is not None:
+                try:
+                    st_cat.modifyRecord(id = student_id,
+                                        entry_mode=entry_mode)
+                except KeyError:
+                    student['Error'] = "Not found in students_catalog"
+                    no_import.append( format_error % student)
+                    continue
+            if app is not None:
+                da = {}
+                da['entry_mode'] = entry_mode
+                app_doc.edit(mapping=da)
+            if per is not None:
+                dp = {}
+                dp['perm_address'] = perm_address
+                per_doc.edit(mapping=dp)
+            tr_count += 1
+            if tr_count > 1000:
+                if len(no_import) > 0:
+                    open("%s/import/%s_not_imported%s.csv" % (i_home,name,current),"a").write(
+                             '\n'.join(no_import) + '\n')
+                    no_import = []
+                em = '%d transactions commited total %s\n' % (tr_count,total)
+                transaction.commit()
+                regs = []
+                logger.info(em)
+                total += tr_count
+                tr_count = 0
+        open("%s/import/%s_not_imported%s.csv" % (i_home,name,current),"a").write(
+                                                '\n'.join(no_import))
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
Index: WAeUP_SRP/trunk_not_used/TODO.txt
===================================================================
--- WAeUP_SRP/trunk_not_used/TODO.txt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/TODO.txt	(revision 2226)
@@ -0,0 +1,3 @@
+see 
+
+https://trac.waeup.org/query?status=new&status=assigned&status=reopened&order=priority
Index: WAeUP_SRP/trunk_not_used/University.py
===================================================================
--- WAeUP_SRP/trunk_not_used/University.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/University.py	(revision 2226)
@@ -0,0 +1,38 @@
+from Globals import InitializeClass,HTMLFile
+from AccessControl import ClassSecurityInfo
+from Products.ZCatalog.ZCatalog import ZCatalog
+
+from Products.CMFCore.utils import getToolByName
+from Products.CMFCore.permissions import View
+from Products.CMFCore.permissions import ModifyPortalContent
+from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder 
+from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument 
+from Products.CPSCore.CPSBase import CPSBaseBTreeFolder as BaseBTreeFolder 
+from Products.CPSDocument.CPSDocument import CPSDocument 
+
+#
+# The WAeUP BaseContainer
+#
+class University(CPSDocument):
+    """
+    Container for the various WAeUP containers 
+    """
+    meta_type = 'University'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+        
+    security.declarePublic('getHallTitle')
+    def getHallTitle(self,hall):
+        """get the Hall Title"""
+        res = ZCatalog.searchResults(self.portal_catalog,portal_type="AccoHall",id=hall)
+        if res and len(res) == 1:
+            return res[0].Title
+        return hall
+
+InitializeClass(University)
+
+def addUniversity(container, id, REQUEST=None, **kw):
+    """Add a University"""
+    ob = University(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
Index: WAeUP_SRP/trunk_not_used/VERSION
===================================================================
--- WAeUP_SRP/trunk_not_used/VERSION	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/VERSION	(revision 2226)
@@ -0,0 +1,1 @@
+1.0-devel (SVN/Unreleased)
Index: WAeUP_SRP/trunk_not_used/WAeUPPermissions.py
===================================================================
--- WAeUP_SRP/trunk_not_used/WAeUPPermissions.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/WAeUPPermissions.py	(revision 2226)
@@ -0,0 +1,28 @@
+# (C) Copyright 2005 AixtraWare <http://aixtraware.de>
+# Author: Joachim Schmitz <js@aixtraware.de>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# $Id$
+
+__author__ = "Joachim Schmitz <js@aixtraware.de>"
+
+"""WAeUP Permissions
+"""
+
+from Products.CMFCore.permissions import setDefaultRoles
+
+#WAeUPModifyOwnContent = "WAeUPModify own content"
+#setDefaultRoles(WAeUPModifyOwnContent, ('Owner',))
Index: WAeUP_SRP/trunk_not_used/WAeUPTables.py
===================================================================
--- WAeUP_SRP/trunk_not_used/WAeUPTables.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/WAeUPTables.py	(revision 2226)
@@ -0,0 +1,1644 @@
+#-*- mode: python; mode: fold -*-
+# (C) Copyright 2005 AixtraWare <http://aixtraware.de>
+# Author: Joachim Schmitz <js@aixtraware.de>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# $Id$
+
+from zope.interface import implements
+from Globals import InitializeClass
+from Products.ZCatalog.ZCatalog import ZCatalog
+from Products.ZCatalog.ProgressHandler import ZLogHandler
+from AccessControl import ClassSecurityInfo
+from Products.CMFCore.permissions import ModifyPortalContent
+from Products.CMFCore.utils import getToolByName
+from Products.CMFCore.CatalogTool import CatalogTool
+from Products.CPSSchemas.StorageAdapter import MappingStorageAdapter
+from Products.CPSSchemas.DataStructure import DataStructure
+from Products.CPSSchemas.DataModel import DataModel
+from Products.AdvancedQuery import Eq, Between, Le,In
+import urllib
+import DateTime,time
+import csv,re
+import logging
+import Globals
+p_home = Globals.package_home(globals())
+i_home = Globals.INSTANCE_HOME
+
+ADDING_SHEDULED = "adding_sheduled"
+OBJECT_CREATED = "object_created"
+
+from interfaces import IWAeUPTable
+
+class AttributeHolder(object):
+    pass
+
+def dict2ob(dict):
+    ob = AttributeHolder()
+    for key, value in dict.items():
+        setattr(ob, key, value)
+    return ob
+
+class WAeUPTable(ZCatalog): ###(
+
+    implements(IWAeUPTable)
+    security = ClassSecurityInfo()
+    meta_type = None
+
+    def __init__(self,name=None):
+        if name ==  None:
+            name = self.name
+        ZCatalog.__init__(self,name)
+
+    def refreshCatalog(self, clear=0, pghandler=None): ###(
+        """ don't refresh for a normal table """
+
+        if self.REQUEST and self.REQUEST.RESPONSE:
+            self.REQUEST.RESPONSE.redirect(
+              URL1 +
+              '/manage_catalogAdvanced?manage_tabs_message=Catalog%20refresh%20not%20implemented')
+
+###)
+
+    def manage_catalogClear(self, REQUEST=None, RESPONSE=None, URL1=None): ###(
+        """ clears the whole enchilada """
+
+        #if REQUEST and RESPONSE:
+        #    RESPONSE.redirect(
+        #      URL1 +
+        #      '/manage_catalogAdvanced?manage_tabs_message=Catalog%20Clearing%20disabled')
+
+        self._catalog.clear()
+        if REQUEST and RESPONSE:
+            RESPONSE.redirect(
+              URL1 +
+              '/manage_catalogAdvanced?manage_tabs_message=Catalog%20cleared')
+
+###)
+
+    def record2dict(self,fields,record):
+        d = {}
+        for key in fields:
+            v = getattr(record, key, None)
+            if key == 'sex':
+                if v:
+                    v = 'F'
+                else:
+                    v = 'M'
+                d[key] = v
+            elif v:
+                if key == 'lga':
+                    v = self.portal_vocabularies.local_gov_areas.get(v)
+                d[key] = v
+            else:
+                d[key] = ''
+        return d
+
+    def addRecord(self, **data): ###(
+        # The uid is the same as "bed".
+        uid = data[self.key]
+        res = self.searchResults({"%s" % self.key : uid})
+        if len(res) > 0:
+            raise ValueError("More than one record with uid %s" % uid)
+        self.catalog_object(dict2ob(data), uid=uid)
+        return uid
+
+###)
+
+    def deleteRecord(self, uid):
+        self.uncatalog_object(uid)
+
+    def searchAndSetRecord(self, **data):
+        raise NotImplemented
+
+    def modifyRecord(self, record=None, **data): ###(
+        #records = self.searchResults(uid=uid)
+        uid = data[self.key]
+        if record is None:
+            records = self.searchResults({"%s" % self.key : uid})
+            if len(records) > 1:
+                # Can not happen, but anyway...
+                raise ValueError("More than one record with uid %s" % uid)
+            if len(records) == 0:
+                raise KeyError("No record for uid %s" % uid)
+            record = records[0]
+        record_data = {}
+        for field in self.schema() + self.indexes():
+            record_data[field] = getattr(record, field)
+        # Add the updated data:
+        record_data.update(data)
+        self.catalog_object(dict2ob(record_data), uid)
+
+###)
+
+    def reindexIndex(self, name, REQUEST,pghandler=None): ###(
+        if isinstance(name, str):
+            name =  (name,)
+        paths = self._catalog.uids.items()
+        i = 0
+        #import pdb;pdb.set_trace()
+        for p,rid in paths:
+            i += 1
+            metadata = self.getMetadataForRID(rid)
+            record_data = {}
+            for field in name:
+                record_data[field] = metadata.get(field)
+            uid = metadata.get(self.key)
+            self.catalog_object(dict2ob(record_data), uid, idxs=name,
+                                update_metadata=0)
+
+###)
+
+    security.declareProtected(ModifyPortalContent,"exportAllRecords") ###(
+    def exportAllRecords(self):
+        "export a WAeUPTable"
+        #import pdb;pdb.set_trace()
+        fields = [field for field in self.schema()]
+        format = ','.join(['"%%(%s)s"' % fn for fn in fields])
+        csv = []
+        csv.append(','.join(['"%s"' % fn for fn in fields]))
+        for uid in self._catalog.uids:
+            records = self.searchResults({"%s" % self.key : uid})
+            if len(records) > 1:
+                # Can not happen, but anyway...
+                raise ValueError("More than one record with uid %s" % uid)
+            if len(records) == 0:
+                raise KeyError("No record for uid %s" % uid)
+            rec = records[0]
+            csv.append(format % rec)
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        open("%s/import/%s-%s.csv" % (i_home,self.getId(),current),"w+").write('\n'.join(csv))
+
+###)
+
+    security.declareProtected(ModifyPortalContent,"dumpAll")###(
+    def dumpAll(self):
+        """dump all data in the table to a csv"""
+        member = self.portal_membership.getAuthenticatedMember()
+        logger = logging.getLogger('WAeUPTables.dump_%s' % self.__name__)
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        export_file = "%s/export/%s_%s.csv" % (i_home,self.__name__,current,)
+        print export_file
+        res_list = []
+        lines = []
+        if hasattr(self,"export_keys"):
+            fields = self.export_keys
+        else:
+            fields = []
+            for f in self.schema():
+                fields.append(f)
+        headline = ','.join(fields)
+        #open(export_file,"a").write(headline +'\n')
+        out = open(export_file,"wb")
+        out.write(headline +'\n')
+        out.close()
+        out = open(export_file,"a")
+        csv_writer = csv.DictWriter(out,fields,)
+        format = '"%(' + ')s","%('.join(fields) + ')s"'
+        records = self()
+        nr2export = len(records)
+        logger.info('%s starts dumping, %s records to export' % (member,nr2export))
+        chunk = 2000
+        total = 0
+        start = DateTime.DateTime().timeTime()
+        start_chunk = DateTime.DateTime().timeTime()
+        for record in records:
+            not_all = False
+            d = self.record2dict(fields,record)
+            #d['state'],d['lga'] = formatLGA(d['lga'],voc = self.portal_vocabularies.local_gov_areas)
+            #lines.append(format % d)
+            lines.append(d)
+            total += 1
+            if total and not total % chunk or total == len(records):
+                #open(export_file,"a").write('\n'.join(lines) +'\n')
+                csv_writer.writerows(lines)
+                anz = len(lines)
+                logger.info("wrote %(anz)d  total written %(total)d" % vars())
+                end_chunk = DateTime.DateTime().timeTime()
+                duration = end_chunk-start_chunk
+                per_record = duration/anz
+                till_now = end_chunk - start
+                avarage_per_record = till_now/total
+                estimated_end = DateTime.DateTime(start + avarage_per_record * nr2export)
+                estimated_end = estimated_end.strftime("%H:%M:%S")
+                logger.info('%(duration)4.1f, %(per_record)4.3f,end %(estimated_end)s' % vars())
+                start_chunk = DateTime.DateTime().timeTime()
+                lines = []
+        end = DateTime.DateTime().timeTime()
+        logger.info('total time %6.2f m' % ((end-start)/60))
+        import os
+        filename, extension = os.path.splitext(export_file)
+        from subprocess import call
+        msg = "wrote %(total)d records to %(export_file)s" % vars()
+        try:
+            retcode = call('gzip %s' % (export_file),shell=True)
+            if retcode == 0:
+                msg = "wrote %(total)d records to %(export_file)s.gz" % vars()
+        except OSError, e:
+            retcode = -99
+            logger.info("zip failed with %s" % e)
+        logger.info(msg)
+        args = {'portal_status_message': msg}
+        #url = self.REQUEST.get('URL1') + '?' + urlencode(args)
+        url = self.REQUEST.get('URL2')
+        return self.REQUEST.RESPONSE.redirect(url)
+    ###)
+
+    security.declarePrivate("_import_old") ###(
+    def _import_old(self,filename,schema,layout, mode,logger):
+        "import data from csv"
+        import transaction
+        import random
+        pm = self.portal_membership
+        member = pm.getAuthenticatedMember()
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        import_fn = "%s/import/%s.csv" % (i_home,filename)
+        imported_fn = "%s/import/%s_imported%s.csv" % (i_home,filename,current)
+        not_imported_fn = "%s/import/%s_not_imported%s.csv" % (i_home,filename,current)
+        start = True
+        tr_count = 1
+        total_imported = 0
+        total_not_imported = 0
+        total = 0
+        iname =  "%s" % filename
+        not_imported = []
+        imported = []
+        valid_records = []
+        invalid_records = []
+        d = {}
+        d['mode'] = mode
+        d['imported'] = total_imported
+        d['not_imported'] = total_not_imported
+        d['valid_records'] = valid_records
+        d['invalid_records'] = invalid_records
+        d['import_fn'] = import_fn
+        d['imported_fn'] = imported_fn
+        d['not_imported_fn'] = not_imported_fn
+        if schema is None:
+            em = 'No schema specified'
+            logger.error(em)
+            return d
+        if layout is None:
+            em = 'No layout specified'
+            logger.error(em)
+            return d
+        validators = {}
+        for widget in layout.keys():
+            try:
+                validators[widget] = layout[widget].validate
+            except AttributeError:
+                logger.info('%s has no validate attribute' % widget)
+                return d
+        # if mode == 'edit':
+        #     importer = self.importEdit
+        # elif mode == 'add':
+        #     importer = self.importAdd
+        # else:
+        #     importer = None
+        try:
+            items = csv.DictReader(open(import_fn,"rb"),
+                                   dialect="excel",
+                                   skipinitialspace=True)
+        except:
+            em = 'Error reading %s.csv' % filename
+            logger.error(em)
+            return d
+        #import pdb;pdb.set_trace()
+        for item in items:
+            if start:
+                start = False
+                logger.info('%s starts import from %s.csv' % (member,filename))
+                #import_keys = [k for k in item.keys() if not k.startswith('ignore')]
+                attrs = csv.reader(open("%s/import/%s.csv" % (i_home,filename),"rb"),
+                                   dialect="excel",
+                                   skipinitialspace=True).next()
+                import_keys = [k for k in attrs if not (k.startswith('ignore') or k.isupper())]
+                diff2schema = set(import_keys).difference(set(schema.keys()))
+                diff2layout = set(import_keys).difference(set(layout.keys()))
+                if diff2layout:
+                    em = "not ignorable key(s) %s found in heading" % diff2layout
+                    logger.info(em)
+                    return d
+                s = ','.join(['"%s"' % fn for fn in import_keys])
+                open(not_imported_fn,"a").write(s + ',"Error"'+ '\n')
+                #s = '"id",' + s
+                open(imported_fn,"a").write(s + '\n')
+                format = ','.join(['"%%(%s)s"' % fn for fn in import_keys])
+                format_error = format + ',"%(Error)s"'
+                #format = '"%(id)s",'+ format
+                adapters = [MappingStorageAdapter(schema, item)]
+            dm = DataModel(item, adapters,context=self)
+            ds = DataStructure(data=item,datamodel=dm)
+            error_string = ""
+            for k in import_keys:
+                if not validators[k](ds,mode=mode):
+                    error_string += " %s : %s" % (k,ds.getError(k))
+            # if not error_string and importer:
+            #     item.update(dm)
+            #     item['id'],error = importer(item)
+            #     if error:
+            #         error_string += error
+            if error_string:
+                item['Error'] = error_string
+                invalid_records.append(dm)
+                not_imported.append(format_error % item)
+                total_not_imported += 1
+            else:
+                em = format % item
+                valid_records.append(dm)
+                imported.append(em)
+                #logger.info("%(total_imported)d of %(total)d %(em)s" % vars())
+                tr_count += 1
+                total_imported += 1
+            total += 1
+        if len(imported) > 0:
+            open(imported_fn,"a").write('\n'.join(imported))
+        if len(not_imported) > 0:
+            open(not_imported_fn,"a").write('\n'.join(not_imported))
+        #em = "Imported: %d, not imported: %d of total %d" % (total_imported,total_not_imported,total)
+        d['imported'] = total_imported
+        d['not_imported'] = total_not_imported
+        d['valid_records'] = valid_records
+        d['invalid_records'] = invalid_records
+        d['imported_fn'] = imported_fn
+        d['not_imported_fn'] = not_imported_fn
+        #logger.info(em)
+        return d
+    ###)
+
+    security.declarePrivate("_import") ###(
+    def _import_new(self,csv_items,schema, layout, mode,logger):
+        "import data from csv.Dictreader Instance"
+        start = True
+        tr_count = 1
+        total_imported = 0
+        total_not_imported = 0
+        total = 0
+        iname =  "%s" % filename
+        not_imported = []
+        valid_records = []
+        invalid_records = []
+        duplicate_records = []
+        d = {}
+        d['mode'] = mode
+        d['valid_records'] = valid_records
+        d['invalid_records'] = invalid_records
+        d['invalid_records'] = duplicate_records
+        # d['import_fn'] = import_fn
+        # d['imported_fn'] = imported_fn
+        # d['not_imported_fn'] = not_imported_fn
+        validators = {}
+        for widget in layout.keys():
+            try:
+                validators[widget] = layout[widget].validate
+            except AttributeError:
+                logger.info('%s has no validate attribute' % widget)
+                return d
+        for item in csv_items:
+            if start:
+                start = False
+                logger.info('%s starts import from %s.csv' % (member,filename))
+                #import_keys = [k for k in item.keys() if not k.startswith('ignore')]
+                attrs = csv.reader(open("%s/import/%s.csv" % (i_home,filename),"rb")).next()
+                import_keys = [k for k in attrs if not (k.startswith('ignore') or k.isupper())]
+                diff2schema = set(import_keys).difference(set(schema.keys()))
+                diff2layout = set(import_keys).difference(set(layout.keys()))
+                if diff2layout:
+                    em = "not ignorable key(s) %s found in heading" % diff2layout
+                    logger.info(em)
+                    return d
+                # s = ','.join(['"%s"' % fn for fn in import_keys])
+                # open(not_imported_fn,"a").write(s + ',"Error"'+ '\n')
+                # #s = '"id",' + s
+                # open(imported_fn,"a").write(s + '\n')
+                # format = ','.join(['"%%(%s)s"' % fn for fn in import_keys])
+                # format_error = format + ',"%(Error)s"'
+                # #format = '"%(id)s",'+ format
+                adapters = [MappingStorageAdapter(schema, item)]
+            dm = DataModel(item, adapters,context=self)
+            ds = DataStructure(data=item,datamodel=dm)
+            error_string = ""
+            for k in import_keys:
+                if not validators[k](ds,mode=mode):
+                    error_string += " %s : %s" % (k,ds.getError(k))
+            if error_string:
+                item['Error'] = error_string
+                #invalid_records.append(dm)
+                invalid_records.append(item)
+                total_not_imported += 1
+            else:
+                em = format % item
+                valid_records.append(dm)
+                #logger.info("%(total_imported)d of %(total)d %(em)s" % vars())
+                tr_count += 1
+                total_imported += 1
+            total += 1
+        # if len(imported) > 0:
+        #     open(imported_fn,"a").write('\n'.join(imported))
+        # if len(not_imported) > 0:
+        #     open(not_imported_fn,"a").write('\n'.join(not_imported))
+        #em = "Imported: %d, not imported: %d of total %d" % (total_imported,total_not_imported,total)
+        d['imported'] = total_imported
+        d['not_imported'] = total_not_imported
+        d['valid_records'] = valid_records
+        d['invalid_records'] = invalid_records
+        return d
+    ###)
+
+###)
+
+class AccommodationTable(WAeUPTable): ###(
+
+    meta_type = 'WAeUP Accommodation Tool'
+    name = "portal_accommodation"
+    key = "bed"
+    def __init__(self,name=None):
+        if name ==  None:
+            name = self.name
+        WAeUPTable.__init__(self, name)
+
+    def searchAndReserveBed(self, student_id,bed_type):
+        records = self.searchResults({'student' : student_id})
+        if len(records) > 0:
+            return -1,"Student with Id %s already booked bed %s." % (student_id,records[0].bed)
+
+        records = [r for r in self.searchResults({'bed_type' : bed_type}) if not r.student]
+        #import pdb;pdb.set_trace()
+        if len(records) == 0:
+            return -2,"No bed available"
+        rec = records[0]
+        self.modifyRecord(bed=rec.bed,student=student_id)
+        s_logger = logging.getLogger('WAeUPTables.AccommodationTable.searchAndReserveBed')
+        s_logger.info('%s reserved bed %s' % (student_id,rec.bed))
+        return 1,rec.bed
+
+
+InitializeClass(AccommodationTable)
+
+###)
+
+class PinTable(WAeUPTable): ###(
+    from ZODB.POSException import ConflictError
+    meta_type = 'WAeUP Pin Tool'
+    name = "portal_pins"
+    key = 'pin'
+    def __init__(self,name=None):
+        if name ==  None:
+            name = self.name
+        WAeUPTable.__init__(self, name)
+
+
+    def searchAndSetRecord(self, uid, student_id,prefix):
+
+        # The following line must be activated after resetting the
+        # the portal_pins table. This is to avoid duplicate entries
+        # and disable duplicate payments.
+
+        #student_id = student_id.upper()
+
+        records = self.searchResults(student = student_id)
+        if len(records) > 0 and prefix in ('CLR','APP'):
+            for r in records:
+                if r.pin != uid and r.prefix_batch.startswith(prefix):
+                    return -2
+        records = self.searchResults({"%s" % self.key : uid})
+        if len(records) > 1:
+            # Can not happen, but anyway...
+            raise ValueError("More than one record with uid %s" % uid)
+        if len(records) == 0:
+            return -1
+        record = records[0]
+        if record.student == "":
+            record_data = {}
+            for field in self.schema() + self.indexes():
+                record_data[field] = getattr(record, field)
+            # Add the updated data:
+            record_data['student'] = student_id
+            try:
+                self.catalog_object(dict2ob(record_data), uid)
+                return 1
+            except ConflictError:
+                return 2
+        if record.student.upper() != student_id.upper():
+            return 0
+        if record.student.upper() == student_id.upper():
+            return 2
+        return -3
+
+InitializeClass(PinTable)
+
+###)
+
+class PumeResultsTable(WAeUPTable): ###(
+
+    meta_type = 'WAeUP PumeResults Tool'
+    name = "portal_pumeresults"
+    key = "jamb_reg_no"
+    def __init__(self,name=None):
+        if name ==  None:
+            name = self.name
+        WAeUPTable.__init__(self, name)
+
+
+InitializeClass(PumeResultsTable)
+
+###)
+
+class ApplicantsCatalog(WAeUPTable): ###(
+
+    meta_type = 'WAeUP Applicants Catalog'
+    name = "applicants_catalog"
+    key = "reg_no"
+    security = ClassSecurityInfo()
+    export_keys = (
+                   "reg_no",
+                   "status",
+                   "lastname",
+                   "sex",
+                   "date_of_birth",
+                   "lga",
+                   "email",
+                   "phone",
+                   "passport",
+                   "entry_mode",
+                   "pin",
+                   "screening_type",
+                   "registration_date",
+                   "testdate",
+                   "application_date",
+                   "screening_date",
+                   "faculty",
+                   "department",
+                   "course1",
+                   "course2",
+                   "course3",
+                   "eng_score",
+                   "subj1",
+                   "subj1score",
+                   "subj2",
+                   "subj2score",
+                   "subj3",
+                   "subj3score",
+                   "aggregate",
+                   "course_admitted",
+                   )
+    def __init__(self,name=None):
+        if name ==  None:
+            name = self.name
+        WAeUPTable.__init__(self, name)
+
+
+
+    security.declareProtected(ModifyPortalContent,"new_importCSV")###(
+    def new_importCSV(self,filename="JAMB_data",
+                  schema_id="application",
+                  layout_id="application_import",
+                  mode='add'):
+        """ import JAMB data """
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        pm = self.portal_membership
+        member = pm.getAuthenticatedMember()
+        logger = logging.getLogger('WAeUPTables.ApplicantsCatalog.importCSV')
+        lock_fn = "%s/import/%s_import_lock" % (i_home,filename)
+        import_fn = "%s/import/%s.csv" % (i_home,filename)
+        if mode not in ('add','edit'):
+            logger.info("invalid mode: %s" % mode)
+        if os.path.exists(lock_fn):
+            logger.info("import of %(import_fn)s already in progress" % vars())
+            return
+        lock_file = open(lock_fn,"w")
+        lock_file.write("%(current)s \n" % vars())
+        lock_file.close()
+        invalid_fn = "%s/import/%s_not_imported%s.csv" % (i_home,filename,current)
+        duplicate_fn = "%s/import/%s_not_imported%s.csv" % (i_home,filename,current)
+        stool = getToolByName(self, 'portal_schemas')
+        ltool = getToolByName(self, 'portal_layouts')
+        schema = stool._getOb(schema_id)
+        if schema is None:
+            em = 'No such schema %s' % schema_id
+            logger.error(em)
+            return
+        for postfix in ('_import',''):
+            layout_name = "%(layout_id)s%(postfix)s" % vars()
+            if hasattr(ltool,layout_name):
+                break
+        layout = ltool._getOb(layout_name)
+        if layout is None:
+            em = 'No such layout %s' % layout_id
+            logger.error(em)
+            return
+        try:
+            csv_file = csv.DictReader(open(import_fn,"rb"))
+        except:
+            em = 'Error reading %s.csv' % filename
+            logger.error(em)
+            return
+        d = self._import_new(csv_items,schema,layout,mode,logger)
+        imported = []
+        edited = []
+        duplicates = []
+        not_found = []
+        if len(d['valid_records']) > 0:
+            for record in d['valid_records']:
+                #import pdb;pdb.set_trace()
+                if mode == "add":
+                    try:
+                        self.addRecord(**dict(record.items()))
+                        imported.append(**dict(record.items()))
+                        logger.info("added %s" % record.items())
+                    except ValueError:
+                        dupplicate.append(**dict(record.items()))
+                        logger.info("duplicate %s" % record.items())
+                elif mode == "edit":
+                    try:
+                        self.modifyRecord(**dict(record.items()))
+                        edited.append(**dict(record.items()))
+                        logger.info("edited %s" % record.items())
+                    except KeyError:
+                        not_found.append(**dict(record.items()))
+                        logger.info("not found %s" % record.items())
+        invalid = d['invalid_records']
+        for itype in ("imported","edited","not_found","duplicate","invalid"):
+            outlist = locals[itype]
+            if len(outlist):
+                d = {}
+                for k in outlist[0].keys():
+                    d[k] = k
+                outlist[0] = d
+                outfile = open("file_name_%s" % itype,'w')
+                csv.DictWriter(outfile,outlist[0].keys()).writerows(outlist)
+                logger.info("wrote %(itype)s records to %(, written to %(not_imported_fn)s" % d)
+###)
+
+    security.declareProtected(ModifyPortalContent,"importCSV")###(
+    def importCSV(self,filename="JAMB_data",
+                  schema_id="application",
+                  layout_id="application",
+                  mode='add'):
+        """ import JAMB data """
+        stool = getToolByName(self, 'portal_schemas')
+        ltool = getToolByName(self, 'portal_layouts')
+        schema = stool._getOb(schema_id)
+        if schema is None:
+            em = 'No such schema %s' % schema_id
+            logger.error(em)
+            return
+        layout = ltool._getOb(layout_id)
+        if layout is None:
+            em = 'No such layout %s' % layout_id
+            logger.error(em)
+            return
+        logger = logging.getLogger('WAeUPTables.ApplicantsCatalog.importCSV')
+        d = self._import_old(filename,schema,layout,mode,logger)
+        if len(d['valid_records']) > 0:
+            for record in d['valid_records']:
+                #import pdb;pdb.set_trace()
+                if mode == "add":
+                    self.addRecord(**dict(record.items()))
+                    logger.info("added %s" % record.items())
+                elif mode == "edit":
+                    self.modifyRecord(**dict(record.items()))
+                    logger.info("edited %s" % record.items())
+                else:
+                    logger.info("invalid mode: %s" % mode)
+        logger.info("%(mode)sed %(imported)d records, invalid written to %(not_imported_fn)s" % d)
+###)
+
+InitializeClass(ApplicantsCatalog)
+
+###)
+
+class StudentsCatalog(WAeUPTable): ###(
+    security = ClassSecurityInfo()
+
+    meta_type = 'WAeUP Students Catalog'
+    name = "students_catalog"
+    key = "id"
+    affected_types = {   ###(
+                      'StudentApplication':
+                      {'id': 'application',
+                       'fields':
+                       ('jamb_reg_no',
+                        'entry_mode',
+                        #'entry_level',
+                        'entry_session',
+                       )
+                      },
+                      'StudentClearance':
+                      {'id': 'clearance',
+                       'fields':
+                       ('matric_no',
+                        'lga',
+                       )
+                      },
+                      'StudentPersonal':
+                      {'id': 'personal',
+                       'fields':
+                       ('name',
+                        'sex',
+                        'perm_address',
+                        'email',
+                        'phone',
+                       )
+                      },
+                      'StudentStudyCourse':
+                      {'id': 'study_course',
+                       'fields':
+                       ('course', # study_course
+                        'faculty', # from certificate
+                        'department', # from certificate
+                        'end_level', # from certificate
+                        'level', # current_level
+                        'mode',  # current_mode
+                        'session', # current_session
+                        'verdict', # current_verdict
+                       )
+                      },
+                     }
+    ###)
+
+    def __init__(self,name=None):
+        if name ==  None:
+            name = self.name
+        WAeUPTable.__init__(self, name)
+        return
+
+    def manage_catalogClear(self, REQUEST=None, RESPONSE=None, URL1=None):
+        """ clears the whole enchilada """
+        self._catalog.clear()
+
+        if REQUEST and RESPONSE:
+            RESPONSE.redirect(
+              URL1 +
+              '/manage_catalogAdvanced?manage_tabs_message=Catalog%20Cleared')
+
+    def manage_catalogReindex(self, REQUEST, RESPONSE, URL1): ###(
+        """ clear the catalog, then re-index everything """
+
+        elapse = time.time()
+        c_elapse = time.clock()
+
+        pgthreshold = self._getProgressThreshold()
+        handler = (pgthreshold > 0) and ZLogHandler(pgthreshold) or None
+        self.refreshCatalog(clear=1, pghandler=handler)
+
+        elapse = time.time() - elapse
+        c_elapse = time.clock() - c_elapse
+
+        RESPONSE.redirect(
+            URL1 +
+            '/manage_catalogAdvanced?manage_tabs_message=' +
+            urllib.quote('Catalog Updated \n'
+                         'Total time: %s\n'
+                         'Total CPU time: %s' % (`elapse`, `c_elapse`)))
+    ###)
+
+    def fill_certificates_dict(self): ###(
+        "return certificate data in  dict"
+        certificates_brains = self.portal_catalog(portal_type ='Certificate')
+        d = {}
+        for cb in certificates_brains:
+            certificate_doc = cb.getObject().getContent()
+            cb_path = cb.getPath().split('/')
+            ld = {}
+            ld['faculty'] = cb_path[-4]
+            ld['department'] = cb_path[-3]
+            ld['end_level'] = getattr(certificate_doc,'end_level','999')
+            d[cb.getId] = ld
+        return d
+    ###)
+
+    def get_from_doc_department(self,doc,cached_data={}): ###(
+        "return the students department"
+        if doc is None:
+            return None
+        if cached_data.has_key(doc.study_course):
+            return cached_data[doc.study_course]['department']
+        certificate_res = self.portal_catalog(id = doc.study_course)
+        if len(certificate_res) != 1:
+            return None
+        return certificate_res[0].getPath().split('/')[-3]
+
+    def get_from_doc_faculty(self,doc,cached_data={}):
+        "return the students faculty"
+        if doc is None:
+            return None
+        if cached_data.has_key(doc.study_course):
+            return cached_data[doc.study_course]['faculty']
+        certificate_res = self.portal_catalog(id = doc.study_course)
+        if len(certificate_res) != 1:
+            return None
+        return certificate_res[0].getPath().split('/')[-4]
+
+    def get_from_doc_end_level(self,doc,cached_data={}):
+        "return the students end_level"
+        if doc is None:
+            return None
+        if cached_data.has_key(doc.study_course):
+            return cached_data[doc.study_course]['end_level']
+        certificate_res = self.portal_catalog(id = doc.study_course)
+        if len(certificate_res) != 1:
+            return None
+        return getattr(certificate_res[0].getObject().getContent(),'end_level','unknown')
+
+    def get_from_doc_level(self,doc,cached_data={}):
+        "return the students level"
+        if doc is None:
+            return None
+        return getattr(doc,'current_level',None)
+
+    def get_from_doc_mode(self,doc,cached_data={}):
+        "return the students mode"
+        if doc is None:
+            return None
+        cm = getattr(doc,'current_mode',None)
+        return cm
+
+
+    def get_from_doc_session(self,doc,cached_data={}):
+        "return the students current_session"
+        if doc is None:
+            return None
+        return getattr(doc,'current_session',None)
+
+    def get_from_doc_entry_session(self,doc,cached_data={}):
+        "return the students entry_session"
+        if doc is None:
+            return None
+        es = getattr(doc,'entry_session',None)
+        if es is not None and len(es) == 2:
+            return es
+        try:
+            digit = int(doc.jamb_reg_no[0])
+        except:
+            return "-1"
+        if digit < 8:
+            return "0%c" % doc.jamb_reg_no[0]
+        return "9%c" % doc.jamb_reg_no[0]
+
+    def get_from_doc_course(self,doc,cached_data={}):
+        "return the students study_course"
+        if doc is None:
+            return None
+        return getattr(doc,'study_course',None)
+
+    def get_from_doc_name(self,doc,cached_data={}):
+        "return the students name from the personal"
+        if doc is None:
+            return None
+        return "%s %s %s" % (doc.firstname,doc.middlename,doc.lastname)
+
+    def get_from_doc_verdict(self,doc,cached_data={}):
+        "return the students study_course"
+        if doc is None:
+            return None
+        return getattr(doc,'current_verdict',None)
+    ###)
+
+    def reindexIndex(self, name, REQUEST,pghandler=None): ###(
+        if isinstance(name, str):
+            name = (name,)
+        reindextypes = {}
+        reindex_special = []
+        for n in name:
+            if n in ("review_state","registered_courses"):
+                reindex_special.append(n)
+            else:
+                for pt in self.affected_types.keys():
+                    if n in self.affected_types[pt]['fields']:
+                        if reindextypes.has_key(pt):
+                            reindextypes[pt].append(n)
+                        else:
+                            reindextypes[pt]= [n]
+                        break
+        cached_data = {}
+        if set(name).intersection(set(('faculty','department','end_level'))):
+            cached_data = self.fill_certificates_dict()
+        students = self.portal_catalog(portal_type="Student")
+        if hasattr(self,'portal_catalog_real'):
+            aq_portal = self.portal_catalog_real.evalAdvancedQuery
+        else:
+            aq_portal = self.portal_catalog.evalAdvancedQuery
+        num_objects = len(students)
+        if pghandler:
+            pghandler.init('Refreshing catalog: %s' % self.absolute_url(1), num_objects)
+        noattr = set(('StudentClearance','StudentPersonal')) & set(reindextypes.keys())
+        #import pdb;pdb.set_trace()
+        for i in xrange(num_objects):
+            if pghandler: pghandler.report(i)
+            student_brain = students[i]
+            student_object = student_brain.getObject()
+            # query = Eq('path',student_brain.getPath())
+            # sub_brains_list = aq_portal(query)
+            # sub_brains = {}
+            # for sub_brain in sub_brains_list:
+            #     sub_brains[sub_brain.portal_type] = sub_brain
+            # student_path = student_brain.getPath()
+            data = {}
+            modified = False
+            sid = data['id'] = student_brain.getId
+            if reindex_special and 'review_state' in reindex_special:
+                modified = True
+                data['review_state'] = student_brain.review_state
+            sub_objects = False
+            for pt in reindextypes.keys():
+                modified = True
+                try:
+                    doc = getattr(student_object,self.affected_types[pt]['id']).getContent()
+                    #doc = sub_brains[pt].getObject().getContent()
+                    # path = "%s/%s" % (student_path,self.affected_types[pt]['id'])
+                    # doc = self.unrestrictedTraverse(path).getContent()
+                    sub_objects = True
+                except:
+                    continue
+                for field in set(name).intersection(self.affected_types[pt]['fields']):
+                    if hasattr(self,'get_from_doc_%s' % field):
+                        data[field] = getattr(self,'get_from_doc_%s' % field)(doc,
+                                                                              cached_data=cached_data)
+                    else:
+                        data[field] = getattr(doc,field)
+            if not sub_objects and noattr:
+                import_res = self.returning_import(id = sid)
+                if not import_res:
+                    continue
+                import_record = import_res[0]
+                data['matric_no'] = import_record.matric_no
+                data['sex'] = import_record.Sex == 'F'
+                data['name'] = "%s %s %s" % (import_record.Firstname,
+                                             import_record.Middlename,
+                                             import_record.Lastname)
+                data['jamb_reg_no'] = import_record.Entryregno
+            if reindex_special and 'registered_courses' in reindex_special:
+                try:
+                    study_course = getattr(student_object,"study_course")
+                    level_ids = study_course.objectIds()
+                except:
+                    continue
+                if not level_ids:
+                    continue
+                modified = True
+                level_ids.sort()
+                course_ids = getattr(study_course,level_ids[-1]).objectIds()
+                courses = []
+                for c in course_ids:
+                    if c.endswith('_co'):
+                        courses.append(c[:-3])
+                    else:
+                        courses.append(c)
+                data['registered_courses'] = courses
+            if modified:
+                self.modifyRecord(**data)
+        if pghandler: pghandler.finish()
+    ###)
+
+    def refreshCatalog(self, clear=0, pghandler=None): ###(
+        """ re-index everything we can find """
+        students_folder = self.portal_url.getPortalObject().campus.students
+        if clear:
+            self._catalog.clear()
+        students = self.portal_catalog(portal_type="Student")
+        num_objects = len(students)
+        cached_data = self.fill_certificates_dict()
+        if pghandler:
+            pghandler.init('Refreshing catalog: %s' % self.absolute_url(1), num_objects)
+        for i in xrange(num_objects):
+            if pghandler: pghandler.report(i)
+            student_brain = students[i]
+            spath = student_brain.getPath()
+            student_object = student_brain.getObject()
+            data = {}
+            sid = data['id'] = student_brain.getId
+            data['review_state'] = student_brain.review_state
+            sub_objects = False
+            for pt in self.affected_types.keys():
+                modified = True
+                try:
+                    doc = getattr(student_object,self.affected_types[pt]['id']).getContent()
+                    sub_objects = True
+                except:
+                    #from pdb import set_trace;set_trace()
+                    continue
+                for field in self.affected_types[pt]['fields']:
+                    if hasattr(self,'get_from_doc_%s' % field):
+                        data[field] = getattr(self,'get_from_doc_%s' % field)(doc,
+                                                                              cached_data=cached_data)
+                    else:
+                        data[field] = getattr(doc,field,None)
+            if not sub_objects:
+                import_res = self.returning_import(id = sid)
+                if not import_res:
+                    continue
+                import_record = import_res[0]
+                data['matric_no'] = import_record.matric_no
+                data['sex'] = import_record.Sex == 'F'
+                data['name'] = "%s %s %s" % (import_record.Firstname,
+                                             import_record.Middlename,
+                                             import_record.Lastname)
+                data['jamb_reg_no'] = import_record.Entryregno
+            else:
+                study_course = getattr(student_object,'study_course',None)
+                current_level = data.get('level',None)
+                data['registered_courses'] = []
+                if study_course and current_level and current_level in study_course.objectIds():
+                    level_obj = getattr(study_course,current_level)
+                    courses = []
+                    for c in level_obj.objectIds():
+                        if c.endswith('_co'):
+                            courses.append(c[:-3])
+                        else:
+                            courses.append(c)
+                    data['registered_courses'] = courses
+            self.addRecord(**data)
+        if pghandler: pghandler.finish()
+    ###)
+
+    security.declarePrivate('notify_event_listener') ###(
+    def notify_event_listener(self,event_type,object,infos):
+        "listen for events"
+        if not infos.has_key('rpath'):
+            return
+        pt = getattr(object,'portal_type',None)
+        mt = getattr(object,'meta_type',None)
+        students_catalog = self
+        data = {}
+        if pt == 'Student' and\
+           mt == 'CPS Proxy Folder' and\
+           event_type.startswith('workflow'):
+            data['id'] = object.getId()
+            data['review_state'] = self.portal_workflow.getInfoFor(object,'review_state',None)
+            students_catalog.modifyRecord(**data)
+            return
+        rpl = infos['rpath'].split('/')
+        if pt == 'Student' and mt == 'CPS Proxy Folder'\
+           and event_type == "sys_add_object":
+            student_id = object.id
+            try:
+                self.addRecord(id = student_id)
+            except ValueError:
+                pass
+            return
+        elif pt == 'StudentCourseResult' and mt == 'CPS Proxy Folder':
+            if event_type not in ("sys_add_object","sys_del_object"):
+                return
+            level_session = getattr(object.aq_parent.getContent(),'session','unknown')
+            if level_session not in (self.getSessionId()[-2:],'2006/2007'):
+                return
+            course_id = object.getId()
+            if course_id.endswith('_co'):
+                course_id = course_id[:-3]
+            student_id = object.absolute_url_path().split('/')[-4]
+            res = students_catalog(id = student_id)
+            if not res:
+                return
+            student_rec = res[0]
+            registered_courses = getattr(student_rec,'registered_courses',None)
+            if not registered_courses:
+                registered_courses = []
+            #import pdb;pdb.set_trace()
+            if event_type == "sys_add_object":
+                if course_id not in registered_courses:
+                    registered_courses.append(course_id)
+                else:
+                    return
+            elif registered_courses and event_type == "sys_del_object":
+                removed = False
+                while course_id in registered_courses:
+                    removed = True
+                    registered_courses.remove(course_id)
+                if not removed:
+                    return
+            data['id'] = student_id
+            data['registered_courses'] = registered_courses
+            self.modifyRecord(record = student_rec, **data)
+            return
+        if pt not in self.affected_types.keys():
+            return
+        if event_type not in ('sys_modify_object'):
+            return
+        if mt == 'CPS Proxy Folder':
+            return
+        for field in self.affected_types[pt]['fields']:
+            if hasattr(self,'get_from_doc_%s' % field):
+                data[field] = getattr(self,'get_from_doc_%s' % field)(object)
+            else:
+                data[field] = getattr(object,field)
+        data['id'] = rpl[2]
+        self.modifyRecord(**data)
+    ###)
+
+
+InitializeClass(StudentsCatalog)
+
+###)
+
+class CoursesCatalog(WAeUPTable): ###(
+    security = ClassSecurityInfo()
+
+    meta_type = 'WAeUP Courses Catalog'
+    name =  "courses_catalog"
+    key = "code"
+    def __init__(self,name=None):
+        if name ==  None:
+            name =  self.name
+        WAeUPTable.__init__(self, name)
+
+    def manage_catalogReindex(self, REQUEST, RESPONSE, URL1): ###(
+        """ clear the catalog, then re-index everything """
+
+        elapse = time.time()
+        c_elapse = time.clock()
+
+        pgthreshold = self._getProgressThreshold()
+        handler = (pgthreshold > 0) and ZLogHandler(pgthreshold) or None
+        self.refreshCatalog(clear=1, pghandler=handler)
+
+        elapse = time.time() - elapse
+        c_elapse = time.clock() - c_elapse
+
+        RESPONSE.redirect(
+            URL1 +
+            '/manage_catalogAdvanced?manage_tabs_message=' +
+            urllib.quote('Catalog Updated \n'
+                         'Total time: %s\n'
+                         'Total CPU time: %s' % (`elapse`, `c_elapse`)))
+    ###)
+
+    def reindexIndex(self, name, REQUEST,pghandler=None): ###(
+        if isinstance(name, str):
+            name = (name,)
+        courses = self.portal_catalog(portal_type="Course")
+        num_objects = len(courses)
+        if pghandler:
+            pghandler.init('Refreshing catalog: %s' % self.absolute_url(1), num_objects)
+        for i in xrange(num_objects):
+            if pghandler: pghandler.report(i)
+            course_brain = courses[i]
+            course_object = course_brain.getObject()
+            pl = course_brain.getPath().split('/')
+            data = {}
+            cid = data[self.key] = course_brain.getId
+            data['faculty'] = pl[-4]
+            data['department'] = pl[-3]
+            doc = course_object.getContent()
+            for field in name:
+                if field not in (self.key,'faculty','department'):
+                    data[field] = getattr(doc,field)
+            self.modifyRecord(**data)
+        if pghandler: pghandler.finish()
+    ###)
+
+    def refreshCatalog(self, clear=0, pghandler=None): ###(
+        """ re-index everything we can find """
+        if clear:
+            self._catalog.clear()
+        courses = self.portal_catalog(portal_type="Course")
+        num_objects = len(courses)
+        if pghandler:
+            pghandler.init('Refreshing catalog: %s' % self.absolute_url(1), num_objects)
+        #from pdb import set_trace;set_trace()
+        for i in xrange(num_objects):
+            if pghandler: pghandler.report(i)
+            course_brain = courses[i]
+            course_doc = course_brain.getObject().getContent()
+            pl = course_brain.getPath().split('/')
+            data = {}
+            for field in self.schema():
+                data[field] = getattr(course_doc,field,None)
+            data[self.key] = course_brain.getId
+            ai = pl.index('academics')
+            data['faculty'] = pl[ai +1]
+            data['department'] = pl[ai +2]
+            if clear:
+                self.addRecord(**data)
+            else:
+                self.modifyRecord(**data)
+        if pghandler: pghandler.finish()
+    ###)
+
+    security.declarePrivate('notify_event_listener') ###(
+    def notify_event_listener(self,event_type,object,infos):
+        "listen for events"
+        if not infos.has_key('rpath'):
+            return
+        pt = getattr(object,'portal_type',None)
+        mt = getattr(object,'meta_type',None)
+        if pt != 'Course':
+            return
+        data = {}
+        rpl = infos['rpath'].split('/')
+        if event_type not in ("sys_add_object","sys_modify_object","sys_del_object"):
+            return
+        course_id = object.getId()
+        data[self.key] = course_id
+        if event_type == "sys_add_object" and mt == 'CPS Proxy Folder':
+            try:
+                self.addRecord(**data)
+            except ValueError:
+                return
+            course_id = object.getId()
+            doc = object.getContent()
+            if doc is None:
+                return
+            for field in self.schema():
+                data[field] = getattr(doc,field,None)
+            data[self.key] = course_id
+            ai = rpl.index('academics')
+            data['faculty'] = rpl[ai +1]
+            data['department'] = rpl[ai +2]
+            self.modifyRecord(**data)
+            return
+        if event_type == "sys_del_object":
+            self.deleteRecord(course_id)
+            return
+        if event_type == "sys_modify_object" and mt == 'Course':
+            #from pdb import set_trace;set_trace()
+            for field in self.schema():
+                data[field] = getattr(object,field,None)
+            course_id = object.aq_parent.getId()
+            data[self.key] = course_id
+            ai = rpl.index('academics')
+            data['faculty'] = rpl[ai +1]
+            data['department'] = rpl[ai +2]
+            self.modifyRecord(**data)
+    ###)
+
+
+InitializeClass(CoursesCatalog)
+###)
+
+class CourseResults(WAeUPTable): ###(
+    security = ClassSecurityInfo()
+
+    meta_type = 'WAeUP Results Catalog'
+    name = "course_results"
+    key = "key" #student_id + level + course_id
+    def __init__(self,name=None):
+        if name ==  None:
+            name = self.name
+        WAeUPTable.__init__(self, name)
+        self._queue = []
+
+    def addRecord(self, **data): ###(
+        """add one record"""
+
+        uid = key = "%(student_id)s|%(level_id)s|%(course_id)s" % data
+        if key in self._queue:
+            return uid
+        data['queue_status'] = ADDING_SHEDULED
+        data['%s' % self.key] = uid
+        res = self.searchResults({"%s" % self.key : uid})
+        if len(res) > 0:
+            raise ValueError("More than one record with uid %s" % uid)
+        self.catalog_object(dict2ob(data), uid=uid)
+        if not hasattr(self,'_queue'):
+            self._queue = []
+        self._queue.append(key)
+        self._p_changed = 1
+        return uid
+    ###)
+
+    # def _p_resolveConflict(self, oldstate, committed, newstate):
+    #     # Apply the changes made in going from old to newstate to
+    #     # committed
+
+    #     # Note that in the case of undo, the olddata is the data for
+    #     # the transaction being undone and newdata is the data for the
+    #     # transaction previous to the undone transaction.
+
+    #     # Find the conflict policy on the new state to make sure changes
+    #     # to it will be applied
+
+    #     # Committed is always the currently committed data.
+    #     import pdb;pdb.set_trace()
+    #     oldstate_data  =  oldstate['_queue']
+    #     committed_data = committed['_queue']
+    #     newstate_data  =  newstate['_queue']
+
+    #     # Merge newstate changes into committed
+    #     for uid, new in newstate_data.items():
+
+    #         # Decide if this is a change
+    #         old = oldstate_data.get(uid)
+    #         current = committed_data.get(uid)
+
+
+    def addMultipleRecords(self, records): ###(
+        """add many records"""
+        added_keys = []
+        for data in records:
+            uid = key = "%(student_id)s|%(level_id)s|%(course_id)s" % data
+            added_keys.append(key)
+            if key in self._queue:
+                return uid
+            data['queue_status'] = ADDING_SHEDULED
+            data['%s' % self.key] = uid
+            res = self.searchResults({"%s" % self.key : uid})
+            if len(res) > 0:
+                raise ValueError("More than one record with uid %s" % uid)
+            self.catalog_object(dict2ob(data), uid=uid)
+        if not hasattr(self,'_queue'):
+            self._queue = added_keys
+        self._queue.extend(added_keys)
+        self._p_changed = 1
+        return uid
+    ###)
+
+    def deleteRecord(self, uid): ###(
+        self.uncatalog_object(uid)
+        if uid in self._queue:
+            self._queue.remove(uid)
+    ###)
+
+    def updateCourseResults(self,student_id,level_id,portal_catalog_results,course_results): ###(
+        # query = Eq('path',"%s/campus/students/%s/study_course/%s" %
+        #            (self.portal_url.getPortalPath(),
+        #             student_id,
+        #             level_id)) &\
+        #             Eq('portal_type', "StudentCourseResult")
+        # level_results = self.portal_catalog_real.evalAdvancedQuery(query)
+        # level_results = [r for r in course_results
+        #                  if level_id in r.relative_path.split('/')]
+        course_results_ids = [cr.getId for cr in course_results]
+        for r in portal_catalog_results:
+            if r.getId in course_results_ids:
+                continue
+            course_result_doc = r.getObject().getContent()
+            data = {}
+            course_id = r.getId
+            for field in self.schema():
+                data[field] = getattr(course_result_doc,field,'')
+            data['key'] = key = "%(student_id)s|%(level_id)s|%(course_id)s" % vars()
+            data['student_id'] = student_id
+            data['level_id'] = level_id
+            data['queue_status'] = OBJECT_CREATED
+            data['code'] = course_id
+            self.catalog_object(dict2ob(data), uid=key)
+        query = Eq('student_id',student_id) & Eq('level_id', level_id)
+        return self.course_results.evalAdvancedQuery(query)
+    ###)
+
+    def getCourses(self,student_id,level_id): ###(
+        level_path = "%s/campus/students/%s/study_course/%s" % (self.portal_url.getPortalPath(),
+                                                                student_id,
+                                                                level_id)
+        # portal_catalog_query = Eq('path',level_path) &\
+        #                        Eq('portal_type', "StudentCourseResult")
+        # portal_catalog_results = self.portal_catalog_real.evalAdvancedQuery(portal_catalog_query)
+        portal_catalog_results = self.portal_catalog(path = level_path,
+                                                     portal_type = "StudentCourseResult")
+        query = Eq('student_id',student_id) & Eq('level_id', level_id)
+        course_results = self.course_results.evalAdvancedQuery(query)
+        if len(course_results) != len(portal_catalog_results):
+            course_results = self.updateCourseResults(student_id,
+                                                      level_id,
+                                                      portal_catalog_results,
+                                                      course_results)
+        carry_overs = []
+        normal = []
+        credits = 0
+        for brain in course_results:
+            d = {}
+            credits += int(brain.credits)
+            for field in self.schema():
+                d[field] = getattr(brain,field,'')
+            d['sheduled'] = brain.queue_status == ADDING_SHEDULED
+            d['coe'] = 'Elective'
+            if brain.core_or_elective:
+                d['coe'] = 'Core'
+            id = code = d['id'] = brain.code
+            is_carry_over = False
+            if code.endswith('_co'):
+                is_carry_over = True
+                code = code[:-3]
+            d['code'] = code
+            d['title'] = self.courses_catalog.evalAdvancedQuery(Eq('code',code))[0].title
+            if is_carry_over:
+                d['coe'] = 'Core'
+                carry_overs.append(d)
+            else:
+                normal.append(d)
+        normal.sort(cmp=lambda x,y: cmp(x['semester'], y['semester']))
+        carry_overs.sort(cmp=lambda x,y: cmp(x['semester'], y['semester']))
+        return credits,carry_overs,normal
+    ###)
+
+    def addObject(self,record): ###(
+        key = record.key
+        student_id,level_id,course_id = key.split('|')
+        level = getattr(getattr(self.portal_url.getPortalObject().campus.students,student_id).study_course,level_id)
+        cr_id = level.invokeFactory('StudentCourseResult', course_id)
+        course_result = getattr(level,cr_id)
+        self.portal_workflow.doActionFor(course_result,'open')
+        d = {}
+        for field in self.schema():
+            d[field] = getattr(record,field,'')
+        course_result.getContent().edit(mapping=d)
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"process_queue") ###(
+    def process_queue(self,limit=None):
+        """adds objects and removes them from the queue.
+        If limit is specified, at most (limit) events are removed.
+        """
+        if not hasattr(self,'_queue'):
+            return 0
+        queue= self._queue
+        if not limit or len(queue) <= limit:
+            keys = self._queue[:]
+        else:
+            keys = queue[:limit]
+        if not keys:
+            records = self.evalAdvancedQuery(Eq('queue_status',ADDING_SHEDULED))
+        else:
+            records = self.evalAdvancedQuery(In("%s" % self.key,keys))
+        for record in records:
+            if record.queue_status == OBJECT_CREATED:
+                continue
+            self.addObject(record)
+            data = {}
+            data['key'] = record.key
+            data['queue_status'] = OBJECT_CREATED
+            self.modifyRecord(**data)
+        count = 0
+        for key in keys:
+            count +=1
+            if key in self._queue:
+                self._queue.remove(key)
+        self._p_changed = 1
+        return count,len(self._queue)
+    ###)
+
+    def manage_catalogClear(self, REQUEST=None, RESPONSE=None, URL1=None): ###(
+        """ clears the whole enchilada """
+        self._catalog.clear()
+
+        if REQUEST and RESPONSE:
+            RESPONSE.redirect(
+              URL1 +
+              '/manage_catalogAdvanced?manage_tabs_message=Catalog%20Cleared')
+    ###)
+
+    def manage_catalogReindex(self, REQUEST, RESPONSE, URL1): ###(
+        """ clear the catalog, then re-index everything """
+
+        elapse = time.time()
+        c_elapse = time.clock()
+
+        pgthreshold = self._getProgressThreshold()
+        handler = (pgthreshold > 0) and ZLogHandler(pgthreshold) or None
+        self.refreshCatalog(clear=1, pghandler=handler)
+
+        elapse = time.time() - elapse
+        c_elapse = time.clock() - c_elapse
+
+        RESPONSE.redirect(
+            URL1 +
+            '/manage_catalogAdvanced?manage_tabs_message=' +
+            urllib.quote('Catalog Updated \n'
+                         'Total time: %s\n'
+                         'Total CPU time: %s' % (`elapse`, `c_elapse`)))
+    ###)
+
+    def refreshCatalog(self, clear=1, pghandler=None): ###(
+        """ re-index everything we can find """
+        students_folder = self.portal_url.getPortalObject().campus.students
+        if clear:
+            self._catalog.clear()
+        course_results = self.portal_catalog(portal_type="StudentCourseResult")
+        num_objects = len(course_results)
+        if pghandler:
+            pghandler.init('Refreshing catalog: %s' % self.absolute_url(1), num_objects)
+        #import pdb;pdb.set_trace()
+        for i in xrange(num_objects):
+            if pghandler:
+                pghandler.report(i)
+            course_result_brain = course_results[i]
+            path_list = course_result_brain.getPath().split('/')
+            course_result_doc = course_result_brain.getObject().getContent()
+            data = {}
+            level_id = path_list[-2]
+            course_id = path_list[-1]
+            student_id = path_list[-4]
+            for field in self.schema():
+                data[field] = getattr(course_result_doc,field,'')
+            data['key'] = key = "%(student_id)s|%(level_id)s|%(course_id)s" % vars()
+            data['student_id'] = student_id
+            data['level_id'] = level_id
+            data['queue_status'] = OBJECT_CREATED
+            self.catalog_object(dict2ob(data), uid=key)
+        if pghandler: pghandler.finish()
+    ###)
+
+    security.declarePrivate('notify_event_listener') ###(
+    def notify_event_listener(self,event_type,object,infos):
+        "listen for events"
+        if not infos.has_key('rpath'):
+            return
+        pt = getattr(object,'portal_type',None)
+        mt = getattr(object,'meta_type',None)
+        data = {}
+        rpl = infos['rpath'].split('/')
+        if mt == 'CPS Proxy Folder':
+            return
+        if pt == 'StudentCourseResult' and event_type == "sys_modify_object":
+            data["%s" % self.key] = uid = "%s|%s|%s" % (rpl[-5],rpl[-3],rpl[-2])
+            records = self.searchResults({"%s" % self.key : uid})
+            if len(records) > 1:
+                # Can not happen, but anyway...
+                raise ValueError("More than one record with uid %s" % uid)
+            if len(records) == 0:
+                raise KeyError("No record for uid %s" % uid)
+            record = records[0]
+            for field in ('core_or_elective','score'):
+                value = getattr(object,field,None)
+                data[field] = value
+            try:
+                self.modifyRecord(record,**data)
+            except KeyError:
+                pass
+        if pt == 'StudentStudyLevel' and event_type == "sys_del_object":
+            #import pdb;pdb.set_trace()
+            student_id = rpl[-3]
+            level_id = rpl[-1]
+            res = self.searchResults(student_id = student_id,
+                                     level_id = level_id)
+            for cr in res:
+                self.deleteRecord(cr.key)
+    ###)
+
+InitializeClass(CourseResults)
+###)
+
+class OnlinePaymentsImport(WAeUPTable): ###(
+
+    meta_type = 'WAeUP Online Payment Transactions'
+    name = "online_payments_import"
+    key = "order_id"
+    def __init__(self,name=None):
+        if name ==  None:
+            name = self.name
+        WAeUPTable.__init__(self, name)
+
+
+InitializeClass(OnlinePaymentsImport)
+###)
+
+class ReturningImport(WAeUPTable): ###(
+
+    meta_type = 'Returning Import Table'
+    name = "returning_import"
+    key = "matric_no"
+    def __init__(self,name=None):
+        if name ==  None:
+            name = self.name
+        WAeUPTable.__init__(self, name)
+
+
+InitializeClass(ReturningImport)
+###)
+
+class ResultsImport(WAeUPTable): ###(
+
+    meta_type = 'Results Import Table'
+    name = "results_import"
+    key = "key"
+    def __init__(self,name=None):
+        if name ==  None:
+            name = self.name
+        WAeUPTable.__init__(self, name)
+
+
+InitializeClass(ResultsImport)
+
+###)
+
+class PaymentsCatalog(WAeUPTable): ###(
+
+    meta_type = 'WAeUP Payments Catalog'
+    name = "students_catalog"
+    key = "id"
+    def __init__(self,name=None):
+        if name ==  None:
+            name = self.name
+        WAeUPTable.__init__(self, name)
+
+
+InitializeClass(PaymentsCatalog)
+
+###)
+
+# BBB:
+AccomodationTable = AccommodationTable
Index: WAeUP_SRP/trunk_not_used/WAeUPTool.py
===================================================================
--- WAeUP_SRP/trunk_not_used/WAeUPTool.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/WAeUPTool.py	(revision 2226)
@@ -0,0 +1,1299 @@
+#-*- mode: python; mode: fold -*-
+# (C) Copyright 2005 The WAeUP group  <http://www.waeup.org>
+# Author: Joachim Schmitz (js@aixtraware.de)
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# $Id$
+"""The WAeUP Tool Box.
+"""
+
+from AccessControl import ClassSecurityInfo
+from Acquisition import aq_inner
+from Acquisition import aq_parent
+from Globals import DTMLFile
+from Globals import InitializeClass
+from OFS.SimpleItem import SimpleItem
+
+from Products.CMFCore.utils import getToolByName
+from Products.CPSSchemas.DataStructure import DataStructure
+from Products.CPSSchemas.DataModel import DataModel
+from Products.CPSSchemas.StorageAdapter import MappingStorageAdapter
+from Products.CMFCore.ActionProviderBase import ActionProviderBase
+from Products.CMFCore.permissions import View
+from Products.ZCatalog.ZCatalog import ZCatalog
+from Products.CMFCore.permissions import ModifyPortalContent
+from Products.CMFCore.permissions import ManagePortal
+from Products.CMFCore.utils import UniqueObject
+from Products.CMFCore.URLTool import URLTool
+from Products.CMFCore.utils import getToolByName
+from Students import makeCertificateCode
+from Globals import package_home,INSTANCE_HOME
+p_home = package_home(globals())
+i_home = INSTANCE_HOME
+import DateTime,time
+import logging
+import transaction
+import csv,re,os,sys
+from Products.AdvancedQuery import Eq, Between, Le,In
+
+def getObject(object,name):
+    if object.hasObject(name):
+        return getattr(object,name)
+    return None
+
+class WAeUPTool(UniqueObject, SimpleItem, ActionProviderBase):
+    """WAeUP tool"""
+
+    id = 'waeup_tool'
+    meta_type = 'WAeUP Tool'
+    _actions = ()
+
+    security = ClassSecurityInfo()
+    security.declareObjectProtected(View)
+
+    manage_options = ( ActionProviderBase.manage_options
+                     + SimpleItem.manage_options
+                     )
+
+    def rwrite(self,s): ###(
+        response = self.REQUEST.RESPONSE
+        response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+        response.write("%s<br />\r\n" % s)
+    ###)
+
+    def sleep(self,secs): ###(
+        "sleep"
+        import time
+        time.sleep(secs)
+        return
+
+###)
+
+    security.declareProtected(ModifyPortalContent,'openLog') ###(
+    def openLog(self,name):
+        """open a log file"""
+        version = 1
+        path = "%s/log/%s_%d.log" % (i_home,name,version)
+        while os.path.exists(path):
+            version += 1
+            path = "%s/log/%s_%d.log" % (i_home,name,version)
+        log = open(path,"w")
+        return log
+
+###)
+
+    security.declareProtected(ModifyPortalContent,'measureOaT') ###(
+    def measureOaT(self,method="a",probe="1000",nr_pts="1"):
+        """measure Object access Time"""
+        import random
+        if hasattr(self,'portal_catalog_real'):
+            aq_portal = self.portal_catalog_real.evalAdvancedQuery
+        else:
+            aq_portal = self.portal_catalog.evalAdvancedQuery
+        nr_pts = int(nr_pts)
+        probe = int(probe)
+        intervall = probe/10
+        objects = ("application","clearance","personal")
+        portal_types = ("StudentApplication","StudentClearance","StudentPersonal")
+        #i = random.randrange(num_objects)
+        count = 0
+        found = 0
+        not_found = 0
+        t_found = 0
+        t_not_found = 0
+        time_found = time_not_found = 0.0
+        t_time_found = t_time_not_found = 0.0
+        accessed = []
+        t_min = 1000
+        t_max = 0
+        #import pdb;pdb.set_trace()
+        students = self.portal_catalog(portal_type="Student")
+        num_students = len(students)
+        if method == "d":
+            query = Eq('path','/uniben/campus/students') & In('portal_type',portal_types[:nr_pts])
+            res = aq_portal(query)
+            brains = {}
+            for r in res:
+                sid = r.relative_path.split('/')[-2]
+                if brains.has_key(sid):
+                    brains[sid][r.portal_type] = r
+                else:
+                    brains[sid] = {r.portal_type : r}
+            brains_list = brains.keys()
+            num_objects = len(brains_list)
+        else:
+            num_objects = num_students
+        print "="*40
+        print "method: %s probes: %d nr_pts: %d num_objects: %d" % (method,
+                                                                        probe,
+                                                                        nr_pts,
+                                                                        num_objects)
+        print "nr found/not time found/not min/max"
+        elapse = time.time()
+        i_elapse = time.time()
+        c_elapse = time.clock()
+        for c in range(1,probe + 1):
+            i = random.randrange(num_objects)
+            if method in ('a','b','c'):
+                student_brain = students[i]
+            elif method == "d":
+                #import pdb;pdb.set_trace()
+                student_brain = brains[brains_list[i]]
+            if method == "c":
+                query = Eq('path',student_brain.getPath()) & In('portal_type',portal_types[:nr_pts])
+                res = aq_portal(query)
+                this_portal_types = [r.portal_type for r in res]
+            for i in range(nr_pts):
+                oid = objects[i]
+                if method == "a":
+                    try:
+                        student_path = student_brain.getPath()
+                        path = "%s/%s" % (student_path,oid)
+                        doc = self.unrestrictedTraverse(path).getContent()
+                        found += 1
+                        i_time = time.time() - i_elapse
+                        time_found += i_time
+                    except:
+                        not_found += 1
+                        i_time = time.time() - i_elapse
+                        time_not_found += i_time
+                        pass
+                elif method == "b":
+                    try:
+                        student_object = student_brain.getObject()
+                        doc = getattr(student_object,oid).getContent()
+                        found += 1
+                        i_time = time.time() - i_elapse
+                        time_found += i_time
+                    except:
+                        i_time = time.time() - i_elapse
+                        time_not_found += i_time
+                        not_found += 1
+                        pass
+                elif method == "c":
+                    if portal_types[i] in this_portal_types:
+                        found += 1
+                        doc = res[this_portal_types.index(portal_types[i])].getObject().getContent()
+                        i_time = time.time() - i_elapse
+                        time_found += i_time
+                    else:
+                        not_found += 1
+                        i_time = time.time() - i_elapse
+                        time_not_found += i_time
+                elif method == "d":
+                    if student_brain.has_key(portal_types[i]):
+                        found += 1
+                        doc = student_brain[portal_types[i]].getObject().getContent()
+                        i_time = time.time() - i_elapse
+                        time_found += i_time
+                    else:
+                        not_found += 1
+                        i_time = time.time() - i_elapse
+                        time_not_found += i_time
+                i_elapse = time.time()
+            if c and (c % intervall == 0):
+                #i_time = time.time() - i_elapse
+                t_per = 0.0
+                if found:
+                    t_per = time_found/found
+                if t_per > t_max:
+                    t_max = t_per
+                if t_per > 0.0 and t_per < t_min:
+                    t_min = t_per
+                itf = 0.0
+                if found:
+                    itf = time_found/found
+                itnf = 0.0
+                if not_found :
+                    itnf = time_not_found / not_found
+                interval_time = time_found + time_not_found
+                s = "%(c)d: %(found)d/%(not_found)d " % vars()
+                s += "%(interval_time)6.2f %(itf)6.4f/%(itnf)6.4f " % vars()
+                s += "%(t_min)6.4f/%(t_max)6.4f" %  vars()
+                print s
+                t_found += found
+                t_not_found += not_found
+                t_time_found += time_found
+                t_time_not_found += time_not_found
+                time_found = time_not_found = 0.0
+                found = not_found = 0
+        # t_found += found
+        # t_not_found += not_found
+        elapse = time.time() - elapse
+        itf = 0.0
+        if t_found:
+            itf = t_time_found/t_found
+        itnf = 0.0
+        if t_not_found:
+            itnf = t_time_not_found / t_not_found
+        #c_elapse = time.clock() - c_elapse
+        s = "%(probe)d: %(t_found)d/%(t_not_found)d " % vars()
+        s += "%(elapse)6.2f %(itf)6.4f/%(itnf)6.4f " % vars()
+        s += "%(t_min)6.4f/%(t_max)6.4f" %  vars()
+        print "-"*40
+        print s
+        rel_found = float(t_found)/probe
+        rel_not_found = float(t_not_found)/probe
+        estimated_total_time = num_objects*(rel_found*itf + rel_not_found*itnf)
+        print estimated_total_time
+    ###)
+
+    security.declareProtected(ModifyPortalContent,'writeLog') ###(
+    def writeLog(self,logfile,s):
+        """write to the log file"""
+        logfile.write(s)
+
+###)
+
+    def generateStudentId(self,letter): ###(
+        import random
+        r = random
+        ##if letter not in ('ABCDEFGIHKLMNOPQRSTUVWXY'):
+        if letter == '?':
+            letter= r.choice('ABCDEFGHKLMNPQRSTUVWXY')
+        sid = "%c%d" % (letter,r.randint(99999,1000000))
+        students = self.portal_url.getPortalObject().campus.students
+##        while hasattr(students, sid):
+##            sid = "%c%d" % (letter,r.randint(99999,1000000))
+        while self.students_catalog(id = sid):
+            sid = "%c%d" % (letter,r.randint(99999,1000000))
+        return sid
+    ###)
+
+    def generatePassword(self,s=None): ###(
+        import random
+        r = random
+        ##if letter not in ('ABCDEFGIHKLMNOPQRSTUVWXY'):
+        if s is None:
+            s = 'abcdefghklmnpqrstuvwxy23456789'
+        pw = ''
+        while len(pw) < 6:
+            pw += r.choice(s)
+        return pw
+    ###)
+
+    security.declareProtected(ManagePortal, 'removeDeletedDocIds') ###(
+    def removeDeletedDocIds(self, max=1000):
+        """
+        remove deleted docids from repository commit after max
+        """
+        logger = logging.getLogger('WAeUPTool.removeDeletedDocIds')
+        repository = getToolByName(self, 'portal_repository')
+        pxtool = getToolByName(self, 'portal_proxies')
+        pxtool_infos = pxtool.getRevisionsUsed()
+
+        nb_revs = 0
+        docids_d = {} # all docids
+        unused_docids_d = {} # all docids that are unused
+        ids_unused_revs_docids = [] # ids for revs of unused docids
+        ids_unused_revs = [] # ids for unused revs
+        total = 0
+        idlist = repository.objectIds()
+        for id in idlist:
+            docid, rev = repository._splitId(id)
+            if docid is None:
+                logger.info("invalid doc_id %s" % docid)
+                continue
+            nb_revs += 1
+            docids_d[docid] = None
+            if not pxtool_infos.has_key(docid):
+                unused_docids_d[docid] = None
+                ids_unused_revs_docids.append(id)
+                ids_unused_revs.append(id)
+            elif not pxtool_infos[docid].has_key(rev):
+                ids_unused_revs.append(id)
+            if len(ids_unused_revs) >= max:
+                repository.manage_delObjects(ids_unused_revs)
+                #import pdb;pdb.set_trace()
+                transaction.commit()
+                total += max
+                logger.info('removed %d total %d unused docids ' % (max,total))
+        anz = len(ids_unused_revs)
+        if anz > 0:
+            repository.manage_delObjects(ids_unused_revs)
+            transaction.commit()
+            total += anz
+            logger.info('finished removing %d unused docids ' % (total))
+
+
+###)
+
+    security.declareProtected(ModifyPortalContent,'getCredential') ###(
+    def getCredential(self,student_id):
+        "return a student password"
+        student_entry = getattr(self.portal_directories.students,student_id,None)
+        if student_entry is None:
+            return None
+        return getattr(student_entry,"password","not set")
+    ###)
+
+    security.declarePublic('checkPassword') ###(
+    def checkPassword(self,student_id,password):
+        "return a student password"
+        student_entry = getattr(self.portal_directories.students,student_id,None)
+        if student_entry is None:
+            return False
+        return getattr(student_entry,"password","not set") == password
+    ###)
+
+    security.declarePublic('editPassword') ###(
+    def editPassword(self,student_id,password):
+        "edit a student password"
+        student_entry = getattr(self.portal_directories.students,student_id,None)
+        if student_entry is None:
+            return
+        setattr(student_entry,'password',password)
+    ###)
+
+    security.declareProtected(View,'doCommit') ###(
+    def doCommit(self,logger=None):
+        "commit some transactions"
+        transaction.commit()
+    ###)
+
+    security.declarePublic('loadStudentFoto') ###(
+    def loadStudentFoto(self,student,filename,folder):
+        "return a student passport picture"
+        app = student.application
+        app_doc = app.getContent()
+        #clear = student.clearance
+        #clear_doc = clear.getContent()
+        #matric_no = clear_doc.matric_no.upper()
+        picture1 ="%s/import/%s/%s.jpg" % (i_home,folder,filename)
+        picture2 ="%s/import/%s/%s.JPG" % (i_home,folder,filename)
+        #import pdb;pdb.set_trace()
+        if os.path.exists(picture1):
+            file = open(picture1)
+        elif os.path.exists(picture2):
+            file = open(picture2)
+        else:
+            return "passport picture not found %s" % picture1
+        reopened = False
+        if self.portal_workflow.getInfoFor(app,'review_state',None) !='opened':
+            self.portal_workflow.doActionFor(app,'open')
+            reopened = True
+        outfile = file.read()
+        app_doc.manage_addFile('passport',
+                               file=outfile,
+                               title="%s.jpg" % filename)
+        if reopened:
+            self.portal_workflow.doActionFor(app,'close')
+        return "successfully loaded passport picture"
+    ###)
+
+    security.declareProtected(ModifyPortalContent,'createOne') ###(
+    def createOne(self,students_folder,student_brain,letter,commit=False):
+        sid = self.waeup_tool.generateStudentId(letter)
+        students_folder.invokeFactory('Student', sid)
+        student = getattr(students_folder,sid)
+        self.portal_workflow.doActionFor(student,'return')
+        student.manage_setLocalRoles(sid, ['Owner',])
+        matric_no = student_brain.matric_no
+        jamb_reg_no = student_brain.Entryregno
+        self.students_catalog.addRecord(id = sid,
+                                           matric_no = matric_no,
+                                           jamb_reg_no = jamb_reg_no,
+                                           sex = student_brain.Sex == "F",
+                                           name = "%s %s %s" % (student_brain.Firstname,
+                                                                student_brain.Middlename,
+                                                                student_brain.Lastname)
+                                        )
+        if commit:
+            transaction.commit()
+        return sid,jamb_reg_no
+    ###)
+
+    security.declareProtected(ModifyPortalContent,'addStudent') ###(
+    def addStudent(self,dict):
+        students_folder = self.portal_url.getPortalObject().campus.students
+        sid = self.waeup_tool.generateStudentId('?')
+        students_folder.invokeFactory('Student', sid)
+        student_obj = getattr(students_folder,sid)
+        f2t = self.student_field2types
+        #from pdb import set_trace; set_trace()
+        d = {}
+        d['jamb_sex']  = 'M'
+        if dict.get('sex'):
+            d['jamb_sex']  = 'F'
+
+        entry_session = dict.get('entry_session')
+        if entry_session == self.getSessionId()[-2:]:
+            wfaction = 'admit'
+            wft = 'wf_transition_admit'
+            password = None
+        else:
+            wfaction = 'return'
+            wft = 'wf_transition_return'
+            password = self.generatePassword()
+            self.makeStudentMember(sid,password)
+
+        for pt in f2t.keys():
+            student_obj.invokeFactory(pt,f2t[pt]['id'])
+            sub_obj = getattr(student_obj,f2t[pt]['id'])
+            sub_doc = sub_obj.getContent()
+            #self.portal_workflow.doActionFor(sub_obj,'open',dest_container=sub_obj)
+            d['Title'] = f2t[pt]['title']
+            for field in f2t[pt]['fields']:
+                d[field] = dict.get(field,'')
+            sub_doc.edit(mapping = d)
+            new_state = f2t[pt][wft]
+            if new_state != "remain":
+                self.portal_workflow.doActionFor(sub_obj,new_state,dest_container=sub_obj)
+        self.portal_workflow.doActionFor(student_obj,wfaction)
+        student_obj.manage_setLocalRoles(sid, ['Owner',])
+        return sid,password
+    ###)
+
+    security.declarePublic('getCertificateBrain') ###(
+    def getCertificateBrain(self,cert_id):
+        "do it"
+        res = ZCatalog.searchResults(self.portal_catalog_real,
+                                {'portal_type':"Certificate",
+                                      'id': cert_id})
+        if res:
+            return res[0]
+        return None
+    ###)
+
+    security.declareProtected(ModifyPortalContent,'get_csv_filenames') ###(
+    def get_csv_filenames(self):
+        "do it"
+        files = [file for file in os.listdir("%s/import/" % (i_home))
+                 if file.endswith('.csv') and file.find('imported') == -1]
+        return files
+    ###)
+
+    security.declarePublic('findStudentByMatricelNo') ###(
+    def findStudentByMatricelNo(self,matric_no):
+        "do it"
+        res = ZCatalog.searchResults(self.portal_catalog_real,
+                                {'portal_type':"StudentClearance",
+                                 'SearchableText': matric_no})
+        if res:
+            return res[0]
+        return None
+    ###)
+
+    security.declarePublic('makeStudentMember') ###(
+    def makeStudentMember(self,sid,password='uNsEt'):
+        """make the student a member"""
+        membership = self.portal_membership
+        membership.addMember(sid,
+                             password ,
+                             roles=('Member',
+                                     'Student',
+                                     ),
+                             domains='',
+                             properties = {'memberareaCreationFlag': False,
+                                           'homeless': True},)
+        member = membership.getMemberById(sid)
+        self.portal_registration.afterAdd(member, sid, password, None)
+        #self.manage_setLocalRoles(sid, ['Owner',])
+    ###)
+
+    security.declarePublic('makeStudentData') ###(
+    def makeStudentData(self,student_id,email=None,phone_nr=None):
+        "create Datastructure for a returning Student"
+        #import pdb;pdb.set_trace()
+        logger = logging.getLogger('WAeUPTool.makeStudentData')
+        students_folder = self.portal_url.getPortalObject().campus.students
+        #res = self.students_catalog(id=student_id)
+        #if res:
+        #    st = res[0]
+        #res = self.returning_import(matric_no = st.matric_no)
+        res = self.returning_import(id = student_id)
+        if res:
+            student = res[0]
+        else:
+            logger.info('Id %s not found in returning_import' % student_id)
+            return
+        logger.info('%s creates data structure' % student_id)
+        s_results = self.results_import(matric_no = student.matric_no)
+        if s_results:
+            lnr = self.getLevelFromResultsCosCode(s_results)
+            level = "%d00" % lnr
+            verdict,eligible = self.getVerdict(s_results[0].Verdict)
+            if eligible:
+                level = "%d00" % (lnr + 1)
+        else:
+            logger.info('matric_no %s not found in results_import' % student.matric_no)
+            level = 0
+            verdict = 'N/A'
+        #student should not be allowed to perform this transition
+        #wftool = self.portal_workflow
+        #wftool.doActionFor(student,'return')
+        certcode_org = student.Coursemajorcode
+        certcode = makeCertificateCode(certcode_org)
+        certificate_brain = self.getCertificateBrain(certcode)
+        if not certificate_brain:
+            em = 'Certificate %s org-code %s not found\n' % (certcode, certcode_org)
+            logger.info(em)
+        matric_no = student.matric_no
+        sid = student_id
+        student_obj = getattr(students_folder,sid)
+        student_obj.invokeFactory('StudentApplication','application')
+        application = student_obj.application
+        self.portal_workflow.doActionFor(application,'open',dest_container=application)
+        da = {'Title': 'Application Data'}
+        student_obj.invokeFactory('StudentPersonal','personal')
+        da['jamb_reg_no'] = student.Entryregno
+        em = self.getEntryMode(student.Entryregno)
+##        em = student.Mode_of_Entry
+##        if em in ('DIRECT', 'DIRECT ENTRY',):
+##            em = 'DE'
+##        elif em in ('U.M.E', 'UNE',):
+##            em = 'UME'
+##        elif not em:
+##            em = "unknown"
+        da['entry_mode'] = em
+        personal = student_obj.personal
+        self.portal_workflow.doActionFor(personal,'open',dest_container=personal)
+        dp = {'Title': 'Personal Data'}
+        student_obj.invokeFactory('StudentClearance','clearance')
+        clearance = student_obj.clearance
+        self.portal_workflow.doActionFor(clearance,'open',dest_container=clearance)
+        dc = {'Title': 'Clearance/Eligibility Record'}
+        dc['matric_no'] = matric_no
+        state = student.State
+        lga = student.LGA
+        if state and lga:
+            lga =  state + ' / ' + lga
+        else:
+            lga = "None"
+        da['jamb_lga'] = dc['lga'] = lga
+        da['app_email'] = dp['email'] = email
+        da['app_mobile'] = dp['phone'] = phone_nr
+        dp['firstname'] = student.Firstname
+        dp['middlename'] = student.Middlename
+        dp['lastname'] = student.Lastname
+        da['jamb_lastname'] = "%s %s %s" % (student.Firstname,student.Middlename,student.Lastname)
+        da['jamb_sex'] = student.Sex
+        dp['sex'] = student.Sex == 'F'
+        dp['perm_address'] = student.Permanent_Address
+        application.getContent().edit(mapping=da)
+        self.portal_workflow.doActionFor(application,'close',dest_container=application)
+        personal.getContent().edit(mapping=dp)
+        clearance.getContent().edit(mapping=dc)
+        self.portal_workflow.doActionFor(clearance,'close',dest_container=clearance)
+##        catd = {}
+##        catd['id'] = sid
+##        catd['entry_mode']= da['entry_mode']
+##        catd['matric_no'] = matric_no
+##        catd['jamb_reg_no'] = da['jamb_reg_no']
+##        catd['name'] = "%(firstname)s %(middlename)s %(lastname)s" % dp
+##        catd['sex'] = dp['sex']
+##        catd['level'] = level
+##        catd['verdict'] = verdict
+##        if certificate_brain:
+##            cpath = certificate_brain.getPath().split('/')
+##            catd['faculty'] = cpath[-4]
+##            catd['department'] = cpath[-3]
+##            catd['course'] = certcode
+##        self.students_catalog.modifyRecord(**catd)
+        #
+        # Study Course
+        #
+        student_obj.invokeFactory('StudentStudyCourse','study_course')
+        studycourse = student_obj.study_course
+        self.portal_workflow.doActionFor(studycourse,'open',dest_container=studycourse)
+        dsc = {}
+        dsc['study_course'] = certcode
+        dsc['current_level'] = level
+        dsc['current_verdict'] = verdict
+        dsc['current_mode'] = em
+        dsc['current_session'] = '06'
+        studycourse.getContent().edit(mapping=dsc)
+        #
+        # Level
+        #
+##        l = getattr(studycourse,level,None)
+##        if l is None:
+##            studycourse.invokeFactory('StudentStudyLevel', level)
+##            l = getattr(studycourse, level)
+##            self.portal_workflow.doActionFor(l,'open',dest_container=l)
+##            l.getContent().edit(mapping={'Title': "Level %s" % level})
+###)
+
+    security.declarePublic('makeStudentLevel') ###(
+    def makeStudentLevel(self,student_id):
+        "create the StudyLevel for a returning Student"
+        #import pdb;pdb.set_trace()
+        logger = logging.getLogger('WAeUPTool.makeStudentLevel')
+        students_folder = self.portal_url.getPortalObject().campus.students
+        res = self.students_catalog(id=student_id)
+        if res:
+            st = res[0]
+        course = st.course
+        matric_no = st.matric_no
+        level = st.level
+        res = self.results_import(matric_no = matric_no)
+        if res:
+            results = res
+        logger.info('%s creating Level %s' % (student_id,level))
+        #
+        # Level
+        #
+        student_obj = getattr(self.portal_url.getPortalObject().campus.students,student_id)
+        studycourse = getattr(student_obj,"study_course",None)
+        self.portal_workflow.doActionFor(studycourse,'close_for_edit',dest_container=studycourse)
+        l = getattr(studycourse,level,None)
+        if l is None:
+            studycourse.invokeFactory('StudentStudyLevel', level)
+            l = getattr(studycourse, level)
+            self.portal_workflow.doActionFor(l,'open',dest_container=l)
+            l.getContent().edit(mapping={'Title': "Level %s" % level})
+        ###)
+
+    security.declarePublic('getHallInfo') ###(
+    def getHallInfo(self,bed):
+        """return Hall Info"""
+        info = {}
+        hall,block,room,letter = bed.split('_')
+        res = ZCatalog.searchResults(self.portal_catalog_real,portal_type="AccoHall",id=hall)
+        if res and len(res) == 1:
+            hall_brain = res[0]
+            hall_doc = hall_brain.getObject().getContent()
+        else:
+            return info
+        info['hall_title'] = hall_brain.Title
+        info['maintenance_code'] = hall_doc.maintenance_code
+        res = ZCatalog.searchResults(self.portal_catalog_real,portal_type="ScratchCardBatch")
+        batch_doc = None
+        for brain in res:
+            if brain.id.startswith(info['maintenance_code']):
+                batch_doc = brain.getObject().getContent()
+                break
+        if batch_doc is None:
+            info['maintenance_fee'] = None
+        else:
+            info['maintenance_fee'] = batch_doc.cost
+        return info
+    ###)
+
+    security.declarePublic('showFsPicture') ###(
+    def showFsPicture(self,path):
+        """return a picture from the filesystem"""
+        picture_path = "%s/import/%s" % (i_home,path)
+        if os.path.exists(picture_path):
+            return open(picture_path).read()
+
+    ###)
+
+    security.declareProtected(ModifyPortalContent,'deleteAllCourses') ###(
+    def deleteAllCourses(self,department="All"):
+        ''' delete the courses'''
+        pm = self.portal_membership
+        member = pm.getAuthenticatedMember()
+
+        if str(member) not in ("henrik","joachim"):
+            return "not possible"
+        if department == "All":
+            res = self.portal_catalog({'meta_type': 'Department'})
+        if len(res) < 1:
+            return "No Departments found"
+
+        deleted = []
+        for dep in res:
+            cf = dep.getObject().courses
+            if cf:
+                cf.manage_delObjects(ids=cf.objectIds())
+                deleted.append("deleted Courses in %s" % dep.getId)
+        return "\r".join(deleted)
+    ###)
+
+    security.declareProtected(ModifyPortalContent,'getLogfileLines') ###(
+    def getLogfileLines(self,filename="event.log",numlines=20):
+        """Get last NUMLINES lines of logfile FILENAME.
+
+        Return last lines' of a file in the instances logfile directory as
+        a list. The number of returned lines equals `numlines' or less. If
+        less than `numlines' lines are available, the whole file ist
+        returned. If the file can not be opened or some other error
+        occurs, empty list is returend.
+        """
+        result = []
+        lines_hit = 0
+
+        # We only handle files in instances' log directory...
+        logpath = os.path.join(i_home, "log")
+        filename = str(os.path.abspath( os.path.join( logpath, filename )))
+        if not filename.startswith( logpath ):
+            # Attempt to access file outside log-dir...
+            return []
+
+        try:
+            fd = file( filename, "rb" )
+        except IOError:
+            return []
+        if not fd:
+            return []
+
+        if os.linesep == None:
+            linesep = '\n'
+        else:
+            linesep = os.linesep
+
+        # Try to find 'numlines' times a lineseparator, searching from end
+        # and moving to the beginning of file...
+        fd.seek( 0, 2) # Move to end of file...
+        while lines_hit < numlines:
+            if fd.read(1) == linesep[-1]: # This moves filedescriptor
+                                          # one step forward...
+                lines_hit += 1
+            try:
+                fd.seek( -2, 1) # Go two bytes back from current pos...
+            except IOError:
+                # We cannot go back two bytes. Maybe the file is too small...
+                break
+        fd.seek(2,1)
+
+        # Read all lines from current position...
+        result = fd.readlines()
+        # Remove line endings...
+        result = [x.strip() for x in result]
+        fd.close()
+        return result
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"getCallbacksFromLog")###(
+    def getCallbacksFromLog(self,filename):
+        """fix Online Payment Transactions from Z2.log entries"""
+        import transaction
+        import random
+        from cgi import parse_qs
+        from urlparse import urlparse
+        #from pdb import set_trace
+        wftool = self.portal_workflow
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        students_folder = self.portal_url.getPortalObject().campus.students
+        s = r'(?P<client_ip>\S+) - (?P<member_id>\S+) \['
+        s += r'(?P<date>.*)\] "(?P<get>.*)" (?P<codes>\d+ \d+) "'
+        s += r'(?P<intersw>.*)" "(?P<agent>.*)"'
+        data = re.compile(s)
+        start = True
+        tr_count = 1
+        total = 0
+        #name = 'pume_results'
+        #name = 'epaymentsuccessful_z2log2'
+        name = filename
+        no_import = []
+        imported = []
+        logger = logging.getLogger('WAeUPTool.getFailedTransactions')
+        try:
+            transactions = open("%s/import/%s" % (i_home,name),"rb").readlines()
+        except:
+            logger.error('Error reading %s' % name)
+            return
+        tas = []
+        for line in transactions:
+            dict = {}
+            items = data.search(line)
+            dict['idict'] = idict = items.groupdict()
+            #print idict
+            #from pdb import set_trace;set_trace()
+            urlparsed = urlparse(idict['get'][4:])
+            #print urlparsed
+            path = urlparsed[2].split('/')
+            dict['student_id'] = student_id = path[8]
+            dict['payment_id'] = payment_id = path[10]
+            dict['qs_dict'] = qs_dict = parse_qs(urlparsed[4])
+            tas.append(dict)
+            tr_count += 1
+        return tas
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"importOnlinePaymentTransactions")###(
+    def importOnlinePaymentTransactions(self):
+        """load Online Payment Transactions from CSV values"""
+        import transaction
+        import random
+        #from pdb import set_trace
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        opt = self.online_payments_import
+        students_folder = self.portal_url.getPortalObject().campus.students
+        start = True
+        tr_count = 1
+        total = 0
+        #name = 'pume_results'
+        name = 'OnlineTransactions'
+        no_import = []
+        imported = []
+        logger = logging.getLogger('WAeUPTool.importOnlinePaymentTransactions')
+        try:
+            transactions = csv.DictReader(open("%s/import/%s.csv" % (i_home,name),"rb"))
+        except:
+            logger.error('Error reading %s.csv' % name)
+            return
+        for pay_transaction in transactions:
+            if start:
+                start = False
+                logger.info('Start loading from %s.csv' % name)
+                s = ','.join(['"%s"' % fn for fn in pay_transaction.keys()])
+                no_import.append('%s,"Error"' % s)
+                format = ','.join(['"%%(%s)s"' % fn for fn in pay_transaction.keys()])
+                format_error = format + ',"%(Error)s"'
+            data = {}
+
+            # format of the first file sent by Tayo
+            #data['datetime'] = date = DateTime.DateTime(pay_transaction['Date'])
+            #data['student_id'] = student_id = pay_transaction['Payer ID']
+            #data['order_id'] = order_id = pay_transaction['Order ID (Tranx Ref)']
+            #data['response_code'] = response_code = pay_transaction['Resp Code']
+            #data['amount'] = amount = pay_transaction['Amount']
+
+            # format of the second file sent by Tayo
+            #data['datetime'] = date = 0
+            #data['student_id'] = student_id = pay_transaction['Payer ID']
+            #data['order_id'] = order_id = pay_transaction['Order ID (Tranx Ref)']
+            #data['response_code'] = response_code = '00'
+            #data['amount'] = amount = pay_transaction['Amount']
+
+            # format of the third file sent by Kehinde
+            data['datetime'] = date = 0
+            data['student_id'] = student_id = pay_transaction['customer_id']
+            data['order_id'] = order_id = pay_transaction['merchant_reference']
+            data['response_code'] = response_code = '00'
+            data['amount'] = amount = pay_transaction['Amount']
+
+            dup = False
+            if response_code == "12":
+                continue
+            try:
+                opt.addRecord(**data)
+            except ValueError:
+                dup = True
+            #from pdb import set_trace;set_trace()
+            if dup:
+                if response_code == "00":
+                    try:
+                        opt.modifyRecord(**data)
+                    except:
+                        logger.info("duplicate uid, order_id %(order_id)s, student_id %(student_id)s, response_code %(response_code)s" % data)
+                        continue
+                else:
+                    pay_transaction['Error'] = "Duplicate order_id"
+                    no_import.append( format_error % pay_transaction)
+                    logger.info("duplicate order_id %(order_id)s for %(student_id)s %(response_code)s" % data)
+                    continue
+            tr_count += 1
+            if tr_count > 1000:
+                if len(no_import) > 0:
+                    open("%s/import/%s_not_imported%s.csv" % (i_home,name,current),"a").write(
+                             '\n'.join(no_import) + '\n')
+                    no_import = []
+                em = '%d transactions committed\n' % (tr_count)
+                transaction.commit()
+                regs = []
+                logger.info(em)
+                total += tr_count
+                tr_count = 0
+        open("%s/import/%s_not_imported%s.csv" % (i_home,name,current),"a").write(
+                                                '\n'.join(no_import))
+        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
+    ###)
+    
+    security.declareProtected(ModifyPortalContent,'mass_create') ###(
+    def mass_create_department(self,mapping):
+        "create a department in the correct faculty"
+        logger = logging.getLogger('WAeUPTool.mass_create_department')
+        fid = mapping['faculty_code']
+        if getattr(self,'_v_faculties',None) is None:
+            res = self.portal_catalog(portal_type = "Faculty")
+            self._v_faculties = {}
+            for f in res:
+                self._v_faculties[f.getId] = f.getObject()
+        f = self._v_faculties.get(fid,None)
+        if f is None:
+            return '', "No Faculty with ID: %s" % fid
+        else:
+            did = mapping.get('code')
+            d = getattr(f,did,None)
+            if d is None or d.portal_type == "Faculty":
+                logger.info('Creating Department %(code)s = %(title)s' % mapping)
+                f.invokeFactory('Department', did)
+                d = getattr(f,did)
+                d.invokeFactory('CoursesFolder','courses')
+                courses = getattr(d,'courses')
+                dict = {'Title': 'Courses'}
+                courses.getContent().edit(mapping=dict)
+                d.invokeFactory('CertificatesFolder','certificates')
+                certificates = getattr(d,'certificates')
+                dict = {'Title': 'Certificates'}
+                certificates.getContent().edit(mapping=dict)
+            d.getContent().edit(mapping=mapping)
+        return did,''
+    ###)
+
+    security.declareProtected(ModifyPortalContent,'mass_edit') ###(
+    def mass_edit_department(self,mapping):
+        "create a department in the correct faculty"
+        logger = logging.getLogger('WAeUPTool.mass_create_department')
+        academics_folder = self.portal_url.getPortalObject().campus.academics
+        fid = mapping['faculty_code']
+        did = mapping.get('code')
+        try:
+            d = getattr(getattr(academics_folder,fid),did,None)
+        except KeyError:
+            return '', "Department %s or Faculty %s wrong" % (did,fid)
+        else:
+            if d is None or d.portal_type == "Faculty":
+                logger.info('Editing Department %(code)s = %(title)s' % mapping)
+            d.getContent().edit(mapping=mapping)
+        return did,''
+    ###)
+
+    field2types_student = {   ###(
+                      'StudentApplication':
+                          {'id': 'application',
+                           'title': 'Application Data',
+                           'wf_transition_return': 'close',
+                           'wf_transition_admit': 'remain',
+                           'fields':
+                             ('jamb_reg_no',
+                              'entry_mode',
+                              'entry_session',
+                              'jamb_score',
+                              'app_email',
+                              'jamb_age',
+                              #'jamb_state',
+                              #'jamb_lga',
+                              )
+                              },
+                      #'StudentPume':
+                      #    {'id': 'pume',
+                      #     'title': 'Pume Data',
+                      #     'wf_transition_return': 'close',
+                      #     'wf_transition_admit': 'close',
+                      #     'fields':
+                      #       ('pume_score',
+                      #        )
+                      #        },
+                      'StudentClearance':
+                          {'id': 'clearance',
+                           'title': 'Clearance/Eligibility Record',
+                           'wf_transition_return': 'close',
+                           'wf_transition_admit': 'remain',
+                           'fields':
+                             ('matric_no',
+                              'nationality',
+                              'lga',
+                              'birthday',
+                              )
+                              },
+                         'StudentPersonal':
+                          {'id': 'personal',
+                           'title': 'Personal Data',
+                           'wf_transition_return': 'open',
+                           'wf_transition_admit': 'remain',
+                           'fields':
+                             ('firstname',
+                              'middlename',
+                              'lastname',
+                              'sex',
+                              'email',
+                              'phone',
+                              'perm_address',
+                              )
+                              },
+                         'StudentStudyCourse':
+                          {'id': 'study_course',
+                           'title': 'Study Course',
+                           'wf_transition_return': 'open',
+                           'wf_transition_admit': 'remain',
+                           'fields':
+                             ('study_course',
+                              'current_level',
+                              'current_session',
+                              'current_mode',
+                              'current_verdict',
+                              )
+                              },
+
+                         'PaymentsFolder':
+                          {'id': 'payments',
+                           'title': 'Payments',
+                           'wf_transition_return': 'open',
+                           'wf_transition_admit': 'open',
+                           'fields':
+                             ()
+                              },
+                         }
+    ###)
+
+    security.declareProtected(ModifyPortalContent,'mass_create_student') ###(
+    def mass_create_student(self,mapping):
+        "create a students record due import"
+        logger = logging.getLogger('WAeUPTool.mass_create_student')
+        students_folder = self.portal_url.getPortalObject().campus.students
+        jamb_reg_no = mapping.get('jamb_reg_no',None)
+        if jamb_reg_no:
+            res = self.students_catalog(jamb_reg_no = jamb_reg_no)
+            if res:
+                return '',"jamb_reg_no exists"
+        matric_no = mapping.get('matric_no',None)
+        if matric_no:
+            res = self.students_catalog(matric_no = matric_no)
+            if res:
+                return '',"matric_no exists"
+        sid = self.waeup_tool.generateStudentId('?')
+        students_folder.invokeFactory('Student', sid)
+        student_obj = getattr(students_folder,sid)
+        f2t = self.field2types_student
+        d = {}
+        d['jamb_sex']  = 'M'
+        if mapping.get('sex'):
+            d['jamb_sex']  = 'F'
+        transition = mapping.get('reg_transition','admit')
+        if transition not in ('admit','return'):
+            return '',"no valid transition provided"
+        for pt in f2t.keys():
+            student_obj.invokeFactory(pt,f2t[pt]['id'])
+            sub_obj = getattr(student_obj,f2t[pt]['id'])
+            sub_doc = sub_obj.getContent()
+            d['Title'] = f2t[pt]['title']
+            for field in f2t[pt]['fields']:
+                d[field] = mapping.get(field,'')
+            if pt == "StudyCourse":
+                for von,zu in (('entry_mode','current_mode'),
+                               ('entry_session','current_session')):
+                    if mapping.get(zu,None) is None and mapping.get(von,None) is not None:
+                        d[zu] = mapping[von]
+            sub_doc.edit(mapping = d)
+
+            #import pdb;pdb.set_trace()
+            new_state = f2t[pt]['wf_transition_%(transition)s' % vars()]
+            if new_state != "remain":
+                self.portal_workflow.doActionFor(sub_obj,new_state,dest_container=sub_obj)
+        self.portal_workflow.doActionFor(student_obj,transition)
+        student_obj.manage_setLocalRoles(sid, ['Owner',])
+        return sid,''
+    ###)
+
+    security.declareProtected(ModifyPortalContent,'mass_edit_student') ###(
+    def mass_edit_student(self,mapping):
+        "edit a students record due import"
+        logger = logging.getLogger('WAeUPTool.mass_edit_student')
+        students_folder = self.portal_url.getPortalObject().campus.students
+        sid = mapping.get('id',None)
+        jamb_reg_no = mapping.get('jamb_reg_no',None)
+        matric_no = mapping.get('matric_no',None)
+        editable_keys = mapping.keys()
+        if sid:
+            res = self.students_catalog(id = sid)
+            if not res:
+                return '',"no student with id %s" % sid
+            elif matric_no and res[0].matric_no and\
+              matric_no != res[0].matric_no:
+                return '%s' % res[0].id ,"student has no matric_no %s" % matric_no
+            elif jamb_reg_no and res[0].jamb_reg_no and\
+              jamb_reg_no != res[0].jamb_reg_no:
+                return '%s' % res[0].id ,"student has no jamb_reg_no %s" % jamb_reg_no
+        elif jamb_reg_no:
+            res = self.students_catalog(jamb_reg_no = jamb_reg_no)
+            if not res:
+                return '',"no student with jamb_reg_no %s" % jamb_reg_no
+            editable_keys.remove('jamb_reg_no')
+        elif matric_no:
+            res = self.students_catalog(matric_no = matric_no)
+            if not res:
+                return '',"no student with matric_no %s" % matric_no
+            editable_keys.remove('matric_no')
+
+        # included only to change wf state from admitted to returning
+        if res[0].review_state not in ('admitted','objection_raised'):
+            return '%s' % res[0].id ,"student is not in state admitted or objection_raised"
+        # end inclusion
+
+        sid = res[0].id
+        student_obj = getattr(students_folder,sid)
+        f2t = self.field2types_student
+        d = {}
+        #import pdb;pdb.set_trace()
+        any_change = False
+        for pt in f2t.keys():
+            if pt == "student_application":
+                d['jamb_sex']  = 'M'
+                if mapping.get('sex'):
+                    d['jamb_sex']  = 'F'
+            intersect = set(f2t[pt]['fields']).intersection(set(editable_keys))
+            if intersect:
+                sub_obj = getattr(student_obj,f2t[pt]['id'],None)
+                if sub_obj is None:
+                    try:
+                        student_obj.invokeFactory(pt,f2t[pt]['id'])
+                    except:
+                        continue
+                    sub_obj = getattr(student_obj,f2t[pt]['id'])
+                    d['Title'] = f2t[pt]['title']
+                sub_doc = sub_obj.getContent()
+                for field in intersect:
+                    changed = False
+                    if getattr(sub_doc,field) != mapping.get(field,''):
+                        any_change = True
+                        changed = True
+                        d[field] = mapping.get(field,'')
+                    if changed:
+                        sub_doc.edit(mapping = d)
+
+
+        # included only to change wf state from admitted to returning
+            if res[0].review_state in ('admitted','objection_raised'):
+                new_state = f2t[pt]['wf_transition_return']
+                sub_obj = getattr(student_obj,f2t[pt]['id'],None)
+                if sub_obj and new_state != "remain":
+                    try:
+                        self.portal_workflow.doActionFor(sub_obj,new_state,dest_container=sub_obj)
+                    except:
+                        #logger.info('%s, wf transition %s of %s failed' % (sid,new_state,sub_obj.id))
+                        pass
+        if res[0].review_state in ('admitted','objection_raised'):
+            wfaction = 'return'
+            try:
+                self.portal_workflow.doActionFor(student_obj,wfaction)
+                logger.info('%s, wf state changed' % sid)
+                any_change = True
+            except:
+                logger.info('%s, wf transition failed, old state = %s' % (sid,res[0].review_state))
+                pass
+        # end inclusion
+
+
+        if any_change:
+            return sid,''
+        else:
+            return sid,'not modified'
+    ###)
+
+    security.declareProtected(ModifyPortalContent,"importData")###(
+    def importData(self,filename,name,edit=False):
+        """load data from CSV values"""
+        import transaction
+        import random
+
+        pm = self.portal_membership
+        member = pm.getAuthenticatedMember()
+
+        logger = logging.getLogger('WAeUPTool.importData')
+        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+        students_folder = self.portal_url.getPortalObject().campus.students
+        start = True
+        tr_count = 1
+        total_imported = 0
+        total_not_imported = 0
+        total = 0
+        iname = "import_%s" % name
+        stool = getToolByName(self, 'portal_schemas')
+        ltool = getToolByName(self, 'portal_layouts')
+        schema = stool._getOb(iname)
+        if schema is None:
+            em = 'No such schema %s' % iname
+            logger.error('No such schema %s' % iname)
+            return em
+        layout = ltool._getOb(iname)
+        if layout is None:
+            em = 'No such layout %s' % iname
+            logger.error(em)
+            return em
+        validators = {}
+        for widget in layout.keys():
+            validators[widget] = layout[widget].validate
+        #import pdb;pdb.set_trace()
+        if edit:
+            importer_name = "mass_edit_%s" % name
+        else:
+            importer_name = "mass_create_%s" % name
+        importer = getattr(self, '%s' % importer_name,None)
+        if importer is None:
+            em = 'No importer function %s' % importer_name
+            logger.error(em)
+            return em
+        not_imported = []
+        imported = []
+        try:
+            items = csv.DictReader(open("%s/import/%s.csv" % (i_home,filename),"rb"))
+        except:
+            em = 'Error reading %s.csv' % filename
+            logger.error(em)
+            return em
+        for item in items:
+            if start:
+                start = False
+                adapters = [MappingStorageAdapter(schema, item)]
+                logger.info('%s starts import from %s.csv' % (member,filename))
+                #import_keys = [k for k in item.keys() if not k.startswith('ignore')]
+                attrs = csv.reader(open("%s/import/%s.csv" % (i_home,filename),"rb")).next()
+                #import pdb;pdb.set_trace()
+                import_keys = [k for k in attrs if not k.startswith('ignore')]
+                diff2schema = set(import_keys).difference(set(schema.keys()))
+                diff2layout = set(import_keys).difference(set(layout.keys()))
+                if diff2schema:
+                    em = "not ignorable key(s) %s found in heading" % diff2schema
+                    return em
+                s = ','.join(['"%s"' % fn for fn in import_keys])
+                open("%s/import/%s_not_imported%s.csv" % (i_home,filename,current),"a").write(s + ',"Error"'+ '\n')
+                s = '"id",' + s
+                open("%s/import/%s_imported%s.csv" % (i_home,filename,current),"a").write(s + '\n')
+                format = ','.join(['"%%(%s)s"' % fn for fn in import_keys])
+                format_error = format + ',"%(Error)s"'
+                format = '"%(id)s",'+ format
+            dm = DataModel(item, adapters,context=self)
+            ds = DataStructure(data=item,datamodel=dm)
+            error_string = ""
+            for k in import_keys:
+                if not validators[k](ds):
+                    error_string += " %s : %s" % (k,ds.getError(k))
+            if not error_string:
+                item.update(dm)
+                item['id'],error = importer(item)
+                if error:
+                    error_string += error
+            if error_string:
+                item['Error'] = error_string
+                not_imported.append(format_error % item)
+                total_not_imported += 1
+            else:
+                em = format % item
+                imported.append(em)
+                logger.info("%(total_imported)d of %(total)d %(em)s" % vars())
+                tr_count += 1
+                total_imported += 1
+            total += 1
+            if total and not total % 100:
+                transaction.commit()
+                if len(not_imported) > 0:
+                    open("%s/import/%s_not_imported%s.csv" % (i_home,filename,current),"a").write(
+                             '\n'.join(not_imported) + '\n')
+                    not_imported = []
+                if len(imported) > 0:
+                    open("%s/import/%s_imported%s.csv" % (i_home,filename,current),"a").write(
+                             '\n'.join(imported) + '\n')
+                    imported = []
+                em = '%d transactions committed\n' % (tr_count)
+                regs = []
+                logger.info(em)
+                tr_count = 0
+        if len(imported) > 0:
+            open("%s/import/%s_imported%s.csv" % (i_home,filename,current),"a").write(
+                                                '\n'.join(imported))
+        if len(not_imported) > 0:
+            open("%s/import/%s_not_imported%s.csv" % (i_home,filename,current),"a").write(
+                                                '\n'.join(not_imported))
+        em = "Imported: %d, not imported: %d of total %d" % (total_imported,total_not_imported,total)
+        logger.info(em)
+        return em
+    ###)
+
+InitializeClass(WAeUPTool)
Index: WAeUP_SRP/trunk_not_used/Widgets.py
===================================================================
--- WAeUP_SRP/trunk_not_used/Widgets.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/Widgets.py	(revision 2226)
@@ -0,0 +1,1728 @@
+#-*- mode: python; mode: fold -*-
+# $Id$
+from cgi import escape
+from types import *
+import Globals
+from Globals import InitializeClass
+from ZPublisher.HTTPRequest import FileUpload
+##from Products.CPSSchemas.Widget import CPSWidgetType
+from Products.CMFCore.utils import getToolByName
+from Products.CPSSchemas.BasicWidgets import CPSBooleanWidget, CPSWidget, CPSStringWidget, CPSEmailWidget,CPSImageWidget
+from Products.CPSSchemas.BasicWidgets import CPSFileWidget
+from Products.CPSSchemas.BasicWidgets import renderHtmlTag,CPSSelectWidget, CPSStringWidget
+from Products.CPSSchemas.ExtendedWidgets import CPSDateTimeWidget
+from Products.CPSSchemas.Widget import widgetRegistry
+from Products.CPSUtil.file import PersistableFileUpload
+from Products.CPSUtil.id import generateFileName
+##from Products.CPSSchemas.WidgetTypesTool import WidgetTypeRegistry
+from DateTime.DateTime import DateTime
+from AccessControl import getSecurityManager
+from Products.WAeUP_SRP.Students import getStudentByRegNo
+from Products.WAeUP_SRP.Academics import makeCertificateCode
+#from Products.ExtFile.ExtFile import ExtFile
+import logging,os,re
+import operator
+p_home = Globals.package_home(globals())
+i_home = Globals.INSTANCE_HOME
+
+#from zLOG import LOG, DEBUG
+
+class CPSSelectWidgetForRecord(CPSSelectWidget): ###(
+    """Select widget. with record names"""
+    meta_type = 'Select Widget for Records'
+
+    field_types = ('CPS String Field',)
+    field_inits = ({'is_searchabletext': 1,},)
+
+    _properties = CPSSelectWidget._properties + (
+        {'id': 'record_id', 'type': 'string', 'mode': 'w',
+         'label': 'Record Id', 'is_required' : 1},
+        )
+
+    def render(self, mode, datastructure, **kw):
+        """Render in mode from datastructure."""
+        value = datastructure[self.getWidgetId()]
+        vocabulary = self._getVocabulary(datastructure)
+        portal = getToolByName(self, 'portal_url').getPortalObject()
+        cpsmcat = portal.translation_service
+        if mode == 'view':
+            if self.translated:
+                return escape(cpsmcat(vocabulary.getMsgid(value, value)).encode('ISO-8859-15', 'ignore'))
+            else:
+                return escape(vocabulary.get(value, value))
+        elif mode == 'edit':
+            html_widget_id = self.getHtmlWidgetId()
+            res = renderHtmlTag('select',
+                                name='%s.%s:records' % (self.record_id,html_widget_id),
+                                id=html_widget_id)
+            in_selection = 0
+            for k, v in vocabulary.items():
+                if self.translated:
+                    kw = {'value': k,
+                          'contents': cpsmcat(vocabulary.getMsgid(k, k)).encode('ISO-8859-15', 'ignore')
+                          }
+                else:
+                    kw = {'value': k, 'contents': v}
+                if value == k:
+                    kw['selected'] = 'selected'
+                    in_selection = 1
+                res += renderHtmlTag('option', **kw)
+            if value and not in_selection:
+                kw = {'value': value, 'contents': 'invalid: '+ str(value),
+                      'selected': 'selected'}
+                res += renderHtmlTag('option', **kw)
+            res += '</select>'
+            return res
+        raise RuntimeError('unknown mode %s' % mode)
+
+InitializeClass(CPSSelectWidgetForRecord)
+
+widgetRegistry.register(CPSSelectWidgetForRecord)
+
+###)
+
+class CPSStringWidgetForRecord(CPSStringWidget): ###(
+    """String widget."""
+    meta_type = 'String Widget For Record'
+
+    field_types = ('CPS String Field',)
+    field_inits = ({'is_searchabletext': 1,},)
+    _properties = CPSStringWidget._properties + (
+        {'id': 'record_id', 'type': 'string', 'mode': 'w',
+         'label': 'Record Id', 'is_required' : 1},
+        )
+
+    def render(self, mode, datastructure, **kw):
+        """Render in mode from datastructure."""
+        value = datastructure[self.getWidgetId()]
+        if mode == 'view':
+            return escape(value)
+        elif mode == 'edit':
+            # XXX TODO should use an other name than kw !
+            # XXX change this everywhere
+            html_widget_id = self.getHtmlWidgetId()
+            kw = {'type': 'text',
+                  'id'  : html_widget_id,
+                  'name': '%s.%s:records' % (self.record_id,html_widget_id),
+                  'value': escape(value),
+                  'size': self.display_width,
+                  }
+            if self.size_max:
+                kw['maxlength'] = self.size_max
+            return renderHtmlTag('input', **kw)
+        raise RuntimeError('unknown mode %s' % mode)
+
+InitializeClass(CPSStringWidgetForRecord)
+
+widgetRegistry.register(CPSStringWidgetForRecord)
+
+###)
+
+class CertificateCourseIdWidget(CPSStringWidget): ###(
+    """ CertificateCourseId Widget"""
+    meta_type = "CertificateCourseId Widget"
+
+    def validate(self, datastructure, **kw):
+        """Validate datastructure and update datamodel."""
+
+        valid = CPSStringWidget.validate(self, datastructure, **kw)
+        if not valid:
+            return 0
+        else:
+            widget_id = self.getWidgetId()
+            value = datastructure[widget_id].upper()
+            err = 0
+            c_ids = [c.id for c in self.portal_catalog({'meta_type': "Course"})]
+            if hasattr(self.aq_parent,value):
+                err = 'Course already exists'
+            elif value not in c_ids:
+                err = 'Course does not exist'
+            if err:
+                datastructure.setError(widget_id, err)
+            else:
+                datamodel = datastructure.getDataModel()
+                datamodel[self.fields[0]] = value
+
+            return not err
+
+InitializeClass(CertificateCourseIdWidget)
+
+widgetRegistry.register(CertificateCourseIdWidget)
+###)
+
+class CourseIdWidget(CPSStringWidget): ###(
+    """ CourseId Widget"""
+    meta_type = "CourseId Widget"
+
+    def validate(self, datastructure, **kw):
+        """Validate datastructure and update datamodel."""
+
+        valid = CPSStringWidget.validate(self, datastructure, **kw)
+        if not valid:
+            return 0
+        else:
+            widget_id = self.getWidgetId()
+            value = datastructure[widget_id].upper()
+            err = 0
+            res = self.portal_catalog(meta_type= "Course",id = value)
+            if len(res) > 0:
+                err = 'Course already exists'
+            if err:
+                datastructure.setError(widget_id, err)
+            else:
+                datamodel = datastructure.getDataModel()
+                datamodel[self.fields[0]] = value
+
+            return not err
+
+InitializeClass(CourseIdWidget)
+
+widgetRegistry.register(CourseIdWidget)
+
+
+###)
+
+class WAeUPStudyModeWidget(CPSSelectWidget): ###(
+    """WAeUP StudyMode Widget."""
+    meta_type = 'WAeUP StudyMode Widget'
+    vocabulary = 'entry_modes'
+
+    def _getStudyModes(self):
+        voc = getattr(self.portal_vocabularies,self.vocabulary)
+        d = {}
+        for k,v in voc.items():
+            d[k] = v
+        return d
+
+    def validate(self, datastructure, **kw):
+        """Validate datastructure and update datamodel."""
+        widget_id = self.getWidgetId()
+        value = datastructure[widget_id]
+        try:
+            v = str(value)
+        except ValueError:
+            datastructure.setError(widget_id, "'%s' not a valid session key" % value)
+            return 0
+        studymodes = self._getStudyModes()
+        if not value:
+            v = value = 'ume_ft'
+        #import pdb;pdb.set_trace()
+        if not studymodes.has_key(value):
+            datastructure.setError(widget_id, "'%s' not a valid session key" % v)
+            return 0
+        if self.is_required and not len(v):
+            datastructure.setError(widget_id, "session key required")
+            return 0
+
+        datamodel = datastructure.getDataModel()
+        datamodel[self.fields[0]] = v
+        return 1
+
+    def render(self, mode, datastructure, **kw):
+        """Render in mode from datastructure."""
+        value = datastructure[self.getWidgetId()]
+        studymodes = self._getStudyModes()
+        if mode == 'view':
+            return escape(studymodes.get(value, value))
+        elif mode == 'edit':
+            html_widget_id = self.getHtmlWidgetId()
+            res = renderHtmlTag('select', name=html_widget_id, id=html_widget_id)
+            in_selection = 0
+            vocabulary_items = studymodes.items()
+            if self.sorted:
+                vocabulary_items.sort(key=operator.itemgetter(1))
+            for k, v in vocabulary_items:
+                kw = {'value': k, 'contents': v}
+                if value == k:
+                    kw['selected'] = 'selected'
+                    in_selection = 1
+                res += renderHtmlTag('option', **kw)
+            if value and not in_selection:
+                kw = {'value': value, 'contents': 'invalid: '+ str(value),
+                      'selected': 'selected'}
+                res += renderHtmlTag('option', **kw)
+            res += '</select>'
+            return res
+        raise RuntimeError('unknown mode %s' % mode)
+
+InitializeClass(WAeUPStudyModeWidget)
+
+widgetRegistry.register(WAeUPStudyModeWidget)
+
+###)
+
+class WAeUPSessionWidget(CPSSelectWidget): ###(
+    """WAeUP Session Widget."""
+    meta_type = 'WAeUP Session Widget'
+
+    def _getSessions(self):
+        current_year = DateTime().year()
+        d = {'-1': 'N/A'}
+        for y in range(current_year - 9,current_year + 1):
+            d['%s' % str(y)[-2:]] = '%4d/%4d' % (y,y+1)
+        return d
+
+    def validate(self, datastructure, **kw):
+        """Validate datastructure and update datamodel."""
+        widget_id = self.getWidgetId()
+        value = datastructure[widget_id]
+        try:
+            v = str(value)
+        except ValueError:
+            datastructure.setError(widget_id, "'%s' not a valid session key" % value)
+            return 0
+
+        if len(v) == 1:
+            v = value = '0%c' % v
+        elif not value:
+            v = value = self.getSessionId()[-2:]
+        #import pdb;pdb.set_trace()
+        sessions = self._getSessions()
+        if not sessions.has_key(value):
+            datastructure.setError(widget_id, "'%s' not a valid session key" % v)
+            return 0
+        if self.is_required and not len(v):
+            datastructure.setError(widget_id, "session key required")
+            return 0
+
+        datamodel = datastructure.getDataModel()
+        datamodel[self.fields[0]] = v
+        return 1
+
+    def render(self, mode, datastructure, **kw):
+        """Render in mode from datastructure."""
+        value = datastructure[self.getWidgetId()]
+        sessions = self._getSessions()
+        if mode == 'view':
+            return escape(sessions.get(value, value))
+        elif mode == 'edit':
+            html_widget_id = self.getHtmlWidgetId()
+            res = renderHtmlTag('select', name=html_widget_id, id=html_widget_id)
+            in_selection = 0
+            vocabulary_items = sessions.items()
+            if self.sorted:
+                vocabulary_items.sort(key=operator.itemgetter(0))
+            for k, v in vocabulary_items:
+                kw = {'value': k, 'contents': v}
+                if value == k:
+                    kw['selected'] = 'selected'
+                    in_selection = 1
+                res += renderHtmlTag('option', **kw)
+            if value and not in_selection:
+                kw = {'value': value, 'contents': 'invalid: '+ str(value),
+                      'selected': 'selected'}
+                res += renderHtmlTag('option', **kw)
+            res += '</select>'
+            return res
+        raise RuntimeError('unknown mode %s' % mode)
+
+InitializeClass(WAeUPSessionWidget)
+
+widgetRegistry.register(WAeUPSessionWidget)
+
+###)
+
+class WAeUPLevelWidget(CPSSelectWidget): ###(
+    """WAeUP Level Widget."""
+    meta_type = 'WAeUP Level Widget'
+
+    def _getLevels(self):
+        d = {'000':'N/A'}
+        for y in range(100,800,100):
+            d['%s' % str(y)] = 'Year %1d (%3d Level)' % (y/100,y)
+        return d
+
+    def validate(self, datastructure, **kw):
+        """Validate datastructure and update datamodel."""
+        widget_id = self.getWidgetId()
+        value = datastructure[widget_id]
+        try:
+            v = str(value)
+        except ValueError:
+            datastructure.setError(widget_id, "'%s' not a valid level key" % value)
+            return 0
+
+        if not value:
+            v = value = '100'
+        #import pdb;pdb.set_trace()
+        levels = self._getLevels()
+        if not levels.has_key(value):
+            datastructure.setError(widget_id, "'%s' not a valid level" % v)
+            return 0
+        if self.is_required and not len(v):
+            datastructure.setError(widget_id, "level key required")
+            return 0
+
+        datamodel = datastructure.getDataModel()
+        datamodel[self.fields[0]] = v
+        return 1
+
+    def render(self, mode, datastructure, **kw):
+        """Render in mode from datastructure."""
+        value = datastructure[self.getWidgetId()]
+        levels = self._getLevels()
+        if mode == 'view':
+            return escape(levels.get(value, value))
+        elif mode == 'edit':
+            html_widget_id = self.getHtmlWidgetId()
+            res = renderHtmlTag('select', name=html_widget_id, id=html_widget_id)
+            in_selection = 0
+            vocabulary_items = levels.items()
+            if self.sorted:
+                vocabulary_items.sort(key=operator.itemgetter(0))
+            for k, v in vocabulary_items:
+                kw = {'value': k, 'contents': v}
+                if value == k:
+                    kw['selected'] = 'selected'
+                    in_selection = 1
+                res += renderHtmlTag('option', **kw)
+            if value and not in_selection:
+                kw = {'value': value, 'contents': 'invalid: '+ str(value),
+                      'selected': 'selected'}
+                res += renderHtmlTag('option', **kw)
+            res += '</select>'
+            return res
+        raise RuntimeError('unknown mode %s' % mode)
+
+InitializeClass(WAeUPLevelWidget)
+
+widgetRegistry.register(WAeUPLevelWidget)
+
+###)
+
+class WAeUPVerdictWidget(CPSSelectWidget): ###(
+    """WAeUP Verdict Widget."""
+    meta_type = 'WAeUP Verdict Widget'
+
+    # XXX make a menu for the vocabulary.
+    vocabulary = 'verdicts'
+
+    # Associating the widget label with an input area to improve the widget
+    # accessibility.
+    has_input_area = True
+
+    def _getVerdicts(self,datastructure):
+        voc = getattr(self.portal_vocabularies,self.vocabulary)
+        d = {}
+        for k,v in voc.items():
+            d[k] = v
+        return d
+
+    def validate(self, datastructure, **kw):
+        """Validate datastructure and update datamodel."""
+        widget_id = self.getWidgetId()
+        value = datastructure[widget_id]
+        try:
+            v = str(value)
+        except ValueError:
+            datastructure.setError(widget_id, "'%s' not a valid verdict key" % value)
+            return 0
+        #import pdb;pdb.set_trace()
+        verdicts = self._getVerdicts(datastructure)
+        if not value:
+            v = value = verdicts['N/A']
+        if not verdicts.has_key(value):
+            datastructure.setError(widget_id, "'%s' not a valid verdict key" % v)
+            return 0
+        if self.is_required and not len(v):
+            datastructure.setError(widget_id, "verdict required")
+            return 0
+
+        datamodel = datastructure.getDataModel()
+        datamodel[self.fields[0]] = v
+        return 1
+
+    def render(self, mode, datastructure, **kw):
+        """Render in mode from datastructure."""
+        value = datastructure[self.getWidgetId()]
+        verdicts = self._getVerdicts(datastructure)
+        if mode == 'view':
+            return escape(verdicts.get(value, value))
+        elif mode == 'edit':
+            html_widget_id = self.getHtmlWidgetId()
+            res = renderHtmlTag('select', name=html_widget_id, id=html_widget_id)
+            in_selection = 0
+            vocabulary_items = verdicts.items()
+            if self.sorted:
+                vocabulary_items.sort(key=operator.itemgetter(1))
+            for k, v in vocabulary_items:
+                kw = {'value': k, 'contents': v}
+                if value == k:
+                    kw['selected'] = 'selected'
+                    in_selection = 1
+                res += renderHtmlTag('option', **kw)
+            if value and not in_selection:
+                kw = {'value': value, 'contents': 'invalid: '+ str(value),
+                      'selected': 'selected'}
+                res += renderHtmlTag('option', **kw)
+            res += '</select>'
+            return res
+        raise RuntimeError('unknown mode %s' % mode)
+
+InitializeClass(WAeUPVerdictWidget)
+
+widgetRegistry.register(WAeUPVerdictWidget)
+
+###)
+
+class WAeUPLGAWidget(CPSSelectWidget): ###(
+    """WAeUP LGA Widget."""
+    meta_type = 'WAeUP LGA Widget'
+    _properties = CPSSelectWidget._properties + (
+        {'id': 'state_field', 'type': 'string', 'mode': 'w',
+         'label': 'Name of the state field'},
+         {'id': 'lga_field', 'type': 'string', 'mode': 'w',
+         'label': 'Name of the LGA Field (without state)'},
+         )
+    state_field = "state"
+    lga_field = "lga"
+
+    # XXX make a menu for the vocabulary.
+    vocabulary = 'local_gov_areas'
+
+    # Associating the widget label with an input area to improve the widget
+    # accessibility.
+    has_input_area = True
+
+    def _getLGAs(self):
+        voc = getattr(self.portal_vocabularies,self.vocabulary)
+        states = []
+        lgas  = []
+        d = {}
+        for k,v in voc.items():
+            parts = v.split(' / ')
+            if len(parts) == 1:
+                state = parts[0].lower()
+                lga = ""
+            elif len(parts) == 2:
+                state = parts[0].lower()
+                lga = "_".join(re.split('\W+',parts[1].lower()))
+            else:
+                continue
+            if state not in states:
+                states.append(state)
+            if lga not in lgas:
+                lgas.append(lga)
+            d[k] = v
+
+        return (d,states,lgas)
+
+    def validate(self, datastructure, **kw):
+        """Validate datastructure and update datamodel."""
+        widget_id = self.getWidgetId()
+        value = datastructure[widget_id]
+        #import pdb;pdb.set_trace()
+        try:
+            v = str(value)
+        except ValueError:
+            datastructure.setError(widget_id, "'%s' not a valid lga key" % value)
+            return 0
+        v = v.lower()
+        combined,states,lgas = self._getLGAs()
+        one_field = False
+        if len(v) == 0:
+            pass
+        elif not self.state_field and not self.lga_field:
+            one_field = True
+            if v not in combined.keys():
+                datastructure.setError(widget_id, "'%s' not a valid lga key" % v)
+                return 0
+        else:
+            if widget_id == self.state_field:
+                if v not in states:
+                    datastructure.setError(widget_id, "'%s' not a valid state" % v)
+                    return 0
+            elif widget_id == self.lga_field:
+                if "_".join(re.split('\W+',v)) not in lgas:
+                    datastructure.setError(widget_id, "'%s' not a valid lga" % v)
+                    return 0
+                if datastructure[self.state_field]:
+                    v = datastructure[self.state_field] + '_' + v
+
+        if self.is_required and not len(v):
+            datastructure.setError(widget_id, "lga required")
+            return 0
+
+        datamodel = datastructure.getDataModel()
+        if one_field:
+            datamodel[self.fields[0]] = v
+        else:
+            state = datastructure[self.state_field].lower()
+            lga = "_".join(datastructure[self.lga_field].lower().split())
+            datamodel[self.fields[0]] =   state + "_" + lga
+        return 1
+
+    def render(self, mode, datastructure, **kw):
+        """Render in mode from datastructure."""
+        w_id = self
+        value = datastructure[self.getWidgetId()]
+        lgas,x,y = self._getLGAs(datastructure)
+        if mode == 'view':
+            return escape(lgas.get(value, value))
+        elif mode == 'edit':
+            html_widget_id = self.getHtmlWidgetId()
+            res = renderHtmlTag('select', name=html_widget_id, id=html_widget_id)
+            in_selection = 0
+            vocabulary_items = lgas.items()
+            # if self.sorted:
+            #     vocabulary_items.sort(key=operator.itemgetter(1))
+            for k, v in vocabulary_items:
+                kw = {'value': k, 'contents': v}
+                if value == k:
+                    kw['selected'] = 'selected'
+                    in_selection = 1
+                res += renderHtmlTag('option', **kw)
+            if value and not in_selection:
+                kw = {'value': value, 'contents': 'invalid: '+ str(value),
+                      'selected': 'selected'}
+                res += renderHtmlTag('option', **kw)
+            res += '</select>'
+            return res
+        raise RuntimeError('unknown mode %s' % mode)
+
+InitializeClass(WAeUPLGAWidget)
+
+widgetRegistry.register(WAeUPLGAWidget)
+
+###)
+
+class WAeUPReservedRoomsWidget(CPSStringWidget): ###(
+    """ WAeUPReservedRooms Widget"""
+    meta_type = "WAeUPReservedRooms Widget"
+
+    def validate(self, datastructure, **kw):
+        """Validate datastructure and update datamodel."""
+        import re
+        valid = CPSStringWidget.validate(self, datastructure, **kw)
+        if not valid:
+            return 0
+        else:
+            widget_id = self.getWidgetId()
+            value = datastructure[widget_id]
+            err = 0
+            try:
+                reserved = [(r.split('/')[0],int(r.split('/')[1])) for r in re.split(',|\.| ',value)
+                                     if r]
+            except (ValueError,IndexError),msg:
+                err = str(msg)
+            if err:
+                datastructure.setError(widget_id, err)
+            else:
+                datamodel = datastructure.getDataModel()
+                datamodel[self.fields[0]] = value
+            return not err
+
+InitializeClass(WAeUPReservedRoomsWidget)
+
+widgetRegistry.register(WAeUPReservedRoomsWidget)
+###)
+
+class WAeUPIdWidget(CPSStringWidget): ###(
+    """ WAeUPId Widget"""
+    meta_type = "WAeUPId Widget"
+
+    def validate(self, datastructure, **kw):
+        """Validate datastructure and update datamodel."""
+
+        valid = CPSStringWidget.validate(self, datastructure, **kw)
+        id_pat_str = r"\S"
+        inv_id_pat = re.compile(r"^%s$" % id_pat_str)
+        if not valid:
+            return 0
+        else:
+            portal_type_query = {'query':['Faculty',
+                                          'Department',
+                                          'Course',
+                                          'Certificate',
+                                          'CertificateCourse',]}
+            widget_id = self.getWidgetId()
+            value = datastructure[widget_id]  #.upper()  is not necessary here because it's also done in waeup_document_create_do
+            err = 0
+            mapping = {}
+            if len(value.split()) > 1:
+                err = 'Invalid Id, Id contains space(s).'
+            elif self.portal_catalog(portal_type=portal_type_query,id=value):
+                brain = self.portal_catalog(portal_type=portal_type_query,id=value)[0]
+                err = 'An ${portal_type} object with the Id ${id} already exists at ${path}.'
+                mapping = {'portal_type': brain.portal_type,
+                           'id': value,
+                           'path': brain.getPath(),
+                           }
+            if err:
+                datastructure.setError(widget_id, err, mapping)
+            else:
+                datamodel = datastructure.getDataModel()
+                datamodel[self.fields[0]] = value
+
+            return not err
+
+InitializeClass(WAeUPIdWidget)
+
+widgetRegistry.register(WAeUPIdWidget)
+
+
+###)
+
+class StudyCourseWidget(CPSStringWidget): ###(
+    """ StudyCourse Widget"""
+    meta_type = "StudyCourse Widget"
+
+    def validate(self, datastructure, **kw):
+        """Validate datastructure and update datamodel."""
+        #from Products.zdb import set_trace
+        #set_trace()
+##        valid = CPSStringWidget.validate(self, datastructure, **kw)
+##        if not valid:
+##            return 0
+        widget_id = self.getWidgetId()
+        value = makeCertificateCode(datastructure[widget_id]).upper()
+        id_pat_str = r"\S"
+        inv_id_pat = re.compile(r"^%s$" % id_pat_str)
+        err = 0
+        if len(value.split()) > 1:
+            err = 'Invalid Id, Id contains space(s).'
+        elif not self.portal_catalog(portal_type='Certificate',id=value):
+            err = 'No such certificate'
+        if err:
+            datastructure.setError(widget_id, err)
+        else:
+            datamodel = datastructure.getDataModel()
+            datamodel[self.fields[0]] = value
+        return not err
+
+InitializeClass(StudyCourseWidget)
+
+widgetRegistry.register(StudyCourseWidget)
+###)
+
+class JambRegNoWidget(CPSStringWidget): ###(
+    """ JambRegNo Widget"""
+    meta_type = "JambRegNo Widget"
+    _properties = CPSStringWidget._properties + (
+        {'id': 'catalog', 'type': 'string', 'mode': 'w',
+         'label': 'Catalog to search'},
+         {'id': 'reference', 'type': 'string', 'mode': 'w',
+         'label': 'Reference Field'},
+         )
+    #catalog = "portal_pumeresults" #the catalog to search for jamb_reg_no
+    reference = ""
+    digits = 8
+    digits_str = "N"*digits
+    letters = 2
+    letters_str = "L"*letters
+    def validate(self, datastructure, **kw):
+        """Validate datastructure and update datamodel."""
+        valid = CPSStringWidget.validate(self, datastructure, **kw)
+        reg_no_catalog = getattr(self,self.catalog)
+        widget_id = self.getWidgetId()
+        value = datastructure[widget_id].upper()
+        err = 0
+        #import pdb;pdb.set_trace()
+        if kw.has_key('mode'):
+            mode = kw['mode']
+        else:
+            mode = "edit"
+        if not valid:
+            err = 'Invalid registration number'
+        elif self.reference == '':
+            #s = getStudentByRegNo(self,value)
+            pume = reg_no_catalog(jamb_reg_no = value)
+            if len(pume) < 1:
+                err = 'No student record with this registration number'
+            else:
+                datastructure['pume'] = pume[0]
+        elif mode == 'add':
+            pass
+        elif self.reference != '' and self.catalog == "applicants_catalog":
+            res = reg_no_catalog.searchResults({"%s" % self.reference: value})
+            if len(res) != 1:
+                err = 'No record with this registration number'
+            else:
+                datastructure['record'] = res[0]
+        else:
+            record = datastructure[self.reference]
+            #jamb_reg_no = getattr(record,widget_id)
+            jamb_reg_no = record.Entryregno
+            if jamb_reg_no != value:
+                err = 'Registration number does not match.'
+        if err:
+            datastructure.setError(widget_id, err)
+        else:
+            datamodel = datastructure.getDataModel()
+            datamodel[self.fields[0]] = value
+        return not err
+
+InitializeClass(JambRegNoWidget)
+
+widgetRegistry.register(JambRegNoWidget)
+###)
+
+class SecretWidget(CPSStringWidget): ###(
+    """ Secret Widget"""
+    meta_type = "Secret Widget"
+    _properties = CPSStringWidget._properties + (
+        {'id': 'reference', 'type': 'string', 'mode': 'w',
+         'label': 'Reference Record'},
+         {'id': 'check_fields', 'type': 'tokens', 'mode': 'w',
+         'label': 'Fields to check'},
+         )
+    reference = "student"
+    matric_no_catalog = 'returning_import'
+    check_fields = ("Firstname", "Middlename","Lastname")
+    def validate(self, datastructure, **kw):
+        """Validate datastructure and update datamodel."""
+        logger = logging.getLogger('Widgets.SecretWidget.validate')
+        valid = CPSStringWidget.validate(self, datastructure, **kw)
+        widget_id = self.getWidgetId()
+        value = datastructure[widget_id].upper()
+        err = 0
+        record = datastructure.get(self.reference,None)
+        #import pdb;pdb.set_trace()
+        if not valid or len(value) < 2:
+            err = 'Invalid string'
+        elif not record or datastructure.errors:
+            err = 0
+        else:
+            found = False
+            cvs = []
+            for field in self.check_fields:
+                cv = getattr(record,field).upper()
+                if len(cv.split()) > 1:
+                    for splited in cv.split():
+                        cvs.append(splited.strip())
+                else:
+                    cvs.append(cv)
+            for cv in cvs:
+                if cv  == value.upper():
+                    found = True
+                    break
+            matric_no = record.matric_no
+            name = " ".join(cvs)
+            if not found:
+                logger.info('%(matric_no)s did not find %(value)s in %(name)s' % vars())
+                err = 'No name does match.'
+            else:
+                logger.info('%(matric_no)s found %(value)s in %(name)s' % vars())
+        if err:
+            datastructure.setError(widget_id, err)
+        else:
+            datamodel = datastructure.getDataModel()
+            datamodel[self.fields[0]] = value
+        return not err
+
+InitializeClass(SecretWidget)
+
+widgetRegistry.register(SecretWidget)
+###)
+
+class WAeUPSexWidget(CPSBooleanWidget): ###(
+    """WAeUP sex widget."""
+    meta_type = 'WAeUP Sex Widget'
+
+    def validate(self, datastructure, **kw):
+        """Validate datastructure and update datamodel."""
+        value = datastructure[self.getWidgetId()]
+
+        if self.render_format not in self.render_formats:
+            self.render_format = 'select'
+
+        female = value in ('F','f','Female','female',"True",True)
+        male = value in ('M','m','Male','male','False',False)
+        if not female and not male:
+            datastructure.setError(self.getWidgetId(),
+                                   "invalid sex %s" % value)
+            return 0
+        elif female:
+            v = True
+        else:
+            v = False
+        datamodel = datastructure.getDataModel()
+        datamodel[self.fields[0]] = v
+        return 1
+
+InitializeClass(WAeUPSexWidget)
+
+widgetRegistry.register(WAeUPSexWidget)
+
+###)
+
+class MatricNoWidget(CPSStringWidget): ###(
+    """ MatricNo Widget"""
+    meta_type = "MatricNo Widget"
+
+    _properties = CPSStringWidget._properties + (
+        {'id': 'matric_no_catalog', 'type': 'string', 'mode': 'w',
+         'label': 'Catalog to search for MatricNo'},
+        { 'id': 'results_catalog', 'type': 'string', 'mode': 'w',
+         'label': 'Results Catalog'},
+         )
+    matric_no_catalog = "" #the catalog to search for matric_no
+    results_catalog = "results_import" #results catalog
+
+    def validate(self, datastructure, **kw):
+        """Validate datastructure and update datamodel."""
+        #import pdb;pdb.set_trace()
+        valid = CPSStringWidget.validate(self, datastructure, **kw)
+        logger = logging.getLogger('Widgets.MatricNoWidget.validate')
+        returning = getattr(self,self.matric_no_catalog)
+        results = getattr(self,self.results_catalog,None)
+        err = 0
+        widget_id = self.getWidgetId()
+        value = datastructure[widget_id]
+        if not valid or not value:
+            err = 'Invalid string'
+            logger.info('Invalid matric_no string %s' % value)
+        else:
+            value = value.upper()
+            datastructure['student'] = None
+            while not err:
+                res = returning(matric_no = value)
+                if len(res) < 1:
+                    logger.info('matric_no %s not found' % value)
+                    err = 'No student with this matriculation number.'
+                    break
+                datastructure['student'] = res[0]
+                if results is not None:
+                    res = results(matric_no = value)
+                    if len(res) < 1:
+                        err = 'No results for this matriculation number'
+                        continue
+                    datastructure['results'] = res
+                break
+        if err:
+            datastructure.setError(widget_id, err)
+        else:
+            datamodel = datastructure.getDataModel()
+            datamodel[self.fields[0]] = value
+        return not err
+
+InitializeClass(MatricNoWidget)
+
+widgetRegistry.register(MatricNoWidget)
+###)
+
+class StudentIdWidget(CPSStringWidget): ###(
+    """ StudentId Widget"""
+    meta_type = "StudentId Widget"
+    def validate(self, datastructure, **kw):
+        """Validate datastructure and update datamodel."""
+        valid = CPSStringWidget.validate(self, datastructure, **kw)
+        logger = logging.getLogger('Widgets.StudentIdWidget.validate')
+        #import pdb;pdb.set_trace()
+        s_cat = self.students_catalog
+        err = 0
+        widget_id = self.getWidgetId()
+        value = datastructure[widget_id]
+        if not valid or not value:
+            err = 'Invalid Id string'
+            logger.info('Invalid id string %s' % value)
+            datastructure['student'] = None
+        else:
+            value = value.upper()
+            res = s_cat(id = value)
+            if not res:
+                logger.info('Student id %s not found' % value)
+                err = 'No student with this Id'
+                datastructure['student'] = None
+            else:
+                datastructure['student'] = res[0]
+        if err:
+            datastructure.setError(widget_id, err)
+        else:
+            datamodel = datastructure.getDataModel()
+            datamodel[self.fields[0]] = value
+        return not err
+
+InitializeClass(StudentIdWidget)
+
+widgetRegistry.register(StudentIdWidget)
+###)
+
+class WAeUPMultilineResultsWidget(CPSStringWidget): ###(
+    """ WAeUPMultilineResults Widget"""
+    meta_type = "WAeUp Multiline Results Widget"
+    _properties = CPSWidget._properties + (
+        {'id': 'nr_of_lines', 'type': 'int', 'mode': 'w',
+         'label': 'Nr of Lines'},
+         )
+    nr_of_lines = 5
+    def prepare(self, datastructure, **kw): ###(
+        """Prepare datastructure from datamodel."""
+        datamodel = datastructure.getDataModel()
+        #import pdb;pdb.set_trace()
+        widget_id = self.getWidgetId()
+        v = datamodel[self.fields[0]]
+        if type(v) is ListType and v:
+            nr_results = len(v)
+        else:
+            v = []
+            nr_results = 0
+        count = 1
+        for s,g in v:
+            wid = "%s%02d"% (widget_id,count)
+            datastructure[wid+'_s'] = s
+            datastructure[wid+'_g'] = g
+            count += 1
+        if nr_results < self.nr_of_lines:
+            for line in range(nr_results,self.nr_of_lines):
+                v.append(('',''))
+                wid = "%s%02d"% (widget_id,line)
+                datastructure[wid+'_s'] = ''
+                datastructure[wid+'_g'] = ''
+        datastructure[widget_id] = v
+        datastructure[widget_id+'_s'] = ''
+        datastructure[widget_id+'_g'] = ''
+    ###)
+
+    def validate(self, datastructure, **kw): ###(
+        """Validate datastructure and update datamodel."""
+        #import pdb;pdb.set_trace()
+        widget_id = self.getWidgetId()
+        err = 0
+        lines = []
+        for line in range(1,30):
+            wid = "%s%02d"% (widget_id,line)
+            if not datastructure.has_key(wid+'_s'):
+                break
+            lines.append((datastructure[wid+'_s'].strip(),
+                         datastructure[wid+'_g'].strip()))
+
+        s = datastructure[widget_id+'_s'].strip()
+        g = datastructure[widget_id+'_g'].strip()
+        if s and g:
+            lines.append((s,g))
+        active = []
+        for s,g in lines:
+            if g != "":
+                active.append((s,g))
+        if err:
+            datastructure.setError(widget_id, err)
+        else:
+            datamodel = datastructure.getDataModel()
+            datamodel[self.fields[0]] = active
+        return not err
+    ###)
+
+    def render(self, mode, datastructure, **kw): ###(
+        """Render in mode from datastructure."""
+        render_method = 'widget_waeup_multiline_result_render'
+        meth = getattr(self, render_method, None)
+        if meth is None:
+            raise RuntimeError("Unknown Render Method %s for widget type %s"
+                               % (render_method, self.getId()))
+        #import pdb;pdb.set_trace()
+        datamodel = datastructure.getDataModel()
+        widget_id = self.getWidgetId()
+        lines = datamodel[self.fields[0]]
+        if len(lines) < self.nr_of_lines:
+            for line in range(len(lines),self.nr_of_lines + 1):
+                lines.append(('',''))
+        datastructure[widget_id] = lines
+        datastructure[widget_id+'_s'] = ''
+        datastructure[widget_id+'_g'] = ''
+##        count = 1
+##        for s,g in v:
+##            wid = "%s%02d"% (widget_id,count)
+##            count += 1
+        return meth(mode=mode,
+                    datastructure=datastructure,
+                    )
+    ###)
+
+
+InitializeClass(WAeUPMultilineResultsWidget)
+widgetRegistry.register(WAeUPMultilineResultsWidget)
+###)
+
+class WAeUPResultsWidget(CPSStringWidget): ###(
+    """ WAeUPResults Widget"""
+    meta_type = "WAeUp Results Widget"
+
+    def prepare(self, datastructure, **kw): ###(
+        """Prepare datastructure from datamodel."""
+        datamodel = datastructure.getDataModel()
+        v = datamodel[self.fields[0]]
+        #import pdb;pdb.set_trace()
+        widget_id = self.getWidgetId()
+        datastructure[widget_id] = v
+        datastructure[widget_id+'_s'] = ''
+        datastructure[widget_id+'_g'] = ''
+    ###)
+
+    def validate(self, datastructure, **kw): ###(
+        """Validate datastructure and update datamodel."""
+        #import pdb;pdb.set_trace()
+        widget_id = self.getWidgetId()
+        v = datastructure[widget_id]
+        err = 0
+        s = datastructure[widget_id+'_s'].strip()
+        g = datastructure[widget_id+'_g'].strip()
+        while 1:
+            if not s and g:
+                err = "No subject grade for subject"
+                break
+            i = 0
+            done = False
+            for sv,gv in v:
+                if sv == s:
+                    done = True
+                    if not g:
+                        v.pop(i)
+                        break
+                    v[i] = (s,g)
+                    break
+                i += 1
+            if done:
+                break
+            if s and g:
+                v.append((s,g))
+            break
+        if err:
+            datastructure.setError(widget_id, err)
+        else:
+            datamodel = datastructure.getDataModel()
+            datamodel[self.fields[0]] = v
+            datastructure[widget_id+'_s'] = s
+            datastructure[widget_id+'_g'] = g
+        return not err
+    ###)
+
+    def render(self, mode, datastructure, **kw): ###(
+        """Render in mode from datastructure."""
+        render_method = 'widget_waeup_result_render'
+        meth = getattr(self, render_method, None)
+        if meth is None:
+            raise RuntimeError("Unknown Render Method %s for widget type %s"
+                               % (render_method, self.getId()))
+        #import pdb;pdb.set_trace()
+        datamodel = datastructure.getDataModel()
+        widget_id = self.getWidgetId()
+        datastructure[widget_id+'_s'] = ''
+        datastructure[widget_id+'_g'] = ''
+        return meth(mode=mode,
+                    datastructure=datastructure,
+                    )
+    ###)
+
+
+InitializeClass(WAeUPResultsWidget)
+widgetRegistry.register(WAeUPResultsWidget)
+###)
+
+class ScratchCardPin: ###(
+    """the ScratchCardPin"""
+    def __init__(self,prefix,batch_no,number):
+        if not batch_no and not number:
+            s = prefix
+            if len(s) > 3:
+                prefix,batch_no,number = s[:3],s[3:-10],s[-10:]
+            else:
+                prefix,batch_no,number = s,'',''
+        self.p = prefix
+        self.b = batch_no
+        self.n = number
+
+    def __str__(self):
+        return "%s-%s-%s" % (self.p,self.b,self.n)
+
+    def __repr__(self):
+        return "%s%s%s" % (self.p,self.b,self.n)
+###)
+
+class ScratchcardPinWidget(CPSStringWidget): ###(
+    """ ScratchcardPin Widget"""
+    meta_type = "Scratchcard Pin Widget"
+    _properties = CPSWidget._properties + (
+        {'id': 'prefix', 'type': 'string', 'mode': 'w',
+         'label': 'Prefix'},
+         {'id': 'reference', 'type': 'string', 'mode': 'w',
+         'label': 'Reference Field'},
+        )
+    prefix = ''
+    reference = ''
+    def prepare(self, datastructure, **kw): ###(
+        """Prepare datastructure from datamodel."""
+        datamodel = datastructure.getDataModel()
+        v = datamodel[self.fields[0]]
+        widget_id = self.getWidgetId()
+        if v and type(v) is StringType:
+            try:
+                p,b,n = v.split('-')
+                v = ScratchCardPin(p,b,n)
+            except ValueError:
+                v = ScratchCardPin(v,'','')
+        if v:
+            p = '%s' % v.p
+            b = '%s' % v.b
+            n = '%s' % v.n
+        else:
+            p = self.prefix
+            if p.startswith('@'):
+                p = getattr(self,self.prefix[1:])()
+            b = n = ''
+            v = ScratchCardPin(p,b,n)
+        datastructure[widget_id] = v
+        datastructure[widget_id+'_p'] = p
+        datastructure[widget_id+'_b'] = b
+        datastructure[widget_id+'_n'] = n
+    ###)
+
+    def validate(self, datastructure, **kw): ###(
+        """Validate datastructure and update datamodel."""
+        s_logger = logging.getLogger('Widgets.ScratchcardPinWidget.validate')
+        widget_id = self.getWidgetId()
+        v = datastructure[widget_id]
+        #import pdb;pdb.set_trace()
+        err = 0
+        mapping = {}
+        prefix= self.prefix
+        if prefix.startswith('@'):
+            prefix= getattr(self,self.prefix[1:])()
+        b = datastructure[widget_id+'_b'].strip()
+        n = datastructure[widget_id+'_n'].strip()
+        pins = self.portal_pins
+        pin = "%(prefix)s%(b)s%(n)s" % vars()
+        pin_str = "%(prefix)s-%(b)s-%(n)s" % vars()
+        do = 1
+        s_id = str(self.portal_membership.getAuthenticatedMember())
+        if self.isStaff():
+            do = 0
+            err ='You are not a Student. PIN neither checked nor used.'
+            s_logger.info('%s tried to use scratch card %s' % (s_id,pin_str))
+        elif len(b) > 1 and b.find('-') > -1:
+            do = 0
+            err = 'PIN must not contain "-"'
+            s_logger.info('%s entered invalid PIN  containing "-"' % (s_id))
+        elif n.find('-') > -1:
+            do = 0
+            err = 'PIN must not contain "-"'
+            s_logger.info('%s entered invalid PIN  containing "-"' % (s_id))
+        elif len(n) != 10:
+            do = 0
+            err = 'Invalid PIN length'
+            s_logger.info('%s entered invalid PIN with length %d' % (s_id,len(n)))
+        elif self.reference == "":
+            ref = s_id
+        else:
+            ref = datastructure[self.reference]
+            if datastructure.errors:
+                do = 0
+                datastructure.setError(widget_id, '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))
+                break
+            elif ok == -2:
+                err = 'Service already is activated but with a different PIN.'
+                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))
+                break
+            if ok == 0:
+                err = 'PIN already used'
+                s_logger.info('%s/%s entered used PIN %s' % (s_id,ref,pin_str))
+                break
+            if ok >= 1:
+                #import pdb;pdb.set_trace()
+                if self.isStudent():
+                    if self.reference == "jamb_reg_no":
+                        err = "You are already logged in."
+                        s_logger.info('%s/%s checked admission with PIN %s though logged in' % (s_id,ref,pin_str))
+                        break
+                    if ok == 1:
+                        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))
+                    break
+                else:
+                    student = getStudentByRegNo(self,ref)
+                    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))
+                    break
+                s_id = student.getId()
+                if ok == 2:
+                    if self.reference == "jamb_reg_no":
+                        if hasattr(self.portal_directories.students,s_id):
+                            err = "Please login with your Student Id ${id} and 10-digit PIN."
+                            mapping = {'id': s_id}
+                            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))
+                    else:
+                        err = "Unknown error"
+                        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))
+                except:
+                    err = "Please login with your Student Id ${id} and 10-digit PIN."
+                    mapping = {'id': s_id}
+                    s_logger.info('%s/%s could not be made a member with PIN %s' % (s_id,ref,pin_str))
+                    break
+            break
+        if err:
+            datastructure.setError(widget_id, err,mapping)
+        else:
+            datamodel = datastructure.getDataModel()
+            datamodel[self.fields[0]] = ScratchCardPin(prefix,b,n)
+            datastructure[widget_id] = ScratchCardPin(prefix,b,n)
+            datastructure[widget_id+'_p'] = prefix
+            datastructure[widget_id+'_b'] = b
+            datastructure[widget_id+'_n'] = n
+            datastructure['s_id'] = s_id
+        return not err
+
+###)
+
+    def render(self, mode, datastructure, **kw): ###(
+        """Render in mode from datastructure."""
+        render_method = 'widget_scratch_card_pin_render'
+        meth = getattr(self, render_method, None)
+        if meth is None:
+            raise RuntimeError("Unknown Render Method %s for widget type %s"
+                               % (render_method, self.getId()))
+
+        # XXX AT: datastructure has to be set again here, in case we're in edit
+        # or create mode, because a default value has to be provided.
+        #import pdb;pdb.set_trace()
+        datamodel = datastructure.getDataModel()
+        v = datamodel[self.fields[0]]
+        if v and type(v) is StringType:
+            try:
+                p,b,n = v.split('-')
+                v = ScratchCardPin(p,b,n)
+            except ValueError:
+                v = ScratchCardPin(self.prefix,'XXX',v)
+                pass
+        if v:
+            prefix= '%s' % v.p
+            b = '%s' % v.b
+            n = '%s' % v.n
+        else:
+            prefix= self.prefix
+            if prefix.startswith('@'):
+                prefix= getattr(self,self.prefix[1:])()
+            b = n = ''
+            v = ScratchCardPin(prefix,b,n)
+        widget_id = self.getWidgetId()
+        datastructure[widget_id] = v
+        datastructure[widget_id+'_p'] = prefix
+        datastructure[widget_id+'_b'] = b
+        datastructure[widget_id+'_n'] = n
+        return meth(mode=mode,
+                    datastructure=datastructure,
+                    )
+    ###)
+
+InitializeClass(ScratchcardPinWidget)
+widgetRegistry.register(ScratchcardPinWidget)
+###)
+
+class PumePinWidget(ScratchcardPinWidget): ###(
+    """ Pume Pin Widget"""
+    meta_type = "Pume Pin Widget"
+    catalog = "applicants_catalog"
+
+    def validate(self, datastructure, **kw): ###(
+        """Validate datastructure and update datamodel."""
+        s_logger = logging.getLogger('Widgets.ScratchcardPinWidget.validate')
+        widget_id = self.getWidgetId()
+        v = datastructure[widget_id]
+        err = 0
+        mapping = {}
+
+        prefix= self.prefix
+        if prefix.startswith('@'):
+            prefix= getattr(self,self.prefix[1:])()
+        b = datastructure[widget_id+'_b'].strip()
+        n = datastructure[widget_id+'_n'].strip()
+        pins = self.portal_pins
+        pin = "%(prefix)s%(b)s%(n)s" % vars()
+        pin_str = "%(prefix)s-%(b)s-%(n)s" % vars()
+        do = 1
+        s_id = str(self.portal_membership.getAuthenticatedMember())
+        if self.isStaff():
+            do = 0
+            err ='You are not a Student. PIN neither checked nor used.'
+            s_logger.info('%s tried to use scratch card %s' % (s_id,pin_str))
+        elif len(b) > 1 and b.find('-') > -1:
+            do = 0
+            err = 'PIN must not contain "-"'
+            s_logger.info('%s entered invalid PIN  containing "-"' % (s_id))
+        elif n.find('-') > -1:
+            do = 0
+            err = 'PIN must not contain "-"'
+            s_logger.info('%s entered invalid PIN  containing "-"' % (s_id))
+        elif len(n) != 10:
+            do = 0
+            err = 'Invalid PIN length'
+            s_logger.info('%s entered invalid PIN with length %d' % (s_id,len(n)))
+        elif self.reference == "":
+            ref = s_id
+        else:
+            ref = datastructure[self.reference]
+            if datastructure.errors:
+                do = 0
+                datastructure.setError(widget_id, '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))
+                break
+            elif ok == -2:
+                err = 'Service already is activated but with a different PIN.'
+                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))
+                break
+            if ok == 0:
+                err = 'PIN already used'
+                s_logger.info('%s/%s entered used PIN %s' % (s_id,ref,pin_str))
+                break
+            if ok >= 1:
+                if self.isStudent():
+                    err = "This is only for Pume application."
+                    s_logger.info('%s/%s applied for screening test with PIN %s' % (s_id,ref,pin_str))
+                    break
+                else:
+                    applicant = datastructure['record']
+                    if not applicant.pin:
+                        s_logger.info('%s successfully used PIN %s' % (ref,pin_str))
+                        d = {}
+                        d['reg_no'] = applicant.reg_no
+                        d['pin'] = pin_str
+                        d['status'] = 'entered'
+                        getattr(self,self.catalog).modifyRecord(**d)
+                    elif applicant.pin != pin_str:
+                        s_logger.info('%s/%s tried to enter application record with different PIN %s' % (s_id,ref,pin_str))
+                    elif applicant.pin == pin_str:
+                        s_logger.info('%s/%s repeatedly entered application record with PIN %s' % (s_id,ref,pin_str))
+            break
+        if err:
+            datastructure.setError(widget_id, err,mapping)
+        else:
+            datamodel = datastructure.getDataModel()
+            datamodel[self.fields[0]] = ScratchCardPin(prefix,b,n)
+            datastructure[widget_id] = ScratchCardPin(prefix,b,n)
+            datastructure[widget_id+'_p'] = prefix
+            datastructure[widget_id+'_b'] = b
+            datastructure[widget_id+'_n'] = n
+            datastructure['s_id'] = s_id
+        return not err
+    ###)
+
+    def render(self, mode, datastructure, **kw): ###(
+        """Render in mode from datastructure."""
+        render_method = 'widget_scratch_card_pin_render'
+        meth = getattr(self, render_method, None)
+        if meth is None:
+            raise RuntimeError("Unknown Render Method %s for widget type %s"
+                               % (render_method, self.getId()))
+
+        # XXX AT: datastructure has to be set again here, in case we're in edit
+        # or create mode, because a default value has to be provided.
+        #import pdb;pdb.set_trace()
+        datamodel = datastructure.getDataModel()
+        v = datamodel[self.fields[0]]
+        #import pdb;pdb.set_trace()
+        if v and type(v) is StringType:
+            try:
+                p,b,n = v.split('-')
+                v = ScratchCardPin(p,b,n)
+            except ValueError:
+                v = ScratchCardPin(self.prefix,'XXX',v)
+                pass
+        if v:
+            prefix= '%s' % v.p
+            b = '%s' % v.b
+            n = '%s' % v.n
+        else:
+            prefix= self.prefix
+            if prefix.startswith('@'):
+                prefix= getattr(self,self.prefix[1:])()
+            b = n = ''
+            v = ScratchCardPin(prefix,b,n)
+        widget_id = self.getWidgetId()
+        datastructure[widget_id] = v
+        datastructure[widget_id+'_p'] = prefix
+        datastructure[widget_id+'_b'] = b
+        datastructure[widget_id+'_n'] = n
+        return meth(mode=mode,
+                    datastructure=datastructure,
+                    )
+    ###)
+
+InitializeClass(PumePinWidget)
+widgetRegistry.register(PumePinWidget)
+###)
+
+class WAeUPImageWidget(CPSImageWidget): ###(
+    """Photo widget."""
+    meta_type = 'WAeUP Image Widget'
+
+    def render(self, mode, datastructure, **kw):
+        render_method = 'widget_waeup_image_render'
+        meth = getattr(self, render_method, None)
+        if meth is None:
+            raise RuntimeError("Unknown Render Method %s for widget type %s"
+                               % (render_method, self.getId()))
+        img_info = self.getImageInfo(datastructure)
+        return meth(mode=mode, datastructure=datastructure, **img_info)
+
+InitializeClass(WAeUPImageWidget)
+
+widgetRegistry.register(WAeUPImageWidget)
+###)
+
+class NoZodbImageWidget(CPSImageWidget): ###(
+    """Image widget with filesystem storage."""
+    meta_type = 'No Zodb Image Widget'
+    _properties = CPSImageWidget._properties +\
+    (
+     {'id': 'path', 'type': 'string', 'mode': 'w',
+      'label': 'Relative Path'},
+     {'id': 'id_field', 'type': 'string', 'mode': 'w',
+      'label': 'Field to build the id'},
+    )
+    path = "images"
+    storage_path = "%s/import/%s" % (i_home,path)
+    id_field = "reg_no"
+
+    def getImageInfo(self, datastructure): ###(
+        """Get the file info from the datastructure."""
+        #import pdb; pdb.set_trace()
+        widget_id = self.getWidgetId()
+        if  datastructure.has_key(widget_id):
+            fileupload = datastructure[widget_id]
+            dm = datastructure.getDataModel()
+            field_id = self.fields[0]
+            content_url = "/uniben/viewimage?path=%s/%s_%s.jpg" %\
+                                    (self.path,
+                                    datastructure[self.id_field],
+                                    self.getWidgetId(),
+                                    )
+            current_filename = "%s_%s.jpg" % (datastructure[self.id_field],
+                                            field_id,)
+            file_path = "/%s/%s" % (self.storage_path,
+                                        current_filename)
+        else:
+            file_path = "XXX"
+        # read the file from the filesystem
+        if not os.path.exists(file_path):
+            height = -1
+            width = -1
+            empty_file = True
+            session_file = False
+            current_filename = ''
+            content_url = ''
+            size = 0
+            mimetype = ''
+            last_modified = ''
+            height = ''
+            width = ''
+
+        else:
+            image = open(file_path)
+            from OFS.Image import getImageInfo as getImageInfoOFS
+            image.seek(0)
+            data = image.read(2000)
+            size = len(data)
+            empty_file = size == 0
+            session_file = False
+            last_modified = ''
+            image.close()
+            mimetype, width, height = getImageInfoOFS(data)
+
+            if width < 0:
+                width = None
+            if height < 0:
+                height = None
+
+            if (self.allow_resize
+                and height is not None
+                and width  is not None):
+                z_w = z_h = 1
+                h = int(self.display_height)
+                w = int(self.display_width)
+                if w and h:
+                    if w < width:
+                        z_w = w / float(width)
+                    if h < height:
+                        z_h = h / float(height)
+                    zoom = min(z_w, z_h)
+                    width = int(zoom * width)
+                    height = int(zoom * height)
+                #import pdb;pdb.set_trace()
+        image_info = {
+            'empty_file': empty_file,
+            'session_file': session_file,
+            'current_filename': current_filename,
+            'size': size,
+            'last_modified': last_modified,
+            'content_url': content_url,
+            'mimetype': mimetype,
+            }
+        title = image_info['current_filename']
+        alt = title or ''
+        #height = int(self.display_height)
+        #width = int(self.display_width)
+        if height is None or width is None:
+            tag = renderHtmlTag('img', src=image_info['content_url'],
+                                alt=alt, title=title)
+        else:
+            tag = renderHtmlTag('img', src=image_info['content_url'],
+                                width=str(width), height=str(height),
+                                alt=alt, title=title)
+
+        image_info['height'] = height
+        image_info['width'] = width
+        image_info['image_tag'] = tag
+        return image_info
+    ###)
+
+
+    def checkFileName(self, filename, mimetype):
+        return '', {}
+        if mimetype and mimetype.startswith('image'):
+            return '', {}
+        return 'cpsschemas_err_image', {}
+
+    def prepare(self, datastructure, **kw): ###(
+        """Prepare datastructure from datamodel."""
+        datamodel = datastructure.getDataModel()
+        widget_id = self.getWidgetId()
+        file_name = datamodel[self.fields[0]]
+        #import pdb; pdb.set_trace()
+        if self.allow_resize:
+            datastructure[self.getWidgetId() + '_resize'] = ''
+        datastructure[widget_id] = file_name
+        datastructure[widget_id + '_choice'] = 'change'
+        title = 'Passport Foto'
+        datastructure[widget_id + '_filename'] = title
+    ###)
+
+    def validate(self, datastructure, **kw): ###(
+        """Update datamodel from user data in datastructure.
+        """
+        logger = logging.getLogger('Widgets.NoZodbImageWidget.validate')
+        datamodel = datastructure.getDataModel()
+        field_id = self.fields[0]
+        widget_id = self.getWidgetId()
+        store = False
+        fileupload = None
+        mimetype = None
+        old_file = datamodel[field_id]
+        # if old_file is not None:
+        #     old_filename = old_file.title
+        # else:
+        #     old_filename = ''
+        choice = datastructure[widget_id+'_choice']
+        fileupload = datastructure[widget_id]
+        is_upload = isinstance(fileupload, FileUpload)
+        #import pdb; pdb.set_trace()
+        if not is_upload and not datamodel[field_id]:
+            if self.is_required:
+                return self.validateError('Picture upload required', {},
+                                          datastructure)
+        if choice == 'delete':
+            if self.is_required:
+                return self.validateError('cpsschemas_err_required', {},
+                                          datastructure)
+            datamodel[field_id] = None
+        elif choice == 'keep':
+            fileupload = datastructure[widget_id]
+            if isinstance(fileupload, PersistableFileUpload):
+                # Keeping something from the session means we
+                # actually want to store it.
+                store = True
+            # else:
+            #     # Nothing to change, don't pollute datastructure
+            #     # with something costly already stored, which therefore
+            #     # doesn't need to be kept in the session.
+            #     self.unprepare(datastructure)
+        elif choice == 'change' and is_upload:
+            if not fileupload:
+                return self.validateError('cpsschemas_err_file_empty', {},
+                                          datastructure)
+            if not isinstance(fileupload, FileUpload):
+                return self.validateError('cpsschemas_err_file', {},
+                                          datastructure)
+            fileupload.seek(0, 2) # end of file
+            size = fileupload.tell()
+            if not size:
+                return self.validateError('cpsschemas_err_file_empty', {},
+                                          datastructure)
+            if self.size_max and size > self.size_max:
+                max_size_str = self.getHumanReadableSize(self.size_max)
+                err = 'This file is too big, the allowed max size is ${max_size}'
+                logger.info('%s tried to upload picture with size %dk' %(datastructure['reg_no'],int(size)/1000) )
+                err_mapping = {'max_size': max_size_str}
+                return self.validateError(err, err_mapping, datastructure)
+            store = True
+
+
+        # Find filename
+        if is_upload and store:
+            ext ='jpg'
+            filename = "%s_%s.%s" % (datastructure[self.id_field],
+                                 self.getWidgetId(),
+                                 ext)
+            datamodel[field_id] = filename
+            registry = getToolByName(self, 'mimetypes_registry')
+            mimetype = registry.lookupExtension(filename.lower())
+            if mimetype is not None:
+                mimetype = str(mimetype) # normalize
+            # Set/update data
+            # file_path = "%s_%s.jpg" % (datamodel[self.id_field],
+            #                            field_id,)
+            full_path = "%s/%s" % (self.storage_path, filename)
+            #import pdb; pdb.set_trace()
+            file = self.makeFile(filename, fileupload, datastructure)
+            # Fixup mimetype
+            if mimetype and file.content_type != mimetype:
+                file.content_type = mimetype
+            # Store the file in the filesystem
+            if not os.path.exists(self.storage_path):
+                os.mkdir(self.storage_path)
+            #import pdb;pdb.set_trace()
+            pict = open(full_path,"w")
+            fileupload.seek(0)
+            pict.write(fileupload.read())
+            pict.close()
+
+
+        return True
+
+###)
+
+    def render(self, mode, datastructure, **kw): ###(
+        render_method = 'widget_passport_render'
+        meth = getattr(self, render_method, None)
+        if meth is None:
+            raise RuntimeError("Unknown Render Method %s for widget type %s"
+                               % (render_method, self.getId()))
+        img_info = self.getImageInfo(datastructure)
+        return meth(mode=mode, datastructure=datastructure, **img_info)
+    ###)
+
+InitializeClass(NoZodbImageWidget)
+
+widgetRegistry.register(NoZodbImageWidget)
+###)
+
+
+###########
+
Index: WAeUP_SRP/trunk_not_used/Workflows/WAeUPWorkflow.py
===================================================================
--- WAeUP_SRP/trunk_not_used/Workflows/WAeUPWorkflow.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/Workflows/WAeUPWorkflow.py	(revision 2226)
@@ -0,0 +1,684 @@
+#-*- mode: python; mode: fold -*-
+""" WAeUP Workflfow
+"""
+
+__author__ = "Joachim Schmitz <js@aixtraware.de>"
+
+import os, sys
+from zLOG import LOG, INFO, DEBUG
+
+from Products.CMFCore.permissions import View, ModifyPortalContent
+#from Products.WAeUP.permissions import 
+
+from Products.CPSWorkflow.transitions import \
+     TRANSITION_INITIAL_CREATE, \
+     TRANSITION_ALLOWSUB_CHECKOUT, \
+     TRANSITION_ALLOWSUB_CREATE, \
+     TRANSITION_ALLOWSUB_DELETE, \
+     TRANSITION_ALLOWSUB_MOVE, \
+     TRANSITION_ALLOWSUB_COPY
+
+from Products.DCWorkflow.Transitions import \
+     TRIGGER_USER_ACTION
+
+def waeupWorkflowsInstall(self):
+    """Install the workflow for the WAeUP Types
+    """
+
+    portal = self.portal_url.getPortalObject()
+    wftool = portal.portal_workflow
+
+    wfids = wftool.objectIds()
+    wfid = 'waeup_section_wf' ###(
+
+    if wfid in wfids:
+        wftool.manage_delObjects([wfid])
+
+    wftool.manage_addWorkflow(id=wfid,
+                              workflow_type='cps_workflow (Web-configurable workflow for CPS)')
+
+    wf = wftool[wfid]
+
+    for p in (View,
+              ModifyPortalContent,
+             ):
+        wf.addManagedPermission(p)
+
+    ###########################################################################
+    ###########################################################################
+
+    #                                  STATES
+
+    ###########################################################################
+    ###########################################################################
+
+    for s in ('work',
+             ):
+        wf.states.addState(s)
+
+    ##########################################################################
+    #                                  WORK
+    ##########################################################################
+
+    s = wf.states.get('work')
+
+    s.setPermission(View, 1, ('Student',))
+    s.setPermission(ModifyPortalContent, 1, ('StudentManager','UniversityManager',))
+
+    s.setInitialState('work')
+    s.setProperties(title='Work',
+                    description='',
+                    transitions=('create_content',
+                                 'cut_copy_paste',
+                                 'close',),)
+
+    ##########################################################################
+    #                                  CLOSED ###(
+    ##########################################################################
+
+##    s = wf.states.get('closed')
+##
+##    s.setPermission(View, 1, ('ChatPoster',))
+##    s.setPermission(ModifyPortalContent, 1, ('ChatModerator',))
+##    s.setPermission(chatReply, 1, ('ChatModerator',))
+##    s.setPermission(chatPost, 1, ('ChatModerator',))
+##    s.setPermission(chatModerate, 1, ('ChatModerator',))
+
+##    s.setProperties(title='Closed',
+##                    description='',
+##                    transitions=('unclose',
+##                                 'cut_copy_paste',),)
+##
+    ###########################################################################
+    ###########################################################################
+###)
+
+    #                               TRANSITIONS
+
+    ###########################################################################
+    ###########################################################################
+
+    for t in ('create',
+              'create_content',
+              'cut_copy_paste',
+              ):
+        wf.transitions.addTransition(t)
+
+
+    ###########################################################################
+    #                                 CREATE
+    ###########################################################################
+
+    t = wf.transitions.get('create')
+    t.setProperties(title='Initial creation',
+                    description='Intial transition like',
+                    new_state_id='work',
+                    transition_behavior=(TRANSITION_INITIAL_CREATE, ),
+                    clone_allowed_transitions=None,
+                    actbox_name='', actbox_category='workflow', actbox_url='',
+                    props={'guard_permissions':'',
+                           'guard_roles':'Manager; StudentManager; UniversityManager',
+                           'guard_expr':''},)
+
+    ###########################################################################
+    #                                  CREATE CONTENT
+    ###########################################################################
+
+    t = wf.transitions.get('create_content')
+    t.setProperties(title='Create content',
+                    description='Allow sub Object Create',
+                    new_state_id='work',
+                    transition_behavior=(TRANSITION_ALLOWSUB_CREATE,
+                                         TRANSITION_ALLOWSUB_CHECKOUT,),
+                    trigger_type=TRIGGER_USER_ACTION,
+                    actbox_name='New',
+                    actbox_category='',
+                    actbox_url='',
+                    props={'guard_permissions':'',
+                           'guard_roles':'Manager; StudentManager ; UniversityManager',
+                           'guard_expr':''},)
+
+    ##########################################################################
+    #                                  CUT/COPY/PASTE
+    ##########################################################################
+
+    t = wf.transitions.get('cut_copy_paste')
+    t.setProperties(title='Cut/Copy/Paste',
+                    new_state_id='work',
+                    transition_behavior=(TRANSITION_ALLOWSUB_DELETE,
+                                         TRANSITION_ALLOWSUB_MOVE,
+                                         TRANSITION_ALLOWSUB_COPY),
+                    clone_allowed_transitions=None,
+                    trigger_type=TRIGGER_USER_ACTION,
+                    actbox_name='New',
+                    actbox_category='',
+                    actbox_url='',
+                    props={'guard_permissions':'',
+                           'guard_roles':'Manager; StudentManager ; UniversityManager',
+                           'guard_expr':''},)
+
+    ##########################################################################
+    #                                  CLOSE ###(
+    ##########################################################################
+
+##    t = wf.transitions.get('close')
+##    t.setProperties(title='close',
+##                    new_state_id='closed',
+##                    transition_behavior=(),
+##                    clone_allowed_transitions=None,
+##                    trigger_type=TRIGGER_USER_ACTION,
+##                    actbox_name='label_chat_close',
+##                    actbox_category='workflow',
+##                    actbox_url='%(content_url)s/cps_chat_close',
+##                    props={'guard_permissions':'',
+##                           'guard_roles':'Manager; SectionManager; SectionReviewer',
+##                           'guard_expr':''},)
+##
+##    ##########################################################################
+##    #                                  UNCLOSE
+##    ##########################################################################
+##
+##    t = wf.transitions.get('unclose')
+##    t.setProperties(title='unclose',
+##                    new_state_id='work',
+##                    transition_behavior=(),
+##                    clone_allowed_transitions=None,
+##                    trigger_type=TRIGGER_USER_ACTION,
+##                    actbox_name='label_chat_unclose',
+##                    actbox_category='workflow',
+##                    actbox_url='%(content_url)s/cps_chat_unclose',
+##                    props={'guard_permissions':'',
+##                           'guard_roles':'Manager; SectionManager; SectionReviewer',
+##                           'guard_expr':''},)
+
+###)
+
+    ################################################################
+    #                 VARIABLES
+    ################################################################
+
+    for v in ('action',
+              'actor',
+              'comments',
+              'review_history',
+              'time',
+              'dest_container',
+              ):
+        wf.variables.addVariable(v)
+
+
+    wf.variables.setStateVar('review_state')
+
+    vdef = wf.variables['action']
+    vdef.setProperties(description='The last transition',
+                       default_expr='transition/getId|nothing',
+                       for_status=1, update_always=1)
+
+    vdef = wf.variables['actor']
+    vdef.setProperties(description='The ID of the user who performed '
+                       'the last transition',
+                       default_expr='user/getId',
+                       for_status=1, update_always=1)
+
+    vdef = wf.variables['comments']
+    vdef.setProperties(description='Comments about the last transition',
+                       default_expr="python:state_change.kwargs.get('comment', '')",
+                       for_status=1, update_always=1)
+
+    vdef = wf.variables['review_history']
+    vdef.setProperties(description='Provides access to workflow history',
+                       default_expr="state_change/getHistory",
+                       props={'guard_permissions':'',
+                              'guard_roles':'Manager; WorkspaceManager; WorkspaceMember; WorkspaceReader; Member',
+                              'guard_expr':''})
+
+    vdef = wf.variables['time']
+    vdef.setProperties(description='Time of the last transition',
+                       default_expr="state_change/getDateTime",
+                       for_status=1, update_always=1)
+
+    vdef = wf.variables['dest_container']
+    vdef.setProperties(description='Destination container for the last paste/publish',
+                       default_expr="python:state_change.kwargs.get('dest_container', '')",
+                       for_status=1, update_always=1)
+
+
+    ######################################################################################
+    ######################################################################################
+###)
+
+    wfid = 'waeup_student_wf' ###(
+
+    if wfid in wfids:
+        wftool.manage_delObjects([wfid])
+
+    wftool.manage_addWorkflow(id=wfid,
+                              workflow_type='cps_workflow (Web-configurable workflow for CPS)')
+
+    wf = wftool[wfid]
+
+    for p in (View,
+              ModifyPortalContent,
+             ):
+        wf.addManagedPermission(p)
+
+    ###########################################################################
+    ###########################################################################
+
+    #                                  STATES
+
+    ###########################################################################
+    ###########################################################################
+
+    for s in ('work',
+             ):
+        wf.states.addState(s)
+
+    ##########################################################################
+    #                                  WORK
+    ##########################################################################
+
+    s = wf.states.get('work')
+
+    s.setPermission(View, 1, ('Student',))
+    s.setPermission(ModifyPortalContent, 1, ('StudentManager','UniversityManager','Student'))
+
+    s.setInitialState('work')
+    s.setProperties(title='Work',
+                    description='',
+                    transitions=('create_content',
+                                 'cut_copy_paste',
+                                 'close',),)
+
+    ##########################################################################
+    #                                  CLOSED ###(
+    ##########################################################################
+
+##    s = wf.states.get('closed')
+##
+##    s.setPermission(View, 1, ('ChatPoster',))
+##    s.setPermission(ModifyPortalContent, 1, ('ChatModerator',))
+##    s.setPermission(chatReply, 1, ('ChatModerator',))
+##    s.setPermission(chatPost, 1, ('ChatModerator',))
+##    s.setPermission(chatModerate, 1, ('ChatModerator',))
+
+##    s.setProperties(title='Closed',
+##                    description='',
+##                    transitions=('unclose',
+##                                 'cut_copy_paste',),)
+##
+    ###########################################################################
+    ###########################################################################
+###)
+
+
+    #                               TRANSITIONS
+
+    ###########################################################################
+    ###########################################################################
+
+    for t in ('create',
+              'create_content',
+              'cut_copy_paste',
+              ):
+        wf.transitions.addTransition(t)
+
+
+    ###########################################################################
+    #                                 CREATE
+    ###########################################################################
+
+    t = wf.transitions.get('create')
+    t.setProperties(title='Initial creation',
+                    description='Intial transition like',
+                    new_state_id='work',
+                    transition_behavior=(TRANSITION_INITIAL_CREATE, ),
+                    clone_allowed_transitions=None,
+                    actbox_name='', actbox_category='workflow', actbox_url='',
+                    props={'guard_permissions':'',
+                           'guard_roles':'Manager; StudentManager; UniversityManager; Student',
+                           'guard_expr':''},)
+
+    ###########################################################################
+    #                                  CREATE CONTENT
+    ###########################################################################
+
+    t = wf.transitions.get('create_content')
+    t.setProperties(title='Create content',
+                    description='Allow sub Object Create',
+                    new_state_id='work',
+                    transition_behavior=(TRANSITION_ALLOWSUB_CREATE,
+                                         TRANSITION_ALLOWSUB_CHECKOUT,),
+                    trigger_type=TRIGGER_USER_ACTION,
+                    actbox_name='New',
+                    actbox_category='',
+                    actbox_url='',
+                    props={'guard_permissions':'',
+                           'guard_roles':'Manager; StudentManager ; UniversityManager; Student',
+                           'guard_expr':''},)
+
+    ##########################################################################
+    #                                  CUT/COPY/PASTE
+    ##########################################################################
+
+    t = wf.transitions.get('cut_copy_paste')
+    t.setProperties(title='Cut/Copy/Paste',
+                    new_state_id='work',
+                    transition_behavior=(TRANSITION_ALLOWSUB_DELETE,
+                                         TRANSITION_ALLOWSUB_MOVE,
+                                         TRANSITION_ALLOWSUB_COPY),
+                    clone_allowed_transitions=None,
+                    trigger_type=TRIGGER_USER_ACTION,
+                    actbox_name='New',
+                    actbox_category='',
+                    actbox_url='',
+                    props={'guard_permissions':'',
+                           'guard_roles':'Manager; StudentManager ; UniversityManager',
+                           'guard_expr':''},)
+
+    ##########################################################################
+    #                                  CLOSE ###(
+    ##########################################################################
+
+##    t = wf.transitions.get('close')
+##    t.setProperties(title='close',
+##                    new_state_id='closed',
+##                    transition_behavior=(),
+##                    clone_allowed_transitions=None,
+##                    trigger_type=TRIGGER_USER_ACTION,
+##                    actbox_name='label_chat_close',
+##                    actbox_category='workflow',
+##                    actbox_url='%(content_url)s/cps_chat_close',
+##                    props={'guard_permissions':'',
+##                           'guard_roles':'Manager; SectionManager; SectionReviewer',
+##                           'guard_expr':''},)
+##
+##    ##########################################################################
+##    #                                  UNCLOSE
+##    ##########################################################################
+##
+##    t = wf.transitions.get('unclose')
+##    t.setProperties(title='unclose',
+##                    new_state_id='work',
+##                    transition_behavior=(),
+##                    clone_allowed_transitions=None,
+##                    trigger_type=TRIGGER_USER_ACTION,
+##                    actbox_name='label_chat_unclose',
+##                    actbox_category='workflow',
+##                    actbox_url='%(content_url)s/cps_chat_unclose',
+##                    props={'guard_permissions':'',
+##                           'guard_roles':'Manager; SectionManager; SectionReviewer',
+##                           'guard_expr':''},)
+
+###)
+
+    ################################################################
+    #                 VARIABLES
+    ################################################################
+
+    for v in ('action',
+              'actor',
+              'comments',
+              'review_history',
+              'time',
+              'dest_container',
+              ):
+        wf.variables.addVariable(v)
+
+
+    wf.variables.setStateVar('review_state')
+
+    vdef = wf.variables['action']
+    vdef.setProperties(description='The last transition',
+                       default_expr='transition/getId|nothing',
+                       for_status=1, update_always=1)
+
+    vdef = wf.variables['actor']
+    vdef.setProperties(description='The ID of the user who performed '
+                       'the last transition',
+                       default_expr='user/getId',
+                       for_status=1, update_always=1)
+
+    vdef = wf.variables['comments']
+    vdef.setProperties(description='Comments about the last transition',
+                       default_expr="python:state_change.kwargs.get('comment', '')",
+                       for_status=1, update_always=1)
+
+    vdef = wf.variables['review_history']
+    vdef.setProperties(description='Provides access to workflow history',
+                       default_expr="state_change/getHistory",
+                       props={'guard_permissions':'',
+                              'guard_roles':'Manager; WorkspaceManager; WorkspaceMember; WorkspaceReader; Member',
+                              'guard_expr':''})
+
+    vdef = wf.variables['time']
+    vdef.setProperties(description='Time of the last transition',
+                       default_expr="state_change/getDateTime",
+                       for_status=1, update_always=1)
+
+    vdef = wf.variables['dest_container']
+    vdef.setProperties(description='Destination container for the last paste/publish',
+                       default_expr="python:state_change.kwargs.get('dest_container', '')",
+                       for_status=1, update_always=1)
+
+
+    ######################################################################################
+    ######################################################################################
+###)
+
+    wfid = 'waeup_workspace_wf' ###(
+
+    if wfid in wfids:
+        wftool.manage_delObjects([wfid])
+
+    wftool.manage_addWorkflow(id=wfid,
+                              workflow_type='cps_workflow (Web-configurable workflow for CPS)')
+
+    wf = wftool[wfid]
+
+    for p in (View,
+              ModifyPortalContent,
+              ):
+        wf.addManagedPermission(p)
+
+    ###########################################################################
+    ###########################################################################
+
+    #                                  STATES
+
+    ###########################################################################
+    ###########################################################################
+
+    for s in ('work',
+              'closed'):
+        wf.states.addState(s)
+
+    ##########################################################################
+    #                                  WORK
+    ##########################################################################
+
+    s = wf.states.get('work')
+
+##    s.setPermission(View, 1, ('ChatPoster',))
+##    s.setPermission(ModifyPortalContent, 1, ('ChatModerator',))
+##    s.setPermission(chatReply, 1, ('ChatModerator', 'ChatGuest',))
+##    s.setPermission(chatPost, 1, ('ChatModerator', 'ChatPoster', 'ChatGuest',))
+##    s.setPermission(chatModerate, 1, ('ChatModerator',))
+
+    s.setInitialState('work')
+    s.setProperties(title='Work',
+                    description='',
+                    transitions=('create_content',
+                                 'cut_copy_paste',
+                                 'close',),)
+
+
+    ##########################################################################
+    #                                  CLOSED
+    ##########################################################################
+
+    s = wf.states.get('closed')
+
+##    s.setPermission(View, 1, ('ChatPoster',))
+##    s.setPermission(ModifyPortalContent, 1, ('ChatModerator',))
+##    s.setPermission(chatReply, 1, ('ChatModerator',))
+##    s.setPermission(chatPost, 1, ('ChatModerator',))
+##    s.setPermission(chatModerate, 1, ('ChatModerator',))
+
+    s.setProperties(title='Closed',
+                    description='',
+                    transitions=('unclose',
+                                 'cut_copy_paste',),)
+
+    ###########################################################################
+    ###########################################################################
+
+    #                               TRANSITIONS
+
+    ###########################################################################
+    ###########################################################################
+
+    for t in ('create',
+              'create_content',
+              'cut_copy_paste',
+              'close',
+              'unclose',):
+        wf.transitions.addTransition(t)
+
+
+    ###########################################################################
+    #                                 CREATE
+    ###########################################################################
+
+    t = wf.transitions.get('create')
+    t.setProperties(title='Initial creation',
+                    description='Intial transition like',
+                    new_state_id='work',
+                    transition_behavior=(TRANSITION_INITIAL_CREATE, ),
+                    clone_allowed_transitions=None,
+                    actbox_name='', actbox_category='workflow', actbox_url='',
+                    props={'guard_permissions':'',
+                           'guard_roles':'Manager; WorkspaceManager',
+                           'guard_expr':''},)
+
+    ###########################################################################
+    #                                  CREATE CONTENT
+    ###########################################################################
+
+    t = wf.transitions.get('create_content')
+    t.setProperties(title='Create content',
+                    description='Allow sub Object Create',
+                    new_state_id='work',
+                    transition_behavior=(TRANSITION_ALLOWSUB_CREATE,
+                                         TRANSITION_ALLOWSUB_CHECKOUT,),
+                    trigger_type=TRIGGER_USER_ACTION,
+                    actbox_name='New',
+                    actbox_category='',
+                    actbox_url='',
+                    props={'guard_permissions':'',
+                           'guard_roles':'Manager; WorkspaceManager; WorkspaceMember; WorkspaceReader',
+                           'guard_expr':''},)
+
+    ##########################################################################
+    #                                  CUT/COPY/PASTE
+    ##########################################################################
+
+    t = wf.transitions.get('cut_copy_paste')
+    t.setProperties(title='Cut/Copy/Paste',
+                    new_state_id='work',
+                    transition_behavior=(TRANSITION_ALLOWSUB_DELETE,
+                                         TRANSITION_ALLOWSUB_MOVE,
+                                         TRANSITION_ALLOWSUB_COPY),
+                    clone_allowed_transitions=None,
+                    trigger_type=TRIGGER_USER_ACTION,
+                    actbox_name='New',
+                    actbox_category='',
+                    actbox_url='',
+                    props={'guard_permissions':'',
+                           'guard_roles':'Manager; WorkspaceManager; WorkspaceMember',
+                           'guard_expr':''},)
+
+##    ##########################################################################
+##    #                                  CLOSE
+##    ##########################################################################
+##
+##    t = wf.transitions.get('close')
+##    t.setProperties(title='close',
+##                    new_state_id='closed',
+##                    transition_behavior=(),
+##                    clone_allowed_transitions=None,
+##                    trigger_type=TRIGGER_USER_ACTION,
+##                    actbox_name='label_chat_close',
+##                    actbox_category='workflow',
+##                    actbox_url='%(content_url)s/cps_chat_close',
+##                    props={'guard_permissions':'',
+##                           'guard_roles':'Manager; WorkspaceManager',
+##                           'guard_expr':''},)
+##
+##    ##########################################################################
+##    #                                  UNCLOSE
+##    ##########################################################################
+##
+##    t = wf.transitions.get('unclose')
+##    t.setProperties(title='unclose',
+##                    new_state_id='work',
+##                    transition_behavior=(),
+##                    clone_allowed_transitions=None,
+##                    trigger_type=TRIGGER_USER_ACTION,
+##                    actbox_name='label_chat_unclose',
+##                    actbox_category='workflow',
+##                    actbox_url='%(content_url)s/cps_chat_unclose',
+##                    props={'guard_permissions':'',
+##                           'guard_roles':'Manager; WorkspaceManager; ChatModerator',
+##                           'guard_expr':''},)
+
+    ################################################################
+    #                 VARIABLES
+    ################################################################
+
+    for v in ('action',
+              'actor',
+              'comments',
+              'review_history',
+              'time',
+              'dest_container',
+              ):
+        wf.variables.addVariable(v)
+
+
+    wf.variables.setStateVar('review_state')
+
+    vdef = wf.variables['action']
+    vdef.setProperties(description='The last transition',
+                       default_expr='transition/getId|nothing',
+                       for_status=1, update_always=1)
+
+    vdef = wf.variables['actor']
+    vdef.setProperties(description='The ID of the user who performed '
+                       'the last transition',
+                       default_expr='user/getId',
+                       for_status=1, update_always=1)
+
+    vdef = wf.variables['comments']
+    vdef.setProperties(description='Comments about the last transition',
+                       default_expr="python:state_change.kwargs.get('comment', '')",
+                       for_status=1, update_always=1)
+
+    vdef = wf.variables['review_history']
+    vdef.setProperties(description='Provides access to workflow history',
+                       default_expr="state_change/getHistory",
+                       props={'guard_permissions':'',
+                              'guard_roles':'Manager; WorkspaceManager; WorkspaceMember; WorkspaceReader; Member',
+                              'guard_expr':''})
+
+    vdef = wf.variables['time']
+    vdef.setProperties(description='Time of the last transition',
+                       default_expr="state_change/getDateTime",
+                       for_status=1, update_always=1)
+
+    vdef = wf.variables['dest_container']
+    vdef.setProperties(description='Destination container for the last paste/publish',
+                       default_expr="python:state_change.kwargs.get('dest_container', '')",
+                       for_status=1, update_always=1)
+
+###)
Index: WAeUP_SRP/trunk_not_used/Workflows/__init__.py
===================================================================
--- WAeUP_SRP/trunk_not_used/Workflows/__init__.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/Workflows/__init__.py	(revision 2226)
@@ -0,0 +1,1 @@
+# Make this a module
Index: WAeUP_SRP/trunk_not_used/__init__.py
===================================================================
--- WAeUP_SRP/trunk_not_used/__init__.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/__init__.py	(revision 2226)
@@ -0,0 +1,131 @@
+#-*- mode: python; mode: fold -*-
+# $Id$
+from Products.CMFCore.utils import ContentInit, ToolInit
+from Products.CMFCore.DirectoryView import registerDirectory
+from Products.CMFCore import utils as cmfutils
+from Products.CMFCore.permissions import AddPortalContent
+
+from Products.GenericSetup import profile_registry
+from Products.GenericSetup import EXTENSION
+
+from Products.CPSCore.interfaces import ICPSSite
+from Products.CPSDirectory.DirectoryTool import DirectoryTypeRegistry
+
+import PatchCPSWorkflowWorkflowDefinition
+import PatchCatalogToolXMLAdapter
+import PatchCPSSchemasAttributeStorageAdapter
+import PatchCPSSchemasDataModel
+import PatchCPSSchemasVocabulariesTool
+import PatchCPSMembershipTool
+import PatchCPSUserFolderUserFolder
+import PatchCPSStackingDirectoryStorageAdapter
+import PatchBasicWidgetsCPSStringWidget
+import PatchExtendedWidgetsCPSDateTimeWidget
+import PatchBasicWidgetsUnprepare
+import PatchFasterSessionData
+import PatchQueueCatalogProcessQueue
+import PatchZCatalogCatalogUpdateMetadata
+# Only for CPS 3.4.1. In 3.4.2 and later this should be fixed.
+import PatchCPSDefaultImportExport
+import PatchRenderActionIcon
+#import PatchZODBConnectionOpen
+import PatchLocalizerMessageCatalog_gettext
+import Products.WAeUP_SRP.WAeUPPermissions
+import WAeUPTool
+
+import Widgets
+tools = (WAeUPTool.WAeUPTool,)
+
+waeup_types = (
+    ("University",('University',)),
+    ("Academics",
+       ("AcademicsFolder",
+        "Certificate",
+        "CertificateCourse",
+        "Faculty",
+        "Department",
+        "Course",
+        "CertificateCourse",
+        "StudyLevel",
+        )
+     ),
+     ("Accommodation",
+        ("AccoFolder",
+         "AccoHall",
+         )
+     ),
+     ("Payment",
+        ("PaymentsFolder",
+         "Payment",
+         )
+     ),
+     ("Students",
+        ("StudentsFolder",
+         "Student",
+         "StudentAccommodation",
+         "StudentStudyCourse",
+         "StudentCourseResult",
+         "StudentApplication",
+         "StudentPume",
+         "StudentClearance",
+         "StudentPersonal",
+         "StudentStudyLevel",
+         #"Semester",
+         "StudentCourseResult",
+         # move to Academics later
+         #"Semester",
+         )
+      ),
+     ("ScratchCards",
+         ("ScratchCardBatch",
+          "ScratchCardBatchesFolder",
+         )
+     ),
+     ("Documents",
+        ("DocumentsFolder",
+         "WAeUPDocument",
+        )
+     ),       
+    )
+
+contentClasses = []
+cc = []
+for modu,names in waeup_types:
+    mod = __import__('Products.WAeUP_SRP.%(modu)s' % vars(),
+                globals(),
+                locals(),
+                ['*',]
+                )
+    for name in names:
+        #print name
+        contentClasses.append(getattr(mod,name))
+        cc.append(getattr(mod,"add%(name)s" % vars()))
+contentConstructors = tuple(cc)
+
+fti = [{} for t in range(len(contentConstructors))]
+
+registerDirectory('skins', globals())
+
+def initialize(registrar):
+    ToolInit('WAeUP Tool',
+              tools=tools,
+              icon='tool.gif',
+              ).initialize(registrar)
+    ContentInit('WAeUP Types',
+                content_types = contentClasses,
+                permission = AddPortalContent,
+                extra_constructors = contentConstructors,
+                fti = fti,
+                ).initialize(registrar)
+
+    # Extension profile registration
+    profile_registry.registerProfile(
+        'default',
+        'WAeUP_SRP',
+        "The WestAfrican e-University Project",
+        'profiles/default',
+        'WAeUP_SRP',
+        EXTENSION,
+        for_=ICPSSite)
+##    DirectoryTypeRegistry.register(WAeUPTables.Applicants)
+
Index: WAeUP_SRP/trunk_not_used/configure.zcml
===================================================================
--- WAeUP_SRP/trunk_not_used/configure.zcml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/configure.zcml	(revision 2226)
@@ -0,0 +1,18 @@
+<configure
+    xmlns="http://namespaces.zope.org/zope"
+    xmlns:five="http://namespaces.zope.org/five"
+    xmlns:zcml="http://namespaces.zope.org/zcml"
+    >
+
+  <include file="upgrade.zcml"/>
+
+  <adapter
+      factory=".exportimport.WAeUPTableXMLAdapter"
+      provides="Products.GenericSetup.interfaces.IBody"
+      for=".interfaces.IWAeUPTable
+           Products.GenericSetup.interfaces.ISetupEnviron"
+      />
+
+
+
+</configure>
Index: WAeUP_SRP/trunk_not_used/doc/Meeting_Gocept.mm
===================================================================
--- WAeUP_SRP/trunk_not_used/doc/Meeting_Gocept.mm	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/doc/Meeting_Gocept.mm	(revision 2226)
@@ -0,0 +1,144 @@
+<map version="0.9.0_Beta_8">
+<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
+<node CREATED="1188559059964" ID="Freemind_Link_299977877" MODIFIED="1188559085449" TEXT="Meeting Gocept">
+<node CREATED="1188559230584" FOLDED="true" ID="Freemind_Link_1185236607" MODIFIED="1188559241426" POSITION="right" TEXT="Wer sind wir">
+<node CREATED="1188559269430" ID="Freemind_Link_884814859" MODIFIED="1188559290352" TEXT="Dr. Henrik Bettermann"/>
+<node CREATED="1188559291108" ID="Freemind_Link_748935016" MODIFIED="1188559303662" TEXT="Joachim Schmitz"/>
+<node CREATED="1188559304552" ID="Freemind_Link_903744732" MODIFIED="1188559349604" TEXT="Uli Fouquet"/>
+</node>
+<node CREATED="1188559258214" ID="Freemind_Link_166137380" MODIFIED="1188559263868" POSITION="right" TEXT="Partner">
+<node CREATED="1188559309275" ID="Freemind_Link_1634954429" MODIFIED="1188559401765" TEXT="Nigeria">
+<node CREATED="1188559403438" ID="Freemind_Link_529490766" MODIFIED="1188559414415" TEXT="BT Limited">
+<node CREATED="1188559760954" ID="Freemind_Link_1438626974" MODIFIED="1188559769208" TEXT="Hector Etomi"/>
+</node>
+<node CREATED="1188559415169" ID="Freemind_Link_1774528896" MODIFIED="1188559427471" TEXT="University of Benin"/>
+<node CREATED="1188559428224" ID="Freemind_Link_1714349761" MODIFIED="1188559428224" TEXT=""/>
+</node>
+<node CREATED="1188559435064" ID="Freemind_Link_322105899" MODIFIED="1188559721516" TEXT="Ghana">
+<node CREATED="1188559734058" ID="Freemind_Link_779542952" MODIFIED="1188559741611" TEXT="NetPlux"/>
+</node>
+<node CREATED="1188559726798" ID="Freemind_Link_1225581430" MODIFIED="1188559726798" TEXT=""/>
+</node>
+<node CREATED="1188562712452" ID="Freemind_Link_1972176569" MODIFIED="1188562731790" POSITION="right" TEXT="Kommerzielles">
+<node CREATED="1188562805615" ID="Freemind_Link_228180734" MODIFIED="1188562865154" TEXT="Status">
+<node CREATED="1188563021302" ID="Freemind_Link_284218103" MODIFIED="1188563036739" TEXT="Aktive Universit&#xe4;ten">
+<node CREATED="1188828579823" ID="Freemind_Link_594170772" MODIFIED="1188828596069" TEXT="Universit&#xe4;t Benin"/>
+</node>
+<node CREATED="1188562740259" ID="Freemind_Link_825191227" MODIFIED="1188562929503" TEXT="Aufwand bis heute">
+<node CREATED="1188828602589" FOLDED="true" ID="Freemind_Link_238981980" MODIFIED="1188828787993" TEXT="2005">
+<node CREATED="1188828689973" ID="Freemind_Link_331061731" MODIFIED="1188828701447" TEXT="Henrik 3 MM"/>
+<node CREATED="1188828702292" ID="Freemind_Link_532411826" MODIFIED="1188828715622" TEXT="Joachim 3 MM"/>
+<node CREATED="1188828716695" ID="Freemind_Link_1384972157" MODIFIED="1188828749605" TEXT="rest der WAeUP Group 1 MM"/>
+<node CREATED="1188836665984" ID="Freemind_Link_785163390" MODIFIED="1188836682871" TEXT="Reisekosten 2000 &#x20ac;"/>
+</node>
+<node CREATED="1188828757154" FOLDED="true" ID="Freemind_Link_1920154866" MODIFIED="1188828794470" TEXT="2006">
+<node CREATED="1188828798040" ID="Freemind_Link_1417838347" MODIFIED="1188828820966" TEXT="Henrik 7 MM"/>
+<node CREATED="1188828821767" ID="Freemind_Link_5745851" MODIFIED="1188828829898" TEXT="Joachim 7 MM"/>
+<node CREATED="1188828833010" ID="Freemind_Link_1759026779" MODIFIED="1188828840430" TEXT="Uli 1 MM"/>
+<node CREATED="1188836335516" ID="Freemind_Link_1407257541" MODIFIED="1188836378417" TEXT="alte WAeUP Gruppe ca. 5000 &#x20ac;"/>
+<node CREATED="1188836510123" ID="Freemind_Link_591323323" MODIFIED="1188836542317" TEXT="Reisekosten 3000 &#x20ac;"/>
+<node CREATED="1188836155748" ID="Freemind_Link_1554925554" MODIFIED="1188836177421" TEXT="Nuxeo 3000 &#x20ac;"/>
+</node>
+<node CREATED="1188828862217" FOLDED="true" ID="Freemind_Link_1640766158" MODIFIED="1188828871616" TEXT="2007">
+<node CREATED="1188828872964" ID="Freemind_Link_571430273" MODIFIED="1188828893026" TEXT="Henrik 6 MM"/>
+<node CREATED="1188828893915" ID="Freemind_Link_770598320" MODIFIED="1188828904498" TEXT="Joachim 6 MM"/>
+<node CREATED="1188828905591" ID="Freemind_Link_1221689245" MODIFIED="1188828918827" TEXT="Uli 1 MM"/>
+<node CREATED="1188836240152" ID="Freemind_Link_891759765" MODIFIED="1188836422530" TEXT="Lennart Regebro 2500 &#x20ac;"/>
+<node CREATED="1188836429263" ID="Freemind_Link_528468210" MODIFIED="1188836474994" TEXT="Reisekosten ca. 5000 &#x20ac;"/>
+</node>
+</node>
+<node CREATED="1188562778676" FOLDED="true" ID="Freemind_Link_586821424" MODIFIED="1188562943653" TEXT="Einkommen bis heute">
+<node CREATED="1188836688287" ID="Freemind_Link_1506604961" MODIFIED="1188836740651" TEXT="2005 2000 &#x20ac; Erstattung der Reisekosten"/>
+<node CREATED="1188836031613" ID="Freemind_Link_399187357" MODIFIED="1188836043940" TEXT="2006">
+<node CREATED="1188836048965" ID="Freemind_Link_1622052920" MODIFIED="1188836580360" TEXT="01 12000 &#x20ac;"/>
+<node CREATED="1188836090763" ID="Freemind_Link_1079772535" MODIFIED="1188836636929" TEXT="12 10000 &#x20ac;"/>
+</node>
+<node CREATED="1188836592228" ID="Freemind_Link_1183633245" MODIFIED="1188836598894" TEXT="2007">
+<node CREATED="1188836608535" ID="Freemind_Link_149979247" MODIFIED="1188836628471" TEXT="04 10000 &#x20ac;"/>
+</node>
+</node>
+</node>
+<node CREATED="1188562959993" ID="Freemind_Link_1238623424" MODIFIED="1188837046769" TEXT="Aussichten">
+<node CREATED="1188837049071" ID="Freemind_Link_362540821" MODIFIED="1188838007099" TEXT="Beteiligung an den Einnahmen:&#xa;ca: 300 N pro Geb&#xfc;hr gelten als Bezahlgeb&#xfc;hr.">
+<node CREATED="1188837089621" ID="Freemind_Link_742773741" MODIFIED="1188837135013" TEXT="Anmeldung zur Zulassung 1000 N"/>
+<node CREATED="1188837137983" ID="Freemind_Link_1289981138" MODIFIED="1188837341604" TEXT="Einschreibegeb&#xfc;hr (Clearance) 10000 N"/>
+<node CREATED="1188837350237" ID="Freemind_Link_1044896800" MODIFIED="1188837474393" TEXT="Schoolfee von 30000 N - 43000 N "/>
+</node>
+<node CREATED="1188837601578" ID="Freemind_Link_1277664216" MODIFIED="1188837615376" TEXT="Weitere Universit&#xe4;ten">
+<node CREATED="1188837617181" ID="Freemind_Link_1941154386" MODIFIED="1188837805645" TEXT="Illorin ca 30000 (unsicher)"/>
+<node CREATED="1188837668983" ID="Freemind_Link_1168732958" MODIFIED="1188837789323" TEXT="College of Okene &lt; 10000 (sicher)"/>
+</node>
+</node>
+</node>
+<node CREATED="1188559137011" ID="_" MODIFIED="1188562371344" POSITION="right" TEXT="WAeUP_SRP">
+<node CREATED="1188559180815" ID="Freemind_Link_938044106" MODIFIED="1188564548912" TEXT="Installationen">
+<node CREATED="1188562448060" ID="Freemind_Link_1627382436" MODIFIED="1188564511154" TEXT="Universit&#xe4;t Benin">
+<node CREATED="1188564556610" ID="Freemind_Link_135268073" MODIFIED="1188564592076" TEXT="50000 aktive Studenten"/>
+<node CREATED="1188564593192" ID="Freemind_Link_773677924" MODIFIED="1188564625526" TEXT="30000 Anmeldungen zur Aufnahmepr&#xfc;fung"/>
+</node>
+</node>
+<node CREATED="1188562586328" ID="Freemind_Link_1864740409" MODIFIED="1188563134281" TEXT="Beschreibung">
+<node CREATED="1188562665023" ID="Freemind_Link_1279633507" MODIFIED="1188563161180" TEXT="Es ist kein">
+<node CREATED="1188563162897" ID="Freemind_Link_221209540" MODIFIED="1188563183510" TEXT="Content Management Sytem"/>
+<node CREATED="1188563184808" ID="Freemind_Link_272616222" MODIFIED="1188563195973" TEXT="E-Learning Portal"/>
+<node CREATED="1188563196957" ID="Freemind_Link_975275607" MODIFIED="1188563219013" TEXT="Community Portal"/>
+</node>
+<node CREATED="1188563232409" ID="Freemind_Link_1222798188" MODIFIED="1188563237904" TEXT="sondern">
+<node CREATED="1188563239077" ID="Freemind_Link_1844353336" MODIFIED="1188563258070" TEXT="Studenten Registrierungssystem">
+<node CREATED="1188580273096" ID="Freemind_Link_562541511" MODIFIED="1188580347378" TEXT="ca 30000 Anmeldungen zur Zulassungspr&#xfc;fung in 14 Tagen"/>
+<node CREATED="1188580292275" ID="Freemind_Link_1060558927" MODIFIED="1188836805167" TEXT="ca. 8000 neue Studenten pro Jahr"/>
+</node>
+<node CREATED="1188563259231" ID="Freemind_Link_1887920862" MODIFIED="1188563280653" TEXT="Studenten Verwaltungssystem">
+<node CREATED="1188563765445" ID="Freemind_Link_1833028898" MODIFIED="1188563775024" TEXT="R&#xfc;ckmeldung"/>
+<node CREATED="1188563776141" ID="Freemind_Link_787724834" MODIFIED="1188563791956" TEXT="Bezahlung von Studiengeb&#xfc;hren">
+<node CREATED="1188836829705" ID="Freemind_Link_1903737777" MODIFIED="1188836848599" TEXT="Scratch Card Payments"/>
+<node CREATED="1188836849308" ID="Freemind_Link_1901058536" MODIFIED="1188836864718" TEXT="Online Payment"/>
+</node>
+<node CREATED="1188563792936" ID="Freemind_Link_1941289847" MODIFIED="1188563824509" TEXT="Kursregistrierung">
+<node CREATED="1188580456437" ID="Freemind_Link_1982724676" MODIFIED="1188580540056" TEXT="pro Student werden ca. 15 Objekte angelegt."/>
+<node CREATED="1188580541216" ID="Freemind_Link_286863151" MODIFIED="1188580573072" TEXT="Zeitraum ca. 2 Monate"/>
+</node>
+</node>
+</node>
+<node CREATED="1188563307929" ID="Freemind_Link_1497297429" MODIFIED="1188563722641" TEXT="das heisst">
+<node CREATED="1188563331279" ID="Freemind_Link_658225317" MODIFIED="1188563515506" TEXT="auf sehr viele Objekte (Studenten)"/>
+<node CREATED="1188563518072" ID="Freemind_Link_1961307271" MODIFIED="1188838088650" TEXT="greifen wenige Benutzer, &#xa;sehr selten gleichzeitig zu.">
+<node CREATED="1188563551578" ID="Freemind_Link_1705135114" MODIFIED="1188563561650" TEXT="der Student"/>
+<node CREATED="1188563564037" ID="Freemind_Link_453887794" MODIFIED="1188563596707" TEXT="einige Administratoren"/>
+</node>
+</node>
+</node>
+<node CREATED="1188563886430" ID="Freemind_Link_349684135" MODIFIED="1188563922321" TEXT="Software Stuktur">
+<node CREATED="1188563904717" ID="Freemind_Link_1763206866" MODIFIED="1188563946178" TEXT="Basierend auf CPS-3.4.2">
+<node CREATED="1188564066631" ID="Freemind_Link_582764515" MODIFIED="1188580035552" TEXT="wichtige Features">
+<node CREATED="1188580043821" ID="Freemind_Link_36426106" MODIFIED="1188580057960" TEXT="TTW editing"/>
+<node CREATED="1188564103177" ID="Freemind_Link_1738102231" MODIFIED="1188564112801" TEXT="CPSSchemas"/>
+<node CREATED="1188564114101" ID="Freemind_Link_905983956" MODIFIED="1188564122708" TEXT="CPSLayouts"/>
+<node CREATED="1188836924976" ID="Freemind_Link_301747582" MODIFIED="1188836932368" TEXT="CPS Groups"/>
+<node CREATED="1188838159828" ID="Freemind_Link_1414183250" MODIFIED="1188838170906" TEXT="Generic setup"/>
+</node>
+<node CREATED="1188564324052" ID="Freemind_Link_731172111" MODIFIED="1188564347889" TEXT="nicht benutzte Features">
+<node CREATED="1188564349558" ID="Freemind_Link_680369307" MODIFIED="1188564457968" TEXT="Versionsverwaltung"/>
+<node CREATED="1188836947023" ID="Freemind_Link_805759687" MODIFIED="1188838138149" TEXT="Flexible Documents"/>
+</node>
+</node>
+<node CREATED="1188563950286" ID="Freemind_Link_800271338" MODIFIED="1188564003371" TEXT="Erweiterungen">
+<node CREATED="1188564009711" ID="Freemind_Link_143710823" MODIFIED="1188564021416" TEXT="WAeUPTables"/>
+<node CREATED="1188564044457" ID="Freemind_Link_1379107359" MODIFIED="1188564052594" TEXT="Dymanic Roles"/>
+<node CREATED="1188564275703" ID="Freemind_Link_352935719" MODIFIED="1188564284759" TEXT="Diverse Widgets"/>
+</node>
+</node>
+<node CREATED="1188580101550" ID="Freemind_Link_571537463" MODIFIED="1188580118355" TEXT="Hard/Software Setup">
+<node CREATED="1188580121745" ID="Freemind_Link_1951912029" MODIFIED="1188580175071" TEXT="ZEO setup"/>
+</node>
+<node CREATED="1188580355739" ID="Freemind_Link_81928334" MODIFIED="1188580368894" TEXT="Probleme">
+<node CREATED="1188580371422" ID="Freemind_Link_1523407361" MODIFIED="1188580387030" TEXT="Objektzugriff zu langsam"/>
+<node CREATED="1188580388645" ID="Freemind_Link_308496028" MODIFIED="1188808176353" TEXT="Speicherplatzverwaltung"/>
+<node CREATED="1188808176994" ID="Freemind_Link_1725815162" MODIFIED="1188808180619" TEXT="unstetiger Speicherverbrauch auf waeupclient"/>
+<node CREATED="1188643680583" ID="Freemind_Link_1573328978" MODIFIED="1188643861163" TEXT="conflict errors beim Zugriff auf portal_catalog"/>
+<node CREATED="1188828994311" ID="Freemind_Link_543196208" MODIFIED="1188829024690" TEXT="Deployment neuer Universit&#xe4;ten"/>
+</node>
+</node>
+<node CREATED="1188559218853" ID="Freemind_Link_1065658590" MODIFIED="1188559218853" POSITION="left" TEXT=""/>
+</node>
+</map>
Index: WAeUP_SRP/trunk_not_used/doc/srp_documentation.mm
===================================================================
--- WAeUP_SRP/trunk_not_used/doc/srp_documentation.mm	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/doc/srp_documentation.mm	(revision 2226)
@@ -0,0 +1,324 @@
+<map version="0.9.0_Beta_8">
+<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
+<node CREATED="1170079518946" ID="Freemind_Link_650524897" MODIFIED="1172489583516" TEXT="WAeUP Documentation">
+<node CREATED="1172489553062" FOLDED="true" ID="Freemind_Link_1276207160" MODIFIED="1172489556316" POSITION="right" TEXT="Glossary">
+<node CREATED="1172588742298" ID="Freemind_Link_495359346" LINK="../profiles/default/schemas.xml" MODIFIED="1173007237566" TEXT="Field Names (Attributes)"/>
+<node CREATED="1172588782286" ID="Freemind_Link_1234262632" LINK="../profiles/default/types.xml" MODIFIED="1172588916308" TEXT="Types"/>
+<node CREATED="1172588791669" ID="Freemind_Link_832896495" LINK="../profiles/default/layouts.xml" MODIFIED="1173007318993" TEXT="Labels (Titles)"/>
+</node>
+<node CREATED="1172489529057" ID="Freemind_Link_43083883" MODIFIED="1172489545651" POSITION="right" TEXT="SRP Data Structure">
+<node CREATED="1170079621592" ID="Freemind_Link_1297017754" MODIFIED="1170079640872" TEXT="Campus">
+<node CREATED="1171710559043" ID="Freemind_Link_1592396213" MODIFIED="1171710565212" TEXT="Id: campus"/>
+<node CREATED="1170079643589" FOLDED="true" ID="Freemind_Link_1231068129" MODIFIED="1171710686426" TEXT="Academic Section">
+<node CREATED="1171710577379" ID="Freemind_Link_1444831124" MODIFIED="1171710589887" TEXT="Id: academics"/>
+<node CREATED="1170080366716" FOLDED="true" ID="Freemind_Link_415048819" MODIFIED="1171709591652" TEXT="{Faculties}">
+<node CREATED="1171114205479" ID="Freemind_Link_777914383" LINK="../profiles/default/types/Faculty.xml" MODIFIED="1171114273018" TEXT="Type: Faculty"/>
+<node CREATED="1171124926993" ID="Freemind_Link_1995598127" LINK="../profiles/default/schemas/faculty.xml" MODIFIED="1171124974083" TEXT="Schema: faculty"/>
+<node CREATED="1171124982312" ID="Freemind_Link_875514191" LINK="../profiles/default/layouts/faculty.xml" MODIFIED="1171125747539" TEXT="Layout: faculty"/>
+<node CREATED="1170080406892" FOLDED="true" ID="Freemind_Link_1983042340" MODIFIED="1171709620984" TEXT="{Departments}">
+<node CREATED="1171125049973" ID="Freemind_Link_734335561" LINK="../profiles/default/types/Department.xml" MODIFIED="1171125103478" TEXT="Type: Department"/>
+<node CREATED="1171125108968" ID="Freemind_Link_553285905" LINK="../profiles/default/schemas/department.xml" MODIFIED="1172001385770" TEXT="Schema: department"/>
+<node CREATED="1171125727127" ID="Freemind_Link_481382280" LINK="../profiles/default/layouts/department.xml" MODIFIED="1171125762591" TEXT="Layout: department"/>
+<node CREATED="1170080420252" FOLDED="true" ID="Freemind_Link_290613406" MODIFIED="1171710340659" TEXT="Courses">
+<node CREATED="1171710086403" ID="Freemind_Link_241779697" LINK="../profiles/default/types/CoursesFolder.xml" MODIFIED="1172589332547" TEXT="Type: CoursesFolder"/>
+<node CREATED="1171710355390" ID="Freemind_Link_118311151" MODIFIED="1171710361439" TEXT="Id: courses"/>
+<node CREATED="1171710129425" FOLDED="true" ID="Freemind_Link_768683630" MODIFIED="1171710143816" TEXT="{Courses}">
+<node CREATED="1171125278776" ID="Freemind_Link_271340691" LINK="../profiles/default/types/Course.xml" MODIFIED="1171125499635" TEXT="Type: Course"/>
+<node CREATED="1171125294516" ID="Freemind_Link_1380275634" LINK="../profiles/default/schemas/course.xml" MODIFIED="1171125322984" TEXT="Schema: course"/>
+<node CREATED="1171125766553" ID="Freemind_Link_851403429" LINK="../profiles/default/layouts/course.xml" MODIFIED="1171125799374" TEXT="Layout: course"/>
+</node>
+</node>
+<node CREATED="1170080432978" FOLDED="true" ID="Freemind_Link_562751" MODIFIED="1170080631195" TEXT="Certificates">
+<node CREATED="1171710395037" ID="Freemind_Link_404484787" LINK="../profiles/default/types/CertificatesFolder.xml" MODIFIED="1172589301562" TEXT="Type: CertificatesFolder"/>
+<node CREATED="1171710418961" ID="Freemind_Link_1593662067" MODIFIED="1171710429717" TEXT="Id: certificates"/>
+<node CREATED="1171710430588" FOLDED="true" ID="Freemind_Link_749193871" MODIFIED="1171710447703" TEXT="{Certificates}">
+<node CREATED="1171125332417" ID="Freemind_Link_1282410878" LINK="../profiles/default/types/Certificate.xml" MODIFIED="1171125518275" TEXT="Type: Certificate"/>
+<node CREATED="1171125354169" ID="Freemind_Link_417952670" LINK="../profiles/default/schemas/certificate.xml" MODIFIED="1173174223522" TEXT="Schema: certificate"/>
+<node CREATED="1171125803606" ID="Freemind_Link_1875982916" LINK="../profiles/default/layouts/certificate.xml" MODIFIED="1171125868907" TEXT="Layout: certificate"/>
+<node CREATED="1173173871656" FOLDED="true" ID="Freemind_Link_1723739099" MODIFIED="1173173962036" TEXT="{StudyLevels}">
+<node CREATED="1171710490564" FOLDED="true" ID="Freemind_Link_843869909" MODIFIED="1171710864122" TEXT="{CertificateCourses}">
+<node CREATED="1171125386330" ID="Freemind_Link_107526608" LINK="../profiles/default/types/CertificateCourse.xml" MODIFIED="1171125541376" TEXT="Type: CertificateCourse"/>
+<node CREATED="1171125407620" ID="Freemind_Link_536311369" LINK="../profiles/default/schemas/certificate_course.xml" MODIFIED="1171125455457" TEXT="Schema: certificate_course"/>
+<node CREATED="1171126119984" ID="Freemind_Link_1217942566" LINK="../profiles/default/layouts/certificate_course.xml" MODIFIED="1171126156808" TEXT="Layout: certificate_course"/>
+</node>
+</node>
+</node>
+</node>
+</node>
+</node>
+</node>
+<node CREATED="1170082138244" ID="Freemind_Link_1354366927" MODIFIED="1171710679266" TEXT="Student Section">
+<node CREATED="1171709784119" ID="_" MODIFIED="1171709937449" TEXT="Type: StudentsFolder" VSHIFT="104"/>
+<node CREATED="1171710545564" ID="Freemind_Link_221165828" MODIFIED="1171710551332" TEXT="Id: students"/>
+<node CREATED="1170082147831" ID="Freemind_Link_115332414" MODIFIED="1171709774415" TEXT="{Student}">
+<node CREATED="1171114205479" ID="Freemind_Link_1051911128" LINK="../profiles/default/types/Student.xml" MODIFIED="1184064751825" TEXT="Type: Student"/>
+<node CREATED="1171124926993" ID="Freemind_Link_1838352082" LINK="../profiles/default/schemas/student.xml" MODIFIED="1184064617631" TEXT="Schema: student"/>
+<node CREATED="1171124982312" ID="Freemind_Link_1037588671" LINK="../profiles/default/layouts/student.xml" MODIFIED="1184064687002" TEXT="Layout: student"/>
+<node CREATED="1171353188624" FOLDED="true" ID="Freemind_Link_1032185087" LINK="../profiles/default/workflows/waeup_student_wf/definition.xml" MODIFIED="1171353319663" TEXT="Workflow: waeup_student_wf">
+<node CREATED="1172156481009" ID="Freemind_Link_615926152" LINK="waeup_student_wf.gif" MODIFIED="1172486913476" TEXT="Diagram"/>
+</node>
+<node CREATED="1170883343230" FOLDED="true" ID="Freemind_Link_1345153944" MODIFIED="1172162754390" TEXT="User Interface">
+<node CREATED="1170883352226" FOLDED="true" ID="Freemind_Link_1688911390" MODIFIED="1172488273241" TEXT="Officer">
+<node CREATED="1171124982312" ID="Freemind_Link_1991960145" LINK="../profiles/default/layouts/student_create.xml" MODIFIED="1178091125746" TEXT="Layout: student_create" VSHIFT="2"/>
+<node CREATED="1178091137285" ID="Freemind_Link_1938706963" LINK="../skins/waeup_student/add_student.py" MODIFIED="1178091313673" TEXT="PY: add_student"/>
+<node CREATED="1178091137285" ID="Freemind_Link_954925660" LINK="../skins/waeup_student/add_student_form.pt" MODIFIED="1178091384412" TEXT="PT: add_student_form"/>
+</node>
+</node>
+<node CREATED="1170082164451" FOLDED="true" ID="Freemind_Link_1627718074" MODIFIED="1171894825978" TEXT="Accommodation Data">
+<node CREATED="1170083733194" ID="Freemind_Link_1398132513" MODIFIED="1171894857194" TEXT="Id: accommodation06"/>
+<node CREATED="1170083603042" ID="Freemind_Link_4951906" LINK="../profiles/default/types/StudentAccommodation.xml" MODIFIED="1171894888465" TEXT="Type: StudentAccommodation"/>
+<node CREATED="1170083649773" ID="Freemind_Link_1139787187" LINK="../profiles/default/schemas/student_accommodation.xml" MODIFIED="1171895045243" TEXT="Schema: student_accommodation"/>
+<node CREATED="1171353188624" ID="Freemind_Link_1027526284" LINK="../profiles/default/workflows/waeup_student_accommodation_wf/definition.xml" MODIFIED="1172163355400" TEXT="Workflow: waeup_student_accommodation_wf"/>
+<node CREATED="1170883343230" FOLDED="true" ID="Freemind_Link_158025710" MODIFIED="1172157052630" TEXT="User Interface">
+<node CREATED="1172157054665" FOLDED="true" ID="Freemind_Link_123552519" MODIFIED="1172488186216" TEXT="Student">
+<node CREATED="1171362489012" FOLDED="true" ID="Freemind_Link_875925244" MODIFIED="1173177579487" TEXT="reserve_accommodation">
+<node CREATED="1171362515581" ID="Freemind_Link_1380319587" LINK="../skins/waeup_accommodation/reserve_accommodation.py" MODIFIED="1171376963675" TEXT="PY: reserve_accommodation"/>
+<node CREATED="1171362924343" ID="Freemind_Link_1031270994" LINK="../skins/waeup_accommodation/accommodation_pin_edit_form.pt" MODIFIED="1172163898958" TEXT="PT: accommodation_pin_edit_form"/>
+<node CREATED="1171124926993" ID="Freemind_Link_59643823" LINK="../profiles/default/schemas/student_accommodation.xml" MODIFIED="1171377094450" TEXT="Schema: student_accommodation"/>
+<node CREATED="1171124982312" ID="Freemind_Link_1633331359" LINK="../profiles/default/layouts/student_accommodation_fe.xml" MODIFIED="1171377120846" TEXT="Layout: student_accommodation_fe"/>
+</node>
+</node>
+<node CREATED="1172160956421" FOLDED="true" ID="Freemind_Link_1200464160" MODIFIED="1172488188590" TEXT="Officer">
+<node CREATED="1172160965772" ID="Freemind_Link_1519551515" LINK="../skins/waeup_accommodation/change_bed.py" MODIFIED="1172162566492" TEXT="change_bed"/>
+<node CREATED="1172160986371" ID="Freemind_Link_193689339" LINK="../skins/waeup_accommodation/release_bed.py" MODIFIED="1172162574968" TEXT="release_bed"/>
+</node>
+</node>
+</node>
+<node CREATED="1170082164451" FOLDED="true" ID="Freemind_Link_1808367236" MODIFIED="1171711160327" TEXT="Application Data">
+<node CREATED="1170083733194" ID="Freemind_Link_1603566745" MODIFIED="1170862024807" TEXT="Id: application"/>
+<node CREATED="1170083603042" ID="Freemind_Link_1501749959" LINK="../profiles/default/types/StudentApplication.xml" MODIFIED="1171009517689" TEXT="Type: StudentApplication"/>
+<node CREATED="1170083649773" ID="Freemind_Link_743980261" LINK="../profiles/default/schemas/student_application.xml" MODIFIED="1171009482163" TEXT="Schema: student_application"/>
+<node CREATED="1171353188624" FOLDED="true" ID="Freemind_Link_1002042622" LINK="../profiles/default/workflows/waeup_student_subobject_wf/definition.xml" MODIFIED="1172163415549" TEXT="Workflow: waeup_student_subobject_wf">
+<node CREATED="1172156481009" ID="Freemind_Link_1105306468" LINK="waeup_student_subobject_wf.gif" MODIFIED="1172903933018" TEXT="Diagram"/>
+</node>
+<node CREATED="1170883343230" FOLDED="true" ID="Freemind_Link_575698302" MODIFIED="1172162754390" TEXT="User Interface">
+<node CREATED="1170883352226" FOLDED="true" ID="Freemind_Link_1037532744" MODIFIED="1172163796143" TEXT="Student">
+<node CREATED="1171124982312" LINK="../profiles/default/layouts/student_accommodation_fe.xml" MODIFIED="1172487948615" TEXT="Layout: student_application_fe" VSHIFT="2"/>
+<node CREATED="1172488817664" FOLDED="true" ID="Freemind_Link_1195081094" MODIFIED="1172488820358" TEXT="view">
+<node CREATED="1172163808013" LINK="../skins/waeup_student/application_slip.pt" MODIFIED="1172488857021" TEXT="PT: application_slip"/>
+<node CREATED="1172163797590" LINK="../skins/waeup_student/application_view.pt" MODIFIED="1172488862899" TEXT="PT: application_view"/>
+</node>
+<node CREATED="1172488821089" FOLDED="true" ID="Freemind_Link_671547753" MODIFIED="1172488823242" TEXT="edit">
+<node CREATED="1172163808013" LINK="../skins/waeup_student/application_edit_form.pt" MODIFIED="1172488851172" TEXT="PT: application_edit_form"/>
+<node CREATED="1172163808013" ID="Freemind_Link_6884986" LINK="../skins/waeup_student/application_edit.py" MODIFIED="1173007903444" TEXT="PY: application_edit"/>
+</node>
+</node>
+<node CREATED="1170883352226" FOLDED="true" ID="Freemind_Link_1967355218" MODIFIED="1172488273241" TEXT="Officer">
+<node CREATED="1171124982312" LINK="../profiles/default/layouts/student_application.xml" MODIFIED="1172488456165" TEXT="Layout: student_application" VSHIFT="2"/>
+<node CREATED="1172488875157" FOLDED="true" ID="Freemind_Link_509420887" MODIFIED="1172488877500" TEXT="view">
+<node CREATED="1172163808013" LINK="../skins/waeup_default/waeup_document_view.pt" MODIFIED="1172488738180" TEXT="PT: waeup_document_view"/>
+</node>
+<node CREATED="1172488878061" FOLDED="true" ID="Freemind_Link_935035316" MODIFIED="1172488879643" TEXT="edit">
+<node CREATED="1172163808013" LINK="../skins/waeup_default/waeup_edit.py" MODIFIED="1172488745821" TEXT="PY: waeup_edit"/>
+<node CREATED="1172163808013" LINK="../skins/waeup_default/waeup_edit_form.pt" MODIFIED="1172488792728" TEXT="PT: waeup_edit_form"/>
+</node>
+</node>
+</node>
+</node>
+<node CREATED="1170082180802" FOLDED="true" ID="Freemind_Link_812719734" MODIFIED="1171711167338" TEXT="Clearance Data">
+<node CREATED="1170083733194" ID="Freemind_Link_1823044370" MODIFIED="1170862044390" TEXT="Id: clearance"/>
+<node CREATED="1170083603042" ID="Freemind_Link_1641808385" LINK="../profiles/default/types/StudentClearance.xml" MODIFIED="1171009882288" TEXT="Type: StudentClearance"/>
+<node CREATED="1170083649773" ID="Freemind_Link_1281565507" LINK="../profiles/default/schemas/student_clearance.xml" MODIFIED="1170958977813" TEXT="Schema: student_clearance"/>
+<node CREATED="1171353188624" FOLDED="true" ID="Freemind_Link_1171230143" LINK="../profiles/default/workflows/waeup_student_subobject_wf/definition.xml" MODIFIED="1172163415549" TEXT="Workflow: waeup_student_subobject_wf">
+<node CREATED="1172156481009" ID="Freemind_Link_1817393683" LINK="waeup_student_subobject_wf.gif" MODIFIED="1172903933018" TEXT="Diagram"/>
+</node>
+<node CREATED="1170883343230" FOLDED="true" ID="Freemind_Link_998392827" MODIFIED="1172162754390" TEXT="User Interface">
+<node CREATED="1170883352226" FOLDED="true" ID="Freemind_Link_556396570" MODIFIED="1172163796143" TEXT="Student">
+<node CREATED="1171124982312" ID="Freemind_Link_683557361" LINK="../profiles/default/layouts/student_clearance_fe.xml" MODIFIED="1172590208847" TEXT="Layout: student_clearance_fe" VSHIFT="2"/>
+<node CREATED="1172488817664" FOLDED="true" ID="Freemind_Link_1692130968" MODIFIED="1172488820358" TEXT="view">
+<node CREATED="1172163808013" ID="Freemind_Link_998434555" LINK="../skins/waeup_student/clearance_slip.pt" MODIFIED="1172590222186" TEXT="PT: clearance_slip"/>
+<node CREATED="1172163797590" ID="Freemind_Link_1824516563" LINK="../skins/waeup_student/clearance_view.pt" MODIFIED="1172590230228" TEXT="PT: clearance_view"/>
+</node>
+<node CREATED="1172488821089" FOLDED="true" ID="Freemind_Link_1625962208" MODIFIED="1172488823242" TEXT="edit">
+<node CREATED="1172163808013" ID="Freemind_Link_113324006" LINK="../skins/waeup_student/clearance_edit_form.pt" MODIFIED="1172590237488" TEXT="PT: clearance_edit_form"/>
+<node CREATED="1172163808013" ID="Freemind_Link_735971580" LINK="../skins/waeup_student/clearance_edit.py" MODIFIED="1173008827552" TEXT="PY: clearance_edit"/>
+</node>
+</node>
+<node CREATED="1170883352226" FOLDED="true" ID="Freemind_Link_1353155855" MODIFIED="1172488273241" TEXT="Officer">
+<node CREATED="1171124982312" ID="Freemind_Link_1920730860" LINK="../profiles/default/layouts/student_clearance.xml" MODIFIED="1172590245309" TEXT="Layout: student_clearance" VSHIFT="2"/>
+<node CREATED="1172488875157" FOLDED="true" ID="Freemind_Link_888492061" MODIFIED="1172488877500" TEXT="view">
+<node CREATED="1172163808013" LINK="../skins/waeup_default/waeup_document_view.pt" MODIFIED="1172488738180" TEXT="PT: waeup_document_view"/>
+</node>
+<node CREATED="1172488878061" FOLDED="true" ID="Freemind_Link_1089408606" MODIFIED="1172488879643" TEXT="edit">
+<node CREATED="1172163808013" LINK="../skins/waeup_default/waeup_edit.py" MODIFIED="1172488745821" TEXT="PY: waeup_edit"/>
+<node CREATED="1172163808013" LINK="../skins/waeup_default/waeup_edit_form.pt" MODIFIED="1172488792728" TEXT="PT: waeup_edit_form"/>
+</node>
+</node>
+<node CREATED="1172590261873" ID="Freemind_Link_548109147" MODIFIED="1172590269785" TEXT="ClearanceOfficer"/>
+</node>
+</node>
+<node CREATED="1170082180802" FOLDED="true" ID="Freemind_Link_634523864" MODIFIED="1171711172044" TEXT="Personal Data">
+<node CREATED="1170083733194" ID="Freemind_Link_1809756717" MODIFIED="1170862205697" TEXT="Id: personal"/>
+<node CREATED="1170083603042" ID="Freemind_Link_212388289" LINK="../profiles/default/types/StudentPersonal.xml" MODIFIED="1171010050967" TEXT="Type: StudentPersonal"/>
+<node CREATED="1170083649773" ID="Freemind_Link_329050457" LINK="../profiles/default/schemas/student_personal.xml" MODIFIED="1170959011444" TEXT="Schema: student_personal"/>
+<node CREATED="1171353188624" FOLDED="true" ID="Freemind_Link_1826722808" LINK="../profiles/default/workflows/waeup_student_subobject_wf/definition.xml" MODIFIED="1172163415549" TEXT="Workflow: waeup_student_subobject_wf">
+<node CREATED="1172156481009" ID="Freemind_Link_28070507" LINK="waeup_student_subobject_wf.gif" MODIFIED="1172903933018" TEXT="Diagram"/>
+</node>
+<node CREATED="1170883343230" FOLDED="true" ID="Freemind_Link_1992366565" MODIFIED="1172162754390" TEXT="User Interface">
+<node CREATED="1170883352226" FOLDED="true" ID="Freemind_Link_1836030474" MODIFIED="1172163796143" TEXT="Student">
+<node CREATED="1171124982312" ID="Freemind_Link_619763911" LINK="../profiles/default/layouts/student_personal_fe.xml" MODIFIED="1172590156902" TEXT="Layout: student_personal_fe" VSHIFT="2"/>
+<node CREATED="1172488817664" FOLDED="true" ID="Freemind_Link_1257369345" MODIFIED="1172488820358" TEXT="view">
+<node CREATED="1172163797590" ID="Freemind_Link_1400026339" LINK="../skins/waeup_student/personal_view.pt" MODIFIED="1172590109564" TEXT="PT: personal_view"/>
+</node>
+<node CREATED="1172488821089" FOLDED="true" ID="Freemind_Link_1638658780" MODIFIED="1172488823242" TEXT="edit">
+<node CREATED="1172163808013" ID="Freemind_Link_1344729975" LINK="../skins/waeup_student/personal_edit_form.pt" MODIFIED="1172590121682" TEXT="PT: personal_edit_form"/>
+<node CREATED="1172163808013" ID="Freemind_Link_669247347" LINK="../skins/waeup_student/personal_edit.py" MODIFIED="1173008912775" TEXT="PY: personal_edit"/>
+</node>
+</node>
+<node CREATED="1170883352226" FOLDED="true" ID="Freemind_Link_286219707" MODIFIED="1172488273241" TEXT="Officer">
+<node CREATED="1171124982312" ID="Freemind_Link_1209895790" LINK="../profiles/default/layouts/student_personal.xml" MODIFIED="1172590168539" TEXT="Layout: student_personal" VSHIFT="2"/>
+<node CREATED="1172488875157" FOLDED="true" ID="Freemind_Link_77093197" MODIFIED="1172488877500" TEXT="view">
+<node CREATED="1172163808013" ID="Freemind_Link_1922836083" LINK="../skins/waeup_default/waeup_document_view.pt" MODIFIED="1172488738180" TEXT="PT: waeup_document_view"/>
+</node>
+<node CREATED="1172488878061" FOLDED="true" ID="Freemind_Link_679732160" MODIFIED="1172488879643" TEXT="edit">
+<node CREATED="1172163808013" ID="Freemind_Link_165622352" LINK="../skins/waeup_default/waeup_edit.py" MODIFIED="1172488745821" TEXT="PY: waeup_edit"/>
+<node CREATED="1172163808013" ID="Freemind_Link_534028031" LINK="../skins/waeup_default/waeup_edit_form.pt" MODIFIED="1172488792728" TEXT="PT: waeup_edit_form"/>
+</node>
+</node>
+</node>
+</node>
+<node CREATED="1170082392807" FOLDED="true" ID="Freemind_Link_1979443941" MODIFIED="1171711179966" TEXT="Study Course">
+<node CREATED="1170930140692" ID="Freemind_Link_607082969" MODIFIED="1171009488850" TEXT="Id: study_course"/>
+<node CREATED="1170930264337" ID="Freemind_Link_1384807180" LINK="../profiles/default/types/StudentStudyCourse.xml" MODIFIED="1172159914623" TEXT="Type: StudentStudyCourse"/>
+<node CREATED="1170930285073" ID="Freemind_Link_1989199190" LINK="../profiles/default/schemas/student_study_course.xml" MODIFIED="1171016022394" TEXT="Schema: student_study_course"/>
+<node CREATED="1171015856280" ID="Freemind_Link_86536977" LINK="../profiles/default/layouts/student_study_course.xml" MODIFIED="1172157227132" TEXT="Layout: student_study_course"/>
+<node CREATED="1171353188624" FOLDED="true" ID="Freemind_Link_1421234009" LINK="../profiles/default/workflows/waeup_student_subobject_wf/definition.xml" MODIFIED="1172163415549" TEXT="Workflow: waeup_student_subobject_wf">
+<node CREATED="1172156481009" ID="Freemind_Link_1231607035" LINK="waeup_student_subobject_wf.gif" MODIFIED="1172903933018" TEXT="Diagram"/>
+</node>
+<node CREATED="1170082404788" FOLDED="true" ID="Freemind_Link_1932365066" MODIFIED="1173164769927" TEXT="{StudentStudyLevels}">
+<node CREATED="1171711225441" ID="Freemind_Link_1643185567" LINK="../profiles/default/types/StudentStudyLevel.xml" MODIFIED="1172159926125" TEXT="Type: StudentStudyLevel"/>
+<node CREATED="1171711252019" ID="Freemind_Link_1974988388" LINK="../profiles/default/schemas/student_study_level.xml" MODIFIED="1172160137485" TEXT="Schema: student_study_level"/>
+<node CREATED="1171711275042" ID="Freemind_Link_744562017" LINK="../profiles/default/layouts/student_study_level.xml" MODIFIED="1172157370844" TEXT="Layout: student_study_level"/>
+<node CREATED="1170082419140" FOLDED="true" ID="Freemind_Link_1356993815" MODIFIED="1173164798869" TEXT="{StudentCourseResults]">
+<node CREATED="1171711590937" ID="Freemind_Link_519794554" LINK="../profiles/default/types/StudentCourseResult.xml" MODIFIED="1172160113608" TEXT="Type: StudentCourseResult"/>
+<node CREATED="1171711647027" ID="Freemind_Link_1880871196" LINK="../profiles/default/schemas/student_course_result.xml" MODIFIED="1172160183100" TEXT="Schema: student_course_result"/>
+<node CREATED="1171711617014" ID="Freemind_Link_797419415" LINK="../profiles/default/layouts/student_course_result.xml" MODIFIED="1172160204262" TEXT="Layout: student_course_result"/>
+</node>
+</node>
+</node>
+<node CREATED="1170082200667" FOLDED="true" ID="Freemind_Link_140160478" MODIFIED="1170082364784" TEXT="Payments">
+<node CREATED="1171711430276" ID="Freemind_Link_86727434" MODIFIED="1171711435834" TEXT="Id: payments"/>
+<node CREATED="1171711367726" ID="Freemind_Link_1873791240" MODIFIED="1171711381666" TEXT="Type: PaymentsFolder"/>
+<node CREATED="1170082366149" FOLDED="true" ID="Freemind_Link_1718065298" MODIFIED="1171711406291" TEXT="{Payments}">
+<node CREATED="1171711413572" ID="Freemind_Link_116328775" MODIFIED="1171711419660" TEXT="Type: Payment"/>
+<node CREATED="1170883263996" ID="Freemind_Link_39098989" LINK="../profiles/default/schemas/payment.xml" MODIFIED="1170959080069" TEXT="Schema: payment"/>
+<node CREATED="1171711449483" ID="Freemind_Link_165499016" MODIFIED="1171711455191" TEXT="Layout: payment"/>
+</node>
+</node>
+<node CREATED="1170082164451" FOLDED="true" ID="Freemind_Link_1991619732" MODIFIED="1175265930974" TEXT="Pume Data">
+<node CREATED="1170083733194" ID="Freemind_Link_474120928" MODIFIED="1175265946729" TEXT="Id: pume"/>
+<node CREATED="1170083603042" ID="Freemind_Link_1353178566" LINK="../profiles/default/types/StudentPume.xml" MODIFIED="1175265977383" TEXT="Type: StudentPume"/>
+<node CREATED="1170083649773" ID="Freemind_Link_1635748093" LINK="../profiles/default/schemas/student_pume.xml" MODIFIED="1175266051911" TEXT="Schema: student_pume"/>
+<node CREATED="1171353188624" FOLDED="true" ID="Freemind_Link_1752727630" LINK="../profiles/default/workflows/waeup_student_subobject_wf/definition.xml" MODIFIED="1172163415549" TEXT="Workflow: waeup_student_subobject_wf">
+<node CREATED="1172156481009" ID="Freemind_Link_615932491" LINK="waeup_student_subobject_wf.gif" MODIFIED="1172903933018" TEXT="Diagram"/>
+</node>
+<node CREATED="1170883343230" FOLDED="true" ID="Freemind_Link_1769098562" MODIFIED="1172162754390" TEXT="User Interface">
+<node CREATED="1170883352226" FOLDED="true" ID="Freemind_Link_1332793129" MODIFIED="1172163796143" TEXT="Student">
+<node CREATED="1171124982312" ID="Freemind_Link_1964031449" LINK="../profiles/default/layouts/student_pume.xml" MODIFIED="1175266093912" TEXT="Layout: student_pume" VSHIFT="2"/>
+<node CREATED="1172488817664" FOLDED="true" ID="Freemind_Link_183452447" MODIFIED="1172488820358" TEXT="view">
+<node CREATED="1172163808013" LINK="../skins/waeup_student/application_slip.pt" MODIFIED="1172488857021" TEXT="PT: application_slip"/>
+<node CREATED="1172163797590" ID="Freemind_Link_1061894954" LINK="../skins/waeup_student/application_view.pt" MODIFIED="1178091232930" TEXT="PT: application_view"/>
+</node>
+<node CREATED="1172488821089" FOLDED="true" ID="Freemind_Link_1024852395" MODIFIED="1172488823242" TEXT="edit">
+<node CREATED="1172163808013" LINK="../skins/waeup_student/application_edit_form.pt" MODIFIED="1172488851172" TEXT="PT: application_edit_form"/>
+<node CREATED="1172163808013" ID="Freemind_Link_987823120" LINK="../skins/waeup_student/application_edit.py" MODIFIED="1178091292813" TEXT="PY: application_edit"/>
+</node>
+</node>
+<node CREATED="1170883352226" FOLDED="true" ID="Freemind_Link_156982782" MODIFIED="1172488273241" TEXT="Officer">
+<node CREATED="1171124982312" LINK="../profiles/default/layouts/student_application.xml" MODIFIED="1172488456165" TEXT="Layout: student_application" VSHIFT="2"/>
+<node CREATED="1172488875157" FOLDED="true" ID="Freemind_Link_1326488938" MODIFIED="1172488877500" TEXT="view">
+<node CREATED="1172163808013" LINK="../skins/waeup_default/waeup_document_view.pt" MODIFIED="1172488738180" TEXT="PT: waeup_document_view"/>
+</node>
+<node CREATED="1172488878061" FOLDED="true" ID="Freemind_Link_1633752071" MODIFIED="1172488879643" TEXT="edit">
+<node CREATED="1172163808013" LINK="../skins/waeup_default/waeup_edit.py" MODIFIED="1172488745821" TEXT="PY: waeup_edit"/>
+<node CREATED="1172163808013" LINK="../skins/waeup_default/waeup_edit_form.pt" MODIFIED="1172488792728" TEXT="PT: waeup_edit_form"/>
+</node>
+</node>
+</node>
+</node>
+</node>
+<node CREATED="1171379675232" FOLDED="true" ID="Freemind_Link_41196870" MODIFIED="1171379685192" TEXT="User Interface">
+<node CREATED="1171379691280" FOLDED="true" ID="Freemind_Link_24219" MODIFIED="1171379703554" TEXT="Officers">
+<node CREATED="1171379710053" FOLDED="true" ID="Freemind_Link_1668598079" MODIFIED="1171379734695" TEXT="add_student">
+<node CREATED="1171379737777" ID="Freemind_Link_490783588" LINK="../skins/waeup_student/add_student.py" MODIFIED="1179344480314" TEXT="PY: add_student"/>
+<node CREATED="1171362924343" ID="Freemind_Link_1507034557" LINK="../skins/waeup_student/add_student_form.pt" MODIFIED="1179344416172" TEXT="PT: add_student_form"/>
+<node CREATED="1171379759850" ID="Freemind_Link_435667013" LINK="../profiles/default/schemas/student_create.xml" MODIFIED="1171380077013" TEXT="Schema: student_create"/>
+<node CREATED="1171015856280" ID="Freemind_Link_976681849" LINK="../profiles/default/layouts/student_create.xml" MODIFIED="1171382310446" TEXT="Layout: student_create"/>
+</node>
+</node>
+<node CREATED="1172016304181" FOLDED="true" ID="Freemind_Link_831833270" MODIFIED="1172016314036" TEXT="Students">
+<node CREATED="1171379710053" FOLDED="true" ID="Freemind_Link_413720849" MODIFIED="1172016338320" TEXT="change_password">
+<node CREATED="1171379737777" ID="Freemind_Link_1193425802" LINK="../skins/waeup_student/change_password.py" MODIFIED="1173174911912" TEXT="PY: change_password"/>
+<node CREATED="1171362924343" ID="Freemind_Link_197745680" LINK="../skins/waeup_student/change_password_form.pt" MODIFIED="1173174977596" TEXT="PT: change_password_form"/>
+<node COLOR="#000000" CREATED="1171379759850" ID="Freemind_Link_1595823834" LINK="../profiles/default/schemas/student_change_password.xml" MODIFIED="1179344588229" TEXT="Schema: student_change_password"/>
+<node CREATED="1171015856280" ID="Freemind_Link_83566645" LINK="../profiles/default/layouts/student_change_password.xml" MODIFIED="1172016516654" TEXT="Layout: student_change_password"/>
+</node>
+<node CREATED="1171379710053" FOLDED="true" ID="Freemind_Link_250586527" MODIFIED="1172136136294" TEXT="set_access_data">
+<node CREATED="1171379737777" ID="Freemind_Link_173378373" LINK="../skins/waeup_student/set_access_data.py" MODIFIED="1172136155974" TEXT="PY: set_access_data"/>
+<node CREATED="1171362924343" ID="Freemind_Link_385786925" LINK="../skins/waeup_student/set_access_data_form.pt" MODIFIED="1172136205159" TEXT="PT: set_access_data_form"/>
+<node CREATED="1171379759850" ID="Freemind_Link_1672896645" LINK="../profiles/default/schemas/student_returning.xml" MODIFIED="1172136395249" TEXT="Schema: student_returning"/>
+<node CREATED="1171015856280" ID="Freemind_Link_1275916157" LINK="../profiles/default/layouts/student_session_results_search.xml" MODIFIED="1179344886668" TEXT="Layout: student_session_results_search"/>
+</node>
+</node>
+</node>
+</node>
+<node CREATED="1170082502675" FOLDED="true" ID="Freemind_Link_1051871348" MODIFIED="1171710707226" TEXT="Accommodation Section">
+<node CREATED="1171710631948" ID="Freemind_Link_161316738" MODIFIED="1171710638848" TEXT="Id: accommodation"/>
+<node CREATED="1171114205479" ID="Freemind_Link_685193459" LINK="../profiles/default/types/AccoFolder.xml" MODIFIED="1171360542032" TEXT="Type: AccoFolder"/>
+<node CREATED="1170082513362" FOLDED="true" ID="Freemind_Link_579142716" MODIFIED="1171710738261" TEXT="{Halls}">
+<node CREATED="1171114205479" ID="Freemind_Link_913388948" LINK="../profiles/default/types/AccoHall.xml" MODIFIED="1171360892599" TEXT="Type: AccoHall"/>
+<node CREATED="1171124926993" ID="Freemind_Link_108322260" LINK="../profiles/default/schemas/acco_hall.xml" MODIFIED="1171361085015" TEXT="Schema: acco_hall"/>
+<node CREATED="1171124982312" ID="Freemind_Link_378355401" LINK="../profiles/default/layouts/acco_hall.xml" MODIFIED="1171361118597" TEXT="Layout: acco_hall"/>
+<node CREATED="1171362437684" FOLDED="true" ID="Freemind_Link_1642729597" MODIFIED="1171362486789" TEXT="User Interface">
+<node CREATED="1171362489012" FOLDED="true" ID="Freemind_Link_550352037" MODIFIED="1171362509942" TEXT="book_reserved_bed">
+<node CREATED="1171362515581" ID="Freemind_Link_213666573" LINK="../skins/waeup_accommodation/book_reserved_bed.py" MODIFIED="1171362598179" TEXT="PY: book_reserved_bed"/>
+<node CREATED="1171362924343" ID="Freemind_Link_1340566317" LINK="../skins/waeup_accommodation/book_reserved_bed_form.pt" MODIFIED="1171363012800" TEXT="PT: book_reserved_bed_form"/>
+<node CREATED="1171124926993" ID="Freemind_Link_320666824" LINK="../profiles/default/schemas/acco_bed_booking.xml" MODIFIED="1171362834619" TEXT="Schema: acco_bed_booking"/>
+<node CREATED="1171124982312" ID="Freemind_Link_1520138434" LINK="../profiles/default/layouts/acco_bed_booking.xml" MODIFIED="1171362901153" TEXT="Layout: acco_bed_booking"/>
+</node>
+</node>
+</node>
+<node CREATED="1171381167605" FOLDED="true" ID="Freemind_Link_370176221" MODIFIED="1171381186185" TEXT="User Interface">
+<node CREATED="1171381191363" ID="Freemind_Link_1384539281" MODIFIED="1171381247729" TEXT="Student"/>
+<node CREATED="1171381259796" ID="Freemind_Link_43065296" MODIFIED="1171381265497" TEXT="Officer"/>
+</node>
+</node>
+<node CREATED="1170082542534" ID="Freemind_Link_243354429" MODIFIED="1171710670383" TEXT="Pin Section">
+<node CREATED="1171710956294" ID="Freemind_Link_1564638284" LINK="../profiles/default/types/ScratchCardBatchesFolder.xml" MODIFIED="1184064861155" TEXT="Type: ScratchCardBatchesFolder"/>
+<node CREATED="1171710648131" ID="Freemind_Link_1115846656" MODIFIED="1171710654941" TEXT="Id: pins"/>
+<node CREATED="1170082553111" ID="Freemind_Link_1225342224" MODIFIED="1171884067639" TEXT="ScratchCardBatches">
+<node CREATED="1171711021738" ID="Freemind_Link_1373462759" LINK="../profiles/default/types/ScratchCardBatch.xml" MODIFIED="1184064778686" TEXT="Type: ScratchCardBatch"/>
+<node CREATED="1171711043239" ID="Freemind_Link_215893748" LINK="../profiles/default/schemas/scratch_card_batch.xml" MODIFIED="1184064671398" TEXT="Schema: scratch_card_batch"/>
+<node CREATED="1171711076978" ID="Freemind_Link_1234518938" LINK="../profiles/default/layouts/scratch_card_batch.xml" MODIFIED="1184064714987" TEXT="Layout: scratch_card_batch"/>
+</node>
+</node>
+</node>
+<node CREATED="1171711725971" FOLDED="true" ID="Freemind_Link_716743966" MODIFIED="1171711849759" TEXT="Directories">
+<node CREATED="1171711958926" ID="Freemind_Link_799041044" MODIFIED="1171711970903" TEXT="Id: portal_directories"/>
+<node CREATED="1171711971274" ID="Freemind_Link_1378447478" MODIFIED="1171712308118" TEXT="Members"/>
+<node CREATED="1171711995008" ID="Freemind_Link_861199985" MODIFIED="1171712311913" TEXT="Students"/>
+<node CREATED="1171711999584" ID="Freemind_Link_1070634598" MODIFIED="1171712315178" TEXT="Groups"/>
+</node>
+<node CREATED="1170931308473" ID="Freemind_Link_249696543" MODIFIED="1170931315740" TEXT="Catalogs">
+<node CREATED="1170931319920" ID="Freemind_Link_1633117071" MODIFIED="1171712108641" TEXT="Portal Catalog"/>
+<node CREATED="1171712109062" ID="Freemind_Link_1264506858" LINK="../profiles/default/applicants_catalog.xml" MODIFIED="1187006324354" TEXT="Applicants Catalog"/>
+<node CREATED="1171712109062" ID="Freemind_Link_769089546" LINK="../profiles/default/courses_catalog.xml" MODIFIED="1172055793074" TEXT="Courses Catalog"/>
+<node CREATED="1171712109062" ID="Freemind_Link_964376607" LINK="../profiles/default/course_results.xml" MODIFIED="1186484772138" TEXT="Course Results"/>
+<node CREATED="1171712109062" ID="Freemind_Link_879910437" LINK="../profiles/default/students_catalog.xml" MODIFIED="1172055153081" TEXT="Students Catalog"/>
+<node CREATED="1171712063356" ID="Freemind_Link_1865945880" LINK="../profiles/default/returning_import.xml" MODIFIED="1172055126664" TEXT="Returning Import Table"/>
+<node CREATED="1171712077046" ID="Freemind_Link_1703381403" LINK="../profiles/default/results_import.xml" MODIFIED="1172055188090" TEXT="Session Results Import Table"/>
+<node CREATED="1171712082483" ID="Freemind_Link_1157029282" LINK="../profiles/default/accommodation.xml" MODIFIED="1172055262232" TEXT="Accommodation Table"/>
+<node CREATED="1171712137653" ID="Freemind_Link_371928033" LINK="../profiles/default/pins.xml" MODIFIED="1172055286995" TEXT="Pins Table"/>
+<node CREATED="1171712154817" ID="Freemind_Link_1307066201" LINK="../profiles/default/pumeresults.xml" MODIFIED="1172055646399" TEXT="PUME/PDE Resuts Table"/>
+</node>
+<node CREATED="1172001308558" FOLDED="true" ID="Freemind_Link_1997267023" MODIFIED="1172490300476" TEXT="Profiles">
+<node CREATED="1172001324877" FOLDED="true" ID="Freemind_Link_1866579033" MODIFIED="1172001330846" TEXT="default">
+<node CREATED="1172001340812" ID="Freemind_Link_274105864" LINK="../profiles/default/directories.xml" MODIFIED="1172001465313" TEXT="portal_directories"/>
+<node CREATED="1172001340812" ID="Freemind_Link_1612370167" LINK="../profiles/default/layouts.xml" MODIFIED="1172001506077" TEXT="portal_layouts"/>
+<node CREATED="1172001340812" ID="Freemind_Link_7840481" LINK="../profiles/default/schemas.xml" MODIFIED="1172001572800" TEXT="portal_schemas"/>
+<node CREATED="1172001340812" ID="Freemind_Link_1164818739" LINK="../profiles/default/types.xml" MODIFIED="1172001612293" TEXT="portal_types"/>
+</node>
+</node>
+</node>
+</node>
+</map>
Index: WAeUP_SRP/trunk_not_used/exportimport.py
===================================================================
--- WAeUP_SRP/trunk_not_used/exportimport.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/exportimport.py	(revision 2226)
@@ -0,0 +1,186 @@
+#-*- mode: python; mode: fold -*-
+# $Id$
+"""WAeUP Tool XML Adapter.
+
+An XML adapter tells the GenericSetup machinery howto im- / export persistent
+configuration that is relative to a specific CMF component such as our WAeUP
+Tool.
+
+GenericSetup uses the Zope3 interfaces and components machinery to find the
+right XML adapter for the right object. This is why we flagged our waeup tool
+with the `implements(IWAeUPTool)` class attribute and made an adapter
+association in the `configure.zcml` file.
+"""
+import csv,re
+
+# Zope3 component architecture
+from zope.app import zapi
+from zope.component import adapts
+from zope.interface import implements
+
+# Standard GenericSetup base classes and functions
+from Products.GenericSetup.utils import exportObjects
+from Products.GenericSetup.utils import importObjects
+from Products.GenericSetup.utils import XMLAdapterBase
+from Products.GenericSetup.utils import PropertyManagerHelpers
+
+from Products.CMFCore.utils import getToolByName
+
+# GenericSetup multi adapts a class that implement IWAeUP and a particular
+# ISetupEnvironment to and IBody (piece of XML configuration).
+from Products.GenericSetup.interfaces import IBody
+from Products.GenericSetup.interfaces import ISetupEnviron
+from Products.WAeUP_SRP.interfaces import IWAeUPTool
+import Globals
+p_home = Globals.package_home(globals())
+i_home = Globals.INSTANCE_HOME
+
+TOOL = 'portal_waeup'
+NAME = 'waeup'
+
+def importWAeUPTable(obj, parent_path, context, name):
+    """ Import subobjects recursively.
+    """
+    importer = zapi.queryMultiAdapter((obj, context), IBody)
+
+    path = '%s%s' % (parent_path, obj.getId().replace(' ', '_'))
+    __traceback_info__ = path
+    if importer:
+        path = '%s%s' % (parent_path, name)
+        filename = '%s%s' % (path, importer.suffix)
+        body = context.readDataFile(filename)
+        if body is not None:
+            importer.filename = filename # for error reporting
+            importer.body = body
+
+    if getattr(obj, 'objectValues', False):
+        for sub in obj.objectValues():
+            importObjects(sub, path+'/', context)
+
+def exportWAeUP(context):
+    """Export our WAeUP tool configuration
+    """
+    site = context.getSite()
+    tool = getattr(context,"campus",None)
+    if tool is None:
+        logger = context.getLogger(NAME)
+        logger.info("Nothing to export.")
+        return
+    exportObjects(tool, '', context)
+
+def importWAeUP(context):
+    """Import WAeUP tool configuration
+    """
+    site = context.getSite()
+    pm = site.portal_membership
+    campus = getattr(site.portal_url.getPortalObject(),'campus',None)
+    if campus is not None:
+        academics = getattr(campus,'academics',None)
+        students = getattr(campus,'students',None)
+        accommodation = getattr(campus,'accommodation',None)
+        campus.manage_setLocalGroupRoles(groupid='CampusOfficers',
+                                         roles=('SectionOfficer',))
+        if academics is not None:
+            academics.manage_setLocalGroupRoles(groupid='role:Authenticated',
+                                         roles=('SectionReader',))
+            academics.manage_setLocalGroupRoles(groupid='AcademicsOfficers',
+                                         roles=('SectionOfficer',))
+        if students is not None:
+            students.manage_setLocalGroupRoles(groupid = 'ClearanceOfficers',
+                                              roles=('SectionReader',))
+            students.manage_setLocalGroupRoles(groupid = 'CourseAdvisers',
+                                              roles=('SectionReader',))
+            students.manage_setLocalGroupRoles(groupid='MemberAdmins',
+                                         roles=('SectionOfficer',))
+            students.manage_setLocalGroupRoles(groupid='StudentsOfficers',
+                                         roles=('SectionOfficer',))
+            students.manage_setLocalGroupRoles(groupid = 'role:Student',
+                                              roles=('SectionReader',))
+        if accommodation is not None:
+            accommodation.manage_setLocalGroupRoles(groupid='role:Student',
+                                         roles=('SectionReader',))
+            accommodation.manage_setLocalGroupRoles(groupid='AccommodationOfficers',
+                                         roles=('SectionOfficer',))
+    members = getattr(site.portal_directories,'members')
+    if members is not None:
+        members.manage_setLocalGroupRoles(groupid='MemberAdmins',
+                                         roles=('SectionOfficer',))
+    students = getattr(site.portal_directories,'students')
+    if students is not None:
+        students.manage_setLocalGroupRoles(groupid='MemberAdmins',
+                                         roles=('SectionOfficer',))
+    waeup_stacking_dir = getattr(site.portal_directories,'waeup_stacking_dir')
+    if waeup_stacking_dir is not None:
+        waeup_stacking_dir.manage_setLocalGroupRoles(groupid='MemberAdmins',
+                                         roles=('SectionOfficer',))
+
+##    pm.setLocalGroupRoles(campus.academics,['role:Authenticated',
+##                                           ],'SectionReader')
+    importWAeUPTable(site.portal_accommodation, '', context,'accommodation')
+    importWAeUPTable(site.courses_catalog, '', context,'courses_catalog')
+    importWAeUPTable(site.payments_catalog, '', context,'payments_catalog')
+    importWAeUPTable(site.online_payments_import, '', context,'online_payments_import')
+    importWAeUPTable(site.portal_pins, '', context,'pins')
+    importWAeUPTable(site.portal_pumeresults, '', context,'pumeresults')
+    importWAeUPTable(site.returning_import, '', context,'returning_import')
+    importWAeUPTable(site.results_import, '', context,'results_import')
+    importWAeUPTable(site.students_catalog, '', context,'students_catalog')
+    importWAeUPTable(site.applicants_catalog, '', context,'applicants_catalog')
+    importWAeUPTable(site.course_results, '', context,'course_results')
+    importWAeUPTable(site.portal_catalog_real, '', context,'portal_catalog_real')
+
+from Products.CPSCore.exportimport.catalog import CatalogToolXMLAdapter
+#from Products.GenericSetup.ZCatalog.exportimport import ZCatalogXMLAdapter
+
+from interfaces import IWAeUPTable
+
+class WAeUPTableXMLAdapter(CatalogToolXMLAdapter):
+#class WAeUPTableXMLAdapter(ZCatalogXMLAdapter):
+    __used_for__ = IWAeUPTable
+    _LOGGER_ID = 'waeup_table'
+
+##    def _importNode(self, node):
+##        """Import the object from the DOM node.
+##        """
+##        if self.environ.shouldPurge():
+##            self._purgeProperties()
+##            self._purgeObjects()
+##            self._purgeIndexes()
+##            self._purgeColumns()
+##
+##        self._logger.info('Catalog imported.')
+# This the XMLAdapter itself. It encodes the im- / export logic that is specific
+# to our tool. `im- / exportObjects` functions will find it thanks to the zope
+# components machinery and the associations made in the configure.zcml file.
+
+##class WAeUPXMLAdapter(XMLAdapterBase, PropertyManagerHelpers):
+##    """XML importer and exporter for the WAeUP tool.
+##
+##    Hence this XMLAdapter is really simple. To get more complete examples of
+##    what XMLAdapters are meant to do, please have a look at the
+##    CPSSkins.exportimport.py or CPSDirectory.exportimport.py files, for
+##    instance.
+##    """
+##
+##    adapts(IWAeUPTool, ISetupEnviron)
+##    implements(IBody)
+##
+##    _LOGGER_ID = NAME
+##    name = NAME
+##
+##    def _exportNode(self):
+##        """Export the object as a DOM node.
+##        """
+##        node = self._getObjectNode('object')
+##        node.appendChild(self._extractProperties())
+##        self._logger.info("WAeUP tool exported.")
+##        return node
+##
+##    def _importNode(self, node):
+##        """Import the object from the DOM node.
+##        """
+##        if self.environ.shouldPurge():
+##            self._purgeProperties()
+##        self._initProperties(node)
+##        self._logger.info("WAeUP tool imported.")
+##
Index: WAeUP_SRP/trunk_not_used/ftest/test_waeup.py
===================================================================
--- WAeUP_SRP/trunk_not_used/ftest/test_waeup.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/ftest/test_waeup.py	(revision 2226)
@@ -0,0 +1,56 @@
+# (C) Copyright 2005 Nuxeo SAS <http://nuxeo.com>
+# Author: bdelbosc@nuxeo.com
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+"""Simple funkload zope tests
+
+$Id$
+"""
+import unittest
+from random import random
+from funkload.ZopeTestCase import ZopeTestCase
+from funkload.Lipsum import Lipsum
+
+
+class Zope(ZopeTestCase):
+    """Testing the funkload ZopeTestCase
+
+    This test use a configuration file Zope.conf.
+    """
+    def setUp(self):
+        """Setting up test."""
+        self.logd("setUp.")
+        self.zope_url = self.conf_get('main', 'url')
+        self.admin_id = self.conf_get('main', 'admin_id')
+        self.admin_pwd = self.conf_get('main', 'admin_pwd')
+
+    def tearDown(self):
+        """Setting up test."""
+        self.logd("tearDown.")
+
+    def test_admission(self):
+        server_url = self.zope_url
+        
+        self.get("%s/" % server_url)
+        self.get("%s/students/check_admission" % server_url)
+        self.post("%s/students/check_admission" % server_url, 
+                  params={'widget__sc_pin': '12345678', 
+                          'widget__jamb_id': '12345678lr',
+                          'cpsdocument_edit_button': 'check'})
+        self.assert_('Your Admission Slip' in self.getBody())
+
+if __name__ in ('main', '__main__'):
+    unittest.main()
Index: WAeUP_SRP/trunk_not_used/i18n/.config.pot
===================================================================
--- WAeUP_SRP/trunk_not_used/i18n/.config.pot	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/i18n/.config.pot	(revision 2226)
@@ -0,0 +1,1 @@
+/var/lib/zope2.7/instance/test_madarche_HEAD/Products/MyProject/i18n/myproject.pot
Index: WAeUP_SRP/trunk_not_used/i18n/custom.pot
===================================================================
--- WAeUP_SRP/trunk_not_used/i18n/custom.pot	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/i18n/custom.pot	(revision 2226)
@@ -0,0 +1,18 @@
+# Gettext Message File for default.
+# Your Name <your@email>, Year
+msgid ""
+msgstr ""
+"Project-Id-Version: default\n"
+"POT-Creation-Date: 2005-06-17 10:47default\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Your Name <your@email>\n"
+"Language-Team: Name <email>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"Language-Code: LL\n"
+"Language-Name: Language\n"
+"Preferred-encodings: utf-8 latin1\n"
+"Domain: default\n"
+
Index: WAeUP_SRP/trunk_not_used/i18n/en.po
===================================================================
--- WAeUP_SRP/trunk_not_used/i18n/en.po	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/i18n/en.po	(revision 2226)
@@ -0,0 +1,106 @@
+# Gettext Message File for default.
+# Your Name <your@email>, Year
+msgid ""
+msgstr ""
+"Project-Id-Version: default\n"
+"POT-Creation-Date: 2005-06-17 10:47default\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Your Name <your@email>\n"
+"Language-Team: Name <email>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"Language-Code: en\n"
+"Language-Name: English\n"
+"Preferred-encodings: latin9 utf-8\n"
+"Domain: default\n"
+
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <option value="." content="widget/title_or_id" attributes="value widget/getWidgetId" condition="widget/is_i18n">Type</option>
+msgid "Type"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <input name="addwidget_button" type="submit" class="context" value="button_add" />
+msgid "button_add"
+msgstr ""
+
+#: from ../skins/myproject_document/accepter_visite.pt
+#.   <input onclick="history.back()" type="button" class="context" value="button_cancel" />
+#: from ../skins/myproject_document/refuser_visite.pt
+msgid "button_cancel"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <input name="cpsdocument_edit_button" type="submit" class="standalone" value="button_change" condition="not:creation" />
+msgid "button_change"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <input name="cpsdocument_create_button" type="submit" class="standalone" value="button_create" condition="creation" />
+msgid "button_create"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <input type="submit" class="destructive" value="button_delete" attributes="name string:deleterow_${repeat/row/index};
+#.                                 onclick python:'return window.confirm(\'%s\')' %
+#.                                   (cpsmcat('description_confirm_delete'), )" />
+msgid "button_delete"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <input type="submit" class="context moveDown" value="button_move_down" attributes="name string:downrow_${repeat/row/index}" condition="not:repeat/row/end" />
+msgid "button_move_down"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <input type="submit" class="context moveUp" value="button_move_up" attributes="name string:uprow_${repeat/row/index}" condition="not:repeat/row/start" />
+msgid "button_move_up"
+msgstr ""
+
+#: from ../skins/myproject_document/accepter_visite.pt
+#.   <input type="submit" class="standalone" value="button_publish" />
+#: from ../skins/myproject_document/refuser_visite.pt
+msgid "button_publish"
+msgstr ""
+
+#: from ../skins/myproject_document/widget_datetime_render.pt
+#.   <block>at</block>
+msgid "cpsschema_at"
+msgstr ""
+
+#: from ../skins/myproject_document/widget_datetime_render.pt
+#.   <label attributes="for elt_hour_id">h</label>
+msgid "cpsschema_hour"
+msgstr ""
+
+#: from ../skins/myproject_document/widget_datetime_render.pt
+#.   <label attributes="for elt_minute_id">mn</label>
+msgid "cpsschema_minute"
+msgstr ""
+
+#: from ../skins/myproject_document/accepter_visite.pt
+#.   <title fill-slot="title">
+#.     heading_accept_publication_of
+#.     ${item_id (tal replace="here/title_or_id")}
+#.   </title>
+#: from ../skins/myproject_document/refuser_visite.pt
+msgid "heading_accept_publication_of ${item_id}"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <block content="widget/help" condition="widget/is_i18n">i18_key-help_for_this_field</block>
+msgid "i18_key-help_for_this_field"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <span class="dlabel" content="widget/label" condition="widget/is_i18n">label</span>
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <b content="widget/label" condition="widget/is_i18n">label</b>
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <span content="widget/label_edit" condition="widget/is_i18n">label</span>
+msgid "label"
+msgstr ""
Index: WAeUP_SRP/trunk_not_used/i18n/fr.po
===================================================================
--- WAeUP_SRP/trunk_not_used/i18n/fr.po	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/i18n/fr.po	(revision 2226)
@@ -0,0 +1,106 @@
+# Gettext Message File for default.
+# Your Name <your@email>, Year
+msgid ""
+msgstr ""
+"Project-Id-Version: default\n"
+"POT-Creation-Date: 2005-06-17 10:47default\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Your Name <your@email>\n"
+"Language-Team: Name <email>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"Language-Code: fr\n"
+"Language-Name: French\n"
+"Preferred-encodings: latin9 utf-8\n"
+"Domain: default\n"
+
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <option value="." content="widget/title_or_id" attributes="value widget/getWidgetId" condition="widget/is_i18n">Type</option>
+msgid "Type"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <input name="addwidget_button" type="submit" class="context" value="button_add" />
+msgid "button_add"
+msgstr ""
+
+#: from ../skins/myproject_document/accepter_visite.pt
+#.   <input onclick="history.back()" type="button" class="context" value="button_cancel" />
+#: from ../skins/myproject_document/refuser_visite.pt
+msgid "button_cancel"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <input name="cpsdocument_edit_button" type="submit" class="standalone" value="button_change" condition="not:creation" />
+msgid "button_change"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <input name="cpsdocument_create_button" type="submit" class="standalone" value="button_create" condition="creation" />
+msgid "button_create"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <input type="submit" class="destructive" value="button_delete" attributes="name string:deleterow_${repeat/row/index};
+#.                                 onclick python:'return window.confirm(\'%s\')' %
+#.                                   (cpsmcat('description_confirm_delete'), )" />
+msgid "button_delete"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <input type="submit" class="context moveDown" value="button_move_down" attributes="name string:downrow_${repeat/row/index}" condition="not:repeat/row/end" />
+msgid "button_move_down"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <input type="submit" class="context moveUp" value="button_move_up" attributes="name string:uprow_${repeat/row/index}" condition="not:repeat/row/start" />
+msgid "button_move_up"
+msgstr ""
+
+#: from ../skins/myproject_document/accepter_visite.pt
+#.   <input type="submit" class="standalone" value="button_publish" />
+#: from ../skins/myproject_document/refuser_visite.pt
+msgid "button_publish"
+msgstr ""
+
+#: from ../skins/myproject_document/widget_datetime_render.pt
+#.   <block>at</block>
+msgid "cpsschema_at"
+msgstr ""
+
+#: from ../skins/myproject_document/widget_datetime_render.pt
+#.   <label attributes="for elt_hour_id">h</label>
+msgid "cpsschema_hour"
+msgstr ""
+
+#: from ../skins/myproject_document/widget_datetime_render.pt
+#.   <label attributes="for elt_minute_id">mn</label>
+msgid "cpsschema_minute"
+msgstr ""
+
+#: from ../skins/myproject_document/accepter_visite.pt
+#.   <title fill-slot="title">
+#.     heading_accept_publication_of
+#.     ${item_id (tal replace="here/title_or_id")}
+#.   </title>
+#: from ../skins/myproject_document/refuser_visite.pt
+msgid "heading_accept_publication_of ${item_id}"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <block content="widget/help" condition="widget/is_i18n">i18_key-help_for_this_field</block>
+msgid "i18_key-help_for_this_field"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <span class="dlabel" content="widget/label" condition="widget/is_i18n">label</span>
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <b content="widget/label" condition="widget/is_i18n">label</b>
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <span content="widget/label_edit" condition="widget/is_i18n">label</span>
+msgid "label"
+msgstr ""
Index: WAeUP_SRP/trunk_not_used/i18n/myproject.pot
===================================================================
--- WAeUP_SRP/trunk_not_used/i18n/myproject.pot	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/i18n/myproject.pot	(revision 2226)
@@ -0,0 +1,106 @@
+# Gettext Message File for default.
+# Your Name <your@email>, Year
+msgid ""
+msgstr ""
+"Project-Id-Version: default\n"
+"POT-Creation-Date: 2005-06-17 10:47default\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Your Name <your@email>\n"
+"Language-Team: Name <email>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"Language-Code: LL\n"
+"Language-Name: Language\n"
+"Preferred-encodings: utf-8 latin1\n"
+"Domain: default\n"
+
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <option value="." content="widget/title_or_id" attributes="value widget/getWidgetId" condition="widget/is_i18n">Type</option>
+msgid "Type"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <input name="addwidget_button" type="submit" class="context" value="button_add" />
+msgid "button_add"
+msgstr ""
+
+#: from ../skins/myproject_document/accepter_visite.pt
+#.   <input onclick="history.back()" type="button" class="context" value="button_cancel" />
+#: from ../skins/myproject_document/refuser_visite.pt
+msgid "button_cancel"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <input name="cpsdocument_edit_button" type="submit" class="standalone" value="button_change" condition="not:creation" />
+msgid "button_change"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <input name="cpsdocument_create_button" type="submit" class="standalone" value="button_create" condition="creation" />
+msgid "button_create"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <input type="submit" class="destructive" value="button_delete" attributes="name string:deleterow_${repeat/row/index};
+#.                                 onclick python:'return window.confirm(\'%s\')' %
+#.                                   (cpsmcat('description_confirm_delete'), )" />
+msgid "button_delete"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <input type="submit" class="context moveDown" value="button_move_down" attributes="name string:downrow_${repeat/row/index}" condition="not:repeat/row/end" />
+msgid "button_move_down"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <input type="submit" class="context moveUp" value="button_move_up" attributes="name string:uprow_${repeat/row/index}" condition="not:repeat/row/start" />
+msgid "button_move_up"
+msgstr ""
+
+#: from ../skins/myproject_document/accepter_visite.pt
+#.   <input type="submit" class="standalone" value="button_publish" />
+#: from ../skins/myproject_document/refuser_visite.pt
+msgid "button_publish"
+msgstr ""
+
+#: from ../skins/myproject_document/widget_datetime_render.pt
+#.   <block>at</block>
+msgid "cpsschema_at"
+msgstr ""
+
+#: from ../skins/myproject_document/widget_datetime_render.pt
+#.   <label attributes="for elt_hour_id">h</label>
+msgid "cpsschema_hour"
+msgstr ""
+
+#: from ../skins/myproject_document/widget_datetime_render.pt
+#.   <label attributes="for elt_minute_id">mn</label>
+msgid "cpsschema_minute"
+msgstr ""
+
+#: from ../skins/myproject_document/accepter_visite.pt
+#.   <title fill-slot="title">
+#.     heading_accept_publication_of
+#.     ${item_id (tal replace="here/title_or_id")}
+#.   </title>
+#: from ../skins/myproject_document/refuser_visite.pt
+msgid "heading_accept_publication_of ${item_id}"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <block content="widget/help" condition="widget/is_i18n">i18_key-help_for_this_field</block>
+msgid "i18_key-help_for_this_field"
+msgstr ""
+
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <span class="dlabel" content="widget/label" condition="widget/is_i18n">label</span>
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <b content="widget/label" condition="widget/is_i18n">label</b>
+#: from ../skins/myproject_document/myproject_layout_lib.pt
+#.   <span content="widget/label_edit" condition="widget/is_i18n">label</span>
+msgid "label"
+msgstr ""
Index: WAeUP_SRP/trunk_not_used/i18n/waeup_default.po
===================================================================
--- WAeUP_SRP/trunk_not_used/i18n/waeup_default.po	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/i18n/waeup_default.po	(revision 2226)
@@ -0,0 +1,1696 @@
+msgid ""
+msgstr "Project-Id-Version: \n"
+"POT-Creation-Date: 2007-09-05 15:09+WAT\n"
+"PO-Revision-Date: 2007-09-05 15:09+WAT\n"
+"Last-Translator:  <>\n"
+"Language-Team: en <>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+
+msgid "${portal_title}: Membership reminder"
+msgstr "${portal_title}: Membership reminder"
+
+msgid "<span replace=\"op/id\" /> ${dim}"
+msgstr ""
+
+msgid "Contents"
+msgstr "Contents"
+
+msgid "Contributor"
+msgstr "Contributor"
+
+msgid "Created by ${item_creator}. Last modified ${item_modification}."
+msgstr "Created by ${item_creator}. Last modified ${item_modification}."
+
+msgid "Directories"
+msgstr "Directories"
+
+msgid "Edit"
+msgstr ""
+
+msgid "False"
+msgstr "False"
+
+msgid "Folder actions"
+msgstr "Folder actions"
+
+msgid "Join"
+msgstr "Join"
+
+msgid "Language"
+msgstr "Language"
+
+msgid "Language selector"
+msgstr "Language selector"
+
+msgid "Language..."
+msgstr "Language"
+
+msgid "Log in/out"
+msgstr "Log in/out"
+
+msgid "Log out"
+msgstr "Log out"
+
+msgid "Login"
+msgstr "Login"
+
+msgid "My stuff"
+msgstr "Private space"
+
+msgid "Navigation"
+msgstr "Navigation"
+
+msgid "Object actions"
+msgstr "Object actions"
+
+msgid "Objects: <strong> ${batch_start} - ${batch_limit} </strong> of ${batch_length}"
+msgstr "Objects: <strong> ${batch_start} - ${batch_limit} </strong> of ${batch_length}"
+
+msgid "Portal actions"
+msgstr "Portal actions"
+
+msgid "Portal type description"
+msgstr "Portal type's description"
+
+msgid "Portal type title"
+msgstr "Portal type's title"
+
+msgid "Preferences"
+msgstr "Preferences"
+
+msgid "Reader"
+msgstr "Reader"
+
+msgid "Reconfigure Portal"
+msgstr "Portal configuration"
+
+msgid "Request made by IP ${ip} at ${time}"
+msgstr "Request made by IP ${ip} at ${time}"
+
+msgid "Role"
+msgstr "Role"
+
+msgid "SectionManager"
+msgstr "Section manager"
+
+msgid "SectionReader"
+msgstr "Section reader"
+
+msgid "SectionReviewer"
+msgstr "Section reviewer"
+
+msgid "Session"
+msgstr "Session"
+
+msgid "Title"
+msgstr "Title"
+
+msgid "Translated status message."
+msgstr "Translated status message."
+
+msgid "True"
+msgstr "True"
+
+msgid "Undo"
+msgstr "Undo"
+
+msgid "User"
+msgstr ""
+
+msgid "User actions"
+msgstr "User actions"
+
+msgid "Work"
+msgstr "FAKE"
+
+msgid "WorkspaceManager"
+msgstr "Workspace manager"
+
+msgid "WorkspaceMember"
+msgstr "Workspace member"
+
+msgid "WorkspaceReader"
+msgstr "Workspace reader"
+
+msgid "You are currently logged in as ${member}"
+msgstr "You are currently logged in as ${member}"
+
+msgid "Your login:"
+msgstr "Your login:"
+
+msgid "Your password:"
+msgstr "Your password:"
+
+msgid "Your query gave ${nb_results} results."
+msgstr "Your query gave ${nb_results} results"
+
+msgid "_blank"
+msgstr " "
+
+msgid "abandon_draft"
+msgstr "Abandon of the revision"
+
+msgid "accept"
+msgstr "Publication request accepted"
+
+msgid "action_abandon_draft"
+msgstr "Give up the revision"
+
+msgid "action_accept"
+msgstr "Accept"
+
+msgid "action_access_chat_room"
+msgstr "Access chat room"
+
+msgid "action_add_favorites"
+msgstr "Add to favorites"
+
+msgid "action_addevent"
+msgstr "Add an event"
+
+msgid "action_addmeeting"
+msgstr "Add a meeting"
+
+msgid "action_advanced_search"
+msgstr "Advanced search"
+
+msgid "action_archives_mail_center"
+msgstr "Mail archives"
+
+msgid "action_attendees"
+msgstr "Manage attendees"
+
+msgid "action_calendar"
+msgstr "Back to calendar"
+
+msgid "action_calendar_event_viewer"
+msgstr "Event viewer"
+
+msgid "action_calendar_overview"
+msgstr "Calendar overview"
+
+msgid "action_checkin_draft"
+msgstr "Checkin revision"
+
+msgid "action_checkout_draft"
+msgstr "Checkout revision"
+
+msgid "action_comment"
+msgstr "Comment this document"
+
+msgid "action_contact"
+msgstr "Contact"
+
+msgid "action_day_view"
+msgstr "Day view"
+
+msgid "action_delete"
+msgstr "Delete"
+
+msgid "action_delete_translation"
+msgstr "Delete this translation"
+
+msgid "action_display"
+msgstr "Display"
+
+msgid "action_edit"
+msgstr "Edit"
+
+msgid "action_edit_online"
+msgstr "Edit online"
+
+msgid "action_erase_data"
+msgstr "Erase collected data"
+
+msgid "action_export"
+msgstr "Export"
+
+msgid "action_export_csv"
+msgstr "Export collected data"
+
+msgid "action_folder_contents"
+msgstr "Folder contents"
+
+msgid "action_import_documents"
+msgstr "Import zip archive"
+
+msgid "action_local_roles"
+msgstr "Local roles"
+
+msgid "action_mail_center"
+msgstr "Mail center"
+
+msgid "action_manage_languages"
+msgstr "Manage languages"
+
+msgid "action_manage_members"
+msgstr "Members"
+
+msgid "action_manage_vocabularies"
+msgstr "Vocabularies"
+
+msgid "action_metadata"
+msgstr "Metadata"
+
+msgid "action_moderate_chat"
+msgstr "Moderate Chat"
+
+msgid "action_modify"
+msgstr "Modify"
+
+msgid "action_modify_form"
+msgstr "Edit form"
+
+msgid "action_modify_prop"
+msgstr "Edit properties"
+
+msgid "action_month_view"
+msgstr "Month view"
+
+msgid "action_my_preferences"
+msgstr "Preferences"
+
+msgid "action_new_content"
+msgstr "New"
+
+msgid "action_post_question"
+msgstr "Post a question"
+
+msgid "action_print"
+msgstr "Print"
+
+msgid "action_reject"
+msgstr "Reject"
+
+msgid "action_reply_question"
+msgstr "Reply to pending questions"
+
+msgid "action_status_history"
+msgstr "Status history"
+
+msgid "action_submit"
+msgstr "Submit"
+
+msgid "action_subscribe"
+msgstr "Subscribe"
+
+msgid "action_translate"
+msgstr "New translation"
+
+msgid "action_un_publish"
+msgstr "Unpublish"
+
+msgid "action_unsubscribe"
+msgstr "Unsubscribe"
+
+msgid "action_view"
+msgstr "View"
+
+msgid "action_view_favorites"
+msgstr "My favorites"
+
+msgid "action_view_results"
+msgstr "View results"
+
+msgid "action_view_stat"
+msgstr "View statistics"
+
+msgid "action_week_view"
+msgstr "Week view"
+
+msgid "ajax_failing"
+msgstr "This change is not allowed !"
+
+msgid "ajax_working"
+msgstr "Working..."
+
+msgid "batch_next"
+msgstr "Next"
+
+msgid "batch_previous"
+msgstr "Previous"
+
+msgid "button_abandon_draft"
+msgstr "Give up the revision"
+
+msgid "button_add"
+msgstr "Add"
+
+msgid "button_apply"
+msgstr "Apply"
+
+msgid "button_assign_roles"
+msgstr "Assign roles"
+
+msgid "button_back"
+msgstr "Back"
+
+msgid "button_cancel"
+msgstr "Cancel"
+
+msgid "button_change"
+msgstr "Save Changes"
+
+msgid "button_change_and_edit"
+msgstr "Save Changes & Edit"
+
+msgid "button_change_and_view"
+msgstr "Save Changes & View"
+
+msgid "button_checkin_draft"
+msgstr "Checkin of a revision"
+
+msgid "button_checkout_draft"
+msgstr "New revision"
+
+msgid "button_close"
+msgstr "Close"
+
+msgid "button_copy"
+msgstr "Copy"
+
+msgid "button_create"
+msgstr "Create"
+
+msgid "button_cut"
+msgstr "Cut"
+
+msgid "button_delete"
+msgstr "Delete"
+
+msgid "button_delete_archive"
+msgstr "Delete this archive"
+
+msgid "button_deselect_all"
+msgstr "Deselect all"
+
+msgid "button_hide_blocked_roles"
+msgstr "Hide"
+
+msgid "button_local_roles_block"
+msgstr "Block"
+
+msgid "button_local_roles_unblock"
+msgstr "Unblock"
+
+msgid "button_login"
+msgstr "Login"
+
+msgid "button_move_bottom"
+msgstr "Move bottom"
+
+msgid "button_move_down"
+msgstr "Move down"
+
+msgid "button_move_top"
+msgstr "Move top"
+
+msgid "button_move_up"
+msgstr "Move up"
+
+msgid "button_ok"
+msgstr "OK"
+
+msgid "button_paste"
+msgstr "Paste"
+
+msgid "button_publish"
+msgstr "Publish"
+
+msgid "button_register"
+msgstr "Register"
+
+msgid "button_reject_publication"
+msgstr "Reject publication"
+
+msgid "button_rename"
+msgstr "Change object id"
+
+msgid "button_request_reset_password"
+msgstr "Request password resetting"
+
+msgid "button_reset_password"
+msgstr "Reset password"
+
+msgid "button_revert_revision"
+msgstr "Revert to the archived revision"
+
+msgid "button_search"
+msgstr "Search"
+
+msgid "button_select"
+msgstr "Select"
+
+msgid "button_select_all"
+msgstr "Select all"
+
+msgid "button_send"
+msgstr "Send"
+
+msgid "button_send_password_reminder"
+msgstr "Send me a password reminder"
+
+msgid "button_show_blocked_roles"
+msgstr "Show"
+
+msgid "button_submit_document"
+msgstr "Submit document"
+
+msgid "button_text_editor_popup"
+msgstr "Start online editor"
+
+msgid "button_translate_document"
+msgstr "Create a revision for translation"
+
+msgid "button_unpublish_document"
+msgstr "Unpublish document"
+
+msgid "button_update"
+msgstr "Update"
+
+msgid "checkin_draft"
+msgstr "Commit of this revision"
+
+msgid "checkout_draft"
+msgstr "Creation of a revision"
+
+msgid "collector_psm_erase_data_cancel"
+msgstr "Collected data has not been erased."
+
+msgid "collector_psm_erased_data"
+msgstr "All collected data has been erased."
+
+msgid "cpsdoc_Flash_Animation_label_edit"
+msgstr "Flash Animation (swf)"
+
+msgid "cpsschema_at"
+msgstr "at"
+
+msgid "cpsschema_hour"
+msgstr "h"
+
+msgid "cpsschema_label_off"
+msgstr "Off"
+
+msgid "cpsschema_label_on"
+msgstr "On"
+
+msgid "cpsschema_link_preview"
+msgstr "(preview)"
+
+msgid "cpsschema_link_printable_version"
+msgstr "(printable version)"
+
+msgid "cpsschema_minute"
+msgstr "mn"
+
+msgid "cpsschemas_allowed_file_suffixes ${allowed_file_suffixes}"
+msgstr "Allowed files must have one of the following suffixes: ${allowed_file_suffixes}."
+
+msgid "cpsschemas_err_bad_date"
+msgstr "Date incorrecte"
+
+msgid "cpsschemas_err_boolean"
+msgstr "Invalid boolean"
+
+msgid "cpsschemas_err_date"
+msgstr "Invalid date"
+
+msgid "cpsschemas_err_email"
+msgstr "Invalid Email"
+
+msgid "cpsschemas_err_file"
+msgstr "Invalid file"
+
+msgid "cpsschemas_err_file_bad_suffix ${allowed_file_suffixes}"
+msgstr "This file has not an allowed suffix, the allowed suffixes are: ${allowed_file_suffixes}."
+
+msgid "cpsschemas_err_file_empty"
+msgstr "Invalid file"
+
+msgid "cpsschemas_err_file_too_big"
+msgstr "This file is too big"
+
+msgid "cpsschemas_err_file_too_big ${max_size}"
+msgstr "This file is too big, the allowed max size is ${max_size}Mb."
+
+msgid "cpsschemas_err_float"
+msgstr "Invalid float"
+
+msgid "cpsschemas_err_float_positive"
+msgstr "This float must be positive"
+
+msgid "cpsschemas_err_float_range"
+msgstr "Float out of range"
+
+msgid "cpsschemas_err_identifier"
+msgstr "Invalid identifier"
+
+msgid "cpsschemas_err_image"
+msgstr "Invalid image"
+
+msgid "cpsschemas_err_int"
+msgstr "Invalid integer"
+
+msgid "cpsschemas_err_long"
+msgstr "Invalid long integer"
+
+msgid "cpsschemas_err_long_range"
+msgstr "Long integer out of range"
+
+msgid "cpsschemas_err_multiselect"
+msgstr "Invalid multiple selection"
+
+msgid "cpsschemas_err_password_digit"
+msgstr "Sorry your password must contain a digit"
+
+msgid "cpsschemas_err_password_extra"
+msgstr "Sorry your password must contain a special character other than a letter or a digit"
+
+msgid "cpsschemas_err_password_lower"
+msgstr "Sorry your password must contain a lower case character"
+
+msgid "cpsschemas_err_password_mismatch"
+msgstr "Your password and confirmation don't match"
+
+msgid "cpsschemas_err_password_size_min"
+msgstr "Sorry your password is too short"
+
+msgid "cpsschemas_err_password_upper"
+msgstr "Sorry your password must contain an upper case character"
+
+msgid "cpsschemas_err_rangelist"
+msgstr "Invalid range list"
+
+msgid "cpsschemas_err_readonly"
+msgstr "Read only field"
+
+msgid "cpsschemas_err_required"
+msgstr "Field required"
+
+msgid "cpsschemas_err_select"
+msgstr "Invalid selection"
+
+msgid "cpsschemas_err_string"
+msgstr "Invalid string"
+
+msgid "cpsschemas_err_string_too_long"
+msgstr "String too long"
+
+msgid "cpsschemas_err_textarea"
+msgstr "Invalid text"
+
+msgid "cpsschemas_err_url"
+msgstr "Invalid URL"
+
+msgid "cpsschemas_err_zippedhtml_html_not_found"
+msgstr "No html document found in the Zip file"
+
+msgid "cpsschemas_err_zippedhtml_invalid_zip"
+msgstr "Invalid Zip file"
+
+msgid "cpsschemas_image_resize"
+msgstr "and resize as "
+
+msgid "cpsschemas_label_false"
+msgstr "No"
+
+msgid "cpsschemas_label_file_change"
+msgstr "Change"
+
+msgid "cpsschemas_label_file_delete"
+msgstr "Delete"
+
+msgid "cpsschemas_label_file_edit_online"
+msgstr "Edit online"
+
+msgid "cpsschemas_label_file_keep"
+msgstr "Keep"
+
+msgid "cpsschemas_label_file_none"
+msgstr "None"
+
+msgid "cpsschemas_label_filename"
+msgstr "Filename"
+
+msgid "cpsschemas_label_image_resize"
+msgstr "Resize as "
+
+msgid "cpsschemas_label_link_content"
+msgstr "Name of the link"
+
+msgid "cpsschemas_label_link_href"
+msgstr "URL"
+
+msgid "cpsschemas_label_link_title"
+msgstr "Description"
+
+msgid "cpsschemas_label_modified_since_0"
+msgstr "anytime"
+
+msgid "cpsschemas_label_modified_since_1"
+msgstr "since yesterday"
+
+msgid "cpsschemas_label_modified_since_182"
+msgstr "within the past 6 months"
+
+msgid "cpsschemas_label_modified_since_30"
+msgstr "within the past month"
+
+msgid "cpsschemas_label_modified_since_365"
+msgstr "within a year"
+
+msgid "cpsschemas_label_modified_since_91"
+msgstr "within the past 3 months"
+
+msgid "cpsschemas_label_searchsort_antechrono"
+msgstr "date (reversed)"
+
+msgid "cpsschemas_label_searchsort_chrono"
+msgstr "date"
+
+msgid "cpsschemas_label_searchsort_expires"
+msgstr "expiration date"
+
+msgid "cpsschemas_label_searchsort_portal_type"
+msgstr "document type"
+
+msgid "cpsschemas_label_searchsort_relative_path"
+msgstr "location"
+
+msgid "cpsschemas_label_searchsort_relevance"
+msgstr "relevance"
+
+msgid "cpsschemas_label_searchsort_review_state"
+msgstr "status"
+
+msgid "cpsschemas_label_searchsort_title"
+msgstr "title"
+
+msgid "cpsschemas_label_true"
+msgstr "Yes"
+
+msgid "cpsschemas_label_zctext_field_Description"
+msgstr "in the description"
+
+msgid "cpsschemas_label_zctext_field_SearchableText"
+msgstr "in the document"
+
+msgid "cpsschemas_label_zctext_field_Title"
+msgstr "in the title"
+
+msgid "cpsschemas_label_zctext_operator_and"
+msgstr "all of these words"
+
+msgid "cpsschemas_label_zctext_operator_exact"
+msgstr "the exact phrase"
+
+msgid "cpsschemas_label_zctext_operator_not"
+msgstr "none of these words"
+
+msgid "cpsschemas_label_zctext_operator_or"
+msgstr "any of these words"
+
+msgid "cpsschemas_photo_subtitle"
+msgstr "Caption: "
+
+msgid "cpsschemas_psm_vocabulary_created"
+msgstr "Vocabulary created."
+
+msgid "cpsschemas_psm_vocabulary_deleted"
+msgstr "Vocabulary deleted."
+
+msgid "cpsschemas_psm_vocabulary_entries_deleted"
+msgstr "Vocabulary deleted."
+
+msgid "cpsschemas_psm_vocabulary_entry_added"
+msgstr "Entry added."
+
+msgid "cpsschemas_psm_vocabulary_id_exists"
+msgstr "Id already exist, choose another one."
+
+msgid "cpsschemas_psm_vocabulary_id_missing"
+msgstr "Choose an id."
+
+msgid "cpsschemas_psm_vocabulary_no_entries_selected"
+msgstr "No entry selected. Choose one."
+
+msgid "cpsschemas_psm_vocabulary_updated"
+msgstr "Vocabulary updated."
+
+msgid "cpsschemas_render_format"
+msgstr "Format: "
+
+msgid "cpsschemas_render_position"
+msgstr "Position: "
+
+msgid "cpsschemas_rformat_html"
+msgstr "HTML"
+
+msgid "cpsschemas_rformat_original"
+msgstr "Original"
+
+msgid "cpsschemas_rformat_rst"
+msgstr "Structured Text (reST)"
+
+msgid "cpsschemas_rformat_text"
+msgstr "Text"
+
+msgid "cpsschemas_rposition_center"
+msgstr "Center"
+
+msgid "cpsschemas_rposition_col_left"
+msgstr "Left column"
+
+msgid "cpsschemas_rposition_col_right"
+msgstr "Right column"
+
+msgid "cpsschemas_rposition_left"
+msgstr "Left"
+
+msgid "cpsschemas_rposition_normal"
+msgstr "Page width"
+
+msgid "cpsschemas_rposition_right"
+msgstr "Right"
+
+msgid "cpsschemas_search_all_languages"
+msgstr "any language"
+
+msgid "cpsschemas_search_languages"
+msgstr "one or more of the following languages"
+
+msgid "cpsschemas_size_max ${size_max}"
+msgstr "Maximal size: ${size_max}."
+
+msgid "cpsschemas_unit_bytes"
+msgstr "bytes"
+
+msgid "cpsschemas_unit_giga_bytes"
+msgstr "Gb"
+
+msgid "cpsschemas_unit_kilo_bytes"
+msgstr "Kb"
+
+msgid "cpsschemas_unit_mega_bytes"
+msgstr "Mb"
+
+msgid "cpsschemas_vocabulary_add"
+msgstr "Add a vocabulary"
+
+msgid "cpsschemas_vocabulary_available"
+msgstr "Edit a vocabulary"
+
+msgid "cpsschemas_vocabulary_contains ${voc_entries} entry(ies)"
+msgstr "This vocabulary contains ${voc_entries} entry(ies)"
+
+msgid "cpsschemas_vocabulary_delete"
+msgstr "Delete a vocabulary"
+
+msgid "cpsschemas_vocabulary_edit ${voc_id}"
+msgstr "Edit vocabulary \"${voc_id}\""
+
+msgid "cpsschemas_vocabulary_entry_add"
+msgstr "Add an entry"
+
+msgid "cpsschemas_vocabulary_id"
+msgstr "Id:"
+
+msgid "cpsschemas_vocabulary_key"
+msgstr "Key:"
+
+msgid "cpsschemas_vocabulary_manage"
+msgstr "Vocabularies management"
+
+msgid "cpsschemas_vocabulary_msgid"
+msgstr "MsgId:"
+
+msgid "cpsschemas_vocabulary_value"
+msgstr "Value:"
+
+msgid "create"
+msgstr "Creation"
+
+msgid "date_long"
+msgstr "%m/%d/%Y %I:%M:%S %p"
+
+msgid "date_medium"
+msgstr "%m/%d/%Y %I:%M %p"
+
+msgid "date_short"
+msgstr "%m/%d/%Y"
+
+msgid "deferred"
+msgstr "deferred to "
+
+msgid "delete_translation"
+msgstr "Translation deleted"
+
+msgid "description_confirm_delete"
+msgstr "Are you sure?"
+
+msgid "description_field_required"
+msgstr "is empty while this field is required."
+
+msgid "description_login_failure"
+msgstr "You are not currently logged in. Your username and/or password may be incorrect. Your browser may also not be configured to accept HTTP cookies. If you need help please contact"
+
+msgid "description_logout_success"
+msgstr "You have been logged out."
+
+msgid "description_logout_zmi_warning"
+msgstr "You are logged in outside the portal.  You may need to"
+
+msgid "description_registered"
+msgstr "You have been registered as a member."
+
+msgid "description_the_account_you_will_reset_password_is"
+msgstr "The account below is the one on which the password reset on will be done."
+
+msgid "description_vocabulary_manage_form"
+msgstr "This page allow you to manage vocabularies and their entries."
+
+msgid "description_which_accounts_will_you_reset_password"
+msgstr "Specify which accounts you want to do a password reset on."
+
+msgid "draft"
+msgstr "working revision"
+
+msgid "en"
+msgstr "en"
+
+msgid "err"
+msgstr ""
+
+msgid "error_default_message"
+msgstr "We apologize for the inconvenience."
+
+msgid "error_not_found"
+msgstr "The resource you asked was not found. If the document has moved you may find it using the search form below."
+
+msgid "expired"
+msgstr "expired since "
+
+msgid "heading_abandon_draft_of ${item_id}"
+msgstr "Give up revision ${item_id}"
+
+msgid "heading_about_cps"
+msgstr "About CPS"
+
+msgid "heading_accept_publication_of ${item_id}"
+msgstr "Accept publication of "
+
+msgid "heading_advanced_search"
+msgstr "Advanced search"
+
+msgid "heading_checkin_draft_of ${item_id}"
+msgstr "Checkin revision ${item_id}"
+
+msgid "heading_checkout_draft_of ${item_id}"
+msgstr "Checkout revision ${item_id}"
+
+msgid "heading_click_chosen_value"
+msgstr "Click on the value you want:"
+
+msgid "heading_create"
+msgstr "Create"
+
+msgid "heading_delete_archive_n_of ${rev} ${item_id}"
+msgstr "Delete archive·${rev} of ${item_id}"
+
+msgid "heading_edit ${item_id}"
+msgstr "Edit"
+
+msgid "heading_enter_searched_value"
+msgstr "Enter a search term:"
+
+msgid "heading_error_not_found"
+msgstr "Resource not found"
+
+msgid "heading_error_other"
+msgstr "CPS encountered an error"
+
+msgid "heading_folder_factories"
+msgstr "Add content"
+
+msgid "heading_join_form"
+msgstr "Become a member"
+
+msgid "heading_learn_cps"
+msgstr "Learn CPS"
+
+msgid "heading_local_roles_search_members_and_groups"
+msgstr "Assign local roles: Search members and groups"
+
+msgid "heading_local_roles_search_results"
+msgstr "Assign local roles: Search Results"
+
+msgid "heading_login_failure"
+msgstr "Login failure"
+
+msgid "heading_login_form"
+msgstr "Log in"
+
+msgid "heading_lost_password"
+msgstr "You have lost your password"
+
+msgid "heading_mail_password_form"
+msgstr "Don't panic!"
+
+msgid "heading_mail_password_response"
+msgstr "Don't panic!"
+
+msgid "heading_password_reminder"
+msgstr "Password reminder"
+
+msgid "heading_password_reset"
+msgstr "Password reset"
+
+msgid "heading_publish_of ${item_id}"
+msgstr "Publish of ${item_id}"
+
+msgid "heading_reconfig_portal"
+msgstr "Configure portal"
+
+msgid "heading_registered_title"
+msgstr "Success!"
+
+msgid "heading_reject_publication_of ${item_id}"
+msgstr "Reject publication of "
+
+msgid "heading_rename_items"
+msgstr "Rename objects ids"
+
+msgid "heading_resource_metadata"
+msgstr "Resource metadata"
+
+msgid "heading_revert_to_old_revision_of ${item_id}"
+msgstr "Revert to an archived revision of ${item_id}"
+
+msgid "heading_search_results"
+msgstr "Search Results"
+
+msgid "heading_standard_resource_metadata"
+msgstr "Standard resource metadata"
+
+msgid "heading_start_cps"
+msgstr "Start CPS"
+
+msgid "heading_status_history_of ${item_id}"
+msgstr "Status history of ${item_id}"
+
+msgid "heading_submit_of ${item_id}"
+msgstr "Submit of ${item_id}"
+
+msgid "heading_translation_of ${item_id}"
+msgstr "Translation of \"${item_id}\""
+
+msgid "heading_unpublish_of ${item_id}"
+msgstr "Unpublish of ${item_id}"
+
+msgid "help_no_items_to_rename"
+msgstr "You must select one or more items to rename."
+
+msgid "i18_key-help_for_this_field"
+msgstr ""
+
+msgid "img_auto_size"
+msgstr "Automatic"
+
+msgid "img_icon ${dim}"
+msgstr "Icon ${dim}"
+
+msgid "img_large ${dim}"
+msgstr "Large ${dim}"
+
+msgid "img_medium ${dim}"
+msgstr "Medium ${dim}"
+
+msgid "img_small ${dim}"
+msgstr "Small ${dim}"
+
+msgid "img_xlarge ${dim}"
+msgstr "Extra large ${dim}"
+
+msgid "img_xsmall ${dim}"
+msgstr "Extra small ${dim}"
+
+msgid "jscalendar_date_fmt"
+msgstr "m/d/y"
+
+msgid "label"
+msgstr ""
+
+msgid "label_action_folder"
+msgstr "folder"
+
+msgid "label_action_global"
+msgstr "global"
+
+msgid "label_action_global_header"
+msgstr "global header"
+
+msgid "label_action_object"
+msgstr "object"
+
+msgid "label_action_user"
+msgstr "user"
+
+msgid "label_action_workflow"
+msgstr "workflow"
+
+msgid "label_advertisement_powered_by_cps"
+msgstr "Content Management by CPS"
+
+msgid "label_all"
+msgstr "All"
+
+msgid "label_bottom"
+msgstr "Bottom"
+
+msgid "label_center"
+msgstr "Current folder skin"
+
+msgid "label_center_bottom"
+msgstr "Center bottom"
+
+msgid "label_center_top"
+msgstr "Center top"
+
+msgid "label_choose"
+msgstr "Choose"
+
+msgid "label_comments"
+msgstr "Comments"
+
+msgid "label_compact"
+msgstr "Compact"
+
+msgid "label_creator"
+msgstr "Creator login"
+
+msgid "label_current_revisions"
+msgstr "Current revisions"
+
+msgid "label_current_status"
+msgstr "Current status of the document"
+
+msgid "label_date"
+msgstr "Date"
+
+msgid "label_date_effective_asc"
+msgstr "Effective date"
+
+msgid "label_date_effective_desc"
+msgstr "Effective date desc."
+
+msgid "label_date_modification_asc"
+msgstr "Modification date"
+
+msgid "label_date_modification_desc"
+msgstr "Modification date desc."
+
+msgid "label_default"
+msgstr "Default"
+
+msgid "label_description"
+msgstr "Description"
+
+msgid "label_destruction"
+msgstr "Destruction"
+
+msgid "label_detailed"
+msgstr "Detail"
+
+msgid "label_detailed_tab"
+msgstr "Table"
+
+msgid "label_display"
+msgstr "Display"
+
+msgid "label_download"
+msgstr "[download]"
+
+msgid "label_email"
+msgstr "Email address"
+
+msgid "label_end_date"
+msgstr "End Date (DD/MM/YYYY)"
+
+msgid "label_file_change"
+msgstr "Upload"
+
+msgid "label_file_delete"
+msgstr "Remove"
+
+msgid "label_file_keep"
+msgstr "Keep"
+
+msgid "label_file_upload"
+msgstr "File to use to fill the text area:"
+
+msgid "label_folder_view"
+msgstr "Default skin for folders"
+
+msgid "label_format"
+msgstr "Format"
+
+msgid "label_from"
+msgstr "From"
+
+msgid "label_group"
+msgstr "Group"
+
+msgid "label_group_name"
+msgstr "Group name"
+
+msgid "label_groups_local_roles_assignment"
+msgstr "Groups local roles assignment"
+
+msgid "label_guest"
+msgstr "Guest"
+
+msgid "label_icons"
+msgstr "Icons"
+
+msgid "label_image"
+msgstr "Image"
+
+msgid "label_in"
+msgstr "in"
+
+msgid "label_info_tab_author"
+msgstr "Author"
+
+msgid "label_info_tab_date"
+msgstr "Date"
+
+msgid "label_info_tab_size"
+msgstr "Size"
+
+msgid "label_info_tab_status"
+msgstr "Status"
+
+msgid "label_info_tab_title"
+msgstr "Title"
+
+msgid "label_info_tab_type"
+msgstr "Type"
+
+msgid "label_info_tab_version"
+msgstr "Version"
+
+msgid "label_inherited_blocked_role"
+msgstr "Role whose acquisition has been blocked."
+
+msgid "label_inherited_role"
+msgstr "Acquired role"
+
+msgid "label_inherited_roles"
+msgstr "Acquired roles"
+
+msgid "label_language"
+msgstr "Language"
+
+msgid "label_language ${status_language}"
+msgstr "Language ${status_language}"
+
+msgid "label_language_en"
+msgstr "English"
+
+msgid "label_language_fr"
+msgstr "French"
+
+msgid "label_last_modified"
+msgstr "Last modified:"
+
+msgid "label_left"
+msgstr "Left"
+
+msgid "label_location"
+msgstr "Location"
+
+msgid "label_name"
+msgstr "Name"
+
+msgid "label_none"
+msgstr "Unsorted"
+
+msgid "label_none_selection"
+msgstr " -- Empty -- "
+
+msgid "label_other_selection"
+msgstr "Other, please specify: "
+
+msgid "label_page"
+msgstr "Pages"
+
+msgid "label_password"
+msgstr "Password"
+
+msgid "label_password_confirm"
+msgstr "Password (confirm) "
+
+msgid "label_private_spaces"
+msgstr "Private spaces"
+
+msgid "label_right"
+msgstr "Right"
+
+msgid "label_search_all_site"
+msgstr "entire site"
+
+msgid "label_search_description"
+msgstr "Description"
+
+msgid "label_search_full_text"
+msgstr "Full text"
+
+msgid "label_search_here"
+msgstr "here"
+
+msgid "label_search_location"
+msgstr "Search"
+
+msgid "label_search_modified_since"
+msgstr "Modified since"
+
+msgid "label_search_portal_type"
+msgstr "Document type"
+
+msgid "label_search_status"
+msgstr "Status"
+
+msgid "label_search_title"
+msgstr "Title"
+
+msgid "label_since ${status_time}"
+msgstr "Since ${status_time}"
+
+msgid "label_sort_by"
+msgstr "Sort by"
+
+msgid "label_start_date"
+msgstr "Start Date (DD/MM/YYYY)"
+
+msgid "label_status"
+msgstr "Status"
+
+msgid "label_status_asc"
+msgstr "Status"
+
+msgid "label_status_desc"
+msgstr "Status desc"
+
+msgid "label_subject"
+msgstr "Subject"
+
+msgid "label_text_to_search"
+msgstr "Text to search"
+
+msgid "label_title"
+msgstr "Title"
+
+msgid "label_title_asc"
+msgstr "Title"
+
+msgid "label_title_desc"
+msgstr "Title desc"
+
+msgid "label_to"
+msgstr "To"
+
+msgid "label_top"
+msgstr "Top"
+
+msgid "label_translation_select_language"
+msgstr "Choose the language you want to translate to:"
+
+msgid "label_user"
+msgstr "User"
+
+msgid "label_user_email"
+msgstr "User email address"
+
+msgid "label_user_givenName"
+msgstr "User first name"
+
+msgid "label_user_id"
+msgstr "User id"
+
+msgid "label_user_name"
+msgstr "User name"
+
+msgid "label_user_name_or_email_address"
+msgstr "Username or user email address"
+
+msgid "label_user_surname"
+msgstr "User surname"
+
+msgid "label_users_local_roles_assignment"
+msgstr "Users local roles assignment"
+
+msgid "label_you_are_here"
+msgstr "You are here:&nbsp;"
+
+msgid "language"
+msgstr "Language"
+
+msgid "language_add"
+msgstr "Make available new languages"
+
+msgid "language_delete"
+msgstr "Make unavailable languages"
+
+msgid "language_set_default"
+msgstr "Set default portal language"
+
+msgid "legend_local_roles_assigned"
+msgstr "Assigned local roles"
+
+msgid "legend_local_roles_block"
+msgstr "Local roles are acquired. You can block acquisition:"
+
+msgid "legend_local_roles_filter_roles"
+msgstr "Filter on role"
+
+msgid "legend_local_roles_hide_blocked_roles"
+msgstr "Filter on role"
+
+msgid "legend_local_roles_inherited_blocked_role"
+msgstr "this colour means that corresponding role would be acquired weren't role acquisition blocked."
+
+msgid "legend_local_roles_inherited_role"
+msgstr "this colour means that corresponding roles are set in parent folders. Follow the links to manage the local roles in these folders."
+
+msgid "legend_local_roles_no_results_groups"
+msgstr "Sorry, no group matched your search."
+
+msgid "legend_local_roles_no_results_users"
+msgstr "Sorry, no user matched your search."
+
+msgid "legend_local_roles_no_roles_assigned"
+msgstr "There are no roles assigned in this folder"
+
+msgid "legend_local_roles_not_filtered_role"
+msgstr "No filter"
+
+msgid "legend_local_roles_role_to_assign"
+msgstr "Role to assign:"
+
+msgid "legend_local_roles_search_limit_exceeded"
+msgstr "Sorry, your query gave too many results, please refine your search criteria"
+
+msgid "legend_local_roles_select_groups_and_role"
+msgstr "Select group(s) and a role to assign:"
+
+msgid "legend_local_roles_select_members_and_role"
+msgstr "Select member(s) and a role to assign:"
+
+msgid "legend_local_roles_show_blocked_roles"
+msgstr "Show"
+
+msgid "legend_local_roles_unblock"
+msgstr "Local roles acquisition is <strong>blocked</strong>. You can unblock acquisition:"
+
+msgid "legend_no_search_result"
+msgstr "Your query gave no result."
+
+msgid "legend_one_search_result"
+msgstr "Your query gave one result."
+
+msgid "legend_search_for"
+msgstr "You searched for"
+
+msgid "link_advanced_search"
+msgstr "Advanced search"
+
+msgid "link_all_metadata"
+msgstr "Edit all metadata"
+
+msgid "link_consult_this_revision"
+msgstr "Consult this revision"
+
+msgid "link_go_back"
+msgstr "Go back"
+
+msgid "link_logout_zmi"
+msgstr " log out of the Zope Management Interface"
+
+msgid "link_search"
+msgstr "Search"
+
+msgid "listingheader_sections"
+msgstr "Section"
+
+msgid "locked"
+msgstr "locked"
+
+msgid "log out"
+msgstr "log out"
+
+msgid "members_root_title"
+msgstr "Member Areas"
+
+msgid "modify"
+msgstr "Modification"
+
+msgid "more_choices_folder_factories"
+msgstr "more choices"
+
+msgid "pending"
+msgstr "pending"
+
+msgid "portal_type_Dummy2_description"
+msgstr "&nbsp;"
+
+msgid "portal_type_Dummy2_title"
+msgstr "Dummy2 document"
+
+msgid "portal_type_Dummy_description"
+msgstr "A test document"
+
+msgid "portal_type_Dummy_title"
+msgstr "Dummy document"
+
+msgid "portal_type_Members_Workspace_description"
+msgstr "Members Root Workspace"
+
+msgid "portal_type_Members_Workspace_title"
+msgstr "Members Root Workspace"
+
+msgid "portal_type_Section_description"
+msgstr "Sections contains published revisions of documents"
+
+msgid "portal_type_Section_title"
+msgstr "Section"
+
+msgid "portal_type_Workspace_description"
+msgstr "A folder to create content"
+
+msgid "portal_type_Workspace_title"
+msgstr "Workspace"
+
+msgid "psm_archive_deleted"
+msgstr "Archive deleted."
+
+msgid "psm_content_changed"
+msgstr "Content changed."
+
+msgid "psm_content_created"
+msgstr "Content created."
+
+msgid "psm_content_error"
+msgstr "Invalid entry, please correct the errors."
+
+msgid "psm_copy_or_cut_at_least_one_document"
+msgstr "Copy or cut at least one document."
+
+msgid "psm_default_language_set"
+msgstr "Portal default language set"
+
+msgid "psm_entry_deleted"
+msgstr "Entry deleted."
+
+msgid "psm_entry_modified"
+msgstr "Entry modified."
+
+msgid "psm_form_ok"
+msgstr "Valid form"
+
+msgid "psm_invalid_form"
+msgstr "Invalid form"
+
+msgid "psm_item(s)_copied"
+msgstr "Item(s) copied."
+
+msgid "psm_item(s)_cut"
+msgstr "Item(s) cut."
+
+msgid "psm_item(s)_deleted"
+msgstr "Item(s) deleted."
+
+msgid "psm_item(s)_moved_down"
+msgstr "Item(s) moved down."
+
+msgid "psm_item(s)_moved_to_bottom"
+msgstr "Item(s) moved bottom."
+
+msgid "psm_item(s)_moved_to_top"
+msgstr "Item(s) moved top."
+
+msgid "psm_item(s)_moved_up"
+msgstr "Item(s) moved up."
+
+msgid "psm_item(s)_pasted"
+msgstr "Item(s) pasted."
+
+msgid "psm_item(s)_renamed"
+msgstr "Item(s) renamed."
+
+msgid "psm_join_invalid_email"
+msgstr "Your email is invalid. Please check it."
+
+msgid "psm_join_invalid_name"
+msgstr "The name you have chosen is invalid. Please change it or try another one."
+
+msgid "psm_join_login_already_used"
+msgstr "The login you have chosen is already in use. Please try another one."
+
+msgid "psm_join_password_mismatch"
+msgstr "Your password and your confirmation don't match."
+
+msgid "psm_join_password_too_short"
+msgstr "Your password must have at least 5 characters."
+
+msgid "psm_language_added"
+msgstr "New language(s) available"
+
+msgid "psm_language_deleted"
+msgstr "Language(s) made unavailable"
+
+msgid "psm_language_error_let_at_least_one_language_to_portal"
+msgstr "Let at least one language to CPS."
+
+msgid "psm_language_error_select_at_least_one_item"
+msgstr "Select at least one language."
+
+msgid "psm_language_error_unknown_command"
+msgstr "Unknown command"
+
+msgid "psm_local_roles_blocked"
+msgstr "Local roles acquisition blocked"
+
+msgid "psm_local_roles_changed"
+msgstr "Local roles changed."
+
+msgid "psm_local_roles_no_editable_ids"
+msgstr "No editable local roles"
+
+msgid "psm_local_roles_select_members"
+msgstr "Please select members first"
+
+msgid "psm_local_roles_unblocked"
+msgstr "Local roles acquisition unblocked"
+
+msgid "psm_logged_in"
+msgstr "You have logged in successfully"
+
+msgid "psm_operation_not_allowed"
+msgstr "Operation not allowed."
+
+msgid "psm_portal_reconfigured"
+msgstr "Portal reconfigured."
+
+msgid "psm_reset_password_problem"
+msgstr "The resetting of your password has failed."
+
+msgid "psm_reset_password_request_received"
+msgstr "The request for resetting your password has been well received. An email has been sent to you for confirmation."
+
+msgid "psm_reset_password_success_and_new_password_is"
+msgstr "<p>Your password has been successfully reinitialized. Your new password is: <strong>${new_password}</strong></p><p>Once logged, you will be able to change this password in User actions -> My preferences</p>"
+
+msgid "psm_revision_reverted"
+msgstr "Reverted to old revision."
+
+msgid "psm_select_at_least_one_document"
+msgstr "Select at least one document."
+
+msgid "psm_status_changed"
+msgstr "Workflow status changed."
+
+msgid "psm_translation_added"
+msgstr "Version for translation added"
+
+msgid "psm_translation_deleted"
+msgstr "Translation deleted"
+
+msgid "psm_you_must_select_sections_for_publishing"
+msgstr "You must choose at least one section for publication. Publication aborted !"
+
+msgid "publish"
+msgstr "Publishing"
+
+msgid "published"
+msgstr "published"
+
+msgid "reject"
+msgstr "rejected"
+
+msgid "role:Anonymous"
+msgstr "All users"
+
+msgid "role:Authenticated"
+msgstr "Authenticated users"
+
+msgid "sections_root_title"
+msgstr "Sections"
+
+msgid "submit"
+msgstr "Publication request"
+
+msgid "time_creation_date"
+msgstr "Creation Date"
+
+msgid "time_effective_date"
+msgstr "Effective Date"
+
+msgid "time_expiration_date"
+msgstr "Expiration Date"
+
+msgid "time_last_login"
+msgstr "Last login"
+
+msgid "time_last_modified"
+msgstr "Last modified date"
+
+msgid "time_last_month"
+msgstr "Last month"
+
+msgid "time_last_week"
+msgstr "Last week"
+
+msgid "time_yesterday"
+msgstr "Yesterday"
+
+msgid "transition_comments"
+msgstr "Comments"
+
+msgid "translate"
+msgstr "Translation"
+
+msgid "unpublish"
+msgstr "unpublish"
+
+msgid "v${status_revision}- ${status_language}"
+msgstr "v${status_revision}- ${status_language}"
+
+msgid "work"
+msgstr "work"
+
+msgid "workspaces_root_title"
+msgstr "Workspaces"
Index: WAeUP_SRP/trunk_not_used/interfaces.py
===================================================================
--- WAeUP_SRP/trunk_not_used/interfaces.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/interfaces.py	(revision 2226)
@@ -0,0 +1,48 @@
+"""WAeUP interfaces.
+
+interfaces and components were first introduced for the Zope3 architecture.
+However they can also be used for Zope 2.9 applications too such as CMF and CPS.
+Currently they are used by the GenericSetup tool to adapts persistent objects
+that are worth im- / exporting to their dedicated XMLAdapter.
+
+In our case, we want the state of our vogon tool to be GenericSetup aware.
+Please see the exportimport.py file for more details on the corresponding
+XMLAdapter.
+"""
+
+from zope.interface import Interface
+
+class IWAeUPTool(Interface):
+    """WAeUP_SRP
+    """
+
+class IWAeUPTable(Interface):
+    """Tables to store object relational data
+    """
+        
+    def addRecord(**data):
+        """Adds a record, with the data expressed in the data mapping.
+        
+        Raises an error if the uid exists.
+        """
+    
+    def deleteRecord(uid):
+        """Deletes the record specified by the uid"""
+    
+    def searchAndSetRecord(self, **data):
+        """
+        searches a record and set a specific value if this is unset
+        raises an error when not found.
+        returns 
+        -1 if not found
+        0 if already set by other
+        1 if found and not set
+        2 if found and set
+        """
+        
+    def modifyRecord(uid, **data):
+        """Modifies a record, with the data expressed in the data mapping.
+        
+        Raises an error if the uid does not exist.
+        """
+        
Index: WAeUP_SRP/trunk_not_used/profiles/default/accommodation.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/accommodation.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/accommodation.xml	(revision 2226)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="catalog.xsl"?>
+<object name="portal_accommodation" meta_type="WAeUP Table">
+ <column value="bed"/>
+ <column value="bed_type"/>
+ <column value="hall"/>
+ <column value="student"/>
+ <index name="bed" meta_type="FieldIndex">
+  <indexed_attr value="bed"/>
+ </index>
+ <index name="bed_type" meta_type="FieldIndex">
+  <indexed_attr value="bed_type"/>
+ </index>
+ <index name="student" meta_type="FieldIndex">
+  <indexed_attr value="student"/>
+ </index>
+ <index name="hall" meta_type="FieldIndex">
+  <indexed_attr value="hall"/>
+ </index>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/actionicons.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/actionicons.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/actionicons.xml	(revision 2226)
@@ -0,0 +1,257 @@
+<?xml version="1.0"?>
+<action-icons>
+ <action-icon category="object" action_id="view"
+              title="View" priority="10"
+              icon_expr="actionicon_view.png"/>
+ <action-icon category="object" action_id="new_content"
+              title="New" priority="20"
+              icon_expr="actionicon_add.png"/>
+ <action-icon category="object" action_id="contents"
+              title="Contents" priority="20"
+              icon_expr="actionicon_manage_content.png"/>
+ <action-icon category="object" action_id="preview"
+              title="Preview" priority="30"
+              icon_expr="actionicon_preview_icon.png"/>
+ <action-icon category="object" action_id="metadata"
+              title="Metadata" priority="40"
+              icon_expr="actionicon_metadata.png"/>
+ <action-icon category="object" action_id="localroles"
+              title="Local Roles" priority="90"
+              icon_expr="actionicon_user_roles.png"/>
+ <action-icon category="object"
+              action_id="activate_comments"
+              title="Authorize comments" priority="130"
+              icon_expr="actionicon_comments.png"/>
+ <action-icon category="object" action_id="edit"
+              title="Edit" priority="120"
+              icon_expr="actionicon_modify.png"/>
+ <action-icon category="object" action_id="comment"
+              title="Add comment" priority="140"
+              icon_expr="actionicon_addcomment.png"/>
+ <action-icon category="object" action_id="search_entry"
+              title="Search entry" priority="200"
+              icon_expr="actionicon_search.png"/>
+ <action-icon category="object" action_id="new_entry"
+              title="New entry" priority="210"
+              icon_expr="actionicon_add.png"/>
+ <action-icon category="object" action_id="view_entry"
+              title="View entry" priority="220"
+              icon_expr="actionicon_view.png"/>
+ <action-icon category="object" action_id="edit_entry"
+              title="Edit entry" priority="230"
+              icon_expr="actionicon_modify.png"/>
+ <action-icon category="object" action_id="delete_entry"
+              title="Delete entry" priority="240"
+              icon_expr="actionicon_reject.png"/>
+ <action-icon category="object" action_id="edit_online"
+              title="Edit online" priority="300"
+              icon_expr="actionicon_edit_online.png"/>
+ <action-icon category="object" action_id="new_bed_list"
+              title="Update Bed List" priority="80"
+              icon_expr="bed_list_refresh.gif"/>
+ <action-icon category="object"
+              action_id="change_bed"
+              title="Change Bed" priority="90"
+              icon_expr="bed_list_refresh.gif"/>
+ <action-icon category="object"
+              action_id="allocate_reserved_bed"
+              title="Allocate Reserved Bed" priority="100"
+              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"
+              icon_expr="actionicon_manage_portlets.png"/>
+ <action-icon category="workflow" action_id="copy_submit"
+              title="Submit" priority="70"
+              icon_expr="actionicon_submit.png"/>
+ <action-icon category="workflow" action_id="checkout_draft"
+              title="Version" priority="150"
+              icon_expr="actionicon_version.png"/>
+ <action-icon category="workflow" action_id="status_history"
+              title="History" priority="260"
+              icon_expr="actionicon_history.png"/>
+ <action-icon category="workflow" action_id="retract"
+              title="Submit" priority="90"
+              icon_expr="actionicon_retract.png"/>
+ <action-icon category="workflow" action_id="approve"
+              title="Approve" priority="50"
+              icon_expr="actionicon_validate.png"/>
+ <action-icon category="workflow" action_id="reject"
+              title="Reject" priority="60"
+              icon_expr="actionicon_reject.png"/>
+ <action-icon category="workflow" action_id="expire"
+              title="Expire" priority="80"
+              icon_expr="actionicon_expire.png"/>
+ <action-icon category="workflow"
+              action_id="delete_translation"
+              title="Delete translation" priority="190"
+              icon_expr="actionicon_del_translation.png"/>
+ <action-icon category="workflow" action_id="translate"
+              title="Translate" priority="180"
+              icon_expr="actionicon_add_translation.png"/>
+ <action-icon category="workflow" action_id="accept"
+              title="Accept" priority="50"
+              icon_expr="actionicon_publish.png"/>
+ <action-icon category="workflow" action_id="unpublish"
+              title="Unpublish" priority="70"
+              icon_expr="actionicon_unpublish.png"/>
+ <action-icon category="workflow" action_id="abandon_draft"
+              title="Give up revision" priority="170"
+              icon_expr="actionicon_version_reject.png"/>
+ <action-icon category="workflow" action_id="checkin_draft"
+              title="Checkin revision" priority="160"
+              icon_expr="actionicon_version_validate.png"/>
+
+ <action-icon category="global" action_id="configThemes"
+              title="Portal Themes" priority="0"
+              icon_expr="actionicon_portal_themes.png"/>
+ <action-icon category="global" action_id="configPortal"
+              title="Portal Configuration" priority="1"
+              icon_expr="actionicon_cps_settings3.png"/>
+ <action-icon category="global"
+              action_id="manage_vocabularies"
+              title="Manage vocabularies" priority="2"
+              icon_expr="actionicon_vocabularies.png"/>
+ <action-icon category="global" action_id="manage_languages"
+              title="Manage languages" priority="3"
+              icon_expr="actionicon_lang_selector.png"/>
+ <action-icon category="global" action_id="directories"
+              title="Directories" priority="4"
+              icon_expr="actionicon_directories.png"/>
+ <action-icon category="global" action_id="members"
+              title="Portal Members" priority="5"
+              icon_expr="actionicon_directories.png"/>
+ <action-icon category="global" action_id="waeup_search"
+              title="Search Portal" priority="6"
+              icon_expr="actionicon_search.png"/>
+
+ <action-icon category="global_header" action_id="print"
+              title="Print" priority="0"
+              icon_expr="actionicon_print.png"/>
+ <action-icon category="global_header"
+              action_id="accessibility"
+              title="Accessibility" priority="1"
+              icon_expr="actionicon_accessibility.png"/>
+ <action-icon category="global_header"
+              action_id="advanced_search"
+              title="Advanced Search" priority="2"
+              icon_expr="actionicon_advanced_search.png"/>
+ <action-icon category="global_header" action_id="contact"
+              title="Contact" priority="0"
+              icon_expr="actionicon_email.png"/>
+
+ <action-icon category="user" action_id="login"
+              title="Staff Login" priority="0"
+              icon_expr="actionicon_login.png"/>
+ <action-icon category="user" action_id="logout"
+              title="Logout" priority="1"
+              icon_expr="actionicon_logout.png"/>
+ <action-icon category="user" action_id="mystuff"
+              title="My stuff" priority="2"
+              icon_expr="actionicon_private.png"/>
+ <action-icon category="user" action_id="add_favorites"
+              title="Add to favorites" priority="2"
+              icon_expr="actionicon_addfavorite.png"/>
+ <action-icon category="user" action_id="view_favorites"
+              title="View favorites" priority="3"
+              icon_expr="actionicon_favorites.png"/>
+ <action-icon category="user" action_id="preferences"
+              title="User preferences" priority="5"
+              icon_expr="actionicon_user_preferences.png"/>
+
+ <action-icon category="object" action_id="unchecked"
+              title="Unchecked Items" priority="12"
+              icon_expr="actionicon_reject.png"/>
+ <action-icon category="user" action_id="unchecked"
+              title="Unchecked" priority="6"
+              icon_expr="actionicon_reject.png"/>
+
+ <action-icon category="navigation" action_id="home"
+              title="Home" priority="0"
+              icon_expr="blank.gif"/>
+ <action-icon category="navigation"
+              action_id="view_academics" title="Academics"
+              priority="1" icon_expr="blank.gif"/>
+ <action-icon category="navigation"
+              action_id="view_accommodation"
+              title="Accommodation" priority="2"
+              icon_expr="blank.gif"/>
+ <action-icon category="navigation"
+              action_id="view_students" title="Students"
+              priority="3" icon_expr="blank.gif"/>
+ <action-icon category="navigation" action_id="view_pins"
+              title="PINs" priority="4"
+              icon_expr="blank.gif"/>
+ <action-icon category="navigation"
+              action_id="view_documents" title="Documents"
+              priority="5" icon_expr="blank.gif"/>
+ <action-icon category="navigation" action_id="contact_admin"
+              title="Contact" priority="6"
+              icon_expr="blank.gif"/>
+
+ <action-icon category="student_navigation"
+              action_id="students_home" title="Home"
+              priority="0" icon_expr="blank.gif"/>
+ <action-icon category="student_navigation"
+              action_id="registration" title="My Study"
+              priority="1" icon_expr="blank.gif"/>
+ <action-icon category="student_navigation"
+              action_id="reserve_accommodation"
+              title="My Accommodation" priority="2"
+              icon_expr="blank.gif"/>
+ <action-icon category="student_navigation"
+              action_id="payments"
+              title="My Payments" priority="3"
+              icon_expr="blank.gif"/>
+ <action-icon category="student_navigation"
+              action_id="prospectus" title="Prospectus"
+              priority="4" icon_expr="blank.gif"/>
+ <action-icon category="student_navigation"
+              action_id="support" title="Enquiries"
+              priority="5" icon_expr="blank.gif"/>
+
+ <action-icon category="student_object" action_id="slip"
+              title="Acknowledegement Slip" priority="1"
+              icon_expr="bell.png"/>
+
+ <action-icon category="student" action_id="login_staff"
+              title="Staff Login" priority="0"
+              icon_expr="actionicon_login.png"/>
+ <action-icon category="student" action_id="login_student"
+              title="Student Login" priority="0"
+              icon_expr="actionicon_login.png"/>
+ <action-icon category="student" action_id="logout_student"
+              title="Logout" priority="1"
+              icon_expr="actionicon_logout.png"/>
+ <action-icon category="student" action_id="apply_pume"
+              title="Apply for PUME" priority="11"
+              icon_expr="bell.png"/>
+ <action-icon category="student" action_id="display_pume_results"
+              title="Display PUME Results" priority="3"
+              icon_expr="zoom.png"/>
+ <action-icon category="student" action_id="display_pde_results"
+              title="Display PDE Results" priority="4"
+              icon_expr="zoom.png"/>
+ <action-icon category="student" action_id="display_cest_results"
+              title="Display CEST Results" priority="5"
+              icon_expr="zoom.png"/>
+ <action-icon category="student" action_id="check_admission"
+              title="Check if admitted" priority="6"
+              icon_expr="bell.png"/>
+ <action-icon category="student" action_id="display_session_results"
+              title="Display Session Results" priority="7"
+              icon_expr="bell.png"/>
+ <action-icon category="student" action_id="firsttime_login"
+              title="Register for Previous Sessions" priority="8"
+              icon_expr="bell.png"/>
+ <action-icon category="student" action_id="request_transfer"
+              title="Request Transfer" priority="9"
+              icon_expr="arrow_switch.png"/>
+ <action-icon category="student" action_id="change_password"
+              title="Change Password" priority="10"
+              icon_expr="actionicon_user_preferences.png"/>
+
+</action-icons>
Index: WAeUP_SRP/trunk_not_used/profiles/default/actions.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/actions.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/actions.xml	(revision 2226)
@@ -0,0 +1,207 @@
+<?xml version="1.0"?>
+<object name="portal_actions" meta_type="CMF Actions Tool">
+ <action-provider name="portal_membership">
+  <action title="My stuff" action_id="mystuff" category="user"
+     condition_expr="python: member and portal.portal_membership.getHomeFolder()"
+     url_expr="string:${portal/portal_membership/getHomeUrl}/folder_contents"
+     visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="Search Members" action_id="member_view" category="user"
+     condition_expr="member"
+     url_expr="string:${portal_url}/search_members_form" visible="False">
+   <permission>View</permission>
+  </action>
+  <action title="Staff Login" action_id="login_staff" category="student"
+     condition_expr="not: member" url_expr="string:${portal_url}/login_staff"
+     visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="Log out" action_id="logout" category="user"
+     condition_expr="member" url_expr="string:${portal_url}/logout"
+     visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="action_my_preferences" action_id="preferences"
+     category="user"
+     condition_expr="python:member and member.has_role(&quot;Member&quot;)"
+     url_expr="string:${portal_url}/member_view?dirname=members&amp;id=${member}"
+     visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="Student Login" action_id="login_student" category="student"
+     condition_expr="python: not member and (portal.portal_url().find('uniben.waeup.org') &gt;-1 or portal.portal_url().find('uniben-demo.waeup.org') &gt;-1)"
+     url_expr="string:${portal_url}/login_student" visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="Log out" action_id="logout_student" category="student"
+     condition_expr="member" url_expr="string:${portal_url}/logout"
+     visible="True"/>
+ </action-provider>
+ <action-provider name="portal_actions">
+  <action title="action_print" action_id="print" category="global_header"
+     condition_expr=""
+     url_expr="string:javascript:if%20(window.print)%20window.print();"
+     visible="False">
+   <permission>View</permission>
+  </action>
+  <action title="Search Portal" action_id="waeup_search" category="global"
+     condition_expr="member" url_expr="string:./waeup_search_form"
+     visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="action_manage_vocabularies" action_id="manage_vocabularies"
+     category="global" condition_expr=""
+     url_expr="string:${portal_url}/vocabularies_manage_form" visible="False">
+   <permission>Modify portal content</permission>
+  </action>
+  <action title="Directories" action_id="directories" category="global"
+     condition_expr="python:portal.portal_directories.isSectionOfficer()"
+     url_expr="string:${portal_url}/cpsdirectory_view" visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="Portal Members" action_id="members" category="global"
+     condition_expr="python:portal.portal_directories.members.isSectionOfficer()"
+     url_expr="string:${portal_url}/search_members_form" visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="Home" action_id="home" category="navigation"
+     condition_expr="member" url_expr="string:${portal_url}/campus"
+     visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="Academics" action_id="view_academics" category="navigation"
+     condition_expr="member" url_expr="string:${portal_url}/campus/academics"
+     visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="Hostels" action_id="view_accommodation" category="navigation"
+     condition_expr="python:portal.campus.accommodation.isSectionOfficer()"
+     url_expr="string:${portal_url}/campus/accommodation" visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="Students" action_id="view_students" category="navigation"
+     condition_expr="python:portal.campus.students.isStaff()"
+     url_expr="string:${portal_url}/campus/students" visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="PINs" action_id="view_pins" category="navigation"
+     condition_expr="python:portal.campus.pins.isSectionOfficer()"
+     url_expr="string:${portal_url}/campus/pins" visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="Documents" action_id="view_documents" category="navigation"
+     condition_expr="python:portal.campus.documents.isSectionOfficer()"
+     url_expr="string:${portal_url}/campus/documents"
+     visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="Contact" action_id="contact_admin" category="navigation"
+     condition_expr="member"
+     url_expr="string:${portal_url}/contact_admin_form" visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="Enquiries" action_id="support_anon"
+     category="student_navigation" condition_expr="not:member"
+     url_expr="string:${portal_url}/contact_admin_form" visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="Enquiries" action_id="support" category="student_navigation"
+     condition_expr="member" url_expr="string:${portal_url}/support_form"
+     visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="Unchecked Items" action_id="unchecked" category="object"
+     condition_expr="python:member and 'academics' in object_url"
+     url_expr="string:./unchecked" visible="True">
+   <permission>Modify portal content</permission>
+  </action>
+  <action title="PUME Screening 07/08" action_id="apply_pume"
+     category="student" condition_expr="not:member"
+     url_expr="string:${portal_url}/apply_pume" visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="PUME Results 06/07" action_id="display_pume_results"
+     category="student" condition_expr="not:member"
+     url_expr="string:${portal_url}/display_pume_results" visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="PDE Results 06/07" action_id="display_pde_results"
+     category="student" condition_expr="not:member"
+     url_expr="string:${portal_url}/display_pde_results" visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="CEST Results 06/07" action_id="display_cest_results"
+     category="student" condition_expr="not:member"
+     url_expr="string:${portal_url}/display_cest_results" visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="Check Admission 06/07" action_id="check_admission"
+     category="student" condition_expr="not:member"
+     url_expr="string:${portal_url}/check_admission" visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="Return 06/07" action_id="display_session_results"
+     category="student" condition_expr="not:member"
+     url_expr="string:${portal_url}/display_session_results" visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="Previous Sessions" action_id="firsttime_login"
+     category="student" condition_expr="not:member"
+     url_expr="string:${portal_url}/firsttime_login" visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="Change Password" action_id="change_password"
+     category="student" condition_expr="member"
+     url_expr="string:${portal_url}/change_password" visible="False">
+   <permission>View</permission>
+  </action>
+  <action title="Home" action_id="students_home" category="student_navigation"
+     condition_expr="not:member" url_expr="string:${portal_url}"
+     visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="Prospectus" action_id="prospectus"
+     category="student_navigation" condition_expr="member"
+     url_expr="string:${portal_url}/campus/academics" visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="My Study" action_id="registration"
+     category="student_navigation" condition_expr="member"
+     url_expr="string:${portal_url}/campus/students" visible="True">
+   <permission>View</permission>
+  </action>
+  <action title="My Accommodation" action_id="reserve_accommodation"
+     category="student_navigation" condition_expr="member"
+     url_expr="string:${portal_url}/campus/students/${member}/reserve_accommodation" visible="True"/>
+  <action title="My Payments" action_id="payments"
+     category="student_navigation" condition_expr="member"
+     url_expr="string:${portal_url}/campus/students/${member}/payments"
+     visible="True"/>
+  <action title="Register Courses" action_id="register_courses"
+     category="student" condition_expr="member"
+     url_expr="string:${portal_url}/register_courses" visible="False"/>
+  <action title="Request Transfer" action_id="request_transfer"
+     category="student"
+     condition_expr="python: here.isStudent() and here.getStudentWorkflowInfo()['tr']"
+     url_expr="string:${portal_url}/request_transfer" visible="True"/>
+ </action-provider>
+ <action-provider name="portal_registration">
+  <action title="Join" action_id="join" category="user"
+     condition_expr="python:portal.portal_registration.enable_portal_joining and not member"
+     url_expr="string:${portal_url}/join_form" visible="True">
+   <permission>Add portal member</permission>
+  </action>
+ </action-provider>
+ <action-provider name="portal_themes"/>
+ <action-provider name="portal_types"/>
+ <action-provider name="portal_syndication"/>
+ <action-provider name="portal_workflow"/>
+ <action-provider name="portal_properties">
+  <action title="Reconfigure Portal" action_id="configPortal"
+     category="global" condition_expr=""
+     url_expr="string:${portal_url}/config_form" visible="True">
+   <permission>Manage portal</permission>
+  </action>
+ </action-provider>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/actions.xsl
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/actions.xsl	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/actions.xsl	(revision 2226)
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:output method="html"/>
+  <xsl:template match="/">
+    <html>
+      <head>
+        <title>
+          <xsl:for-each select="object">
+            <xsl:value-of select="@name"/>
+          </xsl:for-each>
+        </title>
+        <link rel="stylesheet" type="text/css" media="all"
+              href="xsl.css" />      
+      </head>
+      <body>
+        <xsl:for-each select="object">
+          <h2>
+            <xsl:value-of select="@name"/>
+          </h2> 
+          <xsl:for-each select="action-provider">
+            <xsl:sort select="@action_provider"
+                      order="ascending" />
+            <h1>
+              <xsl:value-of select="@name"/>
+            </h1> 
+            <h2>Actions</h2>
+            <table>
+              <tr>
+                <th>Id</th>
+                <th>Title</th>
+                <th>Permission</th>
+                <th>Category</th>
+                <th>Visible</th>
+              </tr>
+              <xsl:for-each select="action">
+                <xsl:sort select="@category"
+                          order="ascending" />
+                <xsl:variable name="color">
+                  <xsl:choose>
+                    <xsl:when test="position() mod 2 = 0">
+                      <xsl:text>#ffffff</xsl:text>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      <xsl:text>#eeeeee</xsl:text>
+                    </xsl:otherwise>
+                  </xsl:choose>
+                </xsl:variable>
+                <tr style="background-color:{$color}">
+                  <td>
+                    <xsl:value-of select="@action_id"/>
+                  </td>
+                  <td>
+                    <xsl:value-of select="@title"/>
+                  </td>
+                  <td>
+                    <xsl:for-each select="permission">
+                      <xsl:value-of select="@value"/>
+                    </xsl:for-each>
+                  </td>
+                  <td>
+                    <xsl:value-of select="@category"/>
+                  </td>
+                  <td>
+                    <xsl:value-of select="@visible"/>
+                  </td>
+                  <xsl:for-each select="element">
+                    <td>
+                      <xsl:value-of select="@value"/>
+                    </td>
+                  </xsl:for-each>
+                </tr>
+                <tr style="background-color:{$color}">
+                  <th>url_expression</th>
+                  <td colspan="4">
+                    <xsl:value-of select="@url_expr"/>
+                  </td>
+                </tr>
+                <tr style="background-color:{$color}">
+                  <th>condition_expression</th>
+                  <td colspan="4">
+                    <xsl:value-of select="@condition_expr"/>
+                  </td>
+                </tr>
+              </xsl:for-each>
+            </table>
+          </xsl:for-each>
+        </xsl:for-each>
+      </body>
+    </html>
+  </xsl:template>
+</xsl:stylesheet>
Index: WAeUP_SRP/trunk_not_used/profiles/default/applicants_catalog.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/applicants_catalog.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/applicants_catalog.xml	(revision 2226)
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="catalog.xsl"?>
+<object name="applicants_catalog" meta_type="WAeUP Table">
+ <column value="reg_no"/>
+ <column value="application_date"/>
+ <column value="date_of_birth"/>
+ <column value="sex"/>
+ <column value="firstname"/>
+ <column value="middlenames"/>
+ <column value="lastname"/>
+ <column value="lga"/>
+ <column value="email"/>
+ <column value="phone"/>
+ <column value="pin"/>
+ <column value="eng_score"/>
+ <column value="subj1"/>
+ <column value="subj1score"/>
+ <column value="subj2"/>
+ <column value="subj2score"/>
+ <column value="subj3"/>
+ <column value="subj3score"/>
+ <column value="aggregate"/>
+ <column value="entry_mode"/>
+ <column value="faculty"/>
+ <column value="department"/>
+ <column value="course1"/>
+ <column value="course2"/>
+ <column value="course3"/>
+ <column value="course_admitted"/>
+ <column value="screening_type"/>
+ <column value="screening_date"/>
+ <column value="passport"/>
+ <column value="status"/>
+ <index name="reg_no" meta_type="FieldIndex">
+  <indexed_attr value="reg_no"/>
+ </index>
+ <index name="status" meta_type="FieldIndex">
+  <indexed_attr value="status"/>
+ </index>
+ <index name="lastname" meta_type="TextIndex">
+  <indexed_attr value="lastname"/>
+ </index>
+ <index name="screening_type" meta_type="FieldIndex">
+  <indexed_attr value="screening_type"/>
+ </index>
+ <index name="course_admitted" meta_type="FieldIndex">
+  <indexed_attr value="course_admitted"/>
+ </index>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/catalog.xsl
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/catalog.xsl	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/catalog.xsl	(revision 2226)
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:output method="html"/>
+  <xsl:template match="/">
+    <html>
+      <body>
+      <head>
+        <title>
+          <xsl:value-of select="object/name"/>
+        </title>
+        <link rel="stylesheet" type="text/css" media="all"
+              href="xsl.css" />      
+      </head>
+        <xsl:for-each select="object">
+          <h2>
+            <xsl:value-of select="@name"/>
+            Metatype: <xsl:value-of select="@meta_type"/>
+          </h2> 
+        </xsl:for-each>
+        <h1>Columns</h1>
+        <table>
+          <xsl:for-each select="object/column">
+            <xsl:sort select="@value"
+                      order="ascending" />
+            <xsl:variable name="color">
+              <xsl:choose>
+                <xsl:when test="position() mod 2 = 0">
+                  <xsl:text>#ffffff</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>#eeeeee</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+            <tr style="background-color:{$color}">
+              <td colspan="">
+                <xsl:value-of select="@value"/>
+              </td>
+            </tr>
+          </xsl:for-each>
+        </table>
+        <h1>Indexes</h1>
+        <table>
+          <tr>
+            <th>Name</th>
+            <th>Meta-Type</th>
+            <th>Indexed Attribute</th>
+          </tr>            
+          <xsl:for-each select="object/index">
+            <xsl:sort select="@name"
+                      order="ascending" />
+            <xsl:variable name="color">
+              <xsl:choose>
+                <xsl:when test="position() mod 2 = 0">
+                  <xsl:text>#ffffff</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>#eeeeee</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+            <tr style="background-color:{$color}">
+              <td colspan="">
+                <xsl:value-of select="@name"/>
+              </td>
+              <td colspan="">
+                <xsl:value-of select="@meta_type"/>
+              </td>
+              <xsl:for-each select="indexed_attr">
+                <td>
+                  <xsl:value-of select="@value"/>
+                </td>
+              </xsl:for-each>
+            </tr>
+          </xsl:for-each>
+        </table>
+      </body>
+    </html>
+  </xsl:template>
+</xsl:stylesheet>
Index: WAeUP_SRP/trunk_not_used/profiles/default/content.xsl
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/content.xsl	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/content.xsl	(revision 2226)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:output method="html"/>
+  <xsl:template match="/">
+    <html>
+      <head>
+        <title>
+          <xsl:value-of select="object/name"/>
+        </title>
+        <link rel="stylesheet" type="text/css" media="all"
+              href="../xsl.css" />      
+      </head>
+      <body>
+        <xsl:for-each select="object">
+          <h2>
+            <xsl:value-of select="@name"/> : <xsl:value-of select="@meta_type"/>
+          </h2> 
+          <h1>Objects</h1>
+          <table>
+            <xsl:variable name="path">
+              <xsl:choose>
+                <xsl:when test="@name='portal_directories'">
+                  <xsl:text>directories</xsl:text>
+                </xsl:when>
+                <xsl:when test="@name='portal_layouts'">
+                  <xsl:text>layouts</xsl:text>
+                </xsl:when>
+                <xsl:when test="@name='portal_schemas'">
+                  <xsl:text>schemas</xsl:text>
+                </xsl:when>
+                <xsl:when test="@name='portal_types'">
+                  <xsl:text>types</xsl:text>
+                </xsl:when>
+                <xsl:when test="@name='portal_vocabularies'">
+                  <xsl:text>vocabularies</xsl:text>
+                </xsl:when>
+                <xsl:when test="@name='portal_workflows'">
+                  <xsl:text>workflows</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>xxxxxx</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+          <xsl:for-each select="object">
+            <xsl:sort select="@name"
+                      order="ascending" />
+            <xsl:variable name="color">
+              <xsl:choose>
+                <xsl:when test="position() mod 2 = 0">
+                  <xsl:text>#ffffff</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>#eeeeee</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+            <tr style="background-color:{$color}">
+              <td colspan="">
+                <xsl:value-of select="@name"/>
+              </td>
+              <td colspan="">
+                <a href="{$path}/{@name}.xml"><xsl:value-of select="@name"/></a>
+              </td>
+              <td colspan="">
+                <xsl:value-of select="@meta_type"/>
+              </td>
+            </tr>
+          </xsl:for-each>
+        </table>
+        </xsl:for-each>
+      </body>
+    </html>
+  </xsl:template>
+</xsl:stylesheet>
Index: WAeUP_SRP/trunk_not_used/profiles/default/contenttyperegistry.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/contenttyperegistry.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/contenttyperegistry.xml	(revision 2226)
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<object name="content_type_registry" meta_type="Content Type Registry">
+ <predicate name="link" content_type_name="Link" predicate_type="extension">
+  <argument value="url,link"/>
+ </predicate>
+ <predicate name="news" content_type_name="News Item"
+    predicate_type="extension">
+  <argument value="news"/>
+ </predicate>
+ <predicate name="document" content_type_name="Document"
+    predicate_type="major_minor">
+  <argument value="text"/>
+  <argument value=""/>
+ </predicate>
+ <predicate name="image" content_type_name="Image"
+    predicate_type="major_minor">
+  <argument value="image"/>
+  <argument value=""/>
+ </predicate>
+ <predicate name="file" content_type_name="File" predicate_type="major_minor">
+  <argument value="application"/>
+  <argument value=""/>
+ </predicate>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cookieauth.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cookieauth.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cookieauth.xml	(revision 2226)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<object name="cookie_authentication" meta_type="Cookie Crumbler">
+ <property name="auth_cookie">__ac</property>
+ <property name="name_cookie">__ac_name</property>
+ <property name="pw_cookie">__ac_password</property>
+ <property name="persist_cookie">__ac_persistent</property>
+ <property name="auto_login_page">login_staff</property>
+ <property name="logout_page">logged_out</property>
+ <property name="unauth_page"></property>
+ <property name="local_cookie_path">False</property>
+ <property name="cache_header_value">private</property>
+ <property name="log_username">True</property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/course_results.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/course_results.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/course_results.xml	(revision 2226)
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="catalog.xsl"?>
+<object name="course_results" meta_type="WAeUP Table">
+ <column value="key"/>
+ <column value="code"/>
+ <column value="carry_over"/>
+ <column value="core_or_elective"/>
+ <column value="credits"/>
+ <column value="grade"/>
+ <column value="student_id"/>
+ <column value="level_id"/>
+ <column value="score"/>
+ <column value="grade"/>
+ <column value="semester"/>
+ <column value="queue_status"/>
+ <index name="key" meta_type="FieldIndex">
+  <indexed_attr value="key"/>
+ </index>
+ <index name="code" meta_type="FieldIndex">
+  <indexed_attr value="code"/>
+ </index>
+ <index name="student_id" meta_type="FieldIndex">
+  <indexed_attr value="student_id"/>
+ </index>
+ <index name="level_id" meta_type="FieldIndex">
+  <indexed_attr value="level_id"/>
+ </index>
+ <index name="queue_status" meta_type="FieldIndex">
+  <indexed_attr value="queue_status"/>
+ </index>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/courses_catalog.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/courses_catalog.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/courses_catalog.xml	(revision 2226)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="catalog.xsl"?>
+<object name="courses_catalog" meta_type="WAeUP Table">
+ <column value="code"/>
+ <column value="faculty"/>
+ <column value="department"/>
+ <column value="title"/>
+ <column value="credits"/>
+ <column value="passmark"/>
+ <column value="semester"/>
+ <index name="code" meta_type="FieldIndex">
+  <indexed_attr value="code"/>
+ </index>
+ <index name="faculty" meta_type="FieldIndex">
+  <indexed_attr value="faculty"/>
+ </index>
+ <index name="department" meta_type="FieldIndex">
+  <indexed_attr value="department"/>
+ </index>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets.xml	(revision 2226)
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<object name=".cps_portlets" meta_type="CPS Placeful Portlets Container">
+ <object name="portlet_actions_staff" meta_type="CPS Portlet"
+    portal_type="Actions Portlet"/>
+ <object name="portlet_actions_students" meta_type="CPS Portlet"
+    portal_type="Actions Portlet"/>
+ <object name="portlet_breadcrumbs" meta_type="CPS Portlet"
+    portal_type="Breadcrumbs Portlet"/>
+ <object name="portlet_breadcrumbs2" meta_type="CPS Portlet"
+    portal_type="Breadcrumbs Portlet"/>
+ <object name="portlet_export_actions" meta_type="CPS Portlet"
+    portal_type="Actions Portlet"/>
+ <object name="portlet_global_actions" meta_type="CPS Portlet"
+    portal_type="Actions Portlet"/>
+ <object name="portlet_import_actions" meta_type="CPS Portlet"
+    portal_type="Actions Portlet"/>
+ <object name="portlet_navigation_staff" meta_type="CPS Portlet"
+    portal_type="Actions Portlet"/>
+ <object name="portlet_navigation_students" meta_type="CPS Portlet"
+    portal_type="Actions Portlet"/>
+ <object name="portlet_object_actions_staff" meta_type="CPS Portlet"
+    portal_type="Actions Portlet"/>
+ <object name="portlet_object_actions_students" meta_type="CPS Portlet"
+    portal_type="Actions Portlet"/>
+ <object name="portlet_registration_status" meta_type="CPS Portlet"
+    portal_type="Custom Portlet"/>
+ <object name="portlet_search" meta_type="CPS Portlet"
+    portal_type="Search Portlet"/>
+ <object name="portlet_search2" meta_type="CPS Portlet"
+    portal_type="Search Portlet"/>
+ <object name="portlet_search3" meta_type="CPS Portlet"
+    portal_type="Search Portlet"/>
+ <object name="portlet_session_info" meta_type="CPS Portlet"
+    portal_type="Custom Portlet"/>
+ <object name="portlet_workflow_status" meta_type="CPS Portlet"
+    portal_type="Custom Portlet"/>
+ <object name="portlet_student_notice" meta_type="CPS Portlet"
+    portal_type="Custom Portlet"/>    
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_actions_staff.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_actions_staff.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_actions_staff.xml	(revision 2226)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<object name="portlet_actions_staff" meta_type="CPS Portlet"
+   portal_type="Actions Portlet">
+ <f id="Contributors">
+  <e v="Henrik Bettermann"/>
+  <e v="Perry Schmitz"/>
+ </f>
+ <f id="Coverage" v=""/>
+ <f id="CreationDate" v="20061129154356Z"/>
+ <f id="Creator" v="admin"/>
+ <f id="Description" v=""/>
+ <f id="EffectiveDate" v=""/>
+ <f id="ExpirationDate" v=""/>
+ <f id="Format" v="text/html"/>
+ <f id="Language" v=""/>
+ <f id="ModificationDate" v="20070420061938Z"/>
+ <f id="Relation" v=""/>
+ <f id="Rights" v=""/>
+ <f id="Source" v=""/>
+ <f id="Subject"/>
+ <f id="Title" v="Staff Actions"/>
+ <f id="actions_order"/>
+ <f id="allow_discussion" v="False"/>
+ <f id="cache_cleanup_date" v="1158068837.53"/>
+ <f id="cache_params"/>
+ <f id="cache_timeout" v="0"/>
+ <f id="categories">
+  <e v="user"/>
+ </f>
+ <f id="disable_override" v="0"/>
+ <f id="dummy" v=""/>
+ <f id="identifier" v="portlet_122878951"/>
+ <f id="javascript" v=""/>
+ <f id="order" v="0"/>
+ <f id="portlet" v=""/>
+ <f id="preview"/>
+ <f id="provider" v=""/>
+ <f id="show_icons" v="True"/>
+ <f id="slot" v="staff_actions_slot"/>
+ <f id="slot_override" v="0"/>
+ <f id="visibility_range" v="0-0"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_actions_students.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_actions_students.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_actions_students.xml	(revision 2226)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<object name="portlet_actions_students" meta_type="CPS Portlet"
+   portal_type="Actions Portlet">
+ <f id="Contributors">
+  <e v="Henrik Bettermann"/>
+  <e v="Perry Schmitz"/>
+ </f>
+ <f id="Coverage" v=""/>
+ <f id="CreationDate" v="20061129154356Z"/>
+ <f id="Creator" v="admin"/>
+ <f id="Description" v=""/>
+ <f id="EffectiveDate" v=""/>
+ <f id="ExpirationDate" v=""/>
+ <f id="Format" v="text/html"/>
+ <f id="Language" v=""/>
+ <f id="ModificationDate" v="20070420061939Z"/>
+ <f id="Relation" v=""/>
+ <f id="Rights" v=""/>
+ <f id="Source" v=""/>
+ <f id="Subject"/>
+ <f id="Title" v="Student Actions"/>
+ <f id="actions_order"/>
+ <f id="allow_discussion" v="False"/>
+ <f id="cache_cleanup_date" v="1158088650.46"/>
+ <f id="cache_params"/>
+ <f id="cache_timeout" v="0"/>
+ <f id="categories">
+  <e v="student"/>
+ </f>
+ <f id="disable_override" v="0"/>
+ <f id="dummy" v=""/>
+ <f id="identifier" v="portlet_317036513"/>
+ <f id="javascript" v=""/>
+ <f id="order" v="0"/>
+ <f id="portlet" v=""/>
+ <f id="preview"/>
+ <f id="provider" v=""/>
+ <f id="show_icons" v="True"/>
+ <f id="slot" v="student_actions_slot"/>
+ <f id="slot_override" v="0"/>
+ <f id="visibility_range" v="0-0"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_breadcrumbs.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_breadcrumbs.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_breadcrumbs.xml	(revision 2226)
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<object name="portlet_breadcrumbs" meta_type="CPS Portlet"
+   portal_type="Breadcrumbs Portlet">
+ <f id="Contributors">
+  <e v="Bettermann Henrik"/>
+  <e v="Henrik Bettermann"/>
+  <e v="admin"/>
+  <e v="SRP Manager"/>
+  <e v="Perry Schmitz"/>
+ </f>
+ <f id="Coverage" v=""/>
+ <f id="CreationDate" v="20061129154357Z"/>
+ <f id="Creator" v="admin"/>
+ <f id="Description" v=""/>
+ <f id="EffectiveDate" v=""/>
+ <f id="ExpirationDate" v=""/>
+ <f id="Format" v="text/html"/>
+ <f id="Language" v=""/>
+ <f id="ModificationDate" v="20070420061940Z"/>
+ <f id="Relation" v=""/>
+ <f id="Rights" v=""/>
+ <f id="Source" v=""/>
+ <f id="Subject"/>
+ <f id="Title" v="Breadcrumbs Portlet"/>
+ <f id="allow_discussion" v="False"/>
+ <f id="cache_cleanup_date" v="0.0"/>
+ <f id="cache_params"/>
+ <f id="cache_timeout" v="300"/>
+ <f id="disable_override" v="0"/>
+ <f id="display" v="horizontal_trail"/>
+ <f id="display_hidden_folders" v="True"/>
+ <f id="display_site_root" v="False"/>
+ <f id="first_item" v="1"/>
+ <f id="highlight_last_item" v="0"/>
+ <f id="identifier" v="portlet_778397189"/>
+ <f id="javascript" v=""/>
+ <f id="layout" v=""/>
+ <f id="order" v="0"/>
+ <f id="portlet" v=""/>
+ <f id="preview"/>
+ <f id="provider" v=""/>
+ <f id="slot" v="user_actions"/>
+ <f id="slot_override" v="0"/>
+ <f id="visibility_range" v="0-0"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_breadcrumbs2.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_breadcrumbs2.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_breadcrumbs2.xml	(revision 2226)
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<object name="portlet_breadcrumbs2" meta_type="CPS Portlet"
+   portal_type="Breadcrumbs Portlet">
+ <f id="Contributors">
+  <e v="Henrik Bettermann"/>
+  <e v="admin"/>
+  <e v="SRP Manager"/>
+  <e v="Perry Schmitz"/>
+ </f>
+ <f id="Coverage" v=""/>
+ <f id="CreationDate" v="20061129154357Z"/>
+ <f id="Creator" v="admin"/>
+ <f id="Description" v=""/>
+ <f id="EffectiveDate" v=""/>
+ <f id="ExpirationDate" v=""/>
+ <f id="Format" v="text/html"/>
+ <f id="Language" v=""/>
+ <f id="ModificationDate" v="20070420061940Z"/>
+ <f id="Relation" v=""/>
+ <f id="Rights" v=""/>
+ <f id="Source" v=""/>
+ <f id="Subject"/>
+ <f id="Title" v="Breadcrumbs Portlet2"/>
+ <f id="allow_discussion" v="False"/>
+ <f id="cache_cleanup_date" v="0.0"/>
+ <f id="cache_params"/>
+ <f id="cache_timeout" v="300"/>
+ <f id="disable_override" v="0"/>
+ <f id="display" v="horizontal_trail"/>
+ <f id="display_hidden_folders" v="True"/>
+ <f id="display_site_root" v="True"/>
+ <f id="first_item" v="2"/>
+ <f id="highlight_last_item" v="0"/>
+ <f id="identifier" v="portlet_951449960"/>
+ <f id="javascript" v=""/>
+ <f id="layout" v=""/>
+ <f id="order" v="0"/>
+ <f id="portlet" v=""/>
+ <f id="preview"/>
+ <f id="provider" v=""/>
+ <f id="slot" v="bread_slot"/>
+ <f id="slot_override" v="0"/>
+ <f id="visibility_range" v="0-0"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_export_actions.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_export_actions.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_export_actions.xml	(revision 2226)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<object name="portlet_export_actions" meta_type="CPS Portlet"
+   portal_type="Actions Portlet">
+ <f id="Contributors">
+  <e v="Henrik Bettermann"/>
+  <e v="Perry Schmitz"/>
+ </f>
+ <f id="Coverage" v=""/>
+ <f id="CreationDate" v="20061129154356Z"/>
+ <f id="Creator" v="admin"/>
+ <f id="Description" v=""/>
+ <f id="EffectiveDate" v=""/>
+ <f id="ExpirationDate" v=""/>
+ <f id="Format" v="text/html"/>
+ <f id="Language" v=""/>
+ <f id="ModificationDate" v="20070420061939Z"/>
+ <f id="Relation" v=""/>
+ <f id="Rights" v=""/>
+ <f id="Source" v=""/>
+ <f id="Subject"/>
+ <f id="Title" v="Export"/>
+ <f id="actions_order"/>
+ <f id="allow_discussion" v="False"/>
+ <f id="cache_cleanup_date" v="1159126823.92"/>
+ <f id="cache_params"/>
+ <f id="cache_timeout" v="0"/>
+ <f id="categories">
+  <e v="export"/>
+ </f>
+ <f id="disable_override" v="0"/>
+ <f id="dummy" v=""/>
+ <f id="identifier" v="portlet_234261018"/>
+ <f id="javascript" v=""/>
+ <f id="order" v="0"/>
+ <f id="portlet" v=""/>
+ <f id="preview"/>
+ <f id="provider" v=""/>
+ <f id="show_icons" v="True"/>
+ <f id="slot" v="export_actions_slot"/>
+ <f id="slot_override" v="0"/>
+ <f id="visibility_range" v="0-0"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_global_actions.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_global_actions.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_global_actions.xml	(revision 2226)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<object name="portlet_global_actions" meta_type="CPS Portlet"
+   portal_type="Actions Portlet">
+ <f id="Contributors">
+  <e v="Henrik Bettermann"/>
+  <e v="Perry Schmitz"/>
+ </f>
+ <f id="Coverage" v=""/>
+ <f id="CreationDate" v="20061129154356Z"/>
+ <f id="Creator" v="admin"/>
+ <f id="Description" v=""/>
+ <f id="EffectiveDate" v=""/>
+ <f id="ExpirationDate" v=""/>
+ <f id="Format" v="text/html"/>
+ <f id="Language" v=""/>
+ <f id="ModificationDate" v="20070420061938Z"/>
+ <f id="Relation" v=""/>
+ <f id="Rights" v=""/>
+ <f id="Source" v=""/>
+ <f id="Subject"/>
+ <f id="Title" v="Global Actions"/>
+ <f id="actions_order"/>
+ <f id="allow_discussion" v="False"/>
+ <f id="cache_cleanup_date" v="1158068826.89"/>
+ <f id="cache_params"/>
+ <f id="cache_timeout" v="0"/>
+ <f id="categories">
+  <e v="global"/>
+ </f>
+ <f id="disable_override" v="0"/>
+ <f id="dummy" v=""/>
+ <f id="identifier" v="portlet_122878952"/>
+ <f id="javascript" v=""/>
+ <f id="order" v="0"/>
+ <f id="portlet" v=""/>
+ <f id="preview"/>
+ <f id="provider" v=""/>
+ <f id="show_icons" v="True"/>
+ <f id="slot" v="global_actions_slot"/>
+ <f id="slot_override" v="0"/>
+ <f id="visibility_range" v="0-0"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_import_actions.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_import_actions.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_import_actions.xml	(revision 2226)
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<object name="portlet_import_actions" meta_type="CPS Portlet"
+   portal_type="Actions Portlet">
+ <f id="Contributors">
+  <e v="Bettermann Henrik"/>
+  <e v="admin"/>
+  <e v="SRP Manager"/>
+  <e v="Henrik Bettermann"/>
+  <e v="Perry Schmitz"/>
+ </f>
+ <f id="Coverage" v=""/>
+ <f id="CreationDate" v="20061129154356Z"/>
+ <f id="Creator" v="admin"/>
+ <f id="Description" v=""/>
+ <f id="EffectiveDate" v=""/>
+ <f id="ExpirationDate" v=""/>
+ <f id="Format" v="text/html"/>
+ <f id="Language" v=""/>
+ <f id="ModificationDate" v="20070420061939Z"/>
+ <f id="Relation" v=""/>
+ <f id="Rights" v=""/>
+ <f id="Source" v=""/>
+ <f id="Subject"/>
+ <f id="Title" v="Import Actions"/>
+ <f id="actions_order"/>
+ <f id="allow_discussion" v="False"/>
+ <f id="cache_cleanup_date" v="0.0"/>
+ <f id="cache_params"/>
+ <f id="cache_timeout" v="0"/>
+ <f id="categories">
+  <e v="import"/>
+ </f>
+ <f id="disable_override" v="0"/>
+ <f id="dummy" v=""/>
+ <f id="identifier" v="portlet_12306143"/>
+ <f id="javascript" v=""/>
+ <f id="order" v="0"/>
+ <f id="portlet" v=""/>
+ <f id="preview"/>
+ <f id="provider" v=""/>
+ <f id="show_icons" v="True"/>
+ <f id="slot" v="import_actions"/>
+ <f id="slot_override" v="0"/>
+ <f id="visibility_range" v="0-0"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_navigation_staff.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_navigation_staff.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_navigation_staff.xml	(revision 2226)
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<object name="portlet_navigation_staff" meta_type="CPS Portlet"
+   portal_type="Actions Portlet">
+ <f id="Contributors">
+  <e v="Bettermann Henrik"/>
+  <e v="Henrik Bettermann"/>
+  <e v="admin"/>
+  <e v="SRP Manager"/>
+  <e v="Perry Schmitz"/>
+ </f>
+ <f id="Coverage" v=""/>
+ <f id="CreationDate" v="20061129154357Z"/>
+ <f id="Creator" v="admin"/>
+ <f id="Description" v=""/>
+ <f id="EffectiveDate" v=""/>
+ <f id="ExpirationDate" v=""/>
+ <f id="Format" v="text/html"/>
+ <f id="Language" v=""/>
+ <f id="ModificationDate" v="20070420061940Z"/>
+ <f id="Relation" v=""/>
+ <f id="Rights" v=""/>
+ <f id="Source" v=""/>
+ <f id="Subject"/>
+ <f id="Title" v="Backoffice Navigation"/>
+ <f id="actions_order"/>
+ <f id="allow_discussion" v="False"/>
+ <f id="cache_cleanup_date" v="1158070273.81"/>
+ <f id="cache_params"/>
+ <f id="cache_timeout" v="0"/>
+ <f id="categories">
+  <e v="navigation"/>
+ </f>
+ <f id="disable_override" v="0"/>
+ <f id="dummy" v=""/>
+ <f id="identifier" v="portlet_882630613"/>
+ <f id="javascript" v=""/>
+ <f id="order" v="10"/>
+ <f id="portlet" v=""/>
+ <f id="preview"/>
+ <f id="provider" v=""/>
+ <f id="show_icons" v="True"/>
+ <f id="slot" v="navigation_slot"/>
+ <f id="slot_override" v="0"/>
+ <f id="visibility_range" v="0-0"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_navigation_students.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_navigation_students.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_navigation_students.xml	(revision 2226)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<object name="portlet_navigation_students" meta_type="CPS Portlet"
+   portal_type="Actions Portlet">
+ <f id="Contributors">
+  <e v="Henrik Bettermann"/>
+  <e v="Perry Schmitz"/>
+ </f>
+ <f id="Coverage" v=""/>
+ <f id="CreationDate" v="20070419212040Z"/>
+ <f id="Creator" v="admin"/>
+ <f id="Description" v=""/>
+ <f id="EffectiveDate" v=""/>
+ <f id="ExpirationDate" v=""/>
+ <f id="Format" v="text/html"/>
+ <f id="Language" v=""/>
+ <f id="ModificationDate" v="20070420061941Z"/>
+ <f id="Relation" v=""/>
+ <f id="Rights" v=""/>
+ <f id="Source" v=""/>
+ <f id="Subject"/>
+ <f id="Title" v="Student Navigation"/>
+ <f id="actions_order"/>
+ <f id="allow_discussion" v="False"/>
+ <f id="cache_cleanup_date" v="1157886651.47"/>
+ <f id="cache_params"/>
+ <f id="cache_timeout" v="0"/>
+ <f id="categories">
+  <e v="student_navigation"/>
+ </f>
+ <f id="disable_override" v="0"/>
+ <f id="dummy" v=""/>
+ <f id="identifier" v="portlet_464817518"/>
+ <f id="javascript" v=""/>
+ <f id="order" v="0"/>
+ <f id="portlet" v=""/>
+ <f id="preview"/>
+ <f id="provider" v=""/>
+ <f id="show_icons" v="True"/>
+ <f id="slot" v="student_navigation_slot"/>
+ <f id="slot_override" v="0"/>
+ <f id="visibility_range" v="0-0"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_object_actions_staff.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_object_actions_staff.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_object_actions_staff.xml	(revision 2226)
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<object name="portlet_object_actions_staff" meta_type="CPS Portlet"
+   portal_type="Actions Portlet">
+ <f id="Contributors">
+  <e v="Henrik Bettermann"/>
+  <e v="Perry Schmitz"/>
+ </f>
+ <f id="Coverage" v=""/>
+ <f id="CreationDate" v="20061129154356Z"/>
+ <f id="Creator" v="admin"/>
+ <f id="Description" v=""/>
+ <f id="EffectiveDate" v=""/>
+ <f id="ExpirationDate" v=""/>
+ <f id="Format" v="text/html"/>
+ <f id="Language" v=""/>
+ <f id="ModificationDate" v="20070420061939Z"/>
+ <f id="Relation" v=""/>
+ <f id="Rights" v=""/>
+ <f id="Source" v=""/>
+ <f id="Subject"/>
+ <f id="Title" v="Object Actions"/>
+ <f id="actions_order">
+  <e v="view"/>
+  <e v="edit"/>
+  <e v="localroles"/>
+  <e v="new_entry"/>
+  <e v="approve"/>
+  <e v="retract"/>
+ </f>
+ <f id="allow_discussion" v="False"/>
+ <f id="cache_cleanup_date" v="1158069080.24"/>
+ <f id="cache_params"/>
+ <f id="cache_timeout" v="0"/>
+ <f id="categories">
+  <e v="object"/>
+  <e v="workflow"/>
+ </f>
+ <f id="disable_override" v="0"/>
+ <f id="dummy" v=""/>
+ <f id="identifier" v="portlet_317036516"/>
+ <f id="javascript" v=""/>
+ <f id="order" v="0"/>
+ <f id="portlet" v=""/>
+ <f id="preview"/>
+ <f id="provider" v=""/>
+ <f id="show_icons" v="True"/>
+ <f id="slot" v="staff_object_slot"/>
+ <f id="slot_override" v="0"/>
+ <f id="visibility_range" v="0-0"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_object_actions_students.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_object_actions_students.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_object_actions_students.xml	(revision 2226)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<object name="portlet_object_actions_students" meta_type="CPS Portlet"
+   portal_type="Actions Portlet">
+ <f id="Contributors">
+  <e v="Henrik Bettermann"/>
+  <e v="Perry Schmitz"/>
+ </f>
+ <f id="Coverage" v=""/>
+ <f id="CreationDate" v="20061129154357Z"/>
+ <f id="Creator" v="admin"/>
+ <f id="Description" v=""/>
+ <f id="EffectiveDate" v=""/>
+ <f id="ExpirationDate" v=""/>
+ <f id="Format" v="text/html"/>
+ <f id="Language" v=""/>
+ <f id="ModificationDate" v="20070420061939Z"/>
+ <f id="Relation" v=""/>
+ <f id="Rights" v=""/>
+ <f id="Source" v=""/>
+ <f id="Subject"/>
+ <f id="Title" v="Object Actions"/>
+ <f id="actions_order"/>
+ <f id="allow_discussion" v="False"/>
+ <f id="cache_cleanup_date" v="1157891916.77"/>
+ <f id="cache_params"/>
+ <f id="cache_timeout" v="0"/>
+ <f id="categories">
+  <e v="student_object"/>
+ </f>
+ <f id="disable_override" v="0"/>
+ <f id="dummy" v=""/>
+ <f id="identifier" v="portlet_688565662"/>
+ <f id="javascript" v=""/>
+ <f id="order" v="0"/>
+ <f id="portlet" v=""/>
+ <f id="preview"/>
+ <f id="provider" v=""/>
+ <f id="show_icons" v="True"/>
+ <f id="slot" v="student_object_slot"/>
+ <f id="slot_override" v="0"/>
+ <f id="visibility_range" v="0-0"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_registration_status.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_registration_status.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_registration_status.xml	(revision 2226)
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<object name="portlet_registration_status" meta_type="CPS Portlet"
+   portal_type="Custom Portlet">
+ <f id="Contributors">
+  <e v="Henrik Bettermann"/>
+  <e v="Perry Schmitz"/>
+ </f>
+ <f id="Coverage" v=""/>
+ <f id="CreationDate" v="20061129154357Z"/>
+ <f id="Creator" v="admin"/>
+ <f id="Description" v=""/>
+ <f id="EffectiveDate" v=""/>
+ <f id="ExpirationDate" v=""/>
+ <f id="Format" v="text/html"/>
+ <f id="Language" v=""/>
+ <f id="ModificationDate" v="20070420061940Z"/>
+ <f id="Relation" v=""/>
+ <f id="Rights" v=""/>
+ <f id="Source" v=""/>
+ <f id="Subject"/>
+ <f id="Title" v="Registration Status"/>
+ <f id="allow_discussion" v="False"/>
+ <f id="cache_cleanup_date" v="1157867537.77"/>
+ <f id="cache_params"/>
+ <f id="cache_timeout" v="0"/>
+ <f id="custom_cache_params">
+  <e v="no-cache"/>
+ </f>
+ <f id="disable_override" v="0"/>
+ <f id="identifier" v="portlet_851001221"/>
+ <f id="javascript" v=""/>
+ <f id="js_render_method" v=""/>
+ <f id="order" v="0"/>
+ <f id="portlet" v=""/>
+ <f id="preview"/>
+ <f id="provider" v=""/>
+ <f id="render_method" v="portlet_student_workflow_display"/>
+ <f id="slot" v="student_workflow"/>
+ <f id="slot_override" v="0"/>
+ <f id="visibility_range" v="0-0"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_search.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_search.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_search.xml	(revision 2226)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<object name="portlet_search" meta_type="CPS Portlet"
+   portal_type="Search Portlet">
+ <f id="Contributors">
+  <e v="admin"/>
+  <e v="Henrik Bettermann"/>
+  <e v="SRP Manager"/>
+  <e v="Perry Schmitz"/>
+ </f>
+ <f id="Coverage" v=""/>
+ <f id="CreationDate" v="20061129154337Z"/>
+ <f id="Creator" v="admin"/>
+ <f id="Description" v=""/>
+ <f id="EffectiveDate" v=""/>
+ <f id="ExpirationDate" v=""/>
+ <f id="Format" v="text/html"/>
+ <f id="Language" v=""/>
+ <f id="ModificationDate" v="20070420061941Z"/>
+ <f id="Relation" v=""/>
+ <f id="Rights" v=""/>
+ <f id="Source" v=""/>
+ <f id="Subject"/>
+ <f id="Title" v="Search Portlet"/>
+ <f id="advanced_search_link" v="1"/>
+ <f id="allow_discussion" v="False"/>
+ <f id="cache_cleanup_date" v="1137609905.48"/>
+ <f id="cache_params"/>
+ <f id="cache_timeout" v="0"/>
+ <f id="context_is_portlet" v="0"/>
+ <f id="contextual_search_choice" v="0"/>
+ <f id="disable_override" v="0"/>
+ <f id="dummy" v=""/>
+ <f id="identifier" v="portlet_search"/>
+ <f id="javascript" v="widget_portlet_search_js"/>
+ <f id="order" v="0"/>
+ <f id="portlet" v=""/>
+ <f id="preview"/>
+ <f id="provider" v=""/>
+ <f id="slot" v="search"/>
+ <f id="slot_override" v="0"/>
+ <f id="visibility_range" v="0-0"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_search2.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_search2.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_search2.xml	(revision 2226)
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<object name="portlet_search2" meta_type="CPS Portlet"
+   portal_type="Search Portlet">
+ <f id="Contributors">
+  <e v="SRP Manager"/>
+  <e v="Henrik Bettermann"/>
+  <e v="Perry Schmitz"/>
+ </f>
+ <f id="Coverage" v=""/>
+ <f id="CreationDate" v="20061129154357Z"/>
+ <f id="Creator" v="admin"/>
+ <f id="Description" v=""/>
+ <f id="EffectiveDate" v=""/>
+ <f id="ExpirationDate" v=""/>
+ <f id="Format" v="text/html"/>
+ <f id="Language" v=""/>
+ <f id="ModificationDate" v="20070420061939Z"/>
+ <f id="Relation" v=""/>
+ <f id="Rights" v=""/>
+ <f id="Source" v=""/>
+ <f id="Subject"/>
+ <f id="Title" v="Search Portlet"/>
+ <f id="advanced_search_link" v="0"/>
+ <f id="allow_discussion" v="False"/>
+ <f id="cache_cleanup_date" v="0.0"/>
+ <f id="cache_params"/>
+ <f id="cache_timeout" v="0"/>
+ <f id="context_is_portlet" v="0"/>
+ <f id="contextual_search_choice" v="1"/>
+ <f id="disable_override" v="0"/>
+ <f id="dummy" v=""/>
+ <f id="identifier" v="portlet_615085575"/>
+ <f id="javascript" v="widget_portlet_search_js"/>
+ <f id="order" v="20"/>
+ <f id="portlet" v=""/>
+ <f id="preview"/>
+ <f id="provider" v=""/>
+ <f id="slot" v="add_item"/>
+ <f id="slot_override" v="0"/>
+ <f id="visibility_range" v="0-0"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_search3.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_search3.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_search3.xml	(revision 2226)
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<object name="portlet_search3" meta_type="CPS Portlet"
+   portal_type="Search Portlet">
+ <f id="Contributors">
+  <e v="SRP Manager"/>
+  <e v="Henrik Bettermann"/>
+  <e v="Perry Schmitz"/>
+ </f>
+ <f id="Coverage" v=""/>
+ <f id="CreationDate" v="20061129154357Z"/>
+ <f id="Creator" v="admin"/>
+ <f id="Description" v=""/>
+ <f id="EffectiveDate" v=""/>
+ <f id="ExpirationDate" v=""/>
+ <f id="Format" v="text/html"/>
+ <f id="Language" v=""/>
+ <f id="ModificationDate" v="20070420061939Z"/>
+ <f id="Relation" v=""/>
+ <f id="Rights" v=""/>
+ <f id="Source" v=""/>
+ <f id="Subject"/>
+ <f id="Title" v="Search Portlet"/>
+ <f id="advanced_search_link" v="0"/>
+ <f id="allow_discussion" v="False"/>
+ <f id="cache_cleanup_date" v="0.0"/>
+ <f id="cache_params"/>
+ <f id="cache_timeout" v="0"/>
+ <f id="context_is_portlet" v="0"/>
+ <f id="contextual_search_choice" v="0"/>
+ <f id="disable_override" v="0"/>
+ <f id="dummy" v=""/>
+ <f id="identifier" v="portlet_615085576"/>
+ <f id="javascript" v="widget_portlet_search_js"/>
+ <f id="order" v="0"/>
+ <f id="portlet" v=""/>
+ <f id="preview"/>
+ <f id="provider" v=""/>
+ <f id="slot" v="portal_tabs3"/>
+ <f id="slot_override" v="0"/>
+ <f id="visibility_range" v="0-0"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_session_info.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_session_info.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_session_info.xml	(revision 2226)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<object name="portlet_session_info" meta_type="CPS Portlet"
+   portal_type="Custom Portlet">
+ <f id="Contributors">
+  <e v="Henrik Bettermann"/>
+  <e v="SRP Manager"/>
+  <e v="Perry Schmitz"/>
+ </f>
+ <f id="Coverage" v=""/>
+ <f id="CreationDate" v="20061129154357Z"/>
+ <f id="Creator" v="admin"/>
+ <f id="Description" v=""/>
+ <f id="EffectiveDate" v=""/>
+ <f id="ExpirationDate" v=""/>
+ <f id="Format" v="text/html"/>
+ <f id="Language" v=""/>
+ <f id="ModificationDate" v="20070420061940Z"/>
+ <f id="Relation" v=""/>
+ <f id="Rights" v=""/>
+ <f id="Source" v=""/>
+ <f id="Subject"/>
+ <f id="Title" v="Session Info"/>
+ <f id="allow_discussion" v="False"/>
+ <f id="cache_cleanup_date" v="1156281208.6"/>
+ <f id="cache_params"/>
+ <f id="cache_timeout" v="0"/>
+ <f id="custom_cache_params">
+  <e v="no-cache"/>
+ </f>
+ <f id="disable_override" v="0"/>
+ <f id="identifier" v="portlet_916675861"/>
+ <f id="javascript" v=""/>
+ <f id="js_render_method" v=""/>
+ <f id="order" v="0"/>
+ <f id="portlet" v=""/>
+ <f id="preview"/>
+ <f id="provider" v=""/>
+ <f id="render_method" v="portlet_session_info"/>
+ <f id="slot" v="portal_session"/>
+ <f id="slot_override" v="0"/>
+ <f id="visibility_range" v="0-0"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_student_notice.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_student_notice.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_student_notice.xml	(revision 2226)
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<object name="portlet_student_notice" meta_type="CPS Portlet"
+   portal_type="Custom Portlet">
+ <f id="Contributors">
+  <e v="Henrik Bettermann"/>
+  <e v="admin"/>
+  <e v="SRP Manager"/>
+  <e v="Perry Schmitz"/>
+ </f>
+ <f id="Coverage" v=""/>
+ <f id="CreationDate" v="20061129154356Z"/>
+ <f id="Creator" v="admin"/>
+ <f id="Description" v=""/>
+ <f id="EffectiveDate" v=""/>
+ <f id="ExpirationDate" v=""/>
+ <f id="Format" v="text/html"/>
+ <f id="Language" v=""/>
+ <f id="ModificationDate" v="20070420061938Z"/>
+ <f id="Relation" v=""/>
+ <f id="Rights" v=""/>
+ <f id="Source" v=""/>
+ <f id="Subject"/>
+ <f id="Title" v="Student Notice Portlet"/>
+ <f id="allow_discussion" v="False"/>
+ <f id="cache_cleanup_date" v="1157829868.36"/>
+ <f id="cache_params"/>
+ <f id="cache_timeout" v="0"/>
+ <f id="custom_cache_params">
+  <e v="no-cache"/>
+ </f>
+ <f id="disable_override" v="0"/>
+ <f id="identifier" v="portlet_252988174"/>
+ <f id="javascript" v=""/>
+ <f id="js_render_method" v=""/>
+ <f id="order" v="0"/>
+ <f id="portlet" v=""/>
+ <f id="preview"/>
+ <f id="provider" v=""/>
+ <f id="render_method" v="portlet_student_notice_display"/>
+ <f id="slot" v="student_notice_slot"/>
+ <f id="slot_override" v="0"/>
+ <f id="visibility_range" v="0-0"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_workflow_status.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_workflow_status.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/cps_portlets/portlet_workflow_status.xml	(revision 2226)
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<object name="portlet_workflow_status" meta_type="CPS Portlet"
+   portal_type="Custom Portlet">
+ <f id="Contributors">
+  <e v="Henrik Bettermann"/>
+  <e v="admin"/>
+  <e v="SRP Manager"/>
+  <e v="Perry Schmitz"/>
+ </f>
+ <f id="Coverage" v=""/>
+ <f id="CreationDate" v="20061129154356Z"/>
+ <f id="Creator" v="admin"/>
+ <f id="Description" v=""/>
+ <f id="EffectiveDate" v=""/>
+ <f id="ExpirationDate" v=""/>
+ <f id="Format" v="text/html"/>
+ <f id="Language" v=""/>
+ <f id="ModificationDate" v="20070420061938Z"/>
+ <f id="Relation" v=""/>
+ <f id="Rights" v=""/>
+ <f id="Source" v=""/>
+ <f id="Subject"/>
+ <f id="Title" v="Workflow Status Portlet"/>
+ <f id="allow_discussion" v="False"/>
+ <f id="cache_cleanup_date" v="1157829868.36"/>
+ <f id="cache_params"/>
+ <f id="cache_timeout" v="0"/>
+ <f id="custom_cache_params">
+  <e v="no-cache"/>
+ </f>
+ <f id="disable_override" v="0"/>
+ <f id="identifier" v="portlet_252988174"/>
+ <f id="javascript" v=""/>
+ <f id="js_render_method" v=""/>
+ <f id="order" v="0"/>
+ <f id="portlet" v=""/>
+ <f id="preview"/>
+ <f id="provider" v=""/>
+ <f id="render_method" v="portlet_waeup_status_display"/>
+ <f id="slot" v="status_slot"/>
+ <f id="slot_override" v="0"/>
+ <f id="visibility_range" v="0-0"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/directories.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/directories.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/directories.xml	(revision 2226)
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="content.xsl"?>
+<object name="portal_directories" meta_type="CPS Directory Tool">
+ <property name="title"></property>
+ <object name="waeup_stacking_dir" meta_type="CPS Stacking Directory"/>
+ <object name="students" meta_type="CPS ZODB Directory"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/directories/members.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/directories/members.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/directories/members.xml	(revision 2226)
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<object name="members" meta_type="CPS ZODB Directory">
+ <property name="title">label_members</property>
+ <property name="schema">members</property>
+ <property name="schema_search">members_search</property>
+ <property name="layout">members</property>
+ <property name="layout_search">members_search</property>
+ <property name="acl_directory_view_roles">Manager;SectionOfficer; Member</property>
+ <property name="acl_entry_create_roles">Manager;SectionOfficer</property>
+ <property name="acl_entry_delete_roles">Manager;SectionOfficer</property>
+ <!-- switch back to Owner instead of Member once searchEntries will be
+      able to check ACLs -->
+ <property name="acl_entry_view_roles">Manager;SectionOfficer; Member</property>
+ <property name="acl_entry_edit_roles">Manager;SectionOfficer; Owner</property>
+ <property name="id_field">id</property>
+ <property name="title_field">fullname</property>
+ <property name="search_substring_fields">
+  <element value="id"/>
+  <element value="sn"/>
+  <element value="givenName"/>
+  <element value="email"/>
+ </property>
+ <property name="is_hierarchical">False</property>
+ <property name="password_field">password</property>
+ <entry-local-role
+    role="Owner">python:entry.get('id') == user_id</entry-local-role>
+ <cache-manager name="dir_ramcache"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/directories/students.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/directories/students.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/directories/students.xml	(revision 2226)
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<object name="students" meta_type="CPS ZODB Directory" purge="True">
+ <property name="title">Students</property>
+ <property name="schema">members</property>
+ <property name="schema_search">members_search</property>
+ <property name="layout">members</property>
+ <property name="layout_search">members_search</property>
+ <property name="acl_directory_view_roles">SectionOfficer; Manager; Member</property>
+ <property name="acl_entry_create_roles">SectionOfficer; Manager</property>
+ <property name="acl_entry_delete_roles">SectionOfficer; Manager</property>
+ <!-- switch back to Owner instead of Member once searchEntries will be
+      able to check ACLs -->
+ <property name="acl_entry_view_roles">SectionOfficer; Manager; Member</property>
+ <property name="acl_entry_edit_roles">SectionOfficer; Manager; Owner</property>
+ <property name="id_field">id</property>
+ <property name="search_substring_fields">
+  <element value="id"/>
+  <element value="sn"/>
+  <element value="givenName"/>
+  <element value="email"/>
+ </property>
+ <property name="is_hierarchical">False</property>
+ <property name="password_field">password</property>
+ <entry-local-role
+    role="Owner">python:entry.get('id') == user_id</entry-local-role>
+ <cache-manager name="dir_ramcache"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/directories/waeup_stacking_dir.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/directories/waeup_stacking_dir.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/directories/waeup_stacking_dir.xml	(revision 2226)
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<object name="waeup_stacking_dir" meta_type="CPS Stacking Directory">
+ <property name="title">The WAeUP Masterdirectory</property>
+ <property name="schema"></property>
+ <property name="schemas">
+  <element value="members"/>
+ </property>
+ <property name="schema_search">members_search</property>
+ <property name="schemas_search"/>
+ <property name="layout">members</property>
+ <property name="layout_search">members_search</property>
+ <property name="acl_directory_view_roles">SectionOfficer; Manager</property>
+ <property name="acl_entry_create_roles">SectionOfficer; Manager</property>
+ <property name="acl_entry_delete_roles">SectionOfficer; Manager</property>
+ <property name="acl_entry_view_roles">SectionOfficer; Manager</property>
+ <property name="acl_entry_edit_roles">SectionOfficer; Manager</property>
+ <property name="id_field">id</property>
+ <property name="title_field">fullname</property>
+ <property name="is_hierarchical">False</property>
+ <property name="search_substring_fields">
+  <element value="id"/>
+  <element value="sn"/>
+  <element value="givenname"/>
+  <element value="email"/>
+ </property>
+ <property name="backing_dirs">
+  <element value="members"/>
+  <element value="students"/>
+ </property>
+ <property name="creation_dir">members</property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/eventservice.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/eventservice.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/eventservice.xml	(revision 2226)
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<object name="portal_eventservice" meta_type="CPS Event Service Tool">
+ <object name="subscriber_cpsportlets" meta_type="CPS Subscriber Definition">
+  <property name="subscriber">portal_cpsportlets</property>
+  <property name="action">event</property>
+  <property name="meta_type_">*</property>
+  <property name="event_type">
+   <element value="*"/>
+  </property>
+  <property name="notification_type">synchronous</property>
+  <property name="compressed">False</property>
+  <property name="activated">True</property>
+ </object>
+ <object name="subscriber_proxies" meta_type="CPS Subscriber Definition">
+  <property name="subscriber">portal_proxies</property>
+  <property name="action">proxy</property>
+  <property name="meta_type_">*</property>
+  <property name="event_type">
+   <element value="*"/>
+  </property>
+  <property name="notification_type">synchronous</property>
+  <property name="compressed">False</property>
+  <property name="activated">True</property>
+ </object>
+ <object name="subscriber_trees" meta_type="CPS Subscriber Definition">
+  <property name="subscriber">portal_trees</property>
+  <property name="action">tree</property>
+  <property name="meta_type_">*</property>
+  <property name="event_type">
+   <element value="*"/>
+  </property>
+  <property name="notification_type">synchronous</property>
+  <property name="compressed">False</property>
+  <property name="activated">True</property>
+ </object>
+ <object name="subscriber_1178191852769"
+    meta_type="CPS Subscriber Definition">
+  <property name="subscriber">students_catalog</property>
+  <property name="action">event_listener</property>
+  <property name="meta_type_">*</property>
+  <property name="event_type">
+   <element value="*"/>
+  </property>
+  <property name="notification_type">synchronous</property>
+  <property name="compressed">False</property>
+  <property name="activated">True</property>
+ </object>
+ <object name="subscriber_1178191864769"
+    meta_type="CPS Subscriber Definition">
+  <property name="subscriber">courses_catalog</property>
+  <property name="action">event_listener</property>
+  <property name="meta_type_">*</property>
+  <property name="event_type">
+   <element value="*"/>
+  </property>
+  <property name="notification_type">synchronous</property>
+  <property name="compressed">False</property>
+  <property name="activated">True</property>
+ </object>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/export_steps.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/export_steps.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/export_steps.xml	(revision 2226)
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<export-steps>
+ <export-step id="waeup"
+              handler="Products.WAeUP_SRP.exportimport.exportWAeUP"
+              title="WAeUP">
+  Export WAeUP_SRP and it's configuration.
+ </export-step>
+</export-steps>
Index: WAeUP_SRP/trunk_not_used/profiles/default/import_steps.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/import_steps.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/import_steps.xml	(revision 2226)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<import-steps>
+ <import-step id="waeup" version="20060115-01"
+              handler="Products.WAeUP_SRP.exportimport.importWAeUP"
+              title="WAeUP">
+  <dependency step="toolset" />
+  Import WAeUP_SRP and its configuration.
+ </import-step>
+</import-steps>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts.xml	(revision 2226)
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="content.xsl"?>
+<object name="portal_layouts" meta_type="CPS Layouts Tool">
+  <property name="title">layouts</property>
+  <object name="acco_hall" meta_type="CPS Layout"/>
+  <object name="acco_bed_booking" meta_type="CPS Layout"/>
+  <object name="academics_search" meta_type="CPS Layout"/>
+  <object name="application" meta_type="CPS Layout"/>
+  <object name="application_manage" meta_type="CPS Layout"/>
+  <object name="certificate" meta_type="CPS Layout"/>
+  <object name="certificate_course" meta_type="CPS Layout"/>
+  <object name="course" meta_type="CPS Layout"/>
+  <object name="import_department" meta_type="CPS Layout"/>
+  <object name="department" meta_type="CPS Layout"/>
+  <object name="faculty" meta_type="CPS Layout"/>
+  <object name="import" meta_type="CPS Layout"/>
+  <object name="import_student" meta_type="CPS Layout"/>
+  <object name="members" meta_type="CPS Layout"/>
+  <object name="members_search" meta_type="CPS Layout"/>
+  <object name="payment" meta_type="CPS Layout"/>
+  <object name="student" meta_type="CPS Layout"/>
+  <object name="scratch_card_batch" meta_type="CPS Layout"/>
+  <object name="scratch_card_search" meta_type="CPS Layout"/>
+  <object name="student_accommodation" meta_type="CPS Layout"/>
+  <object name="student_accommodation_fe" meta_type="CPS Layout"/>
+  <object name="student_application" meta_type="CPS Layout"/>
+  <object name="student_application_fe" meta_type="CPS Layout"/>
+  <object name="student_application_search" meta_type="CPS Layout"/>
+  <object name="student_session_results_search" meta_type="CPS Layout"/>
+  <object name="student_change_password" meta_type="CPS Layout"/>
+  <object name="student_clearance" meta_type="CPS Layout"/>
+  <object name="student_clearance_fe" meta_type="CPS Layout"/>
+  <object name="student_course_result" meta_type="CPS Layout"/>
+  <object name="student_course_result_fe" meta_type="CPS Layout"/>
+  <object name="student_create" meta_type="CPS Layout"/>
+  <object name="student_firsttime_login" meta_type="CPS Layout"/>
+  <object name="student_personal" meta_type="CPS Layout"/>
+  <object name="student_personal_fe" meta_type="CPS Layout"/>
+  <object name="student_password" meta_type="CPS Layout"/>
+  <object name="student_pume" meta_type="CPS Layout"/>
+  <object name="student_pume_fe" meta_type="CPS Layout"/>
+  <object name="student_schoolfee" meta_type="CPS Layout"/>
+  <object name="student_search" meta_type="CPS Layout"/>
+  <object name="student_study_level" meta_type="CPS Layout"/>
+  <object name="student_study_course" meta_type="CPS Layout"/>
+  <object name="student_transfer" meta_type="CPS Layout"/>
+  <object name="study_level" meta_type="CPS Layout"/>
+  <object name="university" meta_type="CPS Layout"/>
+  <object name="waeup_common" meta_type="CPS Layout"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/academics_search.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/academics_search.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/academics_search.xml	(revision 2226)
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_search" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_search_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="review_state" meta_type="Select Widget">
+  <property name="title">Review State</property>
+  <property name="fields">
+   <element value="review_state"/>
+  </property>
+  <property name="label">Review State</property>
+  <property name="label_edit">Review State</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">searchable_academics_states</property>
+ </widget>
+ <widget name="search_mode" meta_type="Generic Select Widget">
+  <property name="title">Searchmode</property>
+  <property name="fields">
+   <element value="search_mode"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Search for</property>
+  <property name="label_edit">Search for</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">academics_search_mode</property>
+  <property name="render_format">radio</property>
+ </widget>
+ <widget name="search_string" meta_type="String Widget">
+  <property name="title">Searchstring</property>
+  <property name="fields">
+   <element value="search_string"/>
+  </property>
+  <property name="label">Search for</property>
+  <property name="label_edit">Search for</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">30</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="review_state" ncols="2"/>
+  </row>
+  <row>
+   <cell name="search_string"/>
+   <cell name="search_mode"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/acco_bed_booking.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/acco_bed_booking.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/acco_bed_booking.xml	(revision 2226)
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="acco_bed_reservation" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="bed_letter" meta_type="Select Widget">
+  <property name="title">Bed Letter</property>
+  <property name="fields">
+   <element value="bed_letter"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Bed Letter</property>
+  <property name="label_edit">Bed Letter</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">acco_hall_beds</property>
+ </widget>
+ <widget name="block_room" meta_type="Select Widget">
+  <property name="title">Block / Room</property>
+  <property name="fields">
+   <element value="block_room"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Block / Floor / Room</property>
+  <property name="label_edit">Block / Room</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">acco_hall_reserved_rooms</property>
+ </widget>
+ <widget name="student_id" meta_type="StudentId Widget">
+  <property name="title">Student Id</property>
+  <property name="fields">
+   <element value="student_id"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Student Id</property>
+  <property name="label_edit">Student Id</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">7</property>
+  <property name="size_max">7</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="block_room"/>
+  </row>
+  <row>
+   <cell name="bed_letter"/>
+  </row>
+  <row>
+   <cell name="student_id"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/acco_hall.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/acco_hall.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/acco_hall.xml	(revision 2226)
@@ -0,0 +1,195 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="acco_hall" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="beds_for_final" meta_type="MultiSelect Widget">
+  <property name="fields">
+   <element value="beds_for_final"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Beds for Final Students</property>
+  <property name="label_edit">Beds for Final Students</property>
+  <property name="help">Name the bedspaces for final year students.
+                        Attention: The bed letters must not exceed the number of beds per room.</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">waeup_bed_letters</property>
+ </widget>
+ <widget name="beds_for_fresh" meta_type="MultiSelect Widget">
+  <property name="fields">
+   <element value="beds_for_fresh"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Beds for Fresh Students</property>
+  <property name="label_edit">Beds for Fresh Students</property>
+  <property name="help">Name the beds for first year students.
+                        Attention: The bed letters must not exceed the number of beds per room.</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">waeup_bed_letters</property>
+ </widget>
+ <widget name="beds_per_room" meta_type="Int Widget">
+  <property name="fields">
+   <element value="beds_per_room"/>
+  </property>
+    <property name="is_required">False</property>
+    <property name="label">Beds per Room</property>
+    <property name="label_edit">Beds per Room</property>
+    <property name="is_limited">True</property>
+    <property name="min_value">1</property>
+    <property name="max_value">10</property>
+  </widget>
+<widget name="Title" meta_type="String Widget">
+ <property name="title">Title</property>
+ <property name="fields">
+  <element value="Title"/>
+ </property>
+  <property name="is_required">False</property>
+  <property name="label">Hall Name</property>
+  <property name="label_edit">Hall Name</property>
+  <property name="display_width">40</property>
+  <property name="size_max">40</property>
+ </widget>
+  <widget name="nr_of_blocks" meta_type="Int Widget">
+    <property name="fields">
+      <element value="nr_of_blocks"/>
+    </property>
+    <property name="is_required">False</property>
+    <property name="label">No of Blocks</property>
+    <property name="label_edit">No of Blocks</property>
+    <property name="is_limited">True</property>
+    <property name="min_value">1</property>
+    <property name="max_value">10</property>
+  </widget>
+ <widget name="nr_of_floors" meta_type="Int Widget">
+  <property name="fields">
+   <element value="nr_of_floors"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">No of Floors </property>
+  <property name="label_edit">No of Floors</property>
+    <property name="is_limited">True</property>
+    <property name="min_value">1</property>
+    <property name="max_value">5</property>
+ </widget>
+<widget name="blocks_for_female" meta_type="MultiSelect Widget">
+ <property name="title">Blocks for Female</property>
+ <property name="fields">
+  <element value="blocks_for_female"/>
+ </property>
+ <property name="is_required">False</property>
+ <property name="label">Blocks for Female</property>
+ <property name="label_edit">Blocks for Female</property>
+ <property name="readonly_layout_modes"/>
+ <property name="hidden_layout_modes"/>
+ <property name="hidden_readonly_layout_modes"/>
+<property name="vocabulary">waeup_block_letters</property>
+</widget>
+ <widget name="reserved_rooms" meta_type="WAeUPReservedRooms Widget">
+  <property name="title">Reserved Rooms</property>
+  <property name="fields">
+   <element value="reserved_rooms"/>
+  </property>
+  <property name="label">Reserved Rooms</property>
+  <property name="label_edit">Reserved Rooms</property>
+  <property
+     name="help">Enter the reserved room numbers separeted by comma.</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="rooms_per_floor" meta_type="Int Widget">
+  <property name="fields">
+   <element value="rooms_per_floor"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Rooms per Floor</property>
+  <property name="label_edit">Rooms per Floor</property>
+    <property name="is_limited">True</property>
+    <property name="min_value">1</property>
+    <property name="max_value">500</property>
+ </widget>
+ <widget name="text" meta_type="Text Widget">
+  <property name="fields">
+   <element value="text"/>
+  </property>
+  <property name="label">Text</property>
+  <property name="label_edit">Text</property>
+  <property name="help">Short Description</property>
+  <property name="is_i18n">True</property>
+  <property name="hidden_layout_modes"/>
+  <property name="css_class">description</property>
+  <property name="width">72</property>
+ </widget>
+ <widget name="special_handling" meta_type="Select Widget">
+ <property name="title">Special Handling code</property>
+ <property name="fields">
+  <element value="special_handling"/>
+ </property>
+ <property name="is_required">False</property>
+ <property name="label">Special Handling Code</property>
+ <property name="label_edit">Special Handling Code</property>
+ <property name="readonly_layout_modes"/>
+ <property name="hidden_layout_modes"/>
+ <property name="hidden_readonly_layout_modes"/>
+<property name="vocabulary">acco_special_handling</property>
+</widget>
+<widget name="maintenance_code" meta_type="Select Widget">
+ <property name="title">Maintenance Fee Prefix</property>
+ <property name="fields">
+  <element value="maintenance_code"/>
+ </property>
+ <property name="is_required">False</property>
+ <property name="label">Maintenance Fee Prefix</property>
+ <property name="label_edit">Maintenance Fee Prefix</property>
+ <property name="readonly_layout_modes"/>
+ <property name="hidden_layout_modes"/>
+ <property name="hidden_readonly_layout_modes"/>
+<property name="vocabulary">pin_prefixes</property>
+</widget>
+<table>
+  <row>
+   <cell name="Title"/>
+  </row>
+  <row>
+   <cell name="maintenance_code"/>
+  </row>
+  <row>
+   <cell name="special_handling"/>
+  </row>
+  <row>
+   <cell name="text"/>
+  </row>
+  <row>
+   <cell name="blocks_for_female"/>
+  </row>
+  <row>
+   <cell name="nr_of_blocks"/>
+  </row>
+  <row>
+   <cell name="nr_of_floors"/>
+  </row>
+  <row>
+   <cell name="rooms_per_floor"/>
+  </row>
+  <row>
+   <cell name="beds_per_room"/>
+  </row>
+  <row>
+   <cell name="beds_for_fresh"/>
+  </row>
+  <row>
+   <cell name="beds_for_final"/>
+  </row>
+  <row>
+   <cell name="reserved_rooms"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/application.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/application.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/application.xml	(revision 2226)
@@ -0,0 +1,673 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="application" meta_type="CPS Layout">
+  <property name="layout_create_method"></property>
+  <property name="layout_edit_method"></property>
+  <property name="layout_view_method"></property>
+  <property name="style_prefix">layout_apply_pume_</property>
+  <property name="flexible_widgets"/>
+  <property name="validate_values_expr"></property>
+
+  <widget name="date_of_birth" meta_type="DateTime Widget">
+    <property name="title">Date of Birth</property>
+    <property name="fields">
+      <element value="date_of_birth"/>
+    </property>
+    <property name="label">Date of Birth</property>
+    <property name="label_edit">Date of Birth</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="department" meta_type="String Widget">
+    <property name="title">Department</property>
+    <property name="fields">
+      <element value="department"/>
+    </property>
+    <property name="label">Department</property>
+    <property name="label_edit">Department</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="email" meta_type="Email Widget">
+    <property name="title">Email</property>
+    <property name="fields">
+      <element value="email"/>
+    </property>
+    <property name="label">Email</property>
+    <property name="label_edit">Email</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="entry_mode" meta_type="String Widget">
+    <property name="title">Entry Mode</property>
+    <property name="fields">
+      <element value="entry_mode"/>
+    </property>
+    <property name="label">Entry Mode</property>
+    <property name="label_edit">Entry Mode</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="faculty" meta_type="String Widget">
+    <property name="title">Faculty</property>
+    <property name="fields">
+      <element value="faculty"/>
+    </property>
+    <property name="label">Faculty</property>
+    <property name="label_edit">Faculty</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="firstname" meta_type="String Widget">
+    <property name="title">Firstname</property>
+    <property name="fields">
+      <element value="firstname"/>
+    </property>
+    <property name="label">Firstname</property>
+    <property name="label_edit">Firstname</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="aggregate" meta_type="Int Widget">
+    <property name="title">Total Score</property>
+    <property name="fields">
+      <element value="aggregate"/>
+    </property>
+    <property name="label">Total Score</property>
+    <property name="label_edit">Total Score</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="eng_score" meta_type="Int Widget">
+    <property name="title">English Score</property>
+    <property name="fields">
+      <element value="eng_score"/>
+    </property>
+    <property name="label">'English' Score</property>
+    <property name="label_edit">'English' Score</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="subj1" meta_type="Select Widget">
+    <property name="title">Subject 1</property>
+    <property name="fields">
+      <element value="subj1"/>
+    </property>
+    <property name="label"></property>
+    <property name="label_edit">label field</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+    <property name="vocabulary">jamb_subjects</property>
+  </widget>
+  <widget name="subj1score" meta_type="Int Widget">
+    <property name="title">Subject 1 Score</property>
+    <property name="fields">
+      <element value="subj1score"/>
+    </property>
+    <property name="label"></property>
+    <property name="label_edit"></property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="subj2" meta_type="Select Widget">
+    <property name="title">Subject 2</property>
+    <property name="fields">
+      <element value="subj2"/>
+    </property>
+    <property name="label"></property>
+    <property name="label_edit">label field</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+    <property name="vocabulary">jamb_subjects</property>
+  </widget>
+  <widget name="subj2score" meta_type="Int Widget">
+    <property name="title">Subject 2 Score</property>
+    <property name="fields">
+      <element value="subj2score"/>
+    </property>
+    <property name="label"></property>
+    <property name="label_edit"></property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="subj3" meta_type="Select Widget">
+    <property name="title">Subject 3</property>
+    <property name="fields">
+      <element value="subj3"/>
+    </property>
+    <property name="label"></property>
+    <property name="label_edit">label field</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="vocabulary">jamb_subjects</property>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="subj3score" meta_type="Int Widget">
+    <property name="title">Subject 3 Score</property>
+    <property name="fields">
+      <element value="subj3score"/>
+    </property>
+    <property name="label"></property>
+    <property name="label_edit"></property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="lastname" meta_type="String Widget">
+    <property name="title">Name</property>
+    <property name="fields">
+      <element value="lastname"/>
+    </property>
+    <property name="label">Name</property>
+    <property name="label_edit">Name</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="lga" meta_type="WAeUP LGA Widget">
+    <property name="title">LGA</property>
+    <property name="fields">
+      <element value="lga"/>
+    </property>
+    <property name="label">LGA</property>
+    <property name="label_edit">LGA</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="middlenames" meta_type="String Widget">
+    <property name="title">Middlenames</property>
+    <property name="fields">
+      <element value="middlenames"/>
+    </property>
+    <property name="label">Middlenames</property>
+    <property name="label_edit">Middlenames</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="passport" meta_type="No Zodb Image Widget">
+    <property name="title">Passport Photograph</property>
+    <property name="fields">
+      <element value="passport"/>
+    </property>
+    <property name="is_required">True</property>
+    <property name="label">Passport Photograph</property>
+    <property name="label_edit">Passport Photograph</property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="size_max">20480</property>
+    <property name="display_external_editor">False</property>
+    <property name="display_width">100</property>
+    <property name="display_height">150</property>
+    <property name="allow_resize">True</property>
+  </widget>
+  <widget name="phone" meta_type="String Widget">
+    <property name="title">Phone</property>
+    <property name="fields">
+      <element value="phone"/>
+    </property>
+    <property name="label">Phone</property>
+    <property name="label_edit">Phone</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="pin" meta_type="Pume Pin Widget">
+    <property name="title">Access Code</property>
+    <property name="fields">
+      <element value="pin"/>
+    </property>
+    <property name="label">Access Code</property>
+    <property name="label_edit">Access Code</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+    <property name="prefix">APP</property>
+    <property name="reference">reg_no</property>
+  </widget>
+  <widget name="application_date" meta_type="DateTime Widget">
+    <property name="title">Application Date</property>
+    <property name="fields">
+      <element value="application_date"/>
+    </property>
+    <property name="label">Application Date</property>
+    <property name="label_edit">Application Date</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="view_format">%A, %B %d, %Y</property>
+    <property name="time_setting">False</property>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="screening_date" meta_type="DateTime Widget">
+    <property name="title">Screening Date</property>
+    <property name="fields">
+      <element value="screening_date"/>
+    </property>
+    <property name="label">Screening Date</property>
+    <property name="label_edit">Screening Date</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="view_format">%A, %B %d, %Y</property>
+    <property name="time_setting">False</property>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="screening_type" meta_type="String Widget">
+    <property name="title">Screening Type</property>
+    <property name="fields">
+      <element value="screening_type"/>
+    </property>
+    <property name="label">Screening Type</property>
+    <property name="label_edit">Screening Type</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="reg_no" meta_type="JambRegNo Widget">
+    <property name="title">JAMB Registration Number</property>
+    <property name="fields">
+      <element value="reg_no"/>
+    </property>
+    <property name="label">JAMB Registration Number</property>
+    <property name="label_edit">JAMB Registration Number</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+    <property name="display_width">13</property>
+    <property name="size_max">13</property>
+    <property name="reference">reg_no</property>
+    <property name="catalog">applicants_catalog</property>
+  </widget>
+  <widget name="score" meta_type="Int Widget">
+    <property name="title">Score</property>
+    <property name="fields">
+      <element value="score"/>
+    </property>
+    <property name="label">Score</property>
+    <property name="label_edit">Score</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+  </widget>
+  <widget name="sex" meta_type="WAeUP Sex Widget">
+    <property name="title">Sex</property>
+    <property name="fields">
+      <element value="sex"/>
+    </property>
+    <property name="label">Sex</property>
+    <property name="label_edit">Sex</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="state" meta_type="WAeUP LGA Widget">
+    <property name="title">State</property>
+    <property name="fields">
+      <element value="lga"/>
+    </property>
+    <property name="label">State</property>
+    <property name="label_edit">State</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="status" meta_type="String Widget">
+    <property name="title">Application Status</property>
+    <property name="fields">
+      <element value="status"/>
+    </property>
+    <property name="label">Application Status</property>
+    <property name="label_edit">Application Status</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="course1" meta_type="Select Widget">
+    <property name="title">1st Choice Course of Study</property>
+    <property name="fields">
+      <element value="course1"/>
+    </property>
+    <property name="label">1st Choice Course of Study</property>
+    <property name="label_edit">1st Choice Course of Study</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="vocabulary">cos</property>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="course2" meta_type="Select Widget">
+    <property name="title">2nd Choice Course of Study</property>
+    <property name="fields">
+      <element value="course2"/>
+    </property>
+    <property name="label">2nd Choice Course of Study</property>
+    <property name="label_edit">2nd Choice Course of Study</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="vocabulary">cos</property>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="course3" meta_type="Select Widget">
+    <property name="title">3rd Choice Course of Study</property>
+    <property name="fields">
+      <element value="course3"/>
+    </property>
+    <property name="label">3rd Choice Course of Study</property>
+    <property name="label_edit">3rd Choice Course of Study</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="sorted">True</property>
+    <property name="vocabulary">cos</property>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="course_admitted" meta_type="String Widget">
+    <property name="title">Course of Study</property>
+    <property name="fields">
+      <element value="course_admitted"/>
+    </property>
+    <property name="label">Course of Study</property>
+    <property name="label_edit">Course of Study</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+
+ <table>
+  <row>
+   <cell name="reg_no" ncols="2"/>
+  </row>
+  <row>
+   <cell name="pin" ncols="2"/>
+  </row>
+  <row>
+   <cell name="lastname" ncols="2"/>
+  </row>
+  <row>
+   <cell name="email" ncols="2"/>
+  </row>
+  <row>
+   <cell name="phone" ncols="2"/>
+  </row>
+  <row>
+   <cell name="eng_score" ncols="2"/>
+  </row>
+  <row>
+   <cell name="subj1"/>
+   <cell name="subj1score"/>
+  </row>
+  <row>
+   <cell name="subj2"/>
+   <cell name="subj2score"/>
+  </row>
+  <row>
+   <cell name="subj3"/>
+   <cell name="subj3score"/>
+  </row>
+  <row>
+   <cell name="aggregate" ncols="2"/>
+  </row>
+  <row>
+   <cell name="course1" ncols="2"/>
+  </row>
+  <row>
+   <cell name="course2" ncols="2"/>
+  </row>
+  <row>
+   <cell name="course3" ncols="2"/>
+  </row>
+  <row>
+   <cell name="application_date" ncols="2"/>
+  </row>
+  <row>
+   <cell name="status" ncols="2"/>
+  </row>
+  <row>
+   <cell name="screening_date" ncols="2"/>
+  </row>
+  <row>
+   <cell name="passport" ncols="2"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/application_manage.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/application_manage.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/application_manage.xml	(revision 2226)
@@ -0,0 +1,668 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="application_manage" meta_type="CPS Layout">
+  <property name="layout_create_method"></property>
+  <property name="layout_edit_method"></property>
+  <property name="layout_view_method"></property>
+  <property name="style_prefix">layout_apply_pume_</property>
+  <property name="flexible_widgets"/>
+  <property name="validate_values_expr"></property>
+
+  <widget name="date_of_birth" meta_type="DateTime Widget">
+    <property name="title">Date of Birth</property>
+    <property name="fields">
+      <element value="date_of_birth"/>
+    </property>
+    <property name="label">Date of Birth</property>
+    <property name="label_edit">Date of Birth</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="department" meta_type="String Widget">
+    <property name="title">Department</property>
+    <property name="fields">
+      <element value="department"/>
+    </property>
+    <property name="label">Department</property>
+    <property name="label_edit">Department</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="email" meta_type="Email Widget">
+    <property name="title">Email</property>
+    <property name="fields">
+      <element value="email"/>
+    </property>
+    <property name="label">Email</property>
+    <property name="label_edit">Email</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="entry_mode" meta_type="String Widget">
+    <property name="title">Entry Mode</property>
+    <property name="fields">
+      <element value="entry_mode"/>
+    </property>
+    <property name="label">Entry Mode</property>
+    <property name="label_edit">Entry Mode</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="faculty" meta_type="String Widget">
+    <property name="title">Faculty</property>
+    <property name="fields">
+      <element value="faculty"/>
+    </property>
+    <property name="label">Faculty</property>
+    <property name="label_edit">Faculty</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="firstname" meta_type="String Widget">
+    <property name="title">Firstname</property>
+    <property name="fields">
+      <element value="firstname"/>
+    </property>
+    <property name="label">Firstname</property>
+    <property name="label_edit">Firstname</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="aggregate" meta_type="Int Widget">
+    <property name="title">Total Score</property>
+    <property name="fields">
+      <element value="aggregate"/>
+    </property>
+    <property name="label">Total Score</property>
+    <property name="label_edit">Total Score</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="eng_score" meta_type="Int Widget">
+    <property name="title">English Score</property>
+    <property name="fields">
+      <element value="eng_score"/>
+    </property>
+    <property name="label">'English' Score</property>
+    <property name="label_edit">'English' Score</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="subj1" meta_type="Select Widget">
+    <property name="title">Subject 1</property>
+    <property name="fields">
+      <element value="subj1"/>
+    </property>
+    <property name="label"></property>
+    <property name="label_edit">label field</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+    <property name="vocabulary">jamb_subjects</property>
+  </widget>
+  <widget name="subj1score" meta_type="Int Widget">
+    <property name="title">Subject 1 Score</property>
+    <property name="fields">
+      <element value="subj1score"/>
+    </property>
+    <property name="label"></property>
+    <property name="label_edit"></property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="subj2" meta_type="Select Widget">
+    <property name="title">Subject 2</property>
+    <property name="fields">
+      <element value="subj2"/>
+    </property>
+    <property name="label"></property>
+    <property name="label_edit">label field</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+    <property name="vocabulary">jamb_subjects</property>
+  </widget>
+  <widget name="subj2score" meta_type="Int Widget">
+    <property name="title">Subject 2 Score</property>
+    <property name="fields">
+      <element value="subj2score"/>
+    </property>
+    <property name="label"></property>
+    <property name="label_edit"></property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="subj3" meta_type="Select Widget">
+    <property name="title">Subject 3</property>
+    <property name="fields">
+      <element value="subj3"/>
+    </property>
+    <property name="label"></property>
+    <property name="label_edit">label field</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="vocabulary">jamb_subjects</property>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="subj3score" meta_type="Int Widget">
+    <property name="title">Subject 3 Score</property>
+    <property name="fields">
+      <element value="subj3score"/>
+    </property>
+    <property name="label"></property>
+    <property name="label_edit"></property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="lastname" meta_type="String Widget">
+    <property name="title">Name</property>
+    <property name="fields">
+      <element value="lastname"/>
+    </property>
+    <property name="label">Name</property>
+    <property name="label_edit">Name</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="lga" meta_type="WAeUP LGA Widget">
+    <property name="title">LGA</property>
+    <property name="fields">
+      <element value="lga"/>
+    </property>
+    <property name="label">LGA</property>
+    <property name="label_edit">LGA</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="middlenames" meta_type="String Widget">
+    <property name="title">Middlenames</property>
+    <property name="fields">
+      <element value="middlenames"/>
+    </property>
+    <property name="label">Middlenames</property>
+    <property name="label_edit">Middlenames</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="passport" meta_type="No Zodb Image Widget">
+    <property name="title">Passport Photograph</property>
+    <property name="fields">
+      <element value="passport"/>
+    </property>
+    <property name="is_required">True</property>
+    <property name="label">Passport Photograph</property>
+    <property name="label_edit">Passport Photograph</property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="size_max">20480</property>
+    <property name="display_external_editor">False</property>
+    <property name="display_width">100</property>
+    <property name="display_height">150</property>
+    <property name="allow_resize">True</property>
+  </widget>
+  <widget name="phone" meta_type="String Widget">
+    <property name="title">Phone</property>
+    <property name="fields">
+      <element value="phone"/>
+    </property>
+    <property name="label">Phone</property>
+    <property name="label_edit">Phone</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="pin" meta_type="Pume Pin Widget">
+    <property name="title">Access Code</property>
+    <property name="fields">
+      <element value="pin"/>
+    </property>
+    <property name="label">Access Code</property>
+    <property name="label_edit">Access Code</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+      <element value="create"/>
+    </property>
+    <property name="hidden_layout_modes">
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+    <property name="prefix">APP</property>
+    <property name="reference">reg_no</property>
+  </widget>
+  <widget name="application_date" meta_type="DateTime Widget">
+    <property name="title">Application Date</property>
+    <property name="fields">
+      <element value="application_date"/>
+    </property>
+    <property name="label">Application Date</property>
+    <property name="label_edit">Application Date</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="view_format">%A, %B %d, %Y</property>
+    <property name="time_setting">False</property>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="screening_date" meta_type="DateTime Widget">
+    <property name="title">Screening Date</property>
+    <property name="fields">
+      <element value="screening_date"/>
+    </property>
+    <property name="label">Screening Date</property>
+    <property name="label_edit">Screening Date</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="view_format">%d/%m/%Y</property>
+    <property name="time_setting">False</property>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="screening_type" meta_type="String Widget">
+    <property name="title">Screening Type</property>
+    <property name="fields">
+      <element value="screening_type"/>
+    </property>
+    <property name="label">Screening Type</property>
+    <property name="label_edit">Screening Type</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="reg_no" meta_type="JambRegNo Widget">
+    <property name="title">JAMB Registration Number</property>
+    <property name="fields">
+      <element value="reg_no"/>
+    </property>
+    <property name="label">JAMB Registration Number</property>
+    <property name="label_edit">JAMB Registration Number</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+    <property name="display_width">13</property>
+    <property name="size_max">13</property>
+    <property name="reference">reg_no</property>
+    <property name="catalog">applicants_catalog</property>
+  </widget>
+  <widget name="score" meta_type="Int Widget">
+    <property name="title">Score</property>
+    <property name="fields">
+      <element value="score"/>
+    </property>
+    <property name="label">Score</property>
+    <property name="label_edit">Score</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+  </widget>
+  <widget name="sex" meta_type="WAeUP Sex Widget">
+    <property name="title">Sex</property>
+    <property name="fields">
+      <element value="sex"/>
+    </property>
+    <property name="label">Sex</property>
+    <property name="label_edit">Sex</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="state" meta_type="WAeUP LGA Widget">
+    <property name="title">State</property>
+    <property name="fields">
+      <element value="lga"/>
+    </property>
+    <property name="label">State</property>
+    <property name="label_edit">State</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="status" meta_type="String Widget">
+    <property name="title">Application Status</property>
+    <property name="fields">
+      <element value="status"/>
+    </property>
+    <property name="label">Application Status</property>
+    <property name="label_edit">Application Status</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="course1" meta_type="Select Widget">
+    <property name="title">1st Choice Course of Study</property>
+    <property name="fields">
+      <element value="course1"/>
+    </property>
+    <property name="label">1st Choice Course of Study</property>
+    <property name="label_edit">1st Choice Course of Study</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+    </property>
+    <property name="hidden_layout_modes">
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="vocabulary">cos</property>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="course2" meta_type="Select Widget">
+    <property name="title">2nd Choice Course of Study</property>
+    <property name="fields">
+      <element value="course2"/>
+    </property>
+    <property name="label">2nd Choice Course of Study</property>
+    <property name="label_edit">2nd Choice Course of Study</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+    </property>
+    <property name="hidden_layout_modes">
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="vocabulary">cos</property>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="course3" meta_type="Select Widget">
+    <property name="title">3rd Choice Course of Study</property>
+    <property name="fields">
+      <element value="course3"/>
+    </property>
+    <property name="label">3rd Choice Course of Study</property>
+    <property name="label_edit">3rd Choice Course of Study</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="sorted">True</property>
+    <property name="vocabulary">cos</property>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+  <widget name="course_admitted" meta_type="String Widget">
+    <property name="title">Course of Study</property>
+    <property name="fields">
+      <element value="course_admitted"/>
+    </property>
+    <property name="label">Course of Study</property>
+    <property name="label_edit">Course of Study</property>
+    <property name="description"></property>
+    <property name="help"></property>
+    <property name="is_i18n">False</property>
+    <property name="widget_mode_expr"></property>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+    </property>
+    <property name="hidden_layout_modes">
+      <element value="create"/>
+    </property>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="css_class_expr">string:row</property>
+  </widget>
+
+ <table>
+  <row>
+   <cell name="reg_no" ncols="2"/>
+  </row>
+  <row>
+   <cell name="pin" ncols="2"/>
+  </row>
+  <row>
+   <cell name="lastname" ncols="2"/>
+  </row>
+  <row>
+   <cell name="email" ncols="2"/>
+  </row>
+  <row>
+   <cell name="phone" ncols="2"/>
+  </row>
+  <row>
+   <cell name="eng_score" ncols="2"/>
+  </row>
+  <row>
+   <cell name="subj1"/>
+   <cell name="subj1score"/>
+  </row>
+  <row>
+   <cell name="subj2"/>
+   <cell name="subj2score"/>
+  </row>
+  <row>
+   <cell name="subj3"/>
+   <cell name="subj3score"/>
+  </row>
+  <row>
+   <cell name="aggregate" ncols="2"/>
+  </row>
+  <row>
+   <cell name="course1" ncols="2"/>
+  </row>
+  <row>
+   <cell name="course2" ncols="2"/>
+  </row>
+  <row>
+   <cell name="course3" ncols="2"/>
+  </row>
+  <row>
+   <cell name="application_date" ncols="2"/>
+  </row>
+  <row>
+   <cell name="status" ncols="2"/>
+  </row>
+  <row>
+   <cell name="screening_date" ncols="2"/>
+  </row>
+  <row>
+   <cell name="passport" ncols="2"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/certificate.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/certificate.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/certificate.xml	(revision 2226)
@@ -0,0 +1,261 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="certificate" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="Description" meta_type="Text Widget">
+  <property name="fields">
+   <element value="Description"/>
+  </property>
+  <property name="label">Description</property>
+  <property name="label_edit">Description</property>
+  <property name="is_i18n">True</property>
+  <property name="hidden_layout_modes"/>
+  <property name="css_class">description</property>
+  <property name="width">72</property>
+ </widget>
+ <widget name="Title" meta_type="String Widget">
+  <property name="fields">
+   <element value="title"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Title</property>
+  <property name="label_edit">Title</property>
+  <property name="display_width">40</property>
+  <property name="size_max">200</property>
+ </widget>
+ <widget name="code" meta_type="WAeUPId Widget">
+  <property name="title">Certificate ID</property>
+  <property name="fields">
+   <element value="code"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Certificate ID</property>
+  <property name="label_edit">Certificate ID</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="view"/>
+   <element value="edit"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="admin_status" meta_type="String Widget">
+  <property name="title">Admin Status</property>
+  <property name="fields">
+   <element value="admin_status"/>
+  </property>
+  <property name="label">Admin Status</property>
+  <property name="label_edit">Admin Status</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="category" meta_type="String Widget">
+  <property name="title">Category</property>
+  <property name="fields">
+   <element value="category"/>
+  </property>
+  <property name="label">Category</property>
+  <property name="label_edit">Category</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="end_level" meta_type="Select Widget">
+  <property name="title">End Level</property>
+  <property name="fields">
+   <element value="end_level"/>
+  </property>
+  <property name="label">End Level</property>
+  <property name="label_edit">End Level</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">levels</property>
+ </widget>
+ <widget name="m_prefix" meta_type="String Widget">
+  <property name="title">MPREFIX</property>
+  <property name="fields">
+   <element value="m_prefix"/>
+  </property>
+  <property name="label">MPREFIX</property>
+  <property name="label_edit">MPREFIX</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="max_elect" meta_type="String Widget">
+  <property name="title">Max Elect</property>
+  <property name="fields">
+   <element value="max_elect"/>
+  </property>
+  <property name="label">Max Elect</property>
+  <property name="label_edit">Max Elect</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="max_load" meta_type="Int Widget">
+  <property name="title">Maximum Load</property>
+  <property name="fields">
+   <element value="max_load"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Maximum Load</property>
+  <property name="label_edit">Maximum Load</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="max_pass" meta_type="Int Widget">
+  <property name="title">Maximum Pass</property>
+  <property name="fields">
+   <element value="max_pass"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Maximum Pass</property>
+  <property name="label_edit">Maximum Pass</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="n_core" meta_type="Int Widget">
+  <property name="title">NCore</property>
+  <property name="fields">
+   <element value="n_core"/>
+  </property>
+  <property name="label">NCore</property>
+  <property name="label_edit">NCore</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="nr_years" meta_type="Int Widget">
+  <property name="title">Nr of Years</property>
+  <property name="fields">
+   <element value="nr_years"/>
+  </property>
+  <property name="label">Nr of Years</property>
+  <property name="label_edit">Nr of Years</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="original_code" meta_type="String Widget">
+  <property name="title">Original Code</property>
+  <property name="fields">
+   <element value="original_code"/>
+  </property>
+  <property name="label">Original Code</property>
+  <property name="label_edit">Original Code</property>
+  <property name="readonly_layout_modes">
+    <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes" >
+    <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="probation_credits" meta_type="Int Widget">
+  <property name="title">Probation  Credits</property>
+  <property name="fields">
+   <element value="probation_credits"/>
+  </property>
+  <property name="label">Probation Credits</property>
+  <property name="label_edit">Probation Credits</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="promotion_credits" meta_type="Int Widget">
+  <property name="title">Promotion Credits</property>
+  <property name="fields">
+   <element value="promotion_credits"/>
+  </property>
+  <property name="label">Promotion Credits</property>
+  <property name="label_edit">Promotion Credits</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="start_level" meta_type="Select Widget">
+  <property name="title">Start Level</property>
+  <property name="fields">
+   <element value="start_level"/>
+  </property>
+  <property name="label">Start Level</property>
+  <property name="label_edit">Start Level</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">levels</property>
+ </widget>
+ <widget name="school_fee_code" meta_type="String Widget">
+  <property name="title">School Fee Prefix</property>
+  <property name="fields">
+   <element value="school_fee_code"/>
+  </property>
+  <property name="label">School Fee Prefix</property>
+  <property name="label_edit">School Fee Prefix</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <table>
+  <row>
+   <cell name="code"/>
+  </row>
+  <row>
+   <cell name="Title"/>
+  </row>
+  <row>
+   <cell name="Description"/>
+  </row>
+  <row>
+   <cell name="original_code"/>
+  </row>
+  <row>
+   <cell name="start_level"/>
+  </row>
+  <row>
+   <cell name="end_level"/>
+  </row>
+  <row>
+   <cell name="max_pass"/>
+  </row>
+  <row>
+   <cell name="max_load"/>
+  </row>
+  <row>
+   <cell name="promotion_credits"/>
+  </row>
+  <row>
+   <cell name="probation_credits"/>
+  </row>
+  <row>
+   <cell name="admin_status"/>
+  </row>
+  <row>
+   <cell name="category"/>
+  </row>
+  <row>
+   <cell name="nr_years"/>
+  </row>
+  <row>
+   <cell name="n_core"/>
+  </row>
+  <row>
+   <cell name="max_elect"/>
+  </row>
+  <row>
+   <cell name="m_prefix"/>
+  </row>
+  <row>
+   <cell name="school_fee_code"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/certificate_course.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/certificate_course.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/certificate_course.xml	(revision 2226)
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="certificate_course" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="Title" meta_type="String Widget">
+  <property name="title">Title</property>
+  <property name="fields">
+   <element value="Title"/>
+  </property>
+  <property name="label">Title</property>
+  <property name="label_edit">Title</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="code" meta_type="CertificateCourseId Widget">
+  <property name="title">Course Code</property>
+  <property name="fields">
+   <element value="code"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Course Code</property>
+  <property name="label_edit">Course Code</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="view"/>
+   <element value="edit"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="core_or_elective" meta_type="Boolean Widget">
+  <property name="title">Core or Elective</property>
+  <property name="fields">
+   <element value="core_or_elective"/>
+  </property>
+  <property name="label">Core or Elective</property>
+  <property name="label_edit">Core or Elective</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="label_false">elective</property>
+  <property name="label_true">core</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="Title"/>
+  </row>
+  <row>
+   <cell name="code"/>
+  </row>
+  <row>
+   <cell name="core_or_elective"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/common.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/common.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/common.xml	(revision 2226)
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="common" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_default_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="Description" meta_type="Text Widget">
+  <property name="fields">
+   <element value="Description"/>
+  </property>
+  <property name="label_edit">cpsdoc_description_label_edit</property>
+  <property name="is_i18n">True</property>
+  <property name="css_class">ddescription</property>
+  <property name="width">72</property>
+ </widget>
+ <widget name="Title" meta_type="Heading Widget">
+  <property name="fields">
+   <element value="Title"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label_edit">cpsdoc_title_label_edit</property>
+  <property name="is_i18n">True</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">200</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="Title"/>
+  </row>
+  <row>
+   <cell name="Description"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/course.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/course.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/course.xml	(revision 2226)
@@ -0,0 +1,133 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="course" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+<widget name="code" meta_type="CourseId Widget">
+ <property name="title">Course Id</property>
+ <property name="fields">
+  <element value="code"/>
+ </property>
+ <property name="is_required">True</property>
+ <property name="label">Course Id</property>
+ <property name="label_edit">Course Id</property>
+ <property name="readonly_layout_modes">
+  <element value="edit"/>
+ </property>
+ <property name="hidden_layout_modes"/>
+ <property name="hidden_readonly_layout_modes"/>
+ <property name="display_width">8</property>
+</widget>
+  <widget name="adm_status" meta_type="String Widget">
+  <property name="title">Adm Status</property>
+  <property name="fields">
+   <element value="adm_status"/>
+  </property>
+  <property name="label">Adm Status</property>
+  <property name="label_edit">Adm Status</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="category" meta_type="String Widget">
+  <property name="title">Category</property>
+  <property name="fields">
+   <element value="category"/>
+  </property>
+  <property name="label">Category</property>
+  <property name="label_edit">Category</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="credits" meta_type="Int Widget">
+  <property name="title">Credits</property>
+  <property name="fields">
+   <element value="credits"/>
+  </property>
+  <property name="label">Credits</property>
+  <property name="label_edit">Credits</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="former_code" meta_type="String Widget">
+  <property name="title">Former Code</property>
+  <property name="fields">
+   <element value="former_code"/>
+  </property>
+  <property name="label">Former Code</property>
+  <property name="label_edit">Former Code</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="org_code" meta_type="String Widget">
+  <property name="title">Original Code</property>
+  <property name="fields">
+   <element value="org_code"/>
+  </property>
+  <property name="label">Original Code</property>
+  <property name="label_edit">Original Code</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="passmark" meta_type="Int Widget">
+  <property name="title">Passmark</property>
+  <property name="fields">
+   <element value="passmark"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Passmark</property>
+  <property name="label_edit">Passmark</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="semester" meta_type="Int Widget">
+  <property name="title">Semester</property>
+  <property name="fields">
+   <element value="semester"/>
+  </property>
+  <property name="label">Semester</property>
+  <property name="label_edit">Semester</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="title" meta_type="String Widget">
+  <property name="title">Course Title</property>
+  <property name="fields">
+   <element value="title"/>
+  </property>
+  <property name="label">Course Title</property>
+  <property name="label_edit">Course Title</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">60</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="code"/>
+  </row>
+  <row>
+   <cell name="title"/>
+  </row>
+  <row>
+   <cell name="semester"/>
+  </row>
+  <row>
+   <cell name="credits"/>
+  </row>
+  <row>
+   <cell name="passmark"/>
+  </row>
+ </table>
+</object>
+
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/department.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/department.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/department.xml	(revision 2226)
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="department" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="Description" meta_type="Text Widget">
+  <property name="fields">
+   <element value="Description"/>
+  </property>
+  <property name="label">Description</property>
+  <property name="label_edit">Description</property>
+  <property name="is_i18n">True</property>
+  <property name="hidden_layout_modes"/>
+  <property name="css_class">description</property>
+  <property name="width">72</property>
+ </widget>
+ <widget name="Title" meta_type="String Widget">
+  <property name="fields">
+   <element value="title"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Title</property>
+  <property name="label_edit">Title</property>
+  <property name="display_width">40</property>
+  <property name="size_max">200</property>
+ </widget>
+ <widget name="code" meta_type="WAeUPId Widget">
+  <property name="title">Department Id</property>
+  <property name="fields">
+   <element value="code"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Department Id</property>
+  <property name="label_edit">Department Id</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="view"/>
+   <element value="edit"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="title_prefix" meta_type="Select Widget">
+  <property name="title">Title Prefix</property>
+  <property name="fields">
+   <element value="title_prefix"/>
+  </property>
+  <property name="label">Title Prefix</property>
+  <property name="label_edit">Title Prefix</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">institution_types_voc</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="code"/>
+  </row>
+  <row>
+   <cell name="title_prefix"/>
+  </row>
+  <row>
+   <cell name="Title"/>
+  </row>
+  <row>
+   <cell name="Description"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/faculty.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/faculty.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/faculty.xml	(revision 2226)
@@ -0,0 +1,116 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="faculty" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="Description" meta_type="Text Widget">
+  <property name="fields">
+   <element value="Description"/>
+  </property>
+  <property name="label">Description</property>
+  <property name="label_edit">Description</property>
+  <property name="is_i18n">True</property>
+  <property name="hidden_layout_modes"/>
+  <property name="css_class">description</property>
+  <property name="width">72</property>
+ </widget>
+ <widget name="Title" meta_type="String Widget">
+  <property name="fields">
+   <element value="title"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Title</property>
+  <property name="label_edit">Title</property>
+  <property name="display_width">40</property>
+  <property name="size_max">200</property>
+ </widget>
+ <widget name="bank_code" meta_type="String Widget">
+  <property name="title">Bank Code</property>
+  <property name="fields">
+   <element value="bank_code"/>
+  </property>
+  <property name="label">Bank Code</property>
+  <property name="label_edit">Bank Code</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="code" meta_type="WAeUPId Widget">
+  <property name="title">Faculty Id</property>
+  <property name="fields">
+   <element value="code"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Faculty Id</property>
+  <property name="label_edit">Faculty Id</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="edit"/>
+   <element value="view"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="college_code" meta_type="String Widget">
+  <property name="title">College Code</property>
+  <property name="fields">
+   <element value="college_code"/>
+  </property>
+  <property name="label">College Code</property>
+  <property name="label_edit">College Code</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="degree_grade" meta_type="String Widget">
+  <property name="title">Degree Grade</property>
+  <property name="fields">
+   <element value="degree_grade"/>
+  </property>
+  <property name="label">Degree Grade</property>
+  <property name="label_edit">Degree Grade</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="title_prefix" meta_type="Select Widget">
+  <property name="title">Title Prefix</property>
+  <property name="fields">
+   <element value="title_prefix"/>
+  </property>
+  <property name="label">Title Prefix</property>
+  <property name="label_edit">Title Prefix</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">institution_types_voc</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="code"/>
+  </row>
+  <row>
+   <cell name="Title"/>
+  </row>
+  <row>
+   <cell name="title_prefix"/>
+  </row>
+  <row>
+   <cell name="Description"/>
+  </row>
+  <row>
+   <cell name="bank_code"/>
+  </row>
+  <row>
+   <cell name="degree_grade"/>
+  </row>
+  <row>
+   <cell name="college_code"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/import.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/import.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/import.xml	(revision 2226)
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<object name="import_data" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_default_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="filename" meta_type="Select Widget">
+  <property name="title">Filename</property>
+  <property name="fields">
+   <element value="filename"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Filename</property>
+  <property name="label_edit">Filename</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">csv_names</property>
+ </widget>
+ <widget name="name" meta_type="Select Widget">
+  <property name="title">Import Name</property>
+  <property name="fields">
+   <element value="name"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Import Layout</property>
+  <property name="label_edit">Import Layout</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">import_names</property>
+ </widget>
+ <widget name="import_or_edit" meta_type="Boolean Widget">
+  <property name="title">Import or Edit</property>
+  <property name="fields">
+   <element value="import_or_edit"/>
+  </property>
+  <property name="label">Import or Edit</property>
+  <property name="label_edit">Import or Edit</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="label_false">import</property>
+  <property name="label_true">edit</property>
+  <property name="render_format">select</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="filename"/>
+  </row>
+  <row>
+   <cell name="name"/>
+  </row>
+  <row>
+   <cell name="import_or_edit"/>
+  </row>
+ </table>
+
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/import_department.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/import_department.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/import_department.xml	(revision 2226)
@@ -0,0 +1,87 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="import_department" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="code" meta_type="WAeUPId Widget">
+  <property name="title">Department Id</property>
+  <property name="fields">
+   <element value="code"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Department Id</property>
+  <property name="label_edit">Department Id</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="view"/>
+   <element value="edit"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="faculty_code" meta_type="String Widget">
+  <property name="title">Faculty Code</property>
+  <property name="fields">
+   <element value="faculty_code"/>
+  </property>
+  <property name="label">Faculty Code</property>
+  <property name="label_edit">Faculty Code</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="review_state" meta_type="String Widget">
+  <property name="title">Review State</property>
+  <property name="fields">
+   <element value="review_state"/>
+  </property>
+  <property name="label">Review State</property>
+  <property name="label_edit">Review State</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="title" meta_type="String Widget">
+  <property name="title">Title</property>
+  <property name="fields">
+   <element value="title"/>
+  </property>
+  <property name="label">Title</property>
+  <property name="label_edit">Title</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="title_prefix" meta_type="Select Widget">
+  <property name="title">Title Prefix</property>
+  <property name="fields">
+   <element value="title_prefix"/>
+  </property>
+  <property name="label">Title Prefix</property>
+  <property name="label_edit">Title Prefix</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">institution_types_voc</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="code"/>
+  </row>
+  <row>
+   <cell name="title_prefix"/>
+  </row>
+  <row>
+   <cell name="title"/>
+  </row>
+  <row>
+   <cell name="faculty_code"/>
+  </row>
+  <row>
+   <cell name=""/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/import_student.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/import_student.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/import_student.xml	(revision 2226)
@@ -0,0 +1,369 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_create" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="reg_transition" meta_type="String Widget">
+  <property name="title">Transition after import</property>
+  <property name="fields">
+   <element value="reg_transition"/>
+  </property>
+  <property name="label">Transition</property>
+  <property name="label_edit">Transition</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="email" meta_type="Email Widget">
+  <property name="title">Email</property>
+  <property name="fields">
+   <element value="email"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Email</property>
+  <property name="label_edit">Email</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="app_email" meta_type="Email Widget">
+  <property name="title">Application Email</property>
+  <property name="fields">
+   <element value="email"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Application Email</property>
+  <property name="label_edit">Application Email</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="phone" meta_type="String Widget">
+  <property name="title">Phone</property>
+  <property name="fields">
+   <element value="phone"/>
+  </property>
+  <property name="label">Phone</property>
+  <property name="label_edit">Phone</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">15</property>
+ </widget>
+ <widget name="perm_address" meta_type="String Widget">
+  <property name="title">Address</property>
+  <property name="fields">
+   <element value="perm_address"/>
+  </property>
+  <property name="label">Address</property>
+  <property name="label_edit">Address</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">60</property>
+ </widget>
+ <widget name="lga" meta_type="String Widget">
+  <property name="title">LGA</property>
+  <property name="fields">
+   <element value="lga"/>
+  </property>
+  <property name="label">LGA</property>
+  <property name="label_edit">LGA</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="firstname" meta_type="String Widget">
+  <property name="title">First Name</property>
+  <property name="fields">
+   <element value="firstname"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">First Name</property>
+  <property name="label_edit">First Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="middlename" meta_type="String Widget">
+  <property name="title">Middle Name</property>
+  <property name="fields">
+   <element value="middlename"/>
+  </property>
+  <property name="label">Middle Name</property>
+  <property name="label_edit">Middle Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="lastname" meta_type="String Widget">
+  <property name="title">Last Name</property>
+  <property name="fields">
+   <element value="lastname"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Last Name</property>
+  <property name="label_edit">Last Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+<widget name="birthday" meta_type="DateTime Widget">
+ <property name="title">Birthday</property>
+ <property name="fields">
+  <element value="birthday"/>
+ </property>
+ <property name="label">Birthday</property>
+ <property name="label_edit">Birthday</property>
+ <property name="readonly_layout_modes"/>
+ <property name="hidden_layout_modes"/>
+ <property name="hidden_readonly_layout_modes"/>
+ <property name="view_format">%d/%m/%Y</property>
+ <property name="time_setting">False</property>
+ <property name="time_hour_default">00</property>
+</widget>
+  <widget name="entry_mode" meta_type="Select Widget">
+  <property name="title">Entry Mode</property>
+  <property name="fields">
+   <element value="entry_mode"/>
+  </property>
+  <property name="label">Entry Mode</property>
+  <property name="label_edit">Entry Mode</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">entry_modes</property>
+ </widget>
+  <widget name="current_mode" meta_type="Select Widget">
+  <property name="title">Current Mode</property>
+  <property name="fields">
+   <element value="current_mode"/>
+  </property>
+  <property name="label">Current Mode</property>
+  <property name="label_edit">Current Mode</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">entry_modes</property>
+ </widget>
+ <widget name="current_session" meta_type="WAeUP Session Widget">
+  <property name="title">Current Session</property>
+  <property name="fields">
+   <element value="current_session"/>
+  </property>
+  <property name="label">Current Session</property>
+  <property name="label_edit">Current Session</property>
+  <property name="description">The last session school fee has been paid for</property>
+  <property name="help">The last session school fee has been paid for</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">unset</property>
+  <property name="sorted">True</property>
+ </widget>
+ <widget name="current_level" meta_type="WAeUP Level Widget">
+  <property name="title">Current Level</property>
+  <property name="fields">
+   <element value="current_level"/>
+  </property>
+  <property name="label">Current Level</property>
+  <property name="label_edit">Current Level</property>
+  <property name="description">The last level school fee has been paid for</property>
+  <property name="help">The last level school fee has been paid for</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">unset</property>
+  <property name="sorted">True</property>
+ </widget>
+ <widget name="current_verdict" meta_type="WAeUP Verdict Widget">
+  <property name="title">Current Verdict</property>
+  <property name="fields">
+   <element value="current_verdict"/>
+  </property>
+  <property name="label">Current Verdict</property>
+  <property name="label_edit">Current Verdict</property>
+  <property name="description">The verdict of the current level</property>
+  <property name="help">The verdict of the current level</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">verdicts</property>
+  <property name="sorted">True</property>
+ </widget>
+ <widget name="entry_session" meta_type="WAeUP Session Widget">
+  <property name="title">Entry Session</property>
+  <property name="fields">
+   <element value="entry_session"/>
+  </property>
+  <property name="label">Entry Session</property>
+  <property name="label_edit">Entry Session</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">unset</property>
+  <property name="sorted">True</property>
+ </widget>
+ <widget name="jamb_reg_no" meta_type="String Widget">
+  <property name="title">JAMB Registration No</property>
+  <property name="fields">
+   <element value="jamb_reg_no"/>
+  </property>
+  <property name="label">JAMB Registration No</property>
+  <property name="label_edit">JAMB Registration No</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">10</property>
+ </widget>
+ 
+ <widget name="jamb_score" meta_type="String Widget">
+  <property name="title">JAMB Score</property>
+  <property name="fields">
+   <element value="jamb_score"/>
+  </property>
+  <property name="label">JAMB Score</property>
+  <property name="label_edit">JAMB Score</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">3</property>
+ </widget>
+ 
+ <widget name="jamb_state" meta_type="String Widget">
+  <property name="title">JAMB State</property>
+  <property name="fields">
+   <element value="jamb_state"/>
+  </property>
+  <property name="label">JAMB State</property>
+  <property name="label_edit">JAMB State</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+      edit
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ 
+ <widget name="jamb_lga" meta_type="String Widget">
+  <property name="title">JAMB LGA</property>
+  <property name="fields">
+   <element value="jamb_lga"/>
+  </property>
+  <property name="label">JAMB LGA</property>
+  <property name="label_edit">JAMB LGA</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+      edit
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ 
+ <widget name="jamb_age" meta_type="String Widget">
+  <property name="title">JAMB Age</property>
+  <property name="fields">
+   <element value="jamb_age"/>
+  </property>
+  <property name="label">JAMB Age</property>
+  <property name="label_edit">JAMB Age</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+      edit
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ 
+ <widget name="matric_no" meta_type="String Widget">
+  <property name="title">Matriculation No</property>
+  <property name="fields">
+   <element value="matric_no"/>
+  </property>
+  <property name="label">Matriculation No</property>
+  <property name="label_edit">Matriculation No</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">10</property>
+ </widget>
+ <widget name="sex" meta_type="WAeUP Sex Widget">
+  <property name="title">Sex</property>
+  <property name="fields">
+   <element value="sex"/>
+  </property>
+  <property name="label">Sex</property>
+  <property name="label_edit">Sex</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="label_false">male</property>
+  <property name="label_true">female</property>
+  <property name="render_format">select</property>
+ </widget>
+ <widget name="study_course" meta_type="StudyCourse Widget">
+  <property name="title">Study Course Code</property>
+  <property name="fields">
+   <element value="study_course"/>
+  </property>
+  <property name="label">Study Course Code</property>
+  <property name="label_edit">Study Course Code</property>
+  <property name="is_required">True</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">10</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="firstname"/>
+  </row>
+  <row>
+   <cell name="middlename"/>
+  </row>
+  <row>
+   <cell name="lastname"/>
+  </row>
+  <row>
+   <cell name="sex"/>
+  </row>
+  <row>
+   <cell name="email"/>
+  </row>
+  <row>
+   <cell name="phone"/>
+  </row>
+  <row>
+   <cell name="entry_mode"/>
+  </row>
+  <row>
+   <cell name="current_mode"/>
+  </row>
+  <row>
+   <cell name="entry_session"/>
+  </row>
+  <row>
+   <cell name="current_session"/>
+  </row>
+  <row>
+   <cell name="current_level"/>
+  </row>
+  <row>
+   <cell name="current_verdict"/>
+  </row>
+  <row>
+   <cell name="jamb_reg_no"/>
+  </row>
+  <row>
+   <cell name="jamb_score"/>
+  </row>
+  <row>
+   <cell name="matric_no"/>
+  </row>
+  <row>
+   <cell name="study_course"/>
+  </row>
+
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/layout.xsl
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/layout.xsl	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/layout.xsl	(revision 2226)
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:output method="html"/>
+  <xsl:template match="/">
+    <html>
+      <head>
+        <title>
+          <xsl:value-of select="object/name"/>
+        </title>
+        <link rel="stylesheet" type="text/css" media="all"
+              href="../xsl.css" />      
+      </head>
+      <body>
+        <xsl:for-each select="object">
+          <h1>Layout: <xsl:value-of select="@name"/></h1>
+        </xsl:for-each>
+        <h1>Layout</h1>
+        <table>
+          <xsl:for-each select="object/table/row">
+            <xsl:variable name="color">
+              <xsl:choose>
+                <xsl:when test="position() mod 2 = 0">
+                  <xsl:text>#ffffff</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>#eeeeee</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+            <tr style="background-color:{$color}">
+              <xsl:for-each select="cell">
+              <td>
+                <xsl:value-of select="@name"/>
+              </td>
+              </xsl:for-each>
+            </tr>
+          </xsl:for-each>
+        </table>
+        <h1>Properties</h1>
+        <table>
+          <tr>
+            <th>Id</th>
+            <th>Text</th>
+          </tr>
+          <xsl:for-each select="object/property">
+            <xsl:variable name="color">
+              <xsl:choose>
+                <xsl:when test="position() mod 2 = 0">
+                  <xsl:text>#ffffff</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>#eeeeee</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+            <tr style="background-color:{$color}">
+              <td>
+                <xsl:value-of select="@name"/>
+              </td>
+              <td>
+                <xsl:value-of select="text()"/>
+              </td>
+            </tr>
+          </xsl:for-each>
+        </table>
+        <h1>Widgets</h1>
+        <xsl:for-each select="object/widget">
+          <xsl:variable name="color">
+            <xsl:choose>
+              <xsl:when test="position() mod 2 = 0">
+                <xsl:text>#ffffff</xsl:text>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:text>#eeeeee</xsl:text>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:variable>
+          <h3><xsl:value-of select="@name"/> Meta Type: <xsl:value-of select="@meta_type"/></h3>
+          <table>
+            <tr style="background-color:{$color}">
+              <th colspan="3">
+                Properties:
+              </th>
+            </tr>
+            <xsl:for-each select="property">
+              <tr style="background-color:{$color}">
+                <th>
+                  <xsl:value-of select="@name"/>
+                </th>
+                <td>
+                  <xsl:choose>
+                    <xsl:when test="@name='vocabulary'">
+                      <a href="../vocabularies/{text()}.xml"><xsl:value-of select="text()"/></a>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      <xsl:value-of select="text()"/>
+                    </xsl:otherwise>
+                  </xsl:choose>
+                </td>
+                <td>
+                  <xsl:for-each select="element">
+                    <xsl:value-of select="@value"/>
+                  </xsl:for-each>
+                </td>
+              </tr>
+            </xsl:for-each>
+          </table>
+        </xsl:for-each>
+      </body>
+    </html>
+  </xsl:template>
+</xsl:stylesheet>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/members.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/members.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/members.xml	(revision 2226)
@@ -0,0 +1,170 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="members" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_dir_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="confirm" meta_type="Password Widget">
+  <property name="fields">
+   <element value="confirm"/>
+  </property>
+  <property name="label">label_password_confirm</property>
+  <property name="label_edit">label_password_confirm</property>
+  <property name="description">Password confirmation when editing</property>
+  <property name="is_i18n">True</property>
+  <property name="hidden_layout_modes">
+   <element value="view"/>
+   <element value="search"/>
+  </property>
+  <property name="hidden_readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_empty">True</property>
+  <property name="display_width">20</property>
+  <property name="size_max">0</property>
+  <property name="password_widget">password</property>
+ </widget>
+ <widget name="email" meta_type="Email Widget">
+  <property name="fields">
+   <element value="email"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Email</property>
+  <property name="label_edit">Email</property>
+  <property name="description"></property>
+  <property name="is_i18n">True</property>
+  <property name="size_max">0</property>
+ </widget>
+ <widget name="fullname" meta_type="String Widget">
+  <property name="fields">
+   <element value="fullname"/>
+  </property>
+  <property name="label">Full Name</property>
+  <property name="label_edit">Full Name</property>
+  <property name="description"></property>
+  <property name="is_i18n">True</property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+   <element value="edit"/>
+   <element value="search"/>
+  </property>
+ </widget>
+ <widget name="givenName" meta_type="String Widget">
+  <property name="fields">
+   <element value="givenName"/>
+  </property>
+  <property name="label">First Name</property>
+  <property name="label_edit">First Name</property>
+  <property name="description"></property>
+  <property name="is_i18n">True</property>
+ </widget>
+ <widget name="groups" meta_type="MultiSelect Widget">
+  <property name="fields">
+   <element value="groups"/>
+  </property>
+  <property name="label">Groups</property>
+  <property name="label_edit">Groups</property>
+  <property name="description"></property>
+  <property name="is_i18n">True</property>
+  <property name="vocabulary">groups</property>
+  <property name="size">7</property>
+ </widget>
+ <widget name="homeless" meta_type="Boolean Widget">
+  <property name="fields">
+   <element value="homeless"/>
+  </property>
+  <property name="label">cpsdir_label_homeless</property>
+  <property name="label_edit">cpsdir_label_homeless</property>
+  <property name="description">Homeless ?</property>
+  <property name="help">cpsdir_help_homeless</property>
+  <property name="is_i18n">True</property>
+  <property name="label_false">cpsschemas_label_true</property>
+  <property name="label_true">cpsschemas_label_false</property>
+ </widget>
+ <widget name="id" meta_type="User Identifier Widget">
+  <property name="fields">
+   <element value="id"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">User Name</property>
+  <property name="label_edit">User Name</property>
+  <property name="description"></property>
+  <property name="is_i18n">True</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+ </widget>
+ <widget name="password" meta_type="Password Widget">
+  <property name="fields">
+   <element value="password"/>
+  </property>
+  <property name="label">label_password</property>
+  <property name="label_edit">label_password</property>
+  <property name="description">Member password</property>
+  <property name="is_i18n">True</property>
+  <property name="hidden_layout_modes">
+   <element value="view"/>
+   <element value="search"/>
+  </property>
+  <property name="hidden_readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_empty">True</property>
+  <property name="display_width">20</property>
+  <property name="size_max">0</property>
+ </widget>
+<widget name="roles" meta_type="Generic MultiSelect Widget">
+ <property name="fields">
+  <element value="roles"/>
+ </property>
+ <property name="label">Roles</property>
+ <property name="label_edit">Roles</property>
+ <property name="description"></property>
+ <property name="is_i18n">True</property>
+ <property name="readonly_layout_modes"/>
+ <property name="hidden_layout_modes"/>
+ <property name="hidden_readonly_layout_modes"/>
+ <property name="hidden_if_expr">not: context/isSectionManager</property>
+ <property name="vocabulary">global_roles</property>
+ <property name="translated">True</property>
+ <property name="render_format">checkbox</property>
+</widget>
+ <widget name="sn" meta_type="String Widget">
+  <property name="fields">
+   <element value="sn"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Last Name</property>
+  <property name="label_edit">Last Name</property>
+  <property name="description"></property>
+  <property name="is_i18n">True</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="id" ncols="2"/>
+  </row>
+  <row>
+   <cell name="password" ncols="2"/>
+  </row>
+  <row>
+   <cell name="confirm" ncols="2"/>
+  </row>
+  <row>
+   <cell name="givenName"/>
+   <cell name="sn"/>
+  </row>
+  <row>
+   <cell name="fullname" ncols="2"/>
+  </row>
+  <row>
+   <cell name="email" ncols="2"/>
+  </row>
+  <row>
+   <cell name="roles"/>
+   <cell name="groups"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/members_search.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/members_search.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/members_search.xml	(revision 2226)
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<object name="members_search" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_dir_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="email" meta_type="String Widget">
+  <property name="fields">
+   <element value="email"/>
+  </property>
+  <property name="label">Email Address</property>
+  <property name="label_edit">Email Address</property>
+  <property name="description">Member email</property>
+  <property name="is_i18n">True</property>
+ </widget>
+ <widget name="givenName" meta_type="String Widget">
+  <property name="fields">
+   <element value="givenName"/>
+  </property>
+  <property name="label">First Name</property>
+  <property name="label_edit">First Name</property>
+  <property name="description">Member first name</property>
+  <property name="is_i18n">True</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="groups" meta_type="MultiSelect Widget">
+  <property name="title">Groups</property>
+  <property name="fields">
+   <element value="groups"/>
+  </property>
+  <property name="label">Groups</property>
+  <property name="label_edit">Groups</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">groups_voc</property>
+ </widget>
+ <widget name="id" meta_type="String Widget">
+  <property name="fields">
+   <element value="id"/>
+  </property>
+  <property name="label">User Name</property>
+  <property name="label_edit">User Name</property>
+  <property name="description">Member login</property>
+  <property name="is_i18n">True</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="sn" meta_type="String Widget">
+  <property name="fields">
+   <element value="sn"/>
+  </property>
+  <property name="label">Last Name</property>
+  <property name="label_edit">Last Name</property>
+  <property name="description">Member last name</property>
+  <property name="is_i18n">True</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <table>
+  <row>
+   <cell name="id" ncols="2"/>
+  </row>
+  <row>
+   <cell name="givenName"/>
+   <cell name="sn"/>
+  </row>
+  <row>
+   <cell name="email" ncols="2"/>
+  </row>
+  <row>
+   <cell name="groups" ncols="2"/>
+  </row>
+ </table>
+</object>
+
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/payment.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/payment.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/payment.xml	(revision 2226)
@@ -0,0 +1,143 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="payment" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="amount" meta_type="String Widget">
+  <property name="title">Amount Authorized</property>
+  <property name="fields">
+   <element value="amount"/>
+  </property>
+  <property name="label">Amount Authorized</property>
+  <property name="label_edit">Amount Authorized</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="date" meta_type="DateTime Widget">
+  <property name="title">Transaction Date</property>
+  <property name="fields">
+   <element value="date"/>
+  </property>
+  <property name="label">Transaction Date</property>
+  <property name="label_edit">Transaction Date</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="resp_approved_amount" meta_type="String Widget">
+  <property name="title">Response Amount Approved</property>
+  <property name="fields">
+   <element value="resp_approved_amount"/>
+  </property>
+  <property name="label">Response Amount Approved</property>
+  <property name="label_edit">Response Amount Approved</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">120</property>
+ </widget>
+ <widget name="resp_pay_reference" meta_type="String Widget">
+  <property name="title">Response Reference</property>
+  <property name="fields">
+   <element value="resp_pay_reference"/>
+  </property>
+  <property name="label">Response Reference</property>
+  <property name="label_edit">Response Reference</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">120</property>
+ </widget>
+ <widget name="resp_card_num" meta_type="String Widget">
+  <property name="title">Response Card Used</property>
+  <property name="fields">
+   <element value="resp_card_num"/>
+  </property>
+  <property name="label">Response Card Used</property>
+  <property name="label_edit">Response Card Used</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">20</property>
+ </widget>
+ <widget name="resp_code" meta_type="String Widget">
+  <property name="title">Response Code</property>
+  <property name="fields">
+   <element value="resp_code"/>
+  </property>
+  <property name="label">Response Code</property>
+  <property name="label_edit">Response Code</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+<widget name="resp_desc" meta_type="String Widget">
+ <property name="title">Response Description</property>
+ <property name="fields">
+  <element value="resp_desc"/>
+ </property>
+ <property name="label">Response Description</property>
+ <property name="label_edit">Response Description</property>
+ <property name="readonly_layout_modes"/>
+ <property name="hidden_layout_modes"/>
+ <property name="hidden_readonly_layout_modes"/>
+</widget>
+  <widget name="type_code" meta_type="String Widget">
+  <property name="title">Payment Code</property>
+  <property name="fields">
+   <element value="type_code"/>
+  </property>
+  <property name="label">Payment Code</property>
+  <property name="label_edit">Payment Code</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="type_description" meta_type="String Widget">
+  <property name="title">Payment Description</property>
+  <property name="fields">
+   <element value="type_description"/>
+  </property>
+  <property name="label">Payment Description</property>
+  <property name="label_edit">Payment Description</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  </widget>
+  <table>
+  <row>
+   <cell name="type_code"/>
+  </row>
+  <row>
+   <cell name="type_description"/>
+  </row>
+  <row>
+   <cell name="date"/>
+  </row>
+  <row>
+   <cell name="amount"/>
+  </row>
+  <row>
+   <cell name="resp_code"/>
+  </row>
+  <row>
+   <cell name="resp_desc"/>
+  </row>
+  <row>
+   <cell name="resp_pay_reference"/>
+  </row>
+  <row>
+   <cell name="resp_card_num"/>
+  </row>
+  <row>
+   <cell name="resp_approved_amount"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/scratch_card_batch.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/scratch_card_batch.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/scratch_card_batch.xml	(revision 2226)
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="scratch_card_batch" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="cost" meta_type="Float Widget">
+  <property name="title">Cost</property>
+  <property name="fields">
+   <element value="cost"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Cost</property>
+  <property name="label_edit">Cost</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="no_of_pins" meta_type="Int Widget">
+  <property name="title">Number of PINs </property>
+  <property name="fields">
+   <element value="no_of_pins"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Number of PINs </property>
+  <property name="label_edit">Number of PINs </property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="min_value">1000</property>
+  <property name="max_value">100000</property>
+ </widget>
+<widget name="prefix" meta_type="Select Widget">
+ <property name="title">Prefix</property>
+ <property name="fields">
+  <element value="prefix"/>
+ </property>
+ <property name="is_required">True</property>
+ <property name="label">Prefix</property>
+ <property name="label_edit">Prefix</property>
+ <property name="readonly_layout_modes"/>
+ <property name="hidden_layout_modes"/>
+ <property name="hidden_readonly_layout_modes"/>
+ <property name="vocabulary">pin_prefixes</property>
+</widget> <widget name="sold_by" meta_type="String Widget">
+  <property name="title">Sold by</property>
+  <property name="fields">
+   <element value="sold_by"/>
+  </property>
+  <property name="label">Sold by</property>
+  <property name="label_edit">Sold by</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <table>
+  <row>
+   <cell name="prefix"/>
+  </row>
+  <row>
+   <cell name="sold_by"/>
+  </row>
+  <row>
+   <cell name="no_of_pins"/>
+  </row>
+  <row>
+   <cell name="cost"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/scratch_card_search.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/scratch_card_search.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/scratch_card_search.xml	(revision 2226)
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="scratch_card_search" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_search_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="search_mode" meta_type="Generic Select Widget">
+  <property name="title">Search Mode</property>
+  <property name="fields">
+   <element value="search_mode"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">>Search for Scratch Card</property>
+  <property name="label_edit">Search for Scratch Card</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">scratch_card_search_mode</property>
+  <property name="render_format">radio</property>
+ </widget>
+ <widget name="search_string" meta_type="String Widget">
+  <property name="title">Search String</property>
+  <property name="fields">
+   <element value="search_string"/>
+  </property>
+  <property name="label">(complete numbers only)</property>
+  <property name="label_edit">(complete numbers only)</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <table>
+  <row>
+   <cell name="search_mode" ncols="2"/>
+  </row>
+  <row>
+   <cell name="search_string" ncols="2"/>
+  </row>
+ </table>
+</object>
+
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student.xml	(revision 2226)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_accommodation.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_accommodation.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_accommodation.xml	(revision 2226)
@@ -0,0 +1,171 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_accommodation" meta_type="CPS Layout">
+ <property name="layout_create_method">layout_enter_access_code</property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="acco_maint_code" meta_type="String Widget">
+  <property name="title">Maintenance Payment Code</property>
+  <property name="fields">
+   <element value="acco_maint_code"/>
+  </property>
+  <property name="label">Maintenance Payment Code</property>
+  <property name="label_edit">Maintenance Payment Code</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="acco_maint_date" meta_type="DateTime Widget">
+  <property name="title">Maintenance Payment Date</property>
+  <property name="fields">
+   <element value="acco_maint_date"/>
+  </property>
+  <property name="label">Maintenance Payment Date</property>
+  <property name="label_edit">Maintenance Payment Date</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="acco_maint_fee" meta_type="String Widget">
+  <property name="title">Maintenance Payment Fee</property>
+  <property name="fields">
+   <element value="acco_maint_fee"/>
+  </property>
+  <property name="label">Maintenance Payment Fee</property>
+  <property name="label_edit">Maintenance Payment Fee</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="acco_maint_sc_pin" meta_type="Scratchcard Pin Widget">
+  <property name="title">Access Code</property>
+  <property name="fields">
+   <element value="acco_maint_sc_pin"/>
+  </property>
+  <property name="label">Access Code</property>
+  <property name="label_edit">Access Code</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="prefix">HMU</property>
+ </widget>
+ <widget name="acco_res_date" meta_type="DateTime Widget">
+  <property name="title">Hostel Application Date</property>
+  <property name="fields">
+   <element value="acco_res_date"/>
+  </property>
+  <property name="label">Hostel Application Date</property>
+  <property name="label_edit">Hostel Application Date</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="acco_res_sc_pin" meta_type="Scratchcard Pin Widget">
+  <property name="title">Hostel Application PIN</property>
+  <property name="fields">
+   <element value="acco_res_sc_pin"/>
+  </property>
+  <property name="label">Hostel Application PIN</property>
+  <property name="label_edit">Hostel Application PIN</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="prefix">HOS</property>
+ </widget>
+ <widget name="bed" meta_type="Method Widget">
+  <property name="title">Bed</property>
+  <property name="fields">
+   <element value="bed"/>
+  </property>
+  <property name="label">Bed</property>
+  <property name="label_edit">Bed</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="render_method">getFormattedBed</property>
+ </widget>
+ <widget name="session" meta_type="String Widget">
+  <property name="title">Session</property>
+  <property name="fields">
+   <element value="session"/>
+  </property>
+  <property name="label">Session</property>
+  <property name="label_edit">Session</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="student_status" meta_type="String Widget">
+  <property name="title">Bed Type</property>
+  <property name="fields">
+   <element value="student_status"/>
+  </property>
+  <property name="label">Bed Type</property>
+  <property name="label_edit">Bed Type</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <table>
+  <row>
+   <cell name="session"/>
+  </row>
+  <row>
+   <cell name="bed"/>
+  </row>
+  <row>
+   <cell name="student_status"/>
+  </row>
+  <row>
+   <cell name="acco_res_sc_pin"/>
+  </row>
+  <row>
+   <cell name="acco_res_date"/>
+  </row>
+  <row>
+   <cell name="acco_maint_code"/>
+  </row>
+  <row>
+   <cell name="acco_maint_fee"/>
+  </row>
+  <row>
+   <cell name="acco_maint_sc_pin"/>
+  </row>
+  <row>
+   <cell name="acco_maint_date"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_accommodation_fe.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_accommodation_fe.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_accommodation_fe.xml	(revision 2226)
@@ -0,0 +1,131 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_accommodation_fe" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_student_acco_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="acco_maint_date" meta_type="DateTime Widget">
+  <property name="title">Maintenance Payment Date</property>
+  <property name="fields">
+   <element value="acco_maint_date"/>
+  </property>
+  <property name="label">Maintenance Payment Date</property>
+  <property name="label_edit">Maintenance Payment Date</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+   <element value="edit"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="acco_maint_sc_pin" meta_type="Scratchcard Pin Widget">
+  <property name="title">Access Code</property>
+  <property name="fields">
+   <element value="acco_maint_sc_pin"/>
+  </property>
+  <property name="label">Access Code</property>
+  <property name="label_edit">Access Code</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="prefix">@getMaintenancePrefix</property>
+ </widget>
+ <widget name="acco_res_date" meta_type="DateTime Widget">
+  <property name="title">Hostel Application Date</property>
+  <property name="fields">
+   <element value="acco_res_date"/>
+  </property>
+  <property name="label">Hostel Application Date</property>
+  <property name="label_edit">Hostel Application Date</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="acco_res_sc_pin" meta_type="Scratchcard Pin Widget">
+  <property name="title">Access Code</property>
+  <property name="fields">
+   <element value="acco_res_sc_pin"/>
+  </property>
+  <property name="label">Access Code</property>
+  <property name="label_edit">Access Code</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="prefix">HOS</property>
+ </widget>
+ <widget name="bed" meta_type="Method Widget">
+  <property name="title">Bed</property>
+  <property name="fields">
+   <element value="bed"/>
+  </property>
+  <property name="label">Bed</property>
+  <property name="label_edit">Bed</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="render_method">getFormattedBed</property>
+ </widget>
+ <widget name="session" meta_type="String Widget">
+  <property name="title">Session</property>
+  <property name="fields">
+   <element value="session"/>
+  </property>
+  <property name="label">Session</property>
+  <property name="label_edit">Session</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="student_status" meta_type="String Widget">
+  <property name="title">Bed Type</property>
+  <property name="fields">
+   <element value="student_status"/>
+  </property>
+  <property name="label">Bed Type</property>
+  <property name="label_edit">Bed Type</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <table>
+  <row>
+   <cell name="bed"/>
+  </row>
+  <row>
+   <cell name="acco_res_sc_pin"/>
+  </row>
+  <row>
+   <cell name="acco_res_date"/>
+  </row>
+  <row>
+   <cell name="acco_maint_sc_pin"/>
+  </row>
+  <row>
+   <cell name="acco_maint_date"/>
+  </row>
+ </table>
+</object>
+
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_application.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_application.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_application.xml	(revision 2226)
@@ -0,0 +1,343 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_application" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="app_ac_date" meta_type="DateTime Widget">
+  <property name="title">Application Date</property>
+  <property name="fields">
+   <element value="app_ac_date"/>
+  </property>
+  <property name="label">Application Date</property>
+  <property name="label_edit">Application Date</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">%d/%m/%Y</property>
+  <property name="time_setting">False</property>
+ </widget>
+ <widget name="app_ac_pin" meta_type="Scratchcard Pin Widget">
+  <property name="title">Access Code</property>
+  <property name="fields">
+   <element value="app_ac_pin"/>
+  </property>
+  <property name="label">Access Code</property>
+  <property name="label_edit">Access Code</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="prefix">APP</property>
+  <property name="reference">jamb_reg_no</property>
+ </widget>
+ <widget name="app_email" meta_type="Email Widget">
+  <property name="title">Email Address</property>
+  <property name="fields">
+   <element value="app_email"/>
+  </property>
+  <property name="label">Email Address</property>
+  <property name="label_edit">Email Address</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="app_mobile" meta_type="String Widget">
+  <property name="title">Mobile Phone No</property>
+  <property name="fields">
+   <element value="app_mobile"/>
+  </property>
+  <property name="label">Mobile Phone No</property>
+  <property name="label_edit">Mobile Phone No</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="entry_mode" meta_type="Select Widget">
+  <property name="title">Mode of Entry</property>
+  <property name="fields">
+   <element value="entry_mode"/>
+  </property>
+  <property name="label">Mode of Entry</property>
+  <property name="label_edit">Mode of Entry</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">entry_modes</property>
+ </widget>
+ <widget name="entry_session" meta_type="Select Widget">
+  <property name="title">Entry Session</property>
+  <property name="fields">
+   <element value="entry_session"/>
+  </property>
+  <property name="label">Entry Session</property>
+  <property name="label_edit">Entry Session</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">sessions</property>
+ </widget>
+ <widget name="jamb_age" meta_type="Int Widget">
+  <property name="title">Age</property>
+  <property name="fields">
+   <element value="jamb_age"/>
+  </property>
+  <property name="label">Age</property>
+  <property name="label_edit">Age</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="jamb_first_cos" meta_type="String Widget">
+  <property name="title">JAMB First Choice Course of Study</property>
+  <property name="fields">
+   <element value="jamb_first_cos"/>
+  </property>
+  <property name="label">JAMB First Choice Course of Study</property>
+  <property name="label_edit">JAMB First Choice Course of Study</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="jamb_first_uni" meta_type="String Widget">
+  <property name="title">JAMB First Choice University</property>
+  <property name="fields">
+   <element value="jamb_first_uni"/>
+  </property>
+  <property name="label">JAMB First Choice University</property>
+  <property name="label_edit">JAMB First Choice University</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="jamb_firstname" meta_type="String Widget">
+  <property name="title">First Name</property>
+  <property name="fields">
+   <element value="jamb_firstname"/>
+  </property>
+  <property name="label">First Name</property>
+  <property name="label_edit">First Name</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="jamb_lastname" meta_type="String Widget">
+  <property name="title">Last Name</property>
+  <property name="fields">
+   <element value="jamb_lastname"/>
+  </property>
+  <property name="label">Last Name</property>
+  <property name="label_edit">Last Name</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="jamb_lga" meta_type="String Widget">
+  <property name="title">Local Government Area</property>
+  <property name="fields">
+   <element value="jamb_lga"/>
+  </property>
+  <property name="label">Local Government Area</property>
+  <property name="label_edit">Local Government Area</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="jamb_middlename" meta_type="String Widget">
+  <property name="title">Middle Name</property>
+  <property name="fields">
+   <element value="jamb_middlename"/>
+  </property>
+  <property name="label">Middle Name</property>
+  <property name="label_edit">Middle Name</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="jamb_reg_no" meta_type="String Widget">
+  <property name="title">Registration Number</property>
+  <property name="fields">
+   <element value="jamb_reg_no"/>
+  </property>
+  <property name="label">Registration Number</property>
+  <property name="label_edit">Registration Number</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">12</property>
+  <property name="size_max">12</property>
+ </widget>
+ <widget name="jamb_score" meta_type="String Widget">
+  <property name="title">JAMB Score</property>
+  <property name="fields">
+   <element value="jamb_score"/>
+  </property>
+  <property name="label">JAMB Score</property>
+  <property name="label_edit">JAMB Score</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="jamb_second_cos" meta_type="String Widget">
+  <property name="title">JAMB Second Choice Course of Study</property>
+  <property name="fields">
+   <element value="jamb_second_cos"/>
+  </property>
+  <property name="label">JAMB Second Choice Course of Study</property>
+  <property name="label_edit">JAMB Second Choice Course of Study</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="jamb_second_uni" meta_type="String Widget">
+  <property name="title">JAMB Second Choice University</property>
+  <property name="fields">
+   <element value="jamb_second_uni"/>
+  </property>
+  <property name="label">JAMB Second Choice University</property>
+  <property name="label_edit">JAMB Second Choice University</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="jamb_sex" meta_type="String Widget">
+  <property name="title">Sex</property>
+  <property name="fields">
+   <element value="jamb_sex"/>
+  </property>
+  <property name="label">Sex</property>
+  <property name="label_edit">Sex</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">1</property>
+  <property name="size_max">1</property>
+ </widget>
+ <widget name="jamb_state" meta_type="String Widget">
+  <property name="title">State</property>
+  <property name="fields">
+   <element value="jamb_state"/>
+  </property>
+  <property name="label">State</property>
+  <property name="label_edit">State</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="objection_date" meta_type="DateTime Widget">
+  <property name="title">Objection Date</property>
+  <property name="fields">
+   <element value="objection_date"/>
+  </property>
+  <property name="label">Objection Date</property>
+  <property name="label_edit">Objection Date</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">%d/%m/%Y</property>
+ </widget>
+ <widget name="passport" meta_type="Photo Widget">
+  <property name="title">Passport Picture</property>
+  <property name="fields">
+   <element value="passport"/>
+  </property>
+  <property name="label">Passport Picture</property>
+  <property name="label_edit">Passport Picture</property>
+  <property
+     name="help">Upload passport photograph with red background</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">204800</property>
+  <property name="display_external_editor">False</property>
+  <property name="display_width">150</property>
+  <property name="display_height">200</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="app_ac_pin" ncols="3"/>
+  </row>
+  <row>
+   <cell name="app_ac_date" ncols="3"/>
+  </row>
+  <row>
+   <cell name="app_email" ncols="3"/>
+  </row>
+  <row>
+   <cell name="app_mobile" ncols="3"/>
+  </row>
+  <row>
+   <cell name="jamb_reg_no" ncols="3"/>
+  </row>
+  <row>
+   <cell name="jamb_firstname" ncols="3"/>
+  </row>
+  <row>
+   <cell name="jamb_middlename" ncols="3"/>
+  </row>
+  <row>
+   <cell name="jamb_lastname" ncols="3"/>
+  </row>
+  <row>
+   <cell name="jamb_sex" ncols="3"/>
+  </row>
+  <row>
+   <cell name="jamb_age" ncols="3"/>
+  </row>
+  <row>
+   <cell name="jamb_state" ncols="3"/>
+  </row>
+  <row>
+   <cell name="jamb_lga" ncols="3"/>
+  </row>
+  <row>
+   <cell name="jamb_score" ncols="3"/>
+  </row>
+  <row>
+   <cell name="entry_mode" ncols="3"/>
+  </row>
+  <row>
+   <cell name="entry_session" ncols="3"/>
+  </row>
+  <row>
+   <cell name="jamb_first_cos" ncols="3"/>
+  </row>
+  <row>
+   <cell name="jamb_second_cos" ncols="3"/>
+  </row>
+  <row>
+   <cell name="jamb_first_uni" ncols="3"/>
+  </row>
+  <row>
+   <cell name="jamb_second_uni" ncols="3"/>
+  </row>
+  <row>
+   <cell name="objection_date" ncols="3"/>
+  </row>
+  <row>
+   <cell name="passport" ncols="3"/>
+  </row>
+ </table>
+</object>
+
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_application_fe.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_application_fe.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_application_fe.xml	(revision 2226)
@@ -0,0 +1,298 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_application_fe" meta_type="CPS Layout">
+ <property name="layout_create_method">layout_enter_access_code</property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_application_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="app_ac_date" meta_type="DateTime Widget">
+  <property name="title">Application Date</property>
+  <property name="fields">
+   <element value="app_ac_date"/>
+  </property>
+  <property name="label">Application Date</property>
+  <property name="label_edit">Application Date</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">%d/%m/%Y</property>
+  <property name="time_setting">False</property>
+ </widget>
+ <widget name="app_ac_pin" meta_type="Scratchcard Pin Widget">
+  <property name="title">Access Code</property>
+  <property name="fields">
+   <element value="app_ac_pin"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Access Code</property>
+  <property name="label_edit">Access Code</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="prefix">APP</property>
+  <property name="reference">jamb_reg_no</property>
+  </widget>
+<widget name="objection_date" meta_type="DateTime Widget">
+ <property name="title">Objection Date</property>
+ <property name="fields">
+  <element value="objection_date"/>
+ </property>
+ <property name="label">Objection Date</property>
+ <property name="label_edit">Objection Date</property>
+ <property name="readonly_layout_modes">
+  <element value="edit"/>
+ </property>
+ <property name="hidden_layout_modes">
+  <element value="create"/>
+ </property>
+ <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">%d/%m/%Y</property>
+  <property name="time_setting">False</property>
+</widget>
+ <widget name="entry_mode" meta_type="Select Widget">
+  <property name="title">Mode of Entry</property>
+  <property name="fields">
+   <element value="entry_mode"/>
+  </property>
+  <property name="label">Mode of Entry</property>
+  <property name="label_edit">Mode of Entry</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">entry_modes</property>
+ </widget>
+ <widget name="entry_session" meta_type="Select Widget">
+  <property name="title">Entry Session</property>
+  <property name="fields">
+   <element value="entry_session"/>
+  </property>
+  <property name="label">Entry Session</property>
+  <property name="label_edit">Entry Session</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">sessions</property>
+ </widget>
+ <widget name="app_email" meta_type="Email Widget">
+  <property name="title">Email Address</property>
+  <property name="fields">
+   <element value="app_email"/>
+  </property>
+  <property name="label">Email Address</property>
+  <property name="label_edit">Email Address</property>
+  <property name="is_required">False</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes">
+    <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="app_mobile" meta_type="String Widget">
+  <property name="title">Mobile Phone No</property>
+  <property name="fields">
+   <element value="app_mobile"/>
+  </property>
+  <property name="label">Mobile Phone No</property>
+  <property name="is_required">False</property>
+  <property name="label_edit">Mobile Phone No</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes">create</property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="jamb_first_cos" meta_type="String Widget">
+  <property name="title">First Choice Course of Study</property>
+  <property name="fields">
+   <element value="jamb_first_cos"/>
+  </property>
+  <property name="label">First Choice Course of Study</property>
+  <property name="label_edit">First Choice Course of Study</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="jamb_firstname" meta_type="String Widget">
+  <property name="title">First Name</property>
+  <property name="fields">
+   <element value="jamb_firstname"/>
+  </property>
+  <property name="label">First Name</property>
+  <property name="label_edit">First Name</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+   <element value="edit"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="jamb_lastname" meta_type="String Widget">
+  <property name="title">Last Name</property>
+  <property name="fields">
+   <element value="jamb_lastname"/>
+  </property>
+  <property name="label">Student's Name</property>
+  <property name="label_edit">Name</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="jamb_middlename" meta_type="String Widget">
+  <property name="title">Middle Name</property>
+  <property name="fields">
+   <element value="jamb_middlename"/>
+  </property>
+  <property name="label">Middle Name</property>
+  <property name="label_edit">Middle Name</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+   <element value="edit"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="jamb_reg_no" meta_type="JambRegNo Widget">
+  <property name="title">Registration Number</property>
+  <property name="fields">
+   <element value="jamb_reg_no"/>
+  </property>
+  <property name="label">Registration Number</property>
+  <property name="label_edit">Registration Number</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">13</property>
+  <property name="size_max">13</property>
+  <property name="catalog">students_catalog</property>
+ </widget>
+ <widget name="jamb_second_cos" meta_type="String Widget">
+  <property name="title">Second Choice Course of Study</property>
+  <property name="fields">
+   <element value="jamb_second_cos"/>
+  </property>
+  <property name="label">Second Choice Course of Study</property>
+  <property name="label_edit">Second Choice Course of Study</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="jamb_sex" meta_type="String Widget">
+  <property name="title">Sex</property>
+  <property name="fields">
+   <element value="jamb_sex"/>
+  </property>
+  <property name="label">Sex</property>
+  <property name="label_edit">Sex</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="jamb_state" meta_type="String Widget">
+  <property name="title">State</property>
+  <property name="fields">
+   <element value="jamb_state"/>
+  </property>
+  <property name="label">State of Origin</property>
+  <property name="label_edit">State of Origin</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="passport" meta_type="Photo Widget">
+  <property name="title">Passport Picture</property>
+  <property name="fields">
+   <element value="passport"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Passport Picture</property>
+  <property name="label_edit">Passport Picture</property>
+  <property
+     name="help">Upload passport photograph with red background.</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">204800</property>
+  <property name="display_external_editor">False</property>
+  <property name="display_width">150</property>
+  <property name="display_height">200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="jamb_reg_no" ncols="3"/>
+  </row>
+  <row>
+   <cell name="app_ac_pin" ncols="3"/>
+  </row>
+  <row>
+   <cell name="app_ac_date" ncols="3"/>
+  </row>
+  <row>
+   <cell name="app_email" ncols="3"/>
+  </row>
+  <row>
+   <cell name="app_mobile" ncols="3"/>
+  </row>
+  <row>
+   <cell name="jamb_lastname" ncols="3"/>
+  </row>
+  <row>
+   <cell name="jamb_sex" ncols="3"/>
+  </row>
+  <row>
+   <cell name="entry_mode" ncols="3"/>
+  </row>
+  <row>
+   <cell name="jamb_state" ncols="3"/>
+  </row>
+  <row>
+   <cell name="passport" ncols="3"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_application_search.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_application_search.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_application_search.xml	(revision 2226)
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_application_search" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_search_pume_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="jamb_reg_no" meta_type="JambRegNo Widget">
+  <property name="title">Registration Number</property>
+  <property name="fields">
+   <element value="jamb_reg_no"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Registration Number</property>
+  <property name="label_edit">Registration Number</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">13</property>
+  <property name="size_max">13</property>
+  <property name="catalog">portal_pumeresults</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="jamb_reg_no" ncols="3"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_change_password.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_change_password.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_change_password.xml	(revision 2226)
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_password_change" meta_type="CPS Layout">
+  <property name="layout_create_method"></property>
+  <property name="layout_edit_method"></property>
+  <property name="layout_view_method"></property>
+  <property name="style_prefix">layout_waeup_</property>
+  <property name="flexible_widgets"/>
+  <property name="validate_values_expr"></property>
+  <widget name="old_password" meta_type="Password Widget">
+    <property name="title">Old Password</property>
+    <property name="fields">
+      <element value="old_password"/>
+    </property>
+    <property name="is_required">True</property>
+    <property name="label">Old Password</property>
+    <property name="label_edit">Old Password</property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="password_widget"></property>
+    <property name="check_digit">False</property>
+    <property name="size_min">3</property>
+    <property name="size_max">10</property>
+  </widget>
+  <widget name="password" meta_type="Password Widget">
+    <property name="title">New Password</property>
+    <property name="fields">
+      <element value="password"/>
+    </property>
+    <property name="label">New Password</property>
+    <property name="label_edit">New Password</property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="password_widget"></property>
+    <property name="check_digit">True</property>
+    <property name="size_min">6</property>
+    <property name="size_max">10</property>
+  </widget>
+  <widget name="repeat_password" meta_type="Password Widget">
+    <property name="title">Repeat Password</property>
+    <property name="fields">
+      <element value="repeat_password"/>
+    </property>
+    <property name="is_required">True</property>
+    <property name="label">Repeat Password</property>
+    <property name="label_edit">Repeat Password</property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="password_widget">password</property>
+    <property name="check_digit">True</property>
+    <property name="size_min">6</property>
+    <property name="size_max">10</property>
+  </widget>
+  <table>
+    <row>
+      <cell name="old_password"/>
+    </row>
+    <row>
+      <cell name="password"/>
+    </row>
+    <row>
+      <cell name="repeat_password"/>
+    </row>
+  </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_clearance.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_clearance.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_clearance.xml	(revision 2226)
@@ -0,0 +1,894 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_clearance" meta_type="CPS Layout">
+ <property name="layout_create_method">layout_enter_access_code</property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_clearance_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="acc_inst" meta_type="Image Widget">
+  <property name="title">Accepted by Institution</property>
+  <property name="fields">
+   <element value="acc_inst"/>
+  </property>
+  <property name="label">Accepted by Institution</property>
+  <property name="label_edit">Accepted by Institution</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="acc_let" meta_type="Image Widget">
+  <property name="title">Acceptance Letter </property>
+  <property name="fields">
+   <element value="acc_let"/>
+  </property>
+  <property name="label">Acceptance Letter </property>
+  <property name="label_edit">Acceptance Letter </property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="age_dec" meta_type="Image Widget">
+  <property name="title">Age Declaration</property>
+  <property name="fields">
+   <element value="age_dec"/>
+  </property>
+  <property name="label">Age Declaration</property>
+  <property name="label_edit">Age Declaration</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="alr_date" meta_type="DateTime Widget">
+  <property name="title">Exam Date</property>
+  <property name="fields">
+   <element value="alr_date"/>
+  </property>
+  <property name="label">Exam Date</property>
+  <property name="label_edit">Exam Date</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">%d/%m/%Y</property>
+  <property name="time_setting">False</property>
+ </widget>
+ <widget name="alr_fname" meta_type="String Widget">
+  <property name="title">Full Name</property>
+  <property name="fields">
+   <element value="alr_fname"/>
+  </property>
+  <property name="label">Full Name</property>
+  <property name="label_edit">Full Name</property>
+  <property name="description">Advanced Level Data</property>
+  <property
+     name="help">Full name as it appears on certificate/result</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="alr_no" meta_type="String Widget">
+  <property name="title">Exam Number</property>
+  <property name="fields">
+   <element value="alr_no"/>
+  </property>
+  <property name="label">Exam Number</property>
+  <property name="label_edit">Exam Number</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="alr_results" meta_type="WAeUp Results Widget">
+  <property name="title">Results</property>
+  <property name="fields">
+   <element value="alr_results"/>
+  </property>
+  <property name="label">Results</property>
+  <property name="label_edit">Results</property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="alr_scan" meta_type="Image Widget">
+  <property name="title">Scan of Advanced Level Result</property>
+  <property name="fields">
+   <element value="alr_scan"/>
+  </property>
+  <property name="label">Scan of Advanced Level Result</property>
+  <property name="label_edit">Scan of Advanced Level Result</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="birth_certificate" meta_type="Image Widget">
+  <property name="title">Birth Certificate</property>
+  <property name="fields">
+   <element value="birth_certificate"/>
+  </property>
+  <property name="label">Birth Certificate</property>
+  <property name="label_edit">Birth Certificate</property>
+  <property name="description">Other Documents</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="birthday" meta_type="DateTime Widget">
+  <property name="title">Date of Birth</property>
+  <property name="fields">
+   <element value="birthday"/>
+  </property>
+  <property name="label">Date of Birth</property>
+  <property name="label_edit">Date of Birth (dd/mm/yyyy)</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">%d/%m/%Y</property>
+  <property name="time_setting">False</property>
+ </widget>
+ <widget name="cert" meta_type="Image Widget">
+  <property name="title">Certificate</property>
+  <property name="fields">
+   <element value="cert"/>
+  </property>
+  <property name="label">Certificate</property>
+  <property name="label_edit">Certificate</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="clr_ac_pin" meta_type="Scratchcard Pin Widget">
+  <property name="title">Access Code</property>
+  <property name="fields">
+   <element value="clr_ac_pin"/>
+  </property>
+  <property name="label">Access Code</property>
+  <property name="label_edit">Access Code</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="prefix">CLR</property>
+ </widget>
+ <widget name="cred" meta_type="Image Widget">
+  <property name="title">Credential</property>
+  <property name="fields">
+   <element value="cred"/>
+  </property>
+  <property name="label">Credential</property>
+  <property name="label_edit">Credential</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="def_adm" meta_type="Boolean Widget">
+  <property name="title">Deferment of Admission</property>
+  <property name="fields">
+   <element value="def_adm"/>
+  </property>
+  <property name="label">Deferment of Admission</property>
+  <property name="label_edit">Deferment of Admission</property>
+  <property
+     name="help">Tick this box if you wish to defer admission till next session.</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="render_format">radio</property>
+ </widget>
+ <widget name="entry_date" meta_type="DateTime Widget">
+  <property name="title">Entry Date</property>
+  <property name="fields">
+   <element value="entry_date"/>
+  </property>
+  <property name="label">Entry Date</property>
+  <property name="label_edit">Entry Date</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">%d/%m/%Y</property>
+  <property name="time_setting">False</property>
+  </widget>
+ <widget name="request_date" meta_type="DateTime Widget">
+  <property name="title">Request Date</property>
+  <property name="fields">
+   <element value="request_date"/>
+  </property>
+  <property name="label">Request Date</property>
+  <property name="label_edit">Request Date</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">%d/%m/%Y</property>
+  <property name="time_setting">False</property>
+ </widget>
+ <widget name="cleared_date" meta_type="DateTime Widget">
+  <property name="title">cleared Date</property>
+  <property name="fields">
+   <element value="cleared_date"/>
+  </property>
+  <property name="label">Cleared Date</property>
+  <property name="label_edit">Cleared Date</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">%d/%m/%Y</property>
+  <property name="time_setting">False</property>
+ </widget>
+ <widget name="evid" meta_type="Image Widget">
+  <property name="title">Evidence of Name</property>
+  <property name="fields">
+   <element value="evid"/>
+  </property>
+  <property name="label">Evidence of Name</property>
+  <property name="label_edit">Evidence of Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="matric_no_history" meta_type="Lines Widget">
+   <property name="title">Previous Matriculation Number(s)</property>
+   <property name="fields">
+     <element value="matric_no_history"/>
+   </property>
+   <property name="label">Previous Matriculation Number(s)</property>
+   <property name="label_edit">Previous Matriculation Number(s)</property>
+   <property name="readonly_layout_modes">
+     <element value="edit"/>
+   </property>
+   <property name="hidden_layout_modes">
+     <element value="create"/>
+   </property>
+   <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="fst_sit_date" meta_type="DateTime Widget">
+  <property name="title">Exam Date</property>
+  <property name="fields">
+   <element value="fst_sit_date"/>
+  </property>
+  <property name="label">Exam Date</property>
+  <property name="label_edit">Exam Date</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">%d/%m/%Y</property>
+  <property name="time_setting">False</property>
+ </widget>
+ <widget name="fst_sit_fname" meta_type="String Widget">
+  <property name="title">Full Name</property>
+  <property name="fields">
+   <element value="fst_sit_fname"/>
+  </property>
+  <property name="label">Full Name</property>
+  <property name="label_edit">Full Name</property>
+  <property name="description">First Sitting Data</property>
+  <property
+     name="help">Full name as it appears on certificate/result</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="fst_sit_no" meta_type="String Widget">
+  <property name="title">Exam Number</property>
+  <property name="fields">
+   <element value="fst_sit_no"/>
+  </property>
+  <property name="label">Exam Number</property>
+  <property name="label_edit">Exam Number</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="fst_sit_results" meta_type="WAeUp Results Widget">
+  <property name="title">Results</property>
+  <property name="fields">
+   <element value="fst_sit_results"/>
+  </property>
+  <property name="label">Results</property>
+  <property name="label_edit">Results</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="fst_sit_scan" meta_type="Image Widget">
+  <property name="title">Scan of First Sitting Result</property>
+  <property name="fields">
+   <element value="fst_sit_scan"/>
+  </property>
+  <property name="label">Scan of First Sitting Result</property>
+  <property name="label_edit">Scan of First Sitting Result</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="fst_sit_type" meta_type="Select Widget">
+  <property name="title">Exam Type</property>
+  <property name="fields">
+   <element value="fst_sit_type"/>
+  </property>
+  <property name="label">Exam Type</property>
+  <property name="label_edit">Exam Type</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">exam_types</property>
+ </widget>
+ <widget name="hq_disc" meta_type="String Widget">
+  <property name="title">Discipline</property>
+  <property name="fields">
+   <element value="hq_disc"/>
+  </property>
+  <property name="label">Discipline</property>
+  <property name="label_edit">Discipline</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="hq_grade" meta_type="Select Widget">
+  <property name="title">Higher Qualification Grade</property>
+  <property name="fields">
+   <element value="hq_grade"/>
+  </property>
+  <property name="label">Higher Qualification Grade</property>
+  <property name="label_edit">Higher Qualification Grade</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">high_grade</property>
+ </widget>
+ <widget name="hq_matric_no" meta_type="String Widget">
+  <property name="title">Matric Number</property>
+  <property name="fields">
+   <element value="hq_matric_no"/>
+  </property>
+  <property name="label">Matric Number</property>
+  <property name="label_edit">Matric Number</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="hq_scan" meta_type="Image Widget">
+  <property name="title">Scan of Higher Qualification Result</property>
+  <property name="fields">
+   <element value="hq_scan"/>
+  </property>
+  <property name="label">Scan of Higher Qualification Result</property>
+  <property name="label_edit">Scan of Higher Qualification Result</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="hq_school" meta_type="String Widget">
+  <property name="title">School Attended</property>
+  <property name="fields">
+   <element value="hq_school"/>
+  </property>
+  <property name="label">School Attended</property>
+  <property name="label_edit">School Attended</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="hq_session" meta_type="String Widget">
+  <property name="title">Session Obtained</property>
+  <property name="fields">
+   <element value="hq_session"/>
+  </property>
+  <property name="label">Session Obtained</property>
+  <property name="label_edit">Session Obtained</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="hq_type" meta_type="Select Widget">
+  <property name="title">Higher Qualification</property>
+  <property name="fields">
+   <element value="hq_type"/>
+  </property>
+  <property name="label">Higher Qualification</property>
+  <property name="label_edit">Higher Qualification</property>
+  <property name="description">Higher Qualification Data</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">high_qual</property>
+ </widget>
+ <widget name="jamb_let" meta_type="Image Widget">
+  <property name="title">JAMB Letter</property>
+  <property name="fields">
+   <element value="jamb_let"/>
+  </property>
+  <property name="label">JAMB Letter</property>
+  <property name="label_edit">JAMB Letter</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="jamb_slip" meta_type="Image Widget">
+  <property name="title">JAMB Slip</property>
+  <property name="fields">
+   <element value="jamb_slip"/>
+  </property>
+  <property name="label">JAMB Slip</property>
+  <property name="label_edit">JAMB Slip</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="lga" meta_type="Select Widget">
+  <property name="title">Local Government Area</property>
+  <property name="fields">
+   <element value="lga"/>
+  </property>
+  <property name="label">Local Government Area</property>
+  <property name="label_edit">Local Government Area</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">local_gov_areas</property>
+ </widget>
+ <widget name="lga_ident" meta_type="Image Widget">
+  <property name="title">LGA Identification</property>
+  <property name="fields">
+   <element value="lga_ident"/>
+  </property>
+  <property name="label">LGA Identification</property>
+  <property name="label_edit">LGA Identification</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="matric_no" meta_type="String Widget">
+  <property name="title">Matriculation Number</property>
+  <property name="fields">
+   <element value="matric_no"/>
+  </property>
+  <property name="label">Matriculation Number</property>
+  <property name="label_edit">Matriculation Number</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">10</property>
+  <property name="size_max">10</property>
+ </widget>
+ <widget name="nationality" meta_type="Select Widget">
+  <property name="title">Nationality</property>
+  <property name="fields">
+   <element value="nationality"/>
+  </property>
+  <property name="label">Nationality</property>
+  <property name="label_edit">Nationality</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">states</property>
+ </widget>
+ <widget name="ref_let" meta_type="Image Widget">
+  <property name="title">Referee Letter</property>
+  <property name="fields">
+   <element value="ref_let"/>
+  </property>
+  <property name="label">Referee Letter</property>
+  <property name="label_edit">Referee Letter</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="res_stat" meta_type="Image Widget">
+  <property name="title">Result Statement</property>
+  <property name="fields">
+   <element value="res_stat"/>
+  </property>
+  <property name="label">Result Statement</property>
+  <property name="label_edit">Result Statement</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="scd_sit_date" meta_type="DateTime Widget">
+  <property name="title">Exam Date</property>
+  <property name="fields">
+   <element value="scd_sit_date"/>
+  </property>
+  <property name="label">Exam Date</property>
+  <property name="label_edit">Exam Date</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">%d/%m/%Y</property>
+  <property name="time_setting">False</property>
+ </widget>
+ <widget name="scd_sit_fname" meta_type="String Widget">
+  <property name="title">Full Name</property>
+  <property name="fields">
+   <element value="scd_sit_fname"/>
+  </property>
+  <property name="label">Full Name</property>
+  <property name="label_edit">Full Name</property>
+  <property name="description">Second Sitting Data</property>
+  <property
+     name="help">Full name as it appears on certificate/result</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="scd_sit_no" meta_type="String Widget">
+  <property name="title">Exam Number</property>
+  <property name="fields">
+   <element value="scd_sit_no"/>
+  </property>
+  <property name="label">Exam Number</property>
+  <property name="label_edit">Exam Number</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="scd_sit_results" meta_type="WAeUp Results Widget">
+  <property name="title">Results</property>
+  <property name="fields">
+   <element value="scd_sit_results"/>
+  </property>
+  <property name="label">Results</property>
+  <property name="label_edit">Results</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="scd_sit_scan" meta_type="Image Widget">
+  <property name="title">Scan of Second Sitting Result</property>
+  <property name="fields">
+   <element value="scd_sit_scan"/>
+  </property>
+  <property name="label">Scan of Second Sitting Result</property>
+  <property name="label_edit">Scan of Second Sitting Result</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="scd_sit_type" meta_type="Select Widget">
+  <property name="title">Exam Type</property>
+  <property name="fields">
+   <element value="scd_sit_type"/>
+  </property>
+  <property name="label">Exam Type</property>
+  <property name="label_edit">Exam Type</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">exam_types</property>
+ </widget>
+ <widget name="stat_dec" meta_type="Image Widget">
+  <property name="title">Statutory Declaration of Good Conduct</property>
+  <property name="fields">
+   <element value="stat_dec"/>
+  </property>
+  <property name="label">Statutory Declaration of Good Conduct</property>
+  <property name="label_edit">Statutory Declaration of Good Conduct</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="uniben" meta_type="Boolean Widget">
+  <property name="title">Former UNIBEN Student</property>
+  <property name="fields">
+   <element value="uniben"/>
+  </property>
+  <property name="label">Former UNIBEN Student</property>
+  <property name="label_edit">Former UNIBEN Student</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="render_format">radio</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="matric_no"/>
+  </row>
+  <row>
+   <cell name="matric_no_history"/>
+  </row>
+  <row>
+   <cell name="clr_ac_pin"/>
+  </row>
+  <row>
+   <cell name="entry_date"/>
+  </row>
+  <row>
+   <cell name="request_date"/>
+  </row>
+  <row>
+   <cell name="cleared_date"/>
+  </row>
+  <row>
+   <cell name="birthday"/>
+  </row>
+  <row>
+   <cell name="lga"/>
+  </row>
+  <row>
+   <cell name="nationality"/>
+  </row>
+  <row>
+   <cell name="fst_sit_fname"/>
+  </row>
+  <row>
+   <cell name="fst_sit_no"/>
+  </row>
+  <row>
+   <cell name="fst_sit_date"/>
+  </row>
+  <row>
+   <cell name="fst_sit_type"/>
+  </row>
+  <row>
+   <cell name="fst_sit_results"/>
+  </row>
+  <row>
+   <cell name="fst_sit_scan"/>
+  </row>
+  <row>
+   <cell name="scd_sit_fname"/>
+  </row>
+  <row>
+   <cell name="scd_sit_no"/>
+  </row>
+  <row>
+   <cell name="scd_sit_date"/>
+  </row>
+  <row>
+   <cell name="scd_sit_type"/>
+  </row>
+  <row>
+   <cell name="scd_sit_results"/>
+  </row>
+  <row>
+   <cell name="scd_sit_scan"/>
+  </row>
+  <row>
+   <cell name="alr_fname"/>
+  </row>
+  <row>
+   <cell name="alr_no"/>
+  </row>
+  <row>
+   <cell name="alr_date"/>
+  </row>
+  <row>
+   <cell name="alr_results"/>
+  </row>
+  <row>
+   <cell name="alr_scan"/>
+  </row>
+  <row>
+   <cell name="hq_type"/>
+  </row>
+  <row>
+   <cell name="hq_grade"/>
+  </row>
+  <row>
+   <cell name="hq_school"/>
+  </row>
+  <row>
+   <cell name="hq_matric_no"/>
+  </row>
+  <row>
+   <cell name="hq_session"/>
+  </row>
+  <row>
+   <cell name="hq_disc"/>
+  </row>
+  <row>
+   <cell name="hq_scan"/>
+  </row>
+  <row>
+   <cell name="birth_certificate"/>
+  </row>
+  <row>
+   <cell name="lga_ident"/>
+  </row>
+  <row>
+   <cell name="acc_let"/>
+  </row>
+  <row>
+   <cell name="jamb_slip"/>
+  </row>
+  <row>
+   <cell name="cert"/>
+  </row>
+  <row>
+   <cell name="evid"/>
+  </row>
+  <row>
+   <cell name="jamb_let"/>
+  </row>
+  <row>
+   <cell name="res_stat"/>
+  </row>
+  <row>
+   <cell name="ref_let"/>
+  </row>
+  <row>
+   <cell name="cred"/>
+  </row>
+  <row>
+   <cell name="stat_dec"/>
+  </row>
+  <row>
+   <cell name="age_dec"/>
+  </row>
+  <row>
+   <cell name="acc_inst"/>
+  </row>
+  <row>
+   <cell name="uniben"/>
+  </row>
+  <row>
+   <cell name="def_adm"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_clearance_fe.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_clearance_fe.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_clearance_fe.xml	(revision 2226)
@@ -0,0 +1,898 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_clearance_fe" meta_type="CPS Layout">
+ <property name="layout_create_method">layout_enter_access_code</property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_clearance_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="acc_inst" meta_type="Image Widget">
+  <property name="title">Accepted by Institution</property>
+  <property name="fields">
+   <element value="acc_inst"/>
+  </property>
+  <property name="label">Accepted by Institution</property>
+  <property name="label_edit">Accepted by Institution</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="acc_let" meta_type="Image Widget">
+  <property name="title">Acceptance Letter </property>
+  <property name="fields">
+   <element value="acc_let"/>
+  </property>
+  <property name="label">Acceptance Letter</property>
+  <property name="label_edit">Acceptance Letter (required)</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="age_dec" meta_type="Image Widget">
+  <property name="title">Age Declaration</property>
+  <property name="fields">
+   <element value="age_dec"/>
+  </property>
+  <property name="label">Age Declaration</property>
+  <property name="label_edit">Age Declaration</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+   <element value="edit"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="alr_date" meta_type="DateTime Widget">
+  <property name="title">Exam Date</property>
+  <property name="fields">
+   <element value="alr_date"/>
+  </property>
+  <property name="label">Exam Date</property>
+  <property name="label_edit">Exam Date</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">%d/%m/%Y</property>
+  <property name="time_setting">False</property>
+ </widget>
+ <widget name="alr_fname" meta_type="String Widget">
+  <property name="title">Full Name</property>
+  <property name="fields">
+   <element value="alr_fname"/>
+  </property>
+  <property name="label">Full Name</property>
+  <property name="label_edit">Full Name</property>
+  <property name="description">Advanced Level Data</property>
+  <property
+     name="help">Full name as it appears on certificate/result</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="alr_no" meta_type="String Widget">
+  <property name="title">Exam Number</property>
+  <property name="fields">
+   <element value="alr_no"/>
+  </property>
+  <property name="label">Exam Number</property>
+  <property name="label_edit">Exam Number</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="alr_results" meta_type="WAeUp Results Widget">
+  <property name="title">Results</property>
+  <property name="fields">
+   <element value="alr_results"/>
+  </property>
+  <property name="label">Results</property>
+  <property name="label_edit">Results</property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="alr_scan" meta_type="Image Widget">
+  <property name="title">Scan of Advanced Level Result</property>
+  <property name="fields">
+   <element value="alr_scan"/>
+  </property>
+  <property name="label">Scan of Advanced Level Result</property>
+  <property name="label_edit">Scan of Advanced Level Result</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="birth_certificate" meta_type="Image Widget">
+  <property name="title">Birth Certificate</property>
+  <property name="fields">
+   <element value="birth_certificate"/>
+  </property>
+  <property name="label">Birth Certificate or Age Declaration</property>
+  <property name="label_edit">Birth Certificate or Age Decl. (required)</property>
+  <property name="description">Other Documents</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="birthday" meta_type="DateTime Widget">
+  <property name="title">Date of Birth</property>
+  <property name="fields">
+   <element value="birthday"/>
+  </property>
+  <property name="label">Date of Birth</property>
+  <property name="label_edit">Date of Birth (dd/mm/yyyy)</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">%d/%m/%Y</property>
+  <property name="time_setting">False</property>
+ </widget>
+ <widget name="cert" meta_type="Image Widget">
+  <property name="title">Certificate</property>
+  <property name="fields">
+   <element value="cert"/>
+  </property>
+  <property name="label">Certificate</property>
+  <property name="label_edit">Certificate</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="clr_ac_pin" meta_type="Scratchcard Pin Widget">
+  <property name="title">Clearance Access Code</property>
+  <property name="fields">
+   <element value="clr_ac_pin"/>
+  </property>
+  <property name="label">Clearance Access Code</property>
+  <property name="label_edit">Clearance Access Code</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="prefix">CLR</property>
+ </widget>
+ <widget name="cred" meta_type="Image Widget">
+  <property name="title">Credential</property>
+  <property name="fields">
+   <element value="cred"/>
+  </property>
+  <property name="label">Credential</property>
+  <property name="label_edit">Credential</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="def_adm" meta_type="Boolean Widget">
+  <property name="title">Deferment of Admission</property>
+  <property name="fields">
+   <element value="def_adm"/>
+  </property>
+  <property name="label">Deferment of Admission</property>
+  <property name="label_edit">Deferment of Admission</property>
+  <property
+     name="help">Tick this box if you wish to defer admission till next session.</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="render_format">radio</property>
+ </widget>
+ <widget name="entry_date" meta_type="DateTime Widget">
+  <property name="title">Entry Date</property>
+  <property name="fields">
+   <element value="entry_date"/>
+  </property>
+  <property name="label">Entry Date</property>
+  <property name="label_edit">Entry Date</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">%d/%m/%Y</property>
+  <property name="time_setting">False</property>
+ </widget>
+ <widget name="request_date" meta_type="DateTime Widget">
+  <property name="title">Request Date</property>
+  <property name="fields">
+   <element value="request_date"/>
+  </property>
+  <property name="label">Request Date</property>
+  <property name="label_edit">Request Date</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">%d/%m/%Y</property>
+  <property name="time_setting">False</property>
+ </widget>
+ <widget name="cleared_date" meta_type="DateTime Widget">
+  <property name="title">Cleared Date</property>
+  <property name="fields">
+   <element value="cleared_date"/>
+  </property>
+  <property name="label">Cleared Date</property>
+  <property name="label_edit">Cleared Date</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">%d/%m/%Y</property>
+  <property name="time_setting">False</property>
+ </widget>
+ <widget name="evid" meta_type="Image Widget">
+  <property name="title">Evidence of Name</property>
+  <property name="fields">
+   <element value="evid"/>
+  </property>
+  <property name="label">Evidence of Name</property>
+  <property name="label_edit">Evidence of Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="fst_sit_date" meta_type="DateTime Widget">
+  <property name="title">Exam Date</property>
+  <property name="fields">
+   <element value="fst_sit_date"/>
+  </property>
+  <property name="label">Exam Date</property>
+  <property name="label_edit">Exam Date (dd/mm/yyyy)</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">%d/%m/%Y</property>
+  <property name="time_setting">False</property>
+ </widget>
+ <widget name="fst_sit_fname" meta_type="String Widget">
+  <property name="title">Full Name</property>
+  <property name="fields">
+   <element value="fst_sit_fname"/>
+  </property>
+  <property name="label">Full Name</property>
+  <property name="label_edit">Full Name</property>
+  <property name="description">First Sitting Data</property>
+  <property
+     name="help">Full name as it appears on certificate/result</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="fst_sit_no" meta_type="String Widget">
+  <property name="title">Exam Number</property>
+  <property name="fields">
+   <element value="fst_sit_no"/>
+  </property>
+  <property name="label">Exam Number</property>
+  <property name="label_edit">Exam Number</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="fst_sit_results" meta_type="WAeUp Results Widget">
+  <property name="title">Results</property>
+  <property name="fields">
+   <element value="fst_sit_results"/>
+  </property>
+  <property name="label">Results</property>
+  <property name="label_edit">Results</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="fst_sit_scan" meta_type="Image Widget">
+  <property name="title">Scan of First Sitting Result</property>
+  <property name="fields">
+   <element value="fst_sit_scan"/>
+  </property>
+  <property name="label">Scan of First Sitting Result</property>
+  <property name="label_edit">Scan of First Sitting Result (required)</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="fst_sit_type" meta_type="Select Widget">
+  <property name="title">Exam Type</property>
+  <property name="fields">
+   <element value="fst_sit_type"/>
+  </property>
+  <property name="label">Exam Type</property>
+  <property name="label_edit">Exam Type</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">exam_types</property>
+ </widget>
+ <widget name="hq_disc" meta_type="String Widget">
+  <property name="title">Discipline</property>
+  <property name="fields">
+   <element value="hq_disc"/>
+  </property>
+  <property name="label">Discipline</property>
+  <property name="label_edit">Discipline</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="hq_grade" meta_type="Select Widget">
+  <property name="title">Higher Qualification Grade</property>
+  <property name="fields">
+   <element value="hq_grade"/>
+  </property>
+  <property name="label">Higher Qualification Grade</property>
+  <property name="label_edit">Higher Qualification Grade</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">high_grade</property>
+ </widget>
+ <widget name="hq_matric_no" meta_type="String Widget">
+  <property name="title">Matric Number</property>
+  <property name="fields">
+   <element value="hq_matric_no"/>
+  </property>
+  <property name="label">Matric Number</property>
+  <property name="label_edit">Matric Number</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="hq_scan" meta_type="Image Widget">
+  <property name="title">Scan of Higher Qualification Result</property>
+  <property name="fields">
+   <element value="hq_scan"/>
+  </property>
+  <property name="label">Scan of Higher Qualification Result</property>
+  <property name="label_edit">Scan of Higher Qualification Result</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="hq_school" meta_type="String Widget">
+  <property name="title">School Attended</property>
+  <property name="fields">
+   <element value="hq_school"/>
+  </property>
+  <property name="label">School Attended</property>
+  <property name="label_edit">School Attended</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="hq_session" meta_type="String Widget">
+  <property name="title">Session Obtained</property>
+  <property name="fields">
+   <element value="hq_session"/>
+  </property>
+  <property name="label">Session Obtained</property>
+  <property name="label_edit">Session Obtained</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="hq_type" meta_type="Select Widget">
+  <property name="title">Higher Qualification</property>
+  <property name="fields">
+   <element value="hq_type"/>
+  </property>
+  <property name="label">Higher Qualification</property>
+  <property name="label_edit">Higher Qualification</property>
+  <property name="description">Higher Qualification Data</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">high_qual</property>
+ </widget>
+ <widget name="jamb_let" meta_type="Image Widget">
+  <property name="title">JAMB Letter</property>
+  <property name="fields">
+   <element value="jamb_let"/>
+  </property>
+  <property name="label">JAMB Letter</property>
+  <property name="label_edit">JAMB Letter</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="jamb_slip" meta_type="Image Widget">
+  <property name="title">JAMB Slip</property>
+  <property name="fields">
+   <element value="jamb_slip"/>
+  </property>
+  <property name="label">JAMB Slip</property>
+  <property name="label_edit">JAMB Slip</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="lga" meta_type="Select Widget">
+  <property name="title">Local Government Area</property>
+  <property name="fields">
+   <element value="lga"/>
+  </property>
+  <property name="label">Local Government Area</property>
+  <property name="label_edit">Local Government Area</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">local_gov_areas</property>
+ </widget>
+ <widget name="lga_ident" meta_type="Image Widget">
+  <property name="title">LGA Identification</property>
+  <property name="fields">
+   <element value="lga_ident"/>
+  </property>
+  <property name="label">LGA Identification</property>
+  <property name="label_edit">LGA Identification</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="matric_no" meta_type="String Widget">
+  <property name="title">Matriculation Number</property>
+  <property name="fields">
+   <element value="matric_no"/>
+  </property>
+  <property name="label">Matriculation Number</property>
+  <property name="label_edit">Matriculation Number</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">10</property>
+  <property name="size_max">10</property>
+ </widget>
+ <widget name="matric_no_history" meta_type="Lines Widget">
+   <property name="title">Previous Matriculation Number(s)</property>
+   <property name="fields">
+     <element value="matric_no_history"/>
+   </property>
+   <property name="label">Previous Matriculation Number(s)</property>
+   <property name="label_edit">Previous Matriculation Number(s)</property>
+   <property name="readonly_layout_modes">
+     <element value="edit"/>
+   </property>
+   <property name="hidden_layout_modes">
+     <element value="create"/>
+   </property>
+   <property name="hidden_readonly_layout_modes"/>
+   <property name="width">50</property>
+   <property name="height">2</property>
+ </widget>
+ <widget name="nationality" meta_type="Select Widget">
+  <property name="title">Nationality</property>
+  <property name="fields">
+   <element value="nationality"/>
+  </property>
+  <property name="label">Nationality</property>
+  <property name="label_edit">Nationality</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">states</property>
+ </widget>
+ <widget name="ref_let" meta_type="Image Widget">
+  <property name="title">Referee Letter</property>
+  <property name="fields">
+   <element value="ref_let"/>
+  </property>
+  <property name="label">Referee Letter</property>
+  <property name="label_edit">Referee Letter (required)</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="res_stat" meta_type="Image Widget">
+  <property name="title">Result Statement</property>
+  <property name="fields">
+   <element value="res_stat"/>
+  </property>
+  <property name="label">Result Statement</property>
+  <property name="label_edit">Result Statement</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="scd_sit_date" meta_type="DateTime Widget">
+  <property name="title">Exam Date</property>
+  <property name="fields">
+   <element value="scd_sit_date"/>
+  </property>
+  <property name="label">Exam Date</property>
+  <property name="label_edit">Exam Date (dd/mm/yyyy)</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">%d/%m/%Y</property>
+  <property name="time_setting">False</property>
+ </widget>
+ <widget name="scd_sit_fname" meta_type="String Widget">
+  <property name="title">Full Name</property>
+  <property name="fields">
+   <element value="scd_sit_fname"/>
+  </property>
+  <property name="label">Full Name</property>
+  <property name="label_edit">Full Name</property>
+  <property name="description">Second Sitting Data</property>
+  <property
+     name="help">Full name as it appears on certificate/result</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="scd_sit_no" meta_type="String Widget">
+  <property name="title">Exam Number</property>
+  <property name="fields">
+   <element value="scd_sit_no"/>
+  </property>
+  <property name="label">Exam Number</property>
+  <property name="label_edit">Exam Number</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="scd_sit_results" meta_type="WAeUp Results Widget">
+  <property name="title">Results</property>
+  <property name="fields">
+   <element value="scd_sit_results"/>
+  </property>
+  <property name="label">Results</property>
+  <property name="label_edit">Results</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="scd_sit_scan" meta_type="Image Widget">
+  <property name="title">Scan of Second Sitting Result</property>
+  <property name="fields">
+   <element value="scd_sit_scan"/>
+  </property>
+  <property name="label">Scan of Second Sitting Result</property>
+  <property name="label_edit">Scan of Second Sitting Result</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="scd_sit_type" meta_type="Select Widget">
+  <property name="title">Exam Type</property>
+  <property name="fields">
+   <element value="scd_sit_type"/>
+  </property>
+  <property name="label">Exam Type</property>
+  <property name="label_edit">Exam Type</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">exam_types</property>
+ </widget>
+ <widget name="stat_dec" meta_type="Image Widget">
+  <property name="title">Statutory Declaration of Good Conduct</property>
+  <property name="fields">
+   <element value="stat_dec"/>
+  </property>
+  <property name="label">Statutory Declaration of Good Conduct</property>
+  <property name="label_edit">Statutory Declaration of Good Conduct</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_max">1000000</property>
+  <property name="display_width">800</property>
+  <property name="display_height">1200</property>
+  <property name="allow_resize">True</property>
+ </widget>
+ <widget name="uniben" meta_type="Boolean Widget">
+  <property name="title">Former UNIBEN Student</property>
+  <property name="fields">
+   <element value="uniben"/>
+  </property>
+  <property name="label">Former UNIBEN Student</property>
+  <property name="label_edit">Former UNIBEN Student</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="render_format">radio</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="matric_no"/>
+  </row>
+  <row>
+   <cell name="matric_no_history"/>
+  </row>
+  <row>
+   <cell name="clr_ac_pin"/>
+  </row>
+  <row>
+   <cell name="entry_date"/>
+  </row>
+  <row>
+   <cell name="request_date"/>
+  </row>
+  <row>
+   <cell name="cleared_date"/>
+  </row>
+  <row>
+   <cell name="birthday"/>
+  </row>
+  <row>
+   <cell name="lga"/>
+  </row>
+  <row>
+   <cell name="nationality"/>
+  </row>
+  <row>
+   <cell name="fst_sit_fname"/>
+  </row>
+  <row>
+   <cell name="fst_sit_no"/>
+  </row>
+  <row>
+   <cell name="fst_sit_date"/>
+  </row>
+  <row>
+   <cell name="fst_sit_type"/>
+  </row>
+  <row>
+   <cell name="fst_sit_results"/>
+  </row>
+  <row>
+   <cell name="fst_sit_scan"/>
+  </row>
+  <row>
+   <cell name="scd_sit_fname"/>
+  </row>
+  <row>
+   <cell name="scd_sit_no"/>
+  </row>
+  <row>
+   <cell name="scd_sit_date"/>
+  </row>
+  <row>
+   <cell name="scd_sit_type"/>
+  </row>
+  <row>
+   <cell name="scd_sit_results"/>
+  </row>
+  <row>
+   <cell name="scd_sit_scan"/>
+  </row>
+  <row>
+   <cell name="alr_fname"/>
+  </row>
+  <row>
+   <cell name="alr_no"/>
+  </row>
+  <row>
+   <cell name="alr_date"/>
+  </row>
+  <row>
+   <cell name="alr_results"/>
+  </row>
+  <row>
+   <cell name="alr_scan"/>
+  </row>
+  <row>
+   <cell name="hq_type"/>
+  </row>
+  <row>
+   <cell name="hq_grade"/>
+  </row>
+  <row>
+   <cell name="hq_school"/>
+  </row>
+  <row>
+   <cell name="hq_matric_no"/>
+  </row>
+  <row>
+   <cell name="hq_session"/>
+  </row>
+  <row>
+   <cell name="hq_disc"/>
+  </row>
+  <row>
+   <cell name="hq_scan"/>
+  </row>
+  <row>
+   <cell name="birth_certificate"/>
+  </row>
+  <row>
+   <cell name="age_dec"/>
+  </row>
+  <row>
+   <cell name="lga_ident"/>
+  </row>
+  <row>
+   <cell name="acc_let"/>
+  </row>
+  <row>
+   <cell name="jamb_slip"/>
+  </row>
+  <row>
+   <cell name="cert"/>
+  </row>
+  <row>
+   <cell name="evid"/>
+  </row>
+  <row>
+   <cell name="jamb_let"/>
+  </row>
+  <row>
+   <cell name="res_stat"/>
+  </row>
+  <row>
+   <cell name="ref_let"/>
+  </row>
+  <row>
+   <cell name="cred"/>
+  </row>
+  <row>
+   <cell name="stat_dec"/>
+  </row>
+  <row>
+   <cell name="uniben"/>
+  </row>
+  <row>
+   <cell name="def_adm"/>
+  </row>
+ </table>
+</object>
+
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_course_result.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_course_result.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_course_result.xml	(revision 2226)
@@ -0,0 +1,141 @@
+<?xml version="1.0"?>
+<object name="student_course_result" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+
+ <widget name="code" meta_type="CertificateCourseId Widget">
+  <property name="title">Course Code</property>
+  <property name="fields">
+   <element value="code"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Course Code</property>
+  <property name="label_edit">Course Code</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="view"/>
+   <element value="edit"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="core_or_elective " meta_type="Boolean Widget">
+  <property name="title">Core or Elective (editable value)</property>
+  <property name="fields">
+   <element value="core_or_elective"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Core or Elective (editable value)</property>
+  <property name="label_edit">Core or Elective (editable value)</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="label_false">elective</property>
+  <property name="label_true">core</property>
+ </widget>
+ <widget name="credits" meta_type="Int Widget">
+  <property name="title">Credits (original value)</property>
+  <property name="fields">
+   <element value="credits"/>
+  </property>
+  <property name="label">Credits (original value)</property>
+  <property name="label_edit">Credits (original value)</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+   <element value="create"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="passmark" meta_type="Int Widget">
+  <property name="title">Passmark (original value)</property>
+  <property name="fields">
+   <element value="passmark"/>
+  </property>
+  <property name="label">Passmark (original value)</property>
+  <property name="label_edit">Passmark (original value)</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+   <element value="create"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="score" meta_type="Int Widget">
+  <property name="title">Score</property>
+  <property name="fields">
+   <element value="score"/>
+  </property>
+  <property name="label">Score</property>
+  <property name="label_edit">Score</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="semester" meta_type="Int Widget">
+  <property name="title">Semester </property>
+  <property name="fields">
+   <element value="semester"/>
+  </property>
+  <property name="label">Semester (original value)</property>
+  <property name="label_edit">Semester (original value)</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+   <element value="create"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="title" meta_type="String Widget">
+  <property name="title">Original Course Title</property>
+  <property name="fields">
+   <element value="title"/>
+  </property>
+  <property name="label">Original Course Title</property>
+  <property name="label_edit">Original Course Title</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+   <element value="create"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">60</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="code"/>
+  </row>
+  <row>
+   <cell name="title"/>
+  </row>
+  <row>
+   <cell name="semester"/>
+  </row>
+  <row>
+   <cell name="credits"/>
+  </row>
+  <row>
+   <cell name="passmark"/>
+  </row>
+  <row>
+   <cell name="score"/>
+  </row>
+  <row>
+   <cell name="core_or_elective "/>
+  </row>
+  <row>
+   <cell name="carry_level"/>
+  </row>
+ </table>
+</object>
+
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_course_result_fe.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_course_result_fe.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_course_result_fe.xml	(revision 2226)
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<object name="student_course_result" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_plain_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+
+
+ <widget name="core_or_elective " meta_type="Boolean Widget">
+  <property name="title">Core or Elective</property>
+  <property name="fields">
+   <element value="core_or_elective"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Core or Elective</property>
+  <property name="label_edit">Core or Elective</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="label_false">elective</property>
+  <property name="label_true">core</property>
+ </widget>
+
+ <table>
+
+  <row>
+   <cell name="core_or_elective "/>
+  </row>
+
+ </table>
+</object>
+
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_create.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_create.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_create.xml	(revision 2226)
@@ -0,0 +1,164 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_create" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="email" meta_type="Email Widget">
+  <property name="title">Email</property>
+  <property name="fields">
+   <element value="email"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Email</property>
+  <property name="label_edit">Email</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="firstname" meta_type="String Widget">
+  <property name="title">First Name</property>
+  <property name="fields">
+   <element value="firstname"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">First Name</property>
+  <property name="label_edit">First Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="lastname" meta_type="String Widget">
+  <property name="title">Last Name</property>
+  <property name="fields">
+   <element value="lastname"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Last Name</property>
+  <property name="label_edit">Last Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="entry_mode" meta_type="Select Widget">
+  <property name="title">Entry Mode</property>
+  <property name="fields">
+   <element value="entry_mode"/>
+  </property>
+  <property name="label">Entry Mode</property>
+  <property name="label_edit">Entry Mode</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">entry_modes</property>
+ </widget>
+ <widget name="level" meta_type="Select Widget">
+  <property name="title">Current Level</property>
+  <property name="fields">
+   <element value="level"/>
+  </property>
+  <property name="label">Current Level</property>
+  <property name="label_edit">Current Level</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">levels</property>
+ </widget>
+ <widget name="jamb_reg_no" meta_type="String Widget">
+  <property name="title">JAMB Registration No</property>
+  <property name="fields">
+   <element value="jamb_reg_no"/>
+  </property>
+  <property name="label">JAMB Registration No</property>
+  <property name="label_edit">JAMB Registration No</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">10</property>
+ </widget>
+ <widget name="matric_no" meta_type="String Widget">
+  <property name="title">Matriculation No</property>
+  <property name="fields">
+   <element value="matric_no"/>
+  </property>
+  <property name="label">Matriculation No</property>
+  <property name="label_edit">Matriculation No</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">13</property>
+ </widget>
+ <widget name="middlename" meta_type="String Widget">
+  <property name="title">Middle Name</property>
+  <property name="fields">
+   <element value="middlename"/>
+  </property>
+  <property name="label">Middle Name</property>
+  <property name="label_edit">Middle Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="sex" meta_type="Boolean Widget">
+  <property name="title">Sex</property>
+  <property name="fields">
+   <element value="sex"/>
+  </property>
+  <property name="label">Sex</property>
+  <property name="label_edit">Sex</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="label_false">male</property>
+  <property name="label_true">female</property>
+  <property name="render_format">select</property>
+ </widget>
+ <widget name="study_course" meta_type="StudyCourse Widget">
+  <property name="title">Study Course Code</property>
+  <property name="fields">
+   <element value="study_course"/>
+  </property>
+  <property name="label">Study Course Code</property>
+  <property name="label_edit">Study Course Code</property>
+  <property name="is_required">True</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">10</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="firstname"/>
+  </row>
+  <row>
+   <cell name="middlename"/>
+  </row>
+  <row>
+   <cell name="lastname"/>
+  </row>
+  <row>
+   <cell name="email"/>
+  </row>
+  <row>
+   <cell name="sex"/>
+  </row>
+  <row>
+   <cell name="entry_mode"/>
+  </row>
+  <row>
+   <cell name="matric_no"/>
+  </row>
+  <row>
+   <cell name="jamb_reg_no"/>
+  </row>
+  <row>
+   <cell name="study_course"/>
+  </row>
+  <row>
+   <cell name="level"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_firsttime_login.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_firsttime_login.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_firsttime_login.xml	(revision 2226)
@@ -0,0 +1,147 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_firsttime_login" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_search_session_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="email" meta_type="Email Widget">
+  <property name="title">Email</property>
+  <property name="fields">
+   <element value="email"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Email</property>
+  <property name="label_edit">Email</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="jamb_reg_no" meta_type="JambRegNo Widget">
+  <property name="title">JAMB Registration Number</property>
+  <property name="fields">
+   <element value="jamb_reg_no"/>
+  </property>
+  <property name="label">JAMB Registration Number</property>
+  <property name="label_edit">JAMB Registration Number</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">13</property>
+  <property name="size_max">13</property>
+  <property name="catalog">returning_import</property>
+  <property name="reference">student</property>
+ </widget>
+ <widget name="matric_no" meta_type="MatricNo Widget">
+  <property name="title">Matriculation Number</property>
+  <property name="fields">
+   <element value="matric_no"/>
+  </property>
+  <property name="label">Matriculation Number</property>
+  <property name="label_edit">Matriculation Number</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">13</property>
+  <property name="size_max">13</property>
+  <property name="matric_no_catalog">students_catalog</property>
+  <property name="results_catalog"></property>
+ </widget>
+ <widget name="password" meta_type="Password Widget">
+  <property name="title">Password</property>
+  <property name="fields">
+   <element value="password"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Choose a Password</property>
+  <property name="label_edit">Choose a Password</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">15</property>
+  <property name="size_max">15</property>
+  <property name="check_digit">True</property>
+ </widget>
+ <widget name="phone_nr" meta_type="String Widget">
+  <property name="title">Phone Number</property>
+  <property name="fields">
+   <element value="phone_nr"/>
+  </property>
+  <property name="label">Phone Number</property>
+  <property name="label_edit">Phone Number</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">15</property>
+  <property name="size_max">15</property>
+ </widget>
+ <widget name="repeat_password" meta_type="Password Widget">
+  <property name="title">Password</property>
+  <property name="fields">
+   <element value="repeat_password"/>
+  </property>
+  <property name="label">Verify the Password</property>
+  <property name="label_edit">Verify the Password</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">15</property>
+  <property name="size_max">15</property>
+  <property name="password_widget">password</property>
+  <property name="size_min">0</property>
+ </widget>
+ <widget name="secret" meta_type="Secret Widget">
+  <property name="title">Secret Widget</property>
+  <property name="fields">
+   <element value="secret"/>
+  </property>
+  <property name="check_fields">
+   <element value="name"/>
+  </property>
+  <property name="label">First name, middle name or last name</property>
+  <property
+     name="label_edit">Enter either your  first, middle or last name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">20</property>
+  <property name="size_max">40</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="matric_no"/>
+  </row>
+  <row>
+   <cell name="secret"/>
+  </row>
+  <row>
+   <cell name="email"/>
+  </row>
+  <row>
+   <cell name="phone_nr"/>
+  </row>
+  <row>
+   <cell name="password"/>
+  </row>
+  <row>
+   <cell name="repeat_password"/>
+  </row>
+ </table>
+</object>
+
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_password.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_password.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_password.xml	(revision 2226)
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_password" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_password_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+
+ <widget name="username" meta_type="String Widget">
+  <property name="title">Username</property>
+  <property name="fields">
+   <element value="username"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+ </widget>
+
+ <widget name="pw" meta_type="Password Widget">
+  <property name="title">Password</property>
+  <property name="fields">
+   <element value="pw"/>
+  </property>
+  <property name="label">New Password</property>
+  <property name="label_edit">New Password</property>
+  <property name="help">Enter a New Password</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">12</property>
+ </widget>
+ <widget name="rpw" meta_type="Password Widget">
+  <property name="title">confirm Password</property>
+  <property name="fields">
+   <element value="rpw"/>
+  </property>
+  <property name="label">Confirm Password</property>
+  <property name="label_edit">Confirm Password</property>
+  <property name="help">Confirm the New Password</property>
+  <property name="display_width">12</property>
+  <property name="password_widget">pw</property>
+ </widget>
+
+ <table>
+  <row>
+   <cell name="username"/>
+  </row>
+  <row>
+   <cell name="pw"/>
+  </row>
+  <row>
+   <cell name="rpw"/>
+  </row>    
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_personal.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_personal.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_personal.xml	(revision 2226)
@@ -0,0 +1,539 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_personal" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="campus_address" meta_type="String Widget">
+  <property name="title">Campus Address</property>
+  <property name="fields">
+   <element value="campus_address"/>
+  </property>
+  <property name="label">Campus Address</property>
+  <property name="label_edit">Campus Address</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="disabled" meta_type="Boolean Widget">
+  <property name="title">Disabled</property>
+  <property name="fields">
+   <element value="disabled"/>
+  </property>
+  <property name="label">Disabled</property>
+  <property name="label_edit">Disabled</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="label_false">no</property>
+  <property name="label_true">yes</property>
+  <property name="render_format">select</property>
+ </widget>
+ <widget name="email" meta_type="Email Widget">
+  <property name="title">Email</property>
+  <property name="fields">
+   <element value="email"/>
+  </property>
+  <property name="label">Email</property>
+  <property name="label_edit">Email</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="firstname" meta_type="String Widget">
+  <property name="title">First Name</property>
+  <property name="fields">
+   <element value="firstname"/>
+  </property>
+  <property name="label">First Name</property>
+  <property name="label_edit">First Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="for_lga" meta_type="String Widget">
+  <property name="title">Foreign Student Local Government Area</property>
+  <property name="fields">
+   <element value="for_lga"/>
+  </property>
+  <property name="label">Foreign Student Local Government Area</property>
+  <property name="label_edit">Foreign Student Local Government Area</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="for_state" meta_type="Select Widget">
+  <property name="title">Foreign Student State</property>
+  <property name="fields">
+   <element value="for_state"/>
+  </property>
+  <property name="label">Foreign Student State</property>
+  <property name="label_edit">Foreign Student State</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">states</property>
+ </widget>
+ <widget name="former_surname" meta_type="String Widget">
+  <property name="title">Former Surname</property>
+  <property name="fields">
+   <element value="former_surname"/>
+  </property>
+  <property name="label">Former Surname</property>
+  <property name="label_edit">Former Surname</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="fst_best_lang" meta_type="String Widget">
+  <property name="title">First Best Language</property>
+  <property name="fields">
+   <element value="fst_best_lang"/>
+  </property>
+  <property name="label">First Best Language</property>
+  <property name="label_edit">First Best Language</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="hall" meta_type="String Widget">
+  <property name="title">Residence Hall on Campus</property>
+  <property name="fields">
+   <element value="hall"/>
+  </property>
+  <property name="label">Residence Hall on Campus</property>
+  <property name="label_edit">Residence Hall on Campus</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="lastname" meta_type="String Widget">
+  <property name="title">Last Name</property>
+  <property name="fields">
+   <element value="lastname"/>
+  </property>
+  <property name="label">Last Name</property>
+  <property name="label_edit">Last Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="marit_stat" meta_type="Boolean Widget">
+  <property name="title">Marital Status</property>
+  <property name="fields">
+   <element value="marit_stat"/>
+  </property>
+  <property name="label">Marital Status</property>
+  <property name="label_edit">Marital Status</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="label_false">single</property>
+  <property name="label_true">married</property>
+  <property name="render_format">select</property>
+ </widget>
+ <widget name="middlename" meta_type="String Widget">
+  <property name="title">Middle Name</property>
+  <property name="fields">
+   <element value="middlename"/>
+  </property>
+  <property name="label">Middle Name</property>
+  <property name="label_edit">Middle Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="mother_tongue" meta_type="String Widget">
+  <property name="title">Mother Tongue</property>
+  <property name="fields">
+   <element value="mother_tongue"/>
+  </property>
+  <property name="label">Mother Tongue</property>
+  <property name="label_edit">Mother Tongue</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="next_kin_address" meta_type="String Widget">
+  <property name="title">Next of Kin Address</property>
+  <property name="fields">
+   <element value="next_kin_address"/>
+  </property>
+  <property name="label">Next of Kin Address</property>
+  <property name="label_edit">Next of Kin Address</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="next_kin_city" meta_type="String Widget">
+  <property name="title">Next of Kin City</property>
+  <property name="fields">
+   <element value="next_kin_city"/>
+  </property>
+  <property name="label">Next of Kin City</property>
+  <property name="label_edit">Next of Kin City</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="next_kin_email" meta_type="Email Widget">
+  <property name="title">Next of Kin Email</property>
+  <property name="fields">
+   <element value="next_kin_email"/>
+  </property>
+  <property name="label">Next of Kin Email</property>
+  <property name="label_edit">Next of Kin Email</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="next_kin_firstname" meta_type="String Widget">
+  <property name="title">Next of Kin First Name</property>
+  <property name="fields">
+   <element value="next_kin_firstname"/>
+  </property>
+  <property name="label">Next of Kin First Name</property>
+  <property name="label_edit">Next of Kin First Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="next_kin_lastname" meta_type="String Widget">
+  <property name="title">Next of Kin Last Name</property>
+  <property name="fields">
+   <element value="next_kin_lastname"/>
+  </property>
+  <property name="label">Next of Kin Last Name</property>
+  <property name="label_edit">Next of Kin Last Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="next_kin_middlename" meta_type="String Widget">
+  <property name="title">Next of Kin Middle Name</property>
+  <property name="fields">
+   <element value="next_kin_middlename"/>
+  </property>
+  <property name="label">Next of Kin Middle Name</property>
+  <property name="label_edit">Next of Kin Middle Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="next_kin_phone" meta_type="String Widget">
+  <property name="title">Next of Kin Phone</property>
+  <property name="fields">
+   <element value="next_kin_phone"/>
+  </property>
+  <property name="label">Next of Kin Phone</property>
+  <property name="label_edit">Next of Kin Phone</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="next_kin_relation" meta_type="String Widget">
+  <property name="title">Next of Kin Relationship</property>
+  <property name="fields">
+   <element value="next_kin_relation"/>
+  </property>
+  <property name="label">Next of Kin Relationship</property>
+  <property name="label_edit">Next of Kin Relationship</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="next_kin_state" meta_type="String Widget">
+  <property name="title">Next of Kin State</property>
+  <property name="fields">
+   <element value="next_kin_state"/>
+  </property>
+  <property name="label">Next of Kin State</property>
+  <property name="label_edit">Next of Kin State</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="notes" meta_type="Text Widget">
+  <property name="title">Notes</property>
+  <property name="fields">
+   <element value="notes"/>
+  </property>
+  <property name="label">Notes</property>
+  <property name="label_edit">Notes</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="perm_address" meta_type="String Widget">
+  <property name="title">Permanent Address</property>
+  <property name="fields">
+   <element value="perm_address"/>
+  </property>
+  <property name="label">Permanent Address</property>
+  <property name="label_edit">Permanent Address</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="perm_city" meta_type="String Widget">
+  <property name="title">City</property>
+  <property name="fields">
+   <element value="perm_city"/>
+  </property>
+  <property name="label">City</property>
+  <property name="label_edit">City</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="phone" meta_type="String Widget">
+  <property name="title">Phone</property>
+  <property name="fields">
+   <element value="phone"/>
+  </property>
+  <property name="label">Phone</property>
+  <property name="label_edit">Phone</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="religion" meta_type="Select Widget">
+  <property name="title">Religion</property>
+  <property name="fields">
+   <element value="religion"/>
+  </property>
+  <property name="label">Religion</property>
+  <property name="label_edit">Religion</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">religion</property>
+ </widget>
+ <widget name="scd_best_lang" meta_type="String Widget">
+  <property name="title">Second Best Language</property>
+  <property name="fields">
+   <element value="scd_best_lang"/>
+  </property>
+  <property name="label">Second Best Language</property>
+  <property name="label_edit">Second Best Language</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="sex" meta_type="Boolean Widget">
+  <property name="title">Sex</property>
+  <property name="fields">
+   <element value="sex"/>
+  </property>
+  <property name="label">Sex</property>
+  <property name="label_edit">Sex</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="label_false">male</property>
+  <property name="label_true">female</property>
+  <property name="render_format">select</property>
+ </widget>
+ <widget name="sponsor_address" meta_type="String Widget">
+  <property name="title">Sponsor Address</property>
+  <property name="fields">
+   <element value="sponsor_address"/>
+  </property>
+  <property name="label">Sponsor Address</property>
+  <property name="label_edit">Sponsor Address</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="sponsor_city" meta_type="String Widget">
+  <property name="title">Sponsor City</property>
+  <property name="fields">
+   <element value="sponsor_city"/>
+  </property>
+  <property name="label">Sponsor City</property>
+  <property name="label_edit">Sponsor City</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="sponsor_email" meta_type="Email Widget">
+  <property name="title">Sponsor Email</property>
+  <property name="fields">
+   <element value="sponsor_email"/>
+  </property>
+  <property name="label">Sponsor Email</property>
+  <property name="label_edit">Sponsor Email</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="sponsor_firstname" meta_type="String Widget">
+  <property name="title">Sponsor First Name</property>
+  <property name="fields">
+   <element value="sponsor_firstname"/>
+  </property>
+  <property name="label">Sponsor First Name</property>
+  <property name="label_edit">Sponsor First Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="sponsor_lastname" meta_type="String Widget">
+  <property name="title">Sponsor Last Name</property>
+  <property name="fields">
+   <element value="sponsor_lastname"/>
+  </property>
+  <property name="label">Sponsor Last Name</property>
+  <property name="label_edit">Sponsor Last Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="sponsor_middlename" meta_type="String Widget">
+  <property name="title">Sponsor Middle Name</property>
+  <property name="fields">
+   <element value="sponsor_middlename"/>
+  </property>
+  <property name="label">Sponsor Middle Name</property>
+  <property name="label_edit">Sponsor Middle Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="sponsor_phone" meta_type="String Widget">
+  <property name="title">Sponsor Phone</property>
+  <property name="fields">
+   <element value="sponsor_phone"/>
+  </property>
+  <property name="label">Sponsor Phone</property>
+  <property name="label_edit">Sponsor Phone</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="sponsor_state" meta_type="String Widget">
+  <property name="title">Sponsor State</property>
+  <property name="fields">
+   <element value="sponsor_state"/>
+  </property>
+  <property name="label">Sponsor State</property>
+  <property name="label_edit">Sponsor State</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <table>
+  <row>
+   <cell name="firstname"/>
+  </row>
+  <row>
+   <cell name="middlename"/>
+  </row>
+  <row>
+   <cell name="lastname"/>
+  </row>
+  <row>
+   <cell name="former_surname"/>
+  </row>
+  <row>
+   <cell name="sex"/>
+  </row>
+  <row>
+   <cell name="for_state"/>
+  </row>
+  <row>
+   <cell name="marit_stat"/>
+  </row>
+  <row>
+   <cell name="religion"/>
+  </row>
+  <row>
+   <cell name="perm_address"/>
+  </row>
+  <row>
+   <cell name="perm_city"/>
+  </row>
+  <row>
+   <cell name="campus_address"/>
+  </row>
+  <row>
+   <cell name="phone"/>
+  </row>
+  <row>
+   <cell name="email"/>
+  </row>
+  <row>
+   <cell name="next_kin_firstname"/>
+  </row>
+  <row>
+   <cell name="next_kin_middlename"/>
+  </row>
+  <row>
+   <cell name="next_kin_lastname"/>
+  </row>
+  <row>
+   <cell name="next_kin_relation"/>
+  </row>
+  <row>
+   <cell name="next_kin_address"/>
+  </row>
+  <row>
+   <cell name="next_kin_city"/>
+  </row>
+  <row>
+   <cell name="next_kin_state"/>
+  </row>
+  <row>
+   <cell name="next_kin_email"/>
+  </row>
+  <row>
+   <cell name="next_kin_phone"/>
+  </row>
+  <row>
+   <cell name="sponsor_firstname"/>
+  </row>
+  <row>
+   <cell name="sponsor_middlename"/>
+  </row>
+  <row>
+   <cell name="sponsor_lastname"/>
+  </row>
+  <row>
+   <cell name="sponsor_address"/>
+  </row>
+  <row>
+   <cell name="sponsor_city"/>
+  </row>
+  <row>
+   <cell name="sponsor_state"/>
+  </row>
+  <row>
+   <cell name="sponsor_email"/>
+  </row>
+  <row>
+   <cell name="sponsor_phone"/>
+  </row>
+  <row>
+   <cell name="fst_best_lang"/>
+  </row>
+  <row>
+   <cell name="scd_best_lang"/>
+  </row>
+  <row>
+   <cell name="mother_tongue"/>
+  </row>
+  <row>
+   <cell name="hall"/>
+  </row>
+  <row>
+   <cell name="disabled"/>
+  </row>
+  <row>
+   <cell name="notes"/>
+  </row>
+ </table>
+</object>
+
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_personal_fe.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_personal_fe.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_personal_fe.xml	(revision 2226)
@@ -0,0 +1,547 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_personal_fe" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_personal_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="campus_address" meta_type="String Widget">
+  <property name="title">Campus Address</property>
+  <property name="fields">
+   <element value="campus_address"/>
+  </property>
+  <property name="label">Campus Address</property>
+  <property name="label_edit">Campus Address</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="disabled" meta_type="Boolean Widget">
+  <property name="title">Disabled</property>
+  <property name="fields">
+   <element value="disabled"/>
+  </property>
+  <property name="label">Disabled</property>
+  <property name="label_edit">Disabled</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="label_false">no</property>
+  <property name="label_true">yes</property>
+  <property name="render_format">select</property>
+ </widget>
+ <widget name="email" meta_type="Email Widget">
+  <property name="title">Email</property>
+  <property name="fields">
+   <element value="email"/>
+  </property>
+  <property name="label">Email</property>
+  <property name="label_edit">Email</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="firstname" meta_type="String Widget">
+  <property name="title">First Name</property>
+  <property name="fields">
+   <element value="firstname"/>
+  </property>
+  <property name="label">First Name</property>
+  <property name="label_edit">First Name</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="for_lga" meta_type="String Widget">
+  <property name="title">Foreign Student Local Government Area</property>
+  <property name="fields">
+   <element value="for_lga"/>
+  </property>
+  <property name="label">Foreign Student Local Government Area</property>
+  <property name="label_edit">Foreign Student Local Government Area</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="for_state" meta_type="Select Widget">
+  <property name="title">Foreign Student State</property>
+  <property name="fields">
+   <element value="for_state"/>
+  </property>
+  <property name="label">Foreign Student State</property>
+  <property name="label_edit">Foreign Student State</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">states</property>
+ </widget>
+ <widget name="former_surname" meta_type="String Widget">
+  <property name="title">Former Surname</property>
+  <property name="fields">
+   <element value="former_surname"/>
+  </property>
+  <property name="label">Former Surname</property>
+  <property name="label_edit">Former Surname</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="fst_best_lang" meta_type="String Widget">
+  <property name="title">First Best Language</property>
+  <property name="fields">
+   <element value="fst_best_lang"/>
+  </property>
+  <property name="label">First Best Language</property>
+  <property name="label_edit">First Best Language</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="hall" meta_type="String Widget">
+  <property name="title">Residence Hall on Campus</property>
+  <property name="fields">
+   <element value="hall"/>
+  </property>
+  <property name="label">Residence Hall on Campus</property>
+  <property name="label_edit">Residence Hall on Campus</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="lastname" meta_type="String Widget">
+  <property name="title">Last Name</property>
+  <property name="fields">
+   <element value="lastname"/>
+  </property>
+  <property name="label">Last Name</property>
+  <property name="label_edit">Last Name</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="marit_stat" meta_type="Boolean Widget">
+  <property name="title">Marital Status</property>
+  <property name="fields">
+   <element value="marit_stat"/>
+  </property>
+  <property name="label">Marital Status</property>
+  <property name="label_edit">Marital Status</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="label_false">single</property>
+  <property name="label_true">married</property>
+  <property name="render_format">select</property>
+ </widget>
+ <widget name="middlename" meta_type="String Widget">
+  <property name="title">Middle Name</property>
+  <property name="fields">
+   <element value="middlename"/>
+  </property>
+  <property name="label">Middle Name</property>
+  <property name="label_edit">Middle Name</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="mother_tongue" meta_type="String Widget">
+  <property name="title">Mother Tongue</property>
+  <property name="fields">
+   <element value="mother_tongue"/>
+  </property>
+  <property name="label">Mother Tongue</property>
+  <property name="label_edit">Mother Tongue</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="next_kin_address" meta_type="String Widget">
+  <property name="title">Next of Kin Address</property>
+  <property name="fields">
+   <element value="next_kin_address"/>
+  </property>
+  <property name="label">Next of Kin Address</property>
+  <property name="label_edit">Next of Kin Address</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="next_kin_city" meta_type="String Widget">
+  <property name="title">Next of Kin City</property>
+  <property name="fields">
+   <element value="next_kin_city"/>
+  </property>
+  <property name="label">Next of Kin City</property>
+  <property name="label_edit">Next of Kin City</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="next_kin_email" meta_type="Email Widget">
+  <property name="title">Next of Kin Email</property>
+  <property name="fields">
+   <element value="next_kin_email"/>
+  </property>
+  <property name="label">Next of Kin Email</property>
+  <property name="label_edit">Next of Kin Email</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="next_kin_firstname" meta_type="String Widget">
+  <property name="title">Next of Kin First Name</property>
+  <property name="fields">
+   <element value="next_kin_firstname"/>
+  </property>
+  <property name="label">Next of Kin First Name</property>
+  <property name="label_edit">Next of Kin First Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="next_kin_lastname" meta_type="String Widget">
+  <property name="title">Next of Kin Last Name</property>
+  <property name="fields">
+   <element value="next_kin_lastname"/>
+  </property>
+  <property name="label">Next of Kin Last Name</property>
+  <property name="label_edit">Next of Kin Last Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="next_kin_middlename" meta_type="String Widget">
+  <property name="title">Next of Kin Middle Name</property>
+  <property name="fields">
+   <element value="next_kin_middlename"/>
+  </property>
+  <property name="label">Next of Kin Middle Name</property>
+  <property name="label_edit">Next of Kin Middle Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="next_kin_phone" meta_type="String Widget">
+  <property name="title">Next of Kin Phone</property>
+  <property name="fields">
+   <element value="next_kin_phone"/>
+  </property>
+  <property name="label">Next of Kin Phone</property>
+  <property name="label_edit">Next of Kin Phone</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="next_kin_relation" meta_type="String Widget">
+  <property name="title">Next of Kin Relationship</property>
+  <property name="fields">
+   <element value="next_kin_relation"/>
+  </property>
+  <property name="label">Next of Kin Relationship</property>
+  <property name="label_edit">Next of Kin Relationship</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="next_kin_state" meta_type="String Widget">
+  <property name="title">Next of Kin State</property>
+  <property name="fields">
+   <element value="next_kin_state"/>
+  </property>
+  <property name="label">Next of Kin State</property>
+  <property name="label_edit">Next of Kin State</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="notes" meta_type="Text Widget">
+  <property name="title">Notes</property>
+  <property name="fields">
+   <element value="notes"/>
+  </property>
+  <property name="label">Notes</property>
+  <property name="label_edit">Notes</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="perm_address" meta_type="String Widget">
+  <property name="title">Permanent Address</property>
+  <property name="fields">
+   <element value="perm_address"/>
+  </property>
+  <property name="label">Permanent Address</property>
+  <property name="label_edit">Permanent Address</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="perm_city" meta_type="String Widget">
+  <property name="title">City</property>
+  <property name="fields">
+   <element value="perm_city"/>
+  </property>
+  <property name="label">City</property>
+  <property name="label_edit">City</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="phone" meta_type="String Widget">
+  <property name="title">Phone</property>
+  <property name="fields">
+   <element value="phone"/>
+  </property>
+  <property name="label">Phone</property>
+  <property name="label_edit">Phone</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="religion" meta_type="Select Widget">
+  <property name="title">Religion</property>
+  <property name="fields">
+   <element value="religion"/>
+  </property>
+  <property name="label">Religion</property>
+  <property name="label_edit">Religion</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">religion</property>
+ </widget>
+ <widget name="scd_best_lang" meta_type="String Widget">
+  <property name="title">Second Best Language</property>
+  <property name="fields">
+   <element value="scd_best_lang"/>
+  </property>
+  <property name="label">Second Best Language</property>
+  <property name="label_edit">Second Best Language</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="sex" meta_type="Boolean Widget">
+  <property name="title">Sex</property>
+  <property name="fields">
+   <element value="sex"/>
+  </property>
+  <property name="label">Sex</property>
+  <property name="label_edit">Sex</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="label_false">male</property>
+  <property name="label_true">female</property>
+  <property name="render_format">select</property>
+ </widget>
+ <widget name="sponsor_address" meta_type="String Widget">
+  <property name="title">Sponsor Address</property>
+  <property name="fields">
+   <element value="sponsor_address"/>
+  </property>
+  <property name="label">Sponsor Address</property>
+  <property name="label_edit">Sponsor Address</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="sponsor_city" meta_type="String Widget">
+  <property name="title">Sponsor City</property>
+  <property name="fields">
+   <element value="sponsor_city"/>
+  </property>
+  <property name="label">Sponsor City</property>
+  <property name="label_edit">Sponsor City</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="sponsor_email" meta_type="Email Widget">
+  <property name="title">Sponsor Email</property>
+  <property name="fields">
+   <element value="sponsor_email"/>
+  </property>
+  <property name="label">Sponsor Email</property>
+  <property name="label_edit">Sponsor Email</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="sponsor_firstname" meta_type="String Widget">
+  <property name="title">Sponsor First Name</property>
+  <property name="fields">
+   <element value="sponsor_firstname"/>
+  </property>
+  <property name="label">Sponsor First Name</property>
+  <property name="label_edit">Sponsor First Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="sponsor_lastname" meta_type="String Widget">
+  <property name="title">Sponsor Last Name</property>
+  <property name="fields">
+   <element value="sponsor_lastname"/>
+  </property>
+  <property name="label">Sponsor Last Name</property>
+  <property name="label_edit">Sponsor Last Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="sponsor_middlename" meta_type="String Widget">
+  <property name="title">Sponsor Middle Name</property>
+  <property name="fields">
+   <element value="sponsor_middlename"/>
+  </property>
+  <property name="label">Sponsor Middle Name</property>
+  <property name="label_edit">Sponsor Middle Name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="sponsor_phone" meta_type="String Widget">
+  <property name="title">Sponsor Phone</property>
+  <property name="fields">
+   <element value="sponsor_phone"/>
+  </property>
+  <property name="label">Sponsor Phone</property>
+  <property name="label_edit">Sponsor Phone</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="sponsor_state" meta_type="String Widget">
+  <property name="title">Sponsor State</property>
+  <property name="fields">
+   <element value="sponsor_state"/>
+  </property>
+  <property name="label">Sponsor State</property>
+  <property name="label_edit">Sponsor State</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <table>
+  <row>
+   <cell name="firstname"/>
+  </row>
+  <row>
+   <cell name="middlename"/>
+  </row>
+  <row>
+   <cell name="lastname"/>
+  </row>
+  <row>
+   <cell name="former_surname"/>
+  </row>
+  <row>
+   <cell name="sex"/>
+  </row>
+  <row>
+   <cell name="for_state"/>
+  </row>
+  <row>
+   <cell name="marit_stat"/>
+  </row>
+  <row>
+   <cell name="religion"/>
+  </row>
+  <row>
+   <cell name="perm_address"/>
+  </row>
+  <row>
+   <cell name="perm_city"/>
+  </row>
+  <row>
+   <cell name="campus_address"/>
+  </row>
+  <row>
+   <cell name="phone"/>
+  </row>
+  <row>
+   <cell name="email"/>
+  </row>
+  <row>
+   <cell name="next_kin_firstname"/>
+  </row>
+  <row>
+   <cell name="next_kin_middlename"/>
+  </row>
+  <row>
+   <cell name="next_kin_lastname"/>
+  </row>
+  <row>
+   <cell name="next_kin_relation"/>
+  </row>
+  <row>
+   <cell name="next_kin_address"/>
+  </row>
+  <row>
+   <cell name="next_kin_city"/>
+  </row>
+  <row>
+   <cell name="next_kin_state"/>
+  </row>
+  <row>
+   <cell name="next_kin_email"/>
+  </row>
+  <row>
+   <cell name="next_kin_phone"/>
+  </row>
+  <row>
+   <cell name="sponsor_firstname"/>
+  </row>
+  <row>
+   <cell name="sponsor_middlename"/>
+  </row>
+  <row>
+   <cell name="sponsor_lastname"/>
+  </row>
+  <row>
+   <cell name="sponsor_address"/>
+  </row>
+  <row>
+   <cell name="sponsor_city"/>
+  </row>
+  <row>
+   <cell name="sponsor_state"/>
+  </row>
+  <row>
+   <cell name="sponsor_email"/>
+  </row>
+  <row>
+   <cell name="sponsor_phone"/>
+  </row>
+  <row>
+   <cell name="fst_best_lang"/>
+  </row>
+  <row>
+   <cell name="scd_best_lang"/>
+  </row>
+  <row>
+   <cell name="mother_tongue"/>
+  </row>
+  <row>
+   <cell name="hall"/>
+  </row>
+  <row>
+   <cell name="disabled"/>
+  </row>
+  <row>
+   <cell name="notes"/>
+  </row>
+ </table>
+</object>
+
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_pume.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_pume.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_pume.xml	(revision 2226)
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_pume" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+
+ <widget name="pume_eng_score" meta_type="Float Widget">
+  <property name="title">PUME English Score</property>
+  <property name="fields">
+   <element value="pume_eng_score"/>
+  </property>
+  <property name="label">PUME English Score</property>
+  <property name="label_edit">PUME English Score</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="pume_gen_score" meta_type="Float Widget">
+  <property name="title">PUME General Score</property>
+  <property name="fields">
+   <element value="pume_gen_score"/>
+  </property>
+  <property name="label">PUME General Score</property>
+  <property name="label_edit">PUME General Score</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="pume_math_score" meta_type="Float Widget">
+  <property name="title">PUME Mathematics Score</property>
+  <property name="fields">
+   <element value="pume_math_score"/>
+  </property>
+  <property name="label">PUME Mathematics Score</property>
+  <property name="label_edit">PUME Mathematics Score</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="pume_tot_score" meta_type="String Widget">
+  <property name="title">PUME Total Score</property>
+  <property name="fields">
+   <element value="pume_tot_score"/>
+  </property>
+  <property name="label">PUME Total Score</property>
+  <property name="label_edit">PUME Total Score</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+
+ <table>
+  <row>
+   <cell name="pume_tot_score" ncols="1"/>
+  </row>
+ </table>
+</object>
+
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_pume_fe.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_pume_fe.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_pume_fe.xml	(revision 2226)
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_pume" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_pume_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+
+ <widget name="pume_eng_score" meta_type="Float Widget">
+  <property name="title">PUME English Score</property>
+  <property name="fields">
+   <element value="pume_eng_score"/>
+  </property>
+  <property name="label">PUME English Score</property>
+  <property name="label_edit">PUME English Score</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="pume_gen_score" meta_type="Float Widget">
+  <property name="title">PUME General Score</property>
+  <property name="fields">
+   <element value="pume_gen_score"/>
+  </property>
+  <property name="label">PUME General Score</property>
+  <property name="label_edit">PUME General Score</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="pume_math_score" meta_type="Float Widget">
+  <property name="title">PUME Mathematics Score</property>
+  <property name="fields">
+   <element value="pume_math_score"/>
+  </property>
+  <property name="label">PUME Mathematics Score</property>
+  <property name="label_edit">PUME Mathematics Score</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="view"/>
+  </property>    
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="pume_tot_score" meta_type="String Widget">
+  <property name="title">PUME Total Score</property>
+  <property name="fields">
+   <element value="pume_tot_score"/>
+  </property>
+  <property name="label">PUME Total Score</property>
+  <property name="label_edit">PUME Total Score</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+
+ <table>
+  <row>
+   <cell name="pume_tot_score" ncols="1"/>
+  </row>
+ </table>
+</object>
+
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_schoolfee.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_schoolfee.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_schoolfee.xml	(revision 2226)
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_schoolfee" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_application_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="pin" meta_type="Scratchcard Pin Widget">
+  <property name="title">Schoolfee Scratch Card</property>
+  <property name="fields">
+   <element value="order_id"/>
+  </property>
+  <property name="label">Access Code</property>
+  <property name="label_edit">Access Code</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="prefix">@getSchoolFeePrefix</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="pin"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_search.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_search.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_search.xml	(revision 2226)
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_search" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_search_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="review_state" meta_type="Select Widget">
+  <property name="title">Review State</property>
+  <property name="fields">
+   <element value="review_state"/>
+  </property>
+  <property name="label">Search for students in state</property>
+  <property name="label_edit">Search for students in state</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">get_searchable_student_states</property>
+ </widget>
+ <widget name="search_mode" meta_type="Generic Select Widget">
+  <property name="title">Search Mode</property>
+  <property name="fields">
+   <element value="search_mode"/>
+  </property>
+  <property name="label">and</property>
+  <property name="label_edit">and</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">student_search_mode</property>
+ </widget>
+ <widget name="search_string" meta_type="String Widget">
+  <property name="title">Search String</property>
+  <property name="fields">
+   <element value="search_string"/>
+  </property>
+  <property name="label">equal to</property>
+  <property name="label_edit">equal to</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <table>
+  <row>
+   <cell name="review_state" ncols="3"/>
+  </row>
+  <row>
+   <cell name="search_mode" ncols="2"/>
+   <cell name="search_string"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_session_results_search.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_session_results_search.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_session_results_search.xml	(revision 2226)
@@ -0,0 +1,149 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_session_results_search" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_search_session_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="email" meta_type="Email Widget">
+  <property name="title">Email</property>
+  <property name="fields">
+   <element value="email"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Email</property>
+  <property name="label_edit">Email</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="jamb_reg_no" meta_type="JambRegNo Widget">
+  <property name="title">JAMB Registration Number</property>
+  <property name="fields">
+   <element value="jamb_reg_no"/>
+  </property>
+  <property name="label">JAMB Registration Number</property>
+  <property name="label_edit">JAMB Registration Number</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">10</property>
+  <property name="size_max">10</property>
+  <property name="catalog">returning_import</property>
+  <property name="reference">student</property>
+ </widget>
+ <widget name="matric_no" meta_type="MatricNo Widget">
+  <property name="title">Matriculation Number</property>
+  <property name="fields">
+   <element value="matric_no"/>
+  </property>
+  <property name="label">Matriculation Number</property>
+  <property name="label_edit">Matriculation Number</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="matric_no_catalog">returning_import</property>
+  <property name="results_catalog">results_import</property>
+  <property name="display_width">13</property>
+  <property name="size_max">13</property>
+ </widget>
+ <widget name="password" meta_type="Password Widget">
+  <property name="title">Password</property>
+  <property name="fields">
+   <element value="password"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Choose a Password</property>
+  <property name="label_edit">Choose a Password</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">15</property>
+  <property name="size_max">15</property>
+  <property name="check_digit">True</property>
+ </widget>
+ <widget name="phone_nr" meta_type="String Widget">
+  <property name="title">Phone Number</property>
+  <property name="fields">
+   <element value="phone_nr"/>
+  </property>
+  <property name="label">Phone Number</property>
+  <property name="label_edit">Phone Number</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">15</property>
+  <property name="size_max">15</property>
+ </widget>
+ <widget name="repeat_password" meta_type="Password Widget">
+  <property name="title">Password</property>
+  <property name="fields">
+   <element value="repeat_password"/>
+  </property>
+  <property name="label">Verify the Password</property>
+  <property name="label_edit">Verify the Password</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">15</property>
+  <property name="size_max">15</property>
+  <property name="password_widget">password</property>
+  <property name="size_min">0</property>
+ </widget>
+ <widget name="secret" meta_type="Secret Widget">
+  <property name="title">Secret Widget</property>
+  <property name="fields">
+   <element value="secret"/>
+  </property>
+  <property name="check_fields">
+   <element value="Firstname"/>
+   <element value="Middlename"/>
+   <element value="Lastname"/>
+  </property>
+  <property name="label">First name, middle name or last name</property>
+  <property
+     name="label_edit">Enter either your first, middle or last name</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">20</property>
+  <property name="size_max">40</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="matric_no"/>
+  </row>
+  <row>
+   <cell name="secret"/>
+  </row>
+  <row>
+   <cell name="email"/>
+  </row>
+  <row>
+   <cell name="phone_nr"/>
+  </row>
+  <row>
+   <cell name="password"/>
+  </row>
+  <row>
+   <cell name="repeat_password"/>
+  </row>
+ </table>
+</object>
+
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_study_course.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_study_course.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_study_course.xml	(revision 2226)
@@ -0,0 +1,109 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_study_course" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="study_course" meta_type="StudyCourse Widget">
+  <property name="title">Certificate Code</property>
+  <property name="fields">
+   <element value="study_course"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Certificate Code</property>
+  <property name="label_edit">Certificate Code</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="study_course_history" meta_type="Lines Widget">
+  <property name="title">Previous Study Courses</property>
+  <property name="fields">
+    <element value="study_course_history"/>
+  </property>
+  <property name="label">Previous Study Courses</property>
+  <property name="label_edit">Previous Study Courses</property>
+  <property name="readonly_layout_modes">
+    <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="width">50</property>
+  <property name="height">2</property>
+ </widget>
+ <widget name="current_session" meta_type="Select Widget">
+  <property name="title">Current Study Session</property>
+  <property name="fields">
+   <element value="current_session"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Current Session</property>
+  <property name="label_edit">Current Session</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">sessions</property>
+ </widget>
+ <widget name="current_level" meta_type="Select Widget">
+  <property name="title">Current Study Level</property>
+  <property name="fields">
+   <element value="current_level"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Current Study Level</property>
+  <property name="label_edit">Current Study Level</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">levels</property>
+ </widget>
+ <widget name="current_mode" meta_type="Select Widget">
+  <property name="title">Current Study Mode</property>
+  <property name="fields">
+   <element value="current_mode"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Current Study Mode</property>
+  <property name="label_edit">Current Study Mode</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">entry_modes</property>
+ </widget>
+ <widget name="current_verdict" meta_type="Select Widget">
+  <property name="title">Current Verdict</property>
+  <property name="fields">
+   <element value="current_verdict"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Current Verdict</property>
+  <property name="label_edit">Current Verdict</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">verdicts</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="study_course"/>
+  </row>
+  <row>
+   <cell name="study_course_history"/>
+  </row>
+  <row>
+   <cell name="current_session"/>
+  </row>
+  <row>
+   <cell name="current_verdict"/>
+  </row>
+  <row>
+   <cell name="current_level"/>
+  </row>
+  <row>
+   <cell name="current_mode"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_study_level.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_study_level.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_study_level.xml	(revision 2226)
@@ -0,0 +1,118 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_study_level" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="code" meta_type="String Widget">
+  <property name="title">Level No</property>
+  <property name="fields">
+   <element value="code"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Level No</property>
+  <property name="label_edit">Level No</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="edit"/>
+   <element value="view"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="gpa" meta_type="Float Widget">
+  <property name="title">GPA</property>
+  <property name="fields">
+   <element value="gpa"/>
+  </property>
+  <property name="label">GPA</property>
+  <property name="label_edit">GPA</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+   <element value="create"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="decimals_number">2</property>
+ </widget>
+ <widget name="imported_gpa" meta_type="Float Widget">
+  <property name="title">GPA</property>
+  <property name="fields">
+   <element value="imported_gpa"/>
+  </property>
+  <property name="label">GPA imported</property>
+  <property name="label_edit">GPA imported</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+   <element value="create"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="decimals_number">2</property>
+ </widget>
+ <widget name="session" meta_type="String Widget">
+  <property name="title">Session</property>
+  <property name="fields">
+   <element value="session"/>
+  </property>
+  <property name="label">Session</property>
+  <property name="label_edit">Session</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="status" meta_type="String Widget">
+  <property name="title">Status</property>
+  <property name="fields">
+   <element value="status"/>
+  </property>
+  <property name="label">Status</property>
+  <property name="label_edit">Status</property>
+  <property name="readonly_layout_modes">
+     <element value="edit"/>
+     <element value="create"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="verdict" meta_type="String Widget">
+  <property name="title">Verdict</property>
+  <property name="fields">
+   <element value="verdict"/>
+  </property>
+  <property name="label">Verdict</property>
+  <property name="label_edit">Verdict</property>
+  <property name="readonly_layout_modes">
+     <element value="edit"/>
+     <element value="create"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <table>
+  <row>
+   <cell name="code"/>
+  </row>
+  <row>
+   <cell name="session"/>
+  </row>
+  <row>
+   <cell name="status"/>
+  </row>
+  <row>
+   <cell name="gpa"/>
+  </row>
+  <row>
+   <cell name="imported_gpa"/>
+  </row>
+  <row>
+   <cell name="verdict"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_transfer.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_transfer.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/student_transfer.xml	(revision 2226)
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_transfer" meta_type="CPS Layout">
+  <property name="layout_create_method"></property>
+  <property name="layout_edit_method"></property>
+  <property name="layout_view_method"></property>
+  <property name="style_prefix">layout_application_</property>
+  <property name="flexible_widgets"/>
+  <property name="validate_values_expr"></property>
+  <widget name="pin" meta_type="Scratchcard Pin Widget">
+    <property name="title">Schoolfee Scratch Card</property>
+    <property name="fields">
+      <element value="payment_id"/>
+    </property>
+    <property name="label">Access Code</property>
+    <property name="label_edit">Access Code</property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="prefix">CLR</property>
+  </widget>
+  <widget name="transfer_type" meta_type="Select Widget">
+    <property name="title">Transfer Type</property>
+    <property name="fields">
+      <element value="response_desc"/>
+    </property>
+    <property name="is_required">True</property>
+    <property name="label">Select Type</property>
+    <property name="label_edit">Select Type</property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="vocabulary">student_transfer_types</property>
+  </widget>
+  <table>
+    <row>
+      <cell name="pin"/>
+    </row>
+  </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/study_level.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/study_level.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/study_level.xml	(revision 2226)
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="study_level" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="code" meta_type="String Widget">
+  <property name="title">Level No</property>
+  <property name="fields">
+   <element value="code"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Level No</property>
+  <property name="label_edit">Level No</property>
+  <property name="readonly_layout_modes"/>
+ <property name="hidden_layout_modes">
+  <element value="edit"/>
+  <element value="view"/>
+ </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <table>
+  <row>
+   <cell name="code"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/university.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/university.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/university.xml	(revision 2226)
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="university" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="Description" meta_type="Text Widget">
+  <property name="fields">
+   <element value="Description"/>
+  </property>
+  <property name="label">Description</property>
+  <property name="label_edit">Description</property>
+  <property name="is_i18n">True</property>
+  <property name="hidden_layout_modes"/>
+  <property name="css_class">description</property>
+  <property name="width">72</property>
+ </widget>
+ <widget name="Title" meta_type="String Widget">
+  <property name="fields">
+   <element value="Title"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Title</property>
+  <property name="label_edit">Title</property>
+  <property name="display_width">40</property>
+  <property name="size_max">200</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="Title"/>
+  </row>
+  <row>
+   <cell name="Description"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/layouts/waeup_common.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/layouts/waeup_common.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/layouts/waeup_common.xml	(revision 2226)
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="waeup_common" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="Title" meta_type="String Widget">
+  <property name="fields">
+   <element value="title"/>
+  </property>
+  <property name="is_required">False</property>
+  <property name="label">Title</property>
+  <property name="label_edit">Title</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+    view
+  </property>>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">40</property>
+  <property name="size_max">200</property>
+ </widget>
+ <widget name="code" meta_type="WAeUPId Widget">
+  <property name="title">Object Id</property>
+  <property name="fields">
+   <element value="code"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Object Id</property>
+  <property name="label_edit">Object Id</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="view"/>
+   <element value="edit"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <table>
+  <row>
+   <cell name="code"/>
+  </row>
+  <row>
+   <cell name="Title"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/online_payments_import.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/online_payments_import.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/online_payments_import.xml	(revision 2226)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="catalog.xsl"?>
+<object name="online_payments_import" meta_type="WAeUP Table">
+ <column value="datetime"/>
+ <column value="student_id"/>
+ <column value="order_id"/>
+ <column value="response_code"/>
+ <column value="amount"/>
+ <index name="student_id" meta_type="FieldIndex">
+  <indexed_attr value="student_id"/>
+ </index>
+ <index name="datetime" meta_type="DateIndex">
+  <indexed_attr value="datetime"/>
+ </index>
+ <index name="order_id" meta_type="FieldIndex">
+  <indexed_attr value="order_id"/>
+ </index>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/payments_catalog.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/payments_catalog.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/payments_catalog.xml	(revision 2226)
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="catalog.xsl"?>
+<object name="payments_catalog" meta_type="WAeUP Table">
+ <column value="id"/>
+ <column value="student_id"/>
+ <column value="pay_type"/>
+ <column value="pay_date"/>
+ <column value="pay_result"/>
+ <column value="pay_result_txt"/>
+ <column value="amount"/>
+ <column value="amount_payed"/>
+ <column value="confirmation_code"/>
+ <index name="id" meta_type="FieldIndex">
+  <indexed_attr value="id"/>
+ </index>
+ <index name="student_id" meta_type="FieldIndex">
+  <indexed_attr value="student_id"/>
+ </index>
+ <index name="pay_type" meta_type="KeywordIndex">
+  <indexed_attr value="pay_type"/>
+ </index>
+ <index name="pay_date" meta_type="DateIndex">
+  <indexed_attr value="pay_type"/>
+ </index>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/pins.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/pins.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/pins.xml	(revision 2226)
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="catalog.xsl"?>
+<object name="portal_pins" meta_type="WAeUP Table">
+ <column value="pin"/>
+ <column value="student"/>
+ <column value="serial"/>
+ <column value="cost"/>
+ <column value="prefix_batch"/>
+ <index name="pin" meta_type="FieldIndex">
+  <indexed_attr value="pin"/>
+ </index>
+ <index name="cost" meta_type="FieldIndex">
+  <indexed_attr value="cost"/>
+ </index>
+ <index name="prefix_batch" meta_type="FieldIndex">
+  <indexed_attr value="prefix_batch" />
+ </index>
+ <index name="student" meta_type="FieldIndex">
+  <indexed_attr value="student"/>
+ </index>
+ <index name="serial" meta_type="FieldIndex">
+  <indexed_attr value="serial"/>
+ </index>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/portal_catalog_real.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/portal_catalog_real.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/portal_catalog_real.xml	(revision 2226)
@@ -0,0 +1,150 @@
+<?xml version="1.0"?>
+<object name="portal_catalog_real" meta_type="CMF Catalog">
+ <property name="title"></property>
+ <object name="cps_defaut_lexicon" meta_type="ZCTextIndex Lexicon">
+  <element name="Whitespace splitter" group="Word Splitter"/>
+  <element name="Case Normalizer" group="Case Normalizer"/>
+ </object>
+ <object name="htmltext_lexicon" meta_type="ZCTextIndex Lexicon">
+  <element name="HTML aware splitter" group="Word Splitter"/>
+  <element name="Case Normalizer" group="Case Normalizer"/>
+  <element name="Remove listed stop words only" group="Stop Words"/>
+ </object>
+ <object name="plaintext_lexicon" meta_type="ZCTextIndex Lexicon">
+  <element name="Whitespace splitter" group="Word Splitter"/>
+  <element name="Case Normalizer" group="Case Normalizer"/>
+  <element name="Remove listed stop words only" group="Stop Words"/>
+ </object>
+ <index name="Creator" meta_type="FieldIndex">
+  <indexed_attr value="Creator"/>
+ </index>
+ <index name="Date" meta_type="DateIndex">
+  <property name="index_naive_time_as_local">True</property>
+ </index>
+ <index name="Description" meta_type="ZCTextIndex">
+  <indexed_attr value="Description"/>
+  <extra name="index_type" value="Okapi BM25 Rank"/>
+  <extra name="lexicon_id" value="plaintext_lexicon"/>
+ </index>
+ <index name="Language" meta_type="FieldIndex">
+  <indexed_attr value="Language"/>
+ </index>
+ <index name="SearchableText" meta_type="ZCTextIndex">
+  <indexed_attr value="SearchableText"/>
+  <extra name="index_type" value="Okapi BM25 Rank"/>
+  <extra name="lexicon_id" value="htmltext_lexicon"/>
+ </index>
+ <index name="Subject" meta_type="KeywordIndex">
+  <indexed_attr value="Subject"/>
+ </index>
+ <index name="Title" meta_type="FieldIndex">
+  <indexed_attr value="Title"/>
+ </index>
+ <index name="Type" meta_type="FieldIndex">
+  <indexed_attr value="Type"/>
+ </index>
+ <index name="ZCTitle" meta_type="ZCTextIndex">
+  <indexed_attr value="Title"/>
+  <extra name="index_type" value="Okapi BM25 Rank"/>
+  <extra name="lexicon_id" value="cps_defaut_lexicon"/>
+ </index>
+ <index name="allowedRolesAndUsers" meta_type="KeywordIndex">
+  <indexed_attr value="allowedRolesAndUsers"/>
+ </index>
+ <index name="container_path" meta_type="FieldIndex">
+  <indexed_attr value="container_path"/>
+ </index>
+ <index name="cps_filter_sets" meta_type="TopicIndex">
+  <filtered_set name="default_languages" meta_type="PythonFilteredSet"
+     expression="not hasattr(o, 'isDefaultLanguage') or o.isDefaultLanguage()"/>
+  <filtered_set name="leaves" meta_type="PythonFilteredSet"
+     expression="not o.isCPSFolderish()"/>
+  <filtered_set name="nodes" meta_type="PythonFilteredSet"
+     expression="o.isCPSFolderish()"/>
+  <filtered_set name="searchable" meta_type="PythonFilteredSet"
+     expression="not filter(lambda s: s.startswith('portal_') or s and s[0] in ('.', '_'), o.getPhysicalPath())"/>
+ </index>
+ <index name="created" meta_type="DateIndex">
+  <property name="index_naive_time_as_local">True</property>
+ </index>
+ <index name="effective" meta_type="DateIndex">
+  <property name="index_naive_time_as_local">True</property>
+ </index>
+ <index name="end" meta_type="DateIndex">
+  <property name="index_naive_time_as_local">True</property>
+ </index>
+ <index name="expires" meta_type="DateIndex">
+  <property name="index_naive_time_as_local">True</property>
+ </index>
+ <index name="getId" meta_type="FieldIndex">
+  <indexed_attr value="getId"/>
+ </index>
+ <index name="id" meta_type="FieldIndex">
+  <indexed_attr value="id"/>
+ </index>
+ <index name="in_reply_to" meta_type="FieldIndex">
+  <indexed_attr value="in_reply_to"/>
+ </index>
+ <index name="listCreators" meta_type="KeywordIndex">
+  <indexed_attr value="listCreators"/>
+ </index>
+ <index name="localUsersWithRoles" meta_type="KeywordIndex">
+  <indexed_attr value="localUsersWithRoles"/>
+ </index>
+ <index name="meta_type" meta_type="FieldIndex">
+  <indexed_attr value="meta_type"/>
+ </index>
+ <index name="modified" meta_type="DateIndex">
+  <property name="index_naive_time_as_local">True</property>
+ </index>
+ <index name="path" meta_type="PathIndex"/>
+ <index name="portal_type" meta_type="FieldIndex">
+  <indexed_attr value="portal_type"/>
+ </index>
+ <index name="position_in_container" meta_type="FieldIndex">
+  <indexed_attr value="position_in_container"/>
+ </index>
+ <index name="relative_path" meta_type="FieldIndex">
+  <indexed_attr value="relative_path"/>
+ </index>
+ <index name="relative_path_depth" meta_type="FieldIndex">
+  <indexed_attr value="relative_path_depth"/>
+ </index>
+ <index name="review_state" meta_type="FieldIndex">
+  <indexed_attr value="review_state"/>
+ </index>
+ <index name="start" meta_type="DateIndex">
+  <property name="index_naive_time_as_local">True</property>
+ </index>
+ <index name="time" meta_type="DateIndex">
+  <property name="index_naive_time_as_local">True</property>
+ </index>
+ <column value="Contributors"/>
+ <column value="CreationDate"/>
+ <column value="Creator"/>
+ <column value="Date"/>
+ <column value="Description"/>
+ <column value="EffectiveDate"/>
+ <column value="ExpirationDate"/>
+ <column value="Language"/>
+ <column value="ModificationDate"/>
+ <column value="Subject"/>
+ <column value="Title"/>
+ <column value="Type"/>
+ <column value="created"/>
+ <column value="effective"/>
+ <column value="end"/>
+ <column value="expires"/>
+ <column value="getIcon"/>
+ <column value="getId"/>
+ <column value="getRevision"/>
+ <column value="id"/>
+ <column value="listCreators"/>
+ <column value="modified"/>
+ <column value="portal_type"/>
+ <column value="position_in_container"/>
+ <column value="relative_path"/>
+ <column value="review_state"/>
+ <column value="start"/>
+ <column value="time"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/portlets.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/portlets.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/portlets.xml	(revision 2226)
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<object name="portal_cpsportlets" meta_type="CPS Portlets Tool">
+ <property name="title"></property>
+ <property name="ignore_events">False</property>
+ <cache-parameters type="Actions Portlet">
+  <element value="actions:(categories)"/>
+  <element value="user"/>
+  <element value="object:path"/>
+ </cache-parameters>
+ <cache-parameters type="Add Item Portlet">
+  <element value="portal_type"/>
+  <element value="wf_create"/>
+ </cache-parameters>
+ <cache-parameters type="Breadcrumbs Portlet">
+  <element value="user"/>
+  <element value="current_lang"/>
+  <element value="object:published_path"/>
+  <element value="objects:relative_path"/>
+  <element value="timeout:300"/>
+  <element value="request:breadcrumb_set"/>
+ </cache-parameters>
+ <cache-parameters type="Content Portlet">
+  <element value="no-cache:(contextual)"/>
+  <element value="user"/>
+  <element
+     value="event_ids:workflow_create,workflow_accept,workflow_reject,workflow_publish,workflow_modify,sys_del_object,workflow_cut_copy_paste,workflow_copy_submit"/>
+  <element value="event_in_folders:(folder_path)"/>
+  <element value="event_on_types:(searchable_types)"/>
+  <element value="baseurl"/>
+ </cache-parameters>
+ <cache-parameters type="Custom Portlet"/>
+ <cache-parameters type="Document Portlet">
+  <element value="no-cache"/>
+ </cache-parameters>
+ <cache-parameters type="Dummy Portlet">
+  <element value="user"/>
+ </cache-parameters>
+ <cache-parameters type="Image Portlet">
+  <element value="baseurl"/>
+ </cache-parameters>
+ <cache-parameters type="Internal Links Portlet">
+  <element value="user"/>
+  <element value="current_lang"/>
+  <element value="objects:(links)"/>
+ </cache-parameters>
+ <cache-parameters type="Language Portlet">
+  <element value="object:path,langs,lang"/>
+  <element value="current_lang"/>
+  <element value="user"/>
+  <element value="timeout:1800"/>
+ </cache-parameters>
+ <cache-parameters type="Navigation Portlet">
+  <element value="no-cache"/>
+ </cache-parameters>
+ <cache-parameters type="RSS Portlet">
+  <element value="event_ids:rss_channel_refresh"/>
+  <element value="timeout:10"/>
+ </cache-parameters>
+ <cache-parameters type="Rotating Image Portlet">
+  <element value="baseurl"/>
+ </cache-parameters>
+ <cache-parameters type="Search Portlet">
+  <element value="no-cache"/>
+ </cache-parameters>
+ <cache-parameters type="Text Portlet"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/portlets_catalog.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/portlets_catalog.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/portlets_catalog.xml	(revision 2226)
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+<object name="portal_cpsportlets_catalog"
+   meta_type="CPS Portlets Catalog Tool">
+ <property name="title"></property>
+ <object name="htmltext_lexicon" meta_type="ZCTextIndex Lexicon">
+  <element name="HTML aware splitter" group="Word Splitter"/>
+  <element name="Case Normalizer" group="Case Normalizer"/>
+  <element name="Remove listed stop words only" group="Stop Words"/>
+ </object>
+ <object name="plaintext_lexicon" meta_type="ZCTextIndex Lexicon">
+  <element name="Whitespace splitter" group="Word Splitter"/>
+  <element name="Case Normalizer" group="Case Normalizer"/>
+  <element name="Remove listed stop words only" group="Stop Words"/>
+ </object>
+ <index name="Creator" meta_type="FieldIndex">
+  <indexed_attr value="Creator"/>
+ </index>
+ <index name="Date" meta_type="DateIndex">
+  <property name="index_naive_time_as_local">True</property>
+ </index>
+ <index name="Description" meta_type="ZCTextIndex">
+  <indexed_attr value="Description"/>
+  <extra name="index_type" value="Okapi BM25 Rank"/>
+  <extra name="lexicon_id" value="plaintext_lexicon"/>
+ </index>
+ <index name="SearchableText" meta_type="ZCTextIndex">
+  <indexed_attr value="SearchableText"/>
+  <extra name="index_type" value="Okapi BM25 Rank"/>
+  <extra name="lexicon_id" value="htmltext_lexicon"/>
+ </index>
+ <index name="Subject" meta_type="KeywordIndex">
+  <indexed_attr value="Subject"/>
+ </index>
+ <index name="Title" meta_type="ZCTextIndex">
+  <indexed_attr value="Title"/>
+  <extra name="index_type" value="Okapi BM25 Rank"/>
+  <extra name="lexicon_id" value="plaintext_lexicon"/>
+ </index>
+ <index name="Type" meta_type="FieldIndex">
+  <indexed_attr value="Type"/>
+ </index>
+ <index name="allowedRolesAndUsers" meta_type="KeywordIndex">
+  <indexed_attr value="allowedRolesAndUsers"/>
+ </index>
+ <index name="created" meta_type="DateIndex">
+  <property name="index_naive_time_as_local">True</property>
+ </index>
+ <index name="eventIds" meta_type="KeywordIndex">
+  <indexed_attr value="eventIds"/>
+ </index>
+ <index name="getId" meta_type="FieldIndex">
+  <indexed_attr value="getId"/>
+ </index>
+ <index name="listCreators" meta_type="KeywordIndex">
+  <indexed_attr value="listCreators"/>
+ </index>
+ <index name="meta_type" meta_type="FieldIndex">
+  <indexed_attr value="meta_type"/>
+ </index>
+ <index name="modified" meta_type="DateIndex">
+  <property name="index_naive_time_as_local">True</property>
+ </index>
+ <index name="path" meta_type="PathIndex"/>
+ <index name="portal_type" meta_type="FieldIndex">
+  <indexed_attr value="portal_type"/>
+ </index>
+ <index name="review_state" meta_type="FieldIndex">
+  <indexed_attr value="review_state"/>
+ </index>
+ <column value="CreationDate"/>
+ <column value="Creator"/>
+ <column value="Date"/>
+ <column value="Description"/>
+ <column value="ModificationDate"/>
+ <column value="Subject"/>
+ <column value="Title"/>
+ <column value="Type"/>
+ <column value="created"/>
+ <column value="eventIds"/>
+ <column value="getIcon"/>
+ <column value="getId"/>
+ <column value="listCreators"/>
+ <column value="modified"/>
+ <column value="portal_type"/>
+ <column value="review_state"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/properties.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/properties.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/properties.xml	(revision 2226)
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<site>
+ <property name="title">Student Registration Portal</property>
+ <property name="enable_password_reset" type="boolean">True</property>
+ <property name="enable_portal_joining" type="boolean">False</property>
+</site>
Index: WAeUP_SRP/trunk_not_used/profiles/default/pumeresults.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/pumeresults.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/pumeresults.xml	(revision 2226)
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="catalog.xsl"?>
+<object name="portal_pumeresults" meta_type="WAeUP Table">
+ <column value="jamb_reg_no"/>
+ <column value="name"/>
+ <column value="score"/>
+ <column value="sex"/>
+ <column value="faculty"/>
+ <column value="course"/>
+ <column value="status"/>
+ <column value="department"/>
+ <column value="course_code_org"/>
+ <column value="course_code"/>
+ <column value="result_type"/>
+ <index name="jamb_reg_no" meta_type="FieldIndex">
+  <indexed_attr value="jamb_reg_no"/>
+ </index>
+ <index name="status" meta_type="KeywordIndex">
+  <indexed_attr value="status"/>
+ </index>
+ <index name="faculty" meta_type="KeywordIndex">
+  <indexed_attr value="faculty"/>
+ </index>
+ <index name="department" meta_type="KeywordIndex">
+  <indexed_attr value="department"/>
+ </index>
+ <index name="course_code" meta_type="KeywordIndex">
+  <indexed_attr value="course_code"/>
+ </index>
+ <index name="score" meta_type="FieldIndex">
+  <indexed_attr value="score"/>
+ </index>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/results_import.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/results_import.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/results_import.xml	(revision 2226)
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="catalog.xsl"?>
+<object name="results_import" meta_type="WAeUP Table">
+ <column value="key"/>
+ <column value="matric_no"/>
+ <column value="CosCode"/>
+ <column value="AnsBook"/>
+ <column value="CosStuatus"/>
+ <column value="Session"/>
+ <column value="Mat_Cos"/>
+ <column value="Score"/>
+ <column value="CarryLevel"/>
+ <column value="GRADE"/>
+ <column value="WEIGHT"/>
+ <column value="Semester"/>
+ <column value="Verdict"/>
+ <column value="Level"/>
+ <column value="id" />
+ <index name="matric_no" meta_type="FieldIndex">
+  <indexed_attr value="matric_no"/>
+ </index>
+ <index name="key" meta_type="FieldIndex">
+  <indexed_attr value="key"/>
+ </index>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/returning_import.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/returning_import.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/returning_import.xml	(revision 2226)
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="catalog.xsl"?>
+<object name="returning_import" meta_type="WAeUP Table">
+ <column value="id"/>
+ <column value="matric_no"/>
+ <column value="Entryregno"/>
+ <column value="Faculty"/>
+ <column value="Department"/>
+ <column value="Coursemajor"/>
+ <column value="Coursemajorcode"/>
+ <column value="Fullname"/>
+ <column value="Firstname"/>
+ <column value="Middlename"/>
+ <column value="Lastname"/>
+ <column value="Mode_of_Entry"/>
+ <column value="Sex"/>
+ <column value="State"/>
+ <column value="LGA"/>
+ <column value="Level"/>
+ <column value="Permanent_Address"/>
+ <column value="f1"/>
+ <column value="f2"/>
+ <column value="f3"/>
+ <column value="f4"/>
+ <index name="matric_no" meta_type="FieldIndex">
+  <indexed_attr value="matric_no"/>
+ </index>
+ <index name="id" meta_type="FieldIndex">
+  <indexed_attr value="id"/>
+ </index>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/rolemap.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/rolemap.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/rolemap.xml	(revision 2226)
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+<rolemap>
+  <roles>
+    <role name="SectionOfficer"/>
+    <role name="ClearanceOfficer"/>
+    <role name="Student"/>
+    <role name="SectionReader"/>
+    <role name="SectionManager"/>
+    <role name="CourseAdviser"/>
+  </roles>
+  <permissions>
+    <permission name="List folder contents" acquire="True">
+      <role name="SectionManager"/>
+      <role name="SectionReader"/>
+      <role name="SectionOfficer"/>
+    </permission>
+    <permission name="View" acquire="True">
+      <role name="SectionManager"/>
+      <role name="SectionReader"/>
+      <role name="SectionOfficer"/>
+    </permission>
+    <permission name="Add portal content" acquire="True">
+      <role name="SectionManager"/>
+      <role name="SectionOfficer"/>
+    </permission>
+    <permission name="Add portal folders" acquire="True">
+      <role name="SectionManager"/>
+      <role name="SectionOfficer"/>
+    </permission>
+    <permission name="Delete objects" acquire="True">
+      <role name="SectionManager"/>
+      <role name="SectionOfficer"/>
+    </permission>
+    <permission name="Change subobjects order" acquire="True">
+      <role name="SectionManager"/>
+      <role name="SectionOfficer"/>
+    </permission>
+    <permission name="Manage properties" acquire="True">
+      <role name="SectionManager"/>
+      <role name="SectionOfficer"/>
+    </permission>
+    <permission name="List portal members" acquire="True">
+      <role name="SectionManager"/>
+      <role name="SectionOfficer"/>
+    </permission>
+    <permission name="Add portal member" acquire="True">
+      <role name="SectionManager"/>
+      <role name="SectionOfficer"/>
+    </permission>
+    <permission name="Review portal content" acquire="True">
+      <role name="Owner"/>
+      <role name="Reviewer"/>
+      <role name="SectionManager"/>
+      <role name="SectionOfficer"/>
+    </permission>
+    <permission name="Modify portal content" acquire="True">
+      <role name="SectionManager"/>
+      <role name="SectionOfficer"/>
+    </permission>
+    <permission name="Set own password" acquire="True">
+      <role name="Member"/>
+    </permission>
+    <permission name="Undo changes" acquire="False">
+      <role name="SectionManager"/>
+    </permission>
+    <permission name="Use mailhost services" acquire="True">
+      <role name="Authenticated"/>
+      <role name="Anonymous"/>
+    </permission>
+  </permissions>
+</rolemap>
Index: WAeUP_SRP/trunk_not_used/profiles/default/roots.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/roots.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/roots.xml	(revision 2226)
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<roots>
+  <object name="campus" portal_type="University"/>
+  <script script_id=".cpsskins_theme"
+          type="Script (Python)"
+          filename="cpsskins_theme.py"
+          /> 
+</roots>
Index: WAeUP_SRP/trunk_not_used/profiles/default/roots/campus.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/roots/campus.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/roots/campus.xml	(revision 2226)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<object name="campus">
+  <property name="Title">University Portal</property>
+  <object name="academics" portal_type="AcademicsFolder" />
+  <object name="accommodation" portal_type="AccoFolder" />
+  <object name="students" portal_type="StudentsFolder" />
+  <object name="pins" portal_type="ScratchCardBatchesFolder" />
+  <object name="documents" portal_type="DocumentsFolder" />
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/roots/campus/academics.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/roots/campus/academics.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/roots/campus/academics.xml	(revision 2226)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<object name="academics">
+  <property name="Title">Academics</property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/roots/campus/accommodation.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/roots/campus/accommodation.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/roots/campus/accommodation.xml	(revision 2226)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<object name="accommodation">
+  <property name="Title">Accommodation</property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/roots/campus/documents.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/roots/campus/documents.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/roots/campus/documents.xml	(revision 2226)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<object name="students">
+  <property name="Title">Documents</property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/roots/campus/pins.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/roots/campus/pins.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/roots/campus/pins.xml	(revision 2226)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<object name="pins">
+  <property name="Title">Pin Batches</property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/roots/campus/students.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/roots/campus/students.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/roots/campus/students.xml	(revision 2226)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<object name="students">
+  <property name="Title">Students</property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas.xml	(revision 2226)
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="content.xsl"?>
+<object name="portal_schemas" meta_type="CPS Schemas Tool">
+ <property name="title"></property>
+ <object name="academics" meta_type="CPS Schema"/>
+ <object name="academics_search" meta_type="CPS Schema"/>
+ <object name="acco_hall" meta_type="CPS Schema"/>
+ <object name="acco_bed_booking" meta_type="CPS Schema"/>
+ <object name="application" meta_type="CPS Schema"/>
+ <object name="certificate" meta_type="CPS Schema"/>
+ <object name="certificate_course" meta_type="CPS Schema"/>
+ <object name="course" meta_type="CPS Schema"/>
+ <object name="import_department" meta_type="CPS Schema"/>
+ <object name="department" meta_type="CPS Schema"/>
+ <object name="faculty" meta_type="CPS Schema"/>
+ <object name="members" meta_type="CPS Schema"/>
+ <object name="members_search" meta_type="CPS Schema"/>
+ <object name="payment" meta_type="CPS Schema"/>
+ <object name="student" meta_type="CPS Schema"/>
+ <object name="scratch_card_batch" meta_type="CPS Schema"/>
+ <object name="import" meta_type="CPS Schema"/>
+ <object name="import_student" meta_type="CPS Schema"/>
+ <object name="import_student_level_data" meta_type="CPS Schema"/>
+ <object name="import_student_course_results" meta_type="CPS Schema"/>
+ <object name="student_accommodation" meta_type="CPS Schema"/>
+ <object name="student_application" meta_type="CPS Schema"/>
+ <object name="student_change_password" meta_type="CPS Schema"/>
+ <object name="student_clearance" meta_type="CPS Schema"/>
+ <object name="student_course_result" meta_type="CPS Schema"/>
+ <object name="student_create" meta_type="CPS Schema"/>
+ <object name="student_personal" meta_type="CPS Schema"/>
+ <object name="student_pume" meta_type="CPS Schema"/>
+ <object name="student_returning" meta_type="CPS Schema"/>
+ <object name="student_search" meta_type="CPS Schema"/>
+ <object name="student_study_course" meta_type="CPS Schema"/>
+ <object name="students" meta_type="CPS Schema"/>
+ <object name="student_study_level" meta_type="CPS Schema"/>
+ <object name="study_level" meta_type="CPS Schema"/>
+ <object name="university" meta_type="CPS Schema"/>
+ <object name="waeup_common" meta_type="CPS Schema"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/academics.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/academics.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/academics.xml	(revision 2226)
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="academics" meta_type="CPS Schema"/>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/academics_search.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/academics_search.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/academics_search.xml	(revision 2226)
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="student_search" meta_type="CPS Schema">
+ <field name="review_state" meta_type="CPS String Field"/>
+ <field name="search_mode" meta_type="CPS String Field"/>
+ <field name="search_string" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/acco_bed_booking.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/acco_bed_booking.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/acco_bed_booking.xml	(revision 2226)
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="acco_bed_booking" meta_type="CPS Schema">
+ <field name="bed_letter" meta_type="CPS String Field"/>
+ <field name="block_room" meta_type="CPS String Field"/>
+ <field name="student_id" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/acco_hall.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/acco_hall.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/acco_hall.xml	(revision 2226)
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="acco_hall" meta_type="CPS Schema">
+  <field name="beds_for_final" meta_type="CPS String List Field"/>
+  <field name="beds_for_fresh" meta_type="CPS String List Field"/>
+  <field name="beds_for_returning" meta_type="CPS String List Field"/>
+  <field name="beds_per_room" meta_type="CPS Int Field">
+    <property name="default_expr">python:6</property>
+  </field>
+  <field name="nr_of_blocks" meta_type="CPS Int Field">
+    <property name="default_expr">python:3</property>
+  </field>
+ <field name="nr_of_floors" meta_type="CPS Int Field">
+    <property name="default_expr">python:3</property>
+  </field>
+ <field name="reserved_rooms" meta_type="CPS String List Field">
+    <property name="default_expr">string:A/101,C/102</property>
+  </field>
+  <field name="rooms_per_floor" meta_type="CPS Int Field">
+    <property name="default_expr">python:20</property>
+  </field>
+ <field name="special_handling" meta_type="CPS String Field"/>
+ <field name="text" meta_type="CPS String Field">
+  <property name="is_searchabletext">False</property>
+ </field>
+ <field name="blocks_for_female" meta_type="CPS String List Field">
+  </field>
+   <field name="maintenance_code" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/application.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/application.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/application.xml	(revision 2226)
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="application" meta_type="CPS Schema">
+ <field name="course1" meta_type="CPS String Field"/>
+ <field name="course2" meta_type="CPS String Field"/>
+ <field name="course3" meta_type="CPS String Field"/>
+ <field name="course_admitted" meta_type="CPS String Field"/>
+ <field name="entry_mode" meta_type="CPS String Field"/>
+ <field name="department" meta_type="CPS String Field"/>
+ <field name="faculty" meta_type="CPS String Field"/>
+ <field name="firstname" meta_type="CPS String Field"/>
+ <field name="eng_score" meta_type="CPS Int Field"/>
+ <field name="subj1" meta_type="CPS Int Field"/>
+ <field name="subj1score" meta_type="CPS Int Field"/>
+ <field name="subj2" meta_type="CPS Int Field"/>
+ <field name="subj2score" meta_type="CPS Int Field"/>
+ <field name="subj3" meta_type="CPS Int Field"/>
+ <field name="subj3score" meta_type="CPS Int Field"/>
+ <field name="aggregate" meta_type="CPS Int Field"/>
+ <field name="lastname" meta_type="CPS String Field"/>
+ <field name="middlenames" meta_type="CPS String Field"/>
+ <field name="email" meta_type="CPS String Field"/>
+ <field name="phone" meta_type="CPS String Field"/>
+ <field name="pin" meta_type="CPS String Field"/>
+ <field name="reg_no" meta_type="CPS String Field"/>
+ <field name="date_of_birth" meta_type="CPS DateTime Field"/>
+ <field name="application_date" meta_type="CPS DateTime Field"/>
+ <field name="score" meta_type="CPS Int Field"/>
+ <field name="sex" meta_type="CPS Boolean Field"/>
+ <field name="lga" meta_type="CPS String Field"/>
+ <field name="screening_date" meta_type="CPS DateTime Field"/>
+ <field name="screening_type" meta_type="CPS String Field"/>
+ <field name="passport" meta_type="CPS String Field"/>
+ <field name="status" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/certificate.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/certificate.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/certificate.xml	(revision 2226)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="certificate" meta_type="CPS Schema">
+ <field name="title" meta_type="CPS String Field"/>
+ <field name="admin_status" meta_type="CPS String Field"/>
+ <field name="category" meta_type="CPS String Field"/>
+ <field name="code" meta_type="CPS String Field">
+  <property name="is_searchabletext">False</property>
+ </field>
+ <field name="end_level" meta_type="CPS String Field"/>
+ <field name="m_prefix" meta_type="CPS String Field"/>
+ <field name="max_elect" meta_type="CPS String Field"/>
+ <field name="max_load" meta_type="CPS Int Field"/>
+ <field name="max_pass" meta_type="CPS Int Field"/>
+ <field name="n_core" meta_type="CPS Int Field"/>
+ <field name="nr_years" meta_type="CPS Int Field"/>
+ <field name="original_code" meta_type="CPS String Field"/>
+ <field name="probation_credits" meta_type="CPS Int Field"/>
+ <field name="promotion_credits" meta_type="CPS Int Field"/>
+ <field name="start_level" meta_type="CPS String Field"/>
+ <field name="school_fee_code" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/certificate_course.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/certificate_course.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/certificate_course.xml	(revision 2226)
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="certificate_course" meta_type="CPS Schema">
+ <field name="code" meta_type="CPS String Field" />
+ <field name="core_or_elective" meta_type="CPS Boolean Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/course.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/course.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/course.xml	(revision 2226)
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="course" meta_type="CPS Schema">
+ <field name="adm_status" meta_type="CPS String Field"/>
+ <field name="category" meta_type="CPS String Field"/>
+ <field name="title" meta_type="CPS String Field"/>
+ <field name="code" meta_type="CPS String Field"/>
+ <field name="credits" meta_type="CPS Int Field"/>
+ <field name="former_code" meta_type="CPS String Field"/>
+ <field name="org_code" meta_type="CPS String Field"/>
+ <field name="passmark" meta_type="CPS Int Field">
+  <property name="default_expr">python:40</property>
+ </field>
+ <field name="semester" meta_type="CPS Int Field"/>
+ <field name="level" meta_type="CPS String Field"/>
+ <field name="session" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/department.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/department.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/department.xml	(revision 2226)
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="department" meta_type="CPS Schema">
+ <field name="code" meta_type="CPS String Field"/>
+ <field name="title" meta_type="CPS String Field"/>
+ <field name="title_prefix" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/faculty.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/faculty.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/faculty.xml	(revision 2226)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="faculty" meta_type="CPS Schema">
+ <field name="bank_code" meta_type="CPS String Field"/>
+ <field name="code" meta_type="CPS String Field"/>
+ <field name="college_code" meta_type="CPS String Field"/>
+ <field name="degree_grade" meta_type="CPS String Field"/>
+ <field name="title" meta_type="CPS String Field"/>
+ <field name="title_prefix" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/import.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/import.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/import.xml	(revision 2226)
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<object name="import" meta_type="CPS Schema">
+ <field name="filename" meta_type="CPS String Field"/>
+ <field name="name" meta_type="CPS String Field"/>
+ <field name="import_or_edit" meta_type="CPS Boolean Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/import_department.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/import_department.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/import_department.xml	(revision 2226)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="import_department" meta_type="CPS Schema">
+ <field name="code" meta_type="CPS String Field"/>
+ <field name="faculty_code" meta_type="CPS String Field"/>
+ <field name="review_state" meta_type="CPS String Field"/>
+ <field name="title" meta_type="CPS String Field"/>
+ <field name="title_prefix" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/import_student.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/import_student.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/import_student.xml	(revision 2226)
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="import_student" meta_type="CPS Schema">
+ <field name="reg_transition" meta_type="CPS String Field"/>
+ <field name="firstname" meta_type="CPS String Field"/>
+ <field name="middlename" meta_type="CPS String Field"/>
+ <field name="lastname" meta_type="CPS String Field"/>
+ <field name="sex" meta_type="CPS String Field"/>
+ <field name="birthday" meta_type="CPS String Field"/>
+ <field name="matric_no" meta_type="CPS String Field"/>
+ <field name="jamb_reg_no" meta_type="CPS String Field"/>
+ <field name="entry_mode" meta_type="CPS String Field"/>
+ <field name="entry_session" meta_type="CPS String Field"/>
+ <field name="jamb_score" meta_type="CPS Int Field"/>
+ <field name="jamb_age" meta_type="CPS String Field"/>
+ <field name="study_course" meta_type="CPS String Field"/>
+ <field name="nationality" meta_type="CPS String Field"/>
+ <field name="lga" meta_type="CPS String Field"/>
+ <field name="phone" meta_type="CPS String Field"/>
+ <field name="email" meta_type="CPS String Field"/>
+ <field name="app_email" meta_type="CPS String Field"/>
+ <field name="current_level" meta_type="CPS String Field"/>
+ <field name="current_session" meta_type="CPS String Field"/>
+ <field name="current_verdict" meta_type="CPS String Field"/>
+ <field name="current_mode" meta_type="CPS String Field"/>
+ <field name="perm_address" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/import_student_course_results.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/import_student_course_results.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/import_student_course_results.xml	(revision 2226)
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="import_student_course_results" meta_type="CPS Schema">
+ <field name="matric_no" meta_type="CPS String Field"/>
+ <field name="code" meta_type="CPS String Field"/>
+ <field name="score" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/import_student_level_data.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/import_student_level_data.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/import_student_level_data.xml	(revision 2226)
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="import_student_level_data" meta_type="CPS Schema">
+ <field name="matric_no" meta_type="CPS String Field"/>
+ <field name="session" meta_type="CPS String Field"/>
+ <field name="level" meta_type="CPS String Field"/>
+ <field name="verdict" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/members.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/members.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/members.xml	(revision 2226)
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="members" meta_type="CPS Schema">
+ <field name="confirm" meta_type="CPS Password Field">
+  <property name="read_ignore_storage">True</property>
+  <property name="write_ignore_storage">True</property>
+ </field>
+ <field name="email" meta_type="CPS String Field">
+  <property name="acl_write_roles">Manager; Owner; SectionOfficer</property>
+ </field>
+ <field name="fullname" meta_type="CPS String Field">
+  <property name="acl_write_roles">Nobody</property>
+  <property name="read_ignore_storage">True</property>
+  <property
+     name="read_process_expr">python:(givenName + " " + sn).strip() or id</property>
+  <property name="read_process_dependent_fields">
+   <element value="givenName"/>
+   <element value="sn"/>
+   <element value="id"/>
+  </property>
+  <property name="write_ignore_storage">True</property>
+ </field>
+ <field name="givenName" meta_type="CPS String Field">
+  <property name="acl_write_roles">Manager; Owner; SectionOfficer</property>
+ </field>
+ <field name="groups" meta_type="CPS String List Field">
+  <property name="acl_write_roles">Manager; SectionOfficer</property>
+ </field>
+ <field name="homeless" meta_type="CPS Int Field">
+  <property name="default_expr">python: 1</property>
+  <property name="acl_write_roles">Manager; SectionOfficer</property>
+ </field>
+ <field name="id" meta_type="CPS String Field"/>
+ <field name="password" meta_type="CPS Password Field">
+  <property name="acl_write_roles">Manager; Owner; SectionOfficer</property>
+ </field>
+ <field name="roles" meta_type="CPS String List Field">
+  <property name="default_expr">python: ['Member',]</property>
+  <property name="acl_write_roles">Manager</property>
+ </field>
+ <field name="sn" meta_type="CPS String Field">
+  <property name="acl_write_roles">Manager; Owner; SectionOfficer</property>
+ </field>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/members_search.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/members_search.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/members_search.xml	(revision 2226)
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="members" meta_type="CPS Schema">
+ <field name="confirm" meta_type="CPS Password Field">
+  <property name="read_ignore_storage">True</property>
+  <property name="write_ignore_storage">True</property>
+ </field>
+ <field name="email" meta_type="CPS String Field">
+  <property name="acl_write_roles">Manager; Owner; SectionOfficer</property>
+ </field>
+ <field name="fullname" meta_type="CPS String Field">
+  <property name="acl_write_roles">Nobody</property>
+  <property name="read_ignore_storage">True</property>
+  <property
+     name="read_process_expr">python:(givenName + " " + sn).strip() or id</property>
+  <property name="read_process_dependent_fields">
+   <element value="givenName"/>
+   <element value="sn"/>
+   <element value="id"/>
+  </property>
+  <property name="write_ignore_storage">True</property>
+ </field>
+ <field name="givenName" meta_type="CPS String Field">
+  <property name="acl_write_roles">Manager; Owner; SectionOfficer</property>
+ </field>
+ <field name="groups" meta_type="CPS String List Field">
+  <property name="acl_write_roles">Manager; SectionOfficer</property>
+ </field>
+ <field name="id" meta_type="CPS String Field"/>
+ <field name="password" meta_type="CPS Password Field">
+  <property name="acl_write_roles">Manager; Owner; SectionOfficer</property>
+ </field>
+ <field name="roles" meta_type="CPS String List Field">
+  <property name="default_expr">python: ['Member',]</property>
+  <property name="acl_write_roles">Manager</property>
+ </field>
+ <field name="sn" meta_type="CPS String Field">
+  <property name="acl_write_roles">Manager; Owner; SectionOfficer</property>
+ </field>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/payment.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/payment.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/payment.xml	(revision 2226)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="payment" meta_type="CPS Schema">
+  <field name="date" meta_type="CPS DateTime Field"/>
+  <field name="type_code" meta_type="CPS String Field"/>
+  <field name="type_description" meta_type="CPS String Field" >
+    <property name="is_searchabletext">True</property>
+  </field> 
+  <field name="amount" meta_type="CPS String Field"/>
+  <field name="resp_pay_reference" meta_type="CPS String Field"/>
+  <field name="resp_desc" meta_type="CPS String Field">
+    <property name="is_searchabletext">True</property>
+  </field> 
+  <field name="order_id" meta_type="CPS String Field"/>
+  <field name="resp_code" meta_type="CPS String Field"/>
+  <field name="resp_card_num" meta_type="CPS String Field"/>
+  <field name="resp_approved_amount" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/schema.xsl
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/schema.xsl	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/schema.xsl	(revision 2226)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:output method="html"/>
+  <xsl:template match="/">
+    <html>
+      <head>
+        <title>
+          <xsl:value-of select="object/name"/>
+        </title>
+        <link rel="stylesheet" type="text/css" media="all"
+              href="../xsl.css" />      
+      </head>
+      <body>
+        <xsl:for-each select="object">
+          <h2>
+            Schema: <xsl:value-of select="@name"/>
+          </h2> 
+        </xsl:for-each>
+        <h1>Fields</h1>
+        <table>
+          <tr>
+            <th>Id</th>
+            <th>Type</th>
+            <th>default</th>
+          </tr>
+          <xsl:for-each select="object/field">
+            <xsl:sort select="@name"
+                      order="ascending" />
+            <xsl:variable name="color">
+              <xsl:choose>
+                <xsl:when test="position() mod 2 = 0">
+                  <xsl:text>#ffffff</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>#eeeeee</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+            <tr style="background-color:{$color}">
+              <td colspan="">
+                <xsl:value-of select="@name"/>
+              </td>
+              <td colspan="">
+                <xsl:value-of select="@meta_type"/>
+              </td>
+              <xsl:for-each select="property">
+                <td>
+                  <xsl:value-of select="@name"/>: <xsl:value-of select="text()"/>
+                </td>
+              </xsl:for-each>
+            </tr>
+          </xsl:for-each>
+        </table>
+      </body>
+    </html>
+  </xsl:template>
+</xsl:stylesheet>
+  
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/scratch_card_batch.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/scratch_card_batch.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/scratch_card_batch.xml	(revision 2226)
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="scratch_card_batch" meta_type="CPS Schema">
+ <field name="batch_no" meta_type="CPS Int Field"/>
+ <field name="cost" meta_type="CPS Float Field"/>
+ <field name="no_of_pins" meta_type="CPS Int Field">
+  <property name="default_expr">python:1000</property>
+ </field>
+ <field name="prefix" meta_type="CPS String Field"/>
+ <field name="sold_by" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/student.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/student.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/student.xml	(revision 2226)
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<object name="student" meta_type="CPS Schema">
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_accommodation.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_accommodation.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_accommodation.xml	(revision 2226)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="student_accommodation" meta_type="CPS Schema">
+ <field name="acco_maint_date" meta_type="CPS DateTime Field"/>
+ <field name="acco_maint_code" meta_type="CPS String Field"/>
+ <field name="acco_maint_fee" meta_type="CPS String Field"/>
+ <field name="acco_maint_sc_pin" meta_type="CPS String Field"/>
+ <field name="acco_res_date" meta_type="CPS DateTime Field"/>
+ <field name="acco_res_sc_pin" meta_type="CPS String Field"/>
+ <field name="bed" meta_type="CPS String Field"/>
+ <field name="session" meta_type="CPS String Field"/>
+ <field name="student_status" meta_type="CPS String Field"/> 
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_application.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_application.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_application.xml	(revision 2226)
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="student_application" meta_type="CPS Schema">
+ <field name="app_ac_date" meta_type="CPS DateTime Field"/>
+ <field name="app_ac_pin" meta_type="CPS String Field"/>
+ <field name="app_email" meta_type="CPS String Field"/>
+ <field name="app_mobile" meta_type="CPS String Field"/>
+ <field name="entry_mode" meta_type="CPS String Field"/>
+ <field name="entry_session" meta_type="CPS String Field"/>
+ <field name="objection_date" meta_type="CPS DateTime Field"/>
+ <field name="jamb_age" meta_type="CPS Int Field"/>
+ <field name="jamb_first_cos" meta_type="CPS String Field"/>
+ <field name="jamb_first_uni" meta_type="CPS String Field"/>
+ <field name="jamb_first_faculty" meta_type="CPS String Field"/>
+ <field name="jamb_firstname" meta_type="CPS String Field"/>
+ <field name="jamb_lastname" meta_type="CPS String Field">
+  <property name="is_searchabletext">True</property>
+ </field>
+ <field name="jamb_lga" meta_type="CPS String Field"/>
+ <field name="jamb_middlename" meta_type="CPS String Field"/>
+ <field name="jamb_reg_no" meta_type="CPS String Field">
+  <property name="is_searchabletext">True</property>
+ </field>
+ <field name="jamb_score" meta_type="CPS String Field"/>
+ <field name="jamb_second_cos" meta_type="CPS String Field"/>
+ <field name="jamb_second_uni" meta_type="CPS String Field"/>
+ <field name="jamb_faculty_uni" meta_type="CPS String Field"/>
+ <field name="jamb_sex" meta_type="CPS String Field"/>
+ <field name="jamb_state" meta_type="CPS String Field"/>
+ <field name="passport" meta_type="CPS Image Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_change_password.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_change_password.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_change_password.xml	(revision 2226)
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="student_password_change" meta_type="CPS Schema">
+ <field name="old_password" meta_type="CPS String Field"/>
+ <field name="password" meta_type="CPS String Field"/>
+ <field name="repeat_password" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_clearance.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_clearance.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_clearance.xml	(revision 2226)
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="student_clearance" meta_type="CPS Schema">
+
+ <field name="clr_ac_pin" meta_type="CPS String Field">
+  <property name="is_searchabletext">False</property>
+ </field>
+
+ <field name="matric_no" meta_type="CPS String Field">
+   <property name="is_searchabletext">True</property>
+ </field>
+
+ <field name="matric_no_history" meta_type="CPS String List Field">
+ </field>
+
+ <field name="entry_date" meta_type="CPS DateTime Field"/>
+ <field name="request_date" meta_type="CPS DateTime Field"/>
+ <field name="cleared_date" meta_type="CPS DateTime Field"/>
+
+ <field name="birthday" meta_type="CPS DateTime Field"/>
+ <field name="lga" meta_type="CPS String Field"/>
+ <field name="nationality" meta_type="CPS String Field"/>
+
+ <field name="fst_sit_fname" meta_type="CPS String Field"/>
+ <field name="fst_sit_no" meta_type="CPS String Field"/>
+ <field name="fst_sit_date" meta_type="CPS DateTime Field"/>
+ <field name="fst_sit_type" meta_type="CPS String Field"/>
+ <field name="fst_sit_results" meta_type="CPS String List Field"/>
+ <field name="fst_sit_scan" meta_type="CPS Image Field"/>
+
+
+ <field name="scd_sit_fname" meta_type="CPS String Field"/>
+ <field name="scd_sit_no" meta_type="CPS String Field"/>
+ <field name="scd_sit_date" meta_type="CPS DateTime Field"/>
+ <field name="scd_sit_type" meta_type="CPS String Field"/>
+ <field name="scd_sit_results" meta_type="CPS String List Field"/>
+ <field name="scd_sit_scan" meta_type="CPS Image Field"/>
+
+ <field name="alr_fname" meta_type="CPS String Field"/>
+ <field name="alr_no" meta_type="CPS String Field"/>
+ <field name="alr_date" meta_type="CPS DateTime Field"/>
+ <field name="alr_results" meta_type="CPS String List Field"/>
+ <field name="alr_scan" meta_type="CPS Image Field"/>
+
+ <field name="hq_type" meta_type="CPS String Field"/>
+ <field name="hq_grade" meta_type="CPS String Field"/>
+ <field name="hq_school" meta_type="CPS String Field"/>
+ <field name="hq_matric_no" meta_type="CPS String Field"/>
+ <field name="hq_session" meta_type="CPS String Field"/>
+ <field name="hq_disc" meta_type="CPS String Field"/>
+ <field name="hq_scan" meta_type="CPS Image Field"/>
+
+ <field name="birth_certificate" meta_type="CPS Image Field"/>
+ <field name="lga_ident" meta_type="CPS Image Field"/>
+ <field name="acc_let" meta_type="CPS Image Field"/>
+ <field name="jamb_slip" meta_type="CPS Image Field"/>
+ <field name="cert" meta_type="CPS Image Field"/>
+ <field name="evid" meta_type="CPS Image Field"/>
+ <field name="jamb_let" meta_type="CPS Image Field"/>
+ <field name="res_stat" meta_type="CPS Image Field"/>
+ <field name="ref_let" meta_type="CPS Image Field"/>
+ <field name="cred" meta_type="CPS Image Field"/>
+ <field name="stat_dec" meta_type="CPS Image Field"/>
+ <field name="age_dec" meta_type="CPS Image Field"/>
+ <field name="acc_inst" meta_type="CPS Image Field"/>
+
+ <field name="fst_ch" meta_type="CPS Boolean Field"/>
+ <field name="scd_ch" meta_type="CPS Boolean Field"/>
+ <field name="sup_adm" meta_type="CPS Boolean Field"/>
+ <field name="uniben" meta_type="CPS Boolean Field"/>
+
+ <field name="def_adm" meta_type="CPS Boolean Field"/>
+
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_course_result.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_course_result.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_course_result.xml	(revision 2226)
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="student_course_results" meta_type="CPS Schema">
+ <field name="code" meta_type="CPS String Field"/>
+ <field name="title" meta_type="CPS String Field"/>
+ <field name="credits" meta_type="CPS Int Field"/>
+ <field name="core_or_elective" meta_type="CPS Boolean Field"/>
+ <field name="carry_level" meta_type="CPS String Field"/>
+ <field name="grade" meta_type="CPS String Field"/>
+ <field name="score" meta_type="CPS Int Field"/>
+ <field name="status" meta_type="CPS String Field"/>
+ <field name="semester" meta_type="CPS Int Field">
+  <property name="default_expr">python:1</property>
+ </field>
+ <field name="passmark" meta_type="CPS Int Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_create.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_create.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_create.xml	(revision 2226)
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="student_create" meta_type="CPS Schema">
+ <field name="email" meta_type="CPS String Field"/>
+ <field name="entry_mode" meta_type="CPS String Field"/>
+ <field name="firstname" meta_type="CPS String Field"/>
+ <field name="lastname" meta_type="CPS String Field"/>
+ <field name="level" meta_type="CPS String Field"/>
+ <field name="matric_no" meta_type="CPS String Field"/>
+ <field name="jamb_reg_no" meta_type="CPS String Field"/> 
+ <field name="middlename" meta_type="CPS String Field"/>
+ <field name="sex" meta_type="CPS Boolean Field"/>
+ <field name="study_course" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_personal.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_personal.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_personal.xml	(revision 2226)
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="student_personal" meta_type="CPS Schema">
+
+ <field name="firstname" meta_type="CPS String Field">
+  <property name="is_searchabletext">True</property>
+ </field>
+ <field name="middlename" meta_type="CPS String Field">
+  <property name="is_searchabletext">True</property>
+ </field>
+ <field name="lastname" meta_type="CPS String Field">
+  <property name="is_searchabletext">True</property>
+ </field>
+ <field name="former_surname" meta_type="CPS String Field">
+  <property name="is_searchabletext">True</property>
+ </field>
+
+ <field name="sex" meta_type="CPS Boolean Field"/>
+
+ <field name="for_lga" meta_type="CPS String Field"/>
+ <field name="for_state" meta_type="CPS String Field"/>
+ <field name="marit_stat" meta_type="CPS Boolean Field"/>
+ <field name="religion" meta_type="CPS String Field"/>
+
+ <field name="perm_address" meta_type="CPS String Field"/>
+ <field name="perm_city" meta_type="CPS String Field"/>
+ <field name="campus_address" meta_type="CPS String Field"/>
+ <field name="phone" meta_type="CPS String Field"/>
+ <field name="email" meta_type="CPS String Field" />
+
+ <field name="next_kin_firstname" meta_type="CPS String Field"/>
+ <field name="next_kin_middlename" meta_type="CPS String Field"/>
+ <field name="next_kin_lastname" meta_type="CPS String Field"/>
+ <field name="next_kin_relation" meta_type="CPS String Field"/>
+ <field name="next_kin_address" meta_type="CPS String Field"/>
+ <field name="next_kin_city" meta_type="CPS String Field"/>
+ <field name="next_kin_state" meta_type="CPS String Field"/>
+ <field name="next_kin_email" meta_type="CPS String Field"/>
+ <field name="next_kin_phone" meta_type="CPS String Field"/>
+
+ <field name="sponsor_firstname" meta_type="CPS String Field"/>
+ <field name="sponsor_middlename" meta_type="CPS String Field"/>
+ <field name="sponsor_lastname" meta_type="CPS String Field"/>
+ <field name="sponsor_address" meta_type="CPS String Field"/>
+ <field name="sponsor_city" meta_type="CPS String Field"/>
+ <field name="sponsor_state" meta_type="CPS String Field"/>
+ <field name="sponsor_email" meta_type="CPS String Field"/>
+ <field name="sponsor_phone" meta_type="CPS String Field"/>
+
+ <field name="fst_best_lang" meta_type="CPS String Field"/>
+ <field name="scd_best_lang" meta_type="CPS String Field"/>
+ <field name="mother_tongue" meta_type="CPS String Field"/>
+ <field name="hall" meta_type="CPS String Field"/>
+ <field name="disabled" meta_type="CPS Boolean Field"/>
+ <field name="notes" meta_type="CPS String Field"/>
+
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_pume.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_pume.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_pume.xml	(revision 2226)
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="student_pume" meta_type="CPS Schema">
+ <field name="pume_eng_score" meta_type="CPS Float Field"/>
+ <field name="pume_gen_score" meta_type="CPS Float Field"/>
+ <field name="pume_math_score" meta_type="CPS Float Field"/>
+ <field name="pume_tot_score" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_returning.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_returning.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_returning.xml	(revision 2226)
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="student_returning" meta_type="CPS Schema">
+ <field name="email" meta_type="CPS String Field"/>
+ <field name="phone_nr" meta_type="CPS String Field"/>
+ <field name="secret" meta_type="CPS String Field"/>
+ <field name="matric_no" meta_type="CPS String Field"/>
+ <field name="jamb_reg_no" meta_type="CPS String Field"/>
+ <field name="password" meta_type="CPS Password Field"/>
+ <field name="repeat_password" meta_type="CPS Password Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_search.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_search.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_search.xml	(revision 2226)
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="student_search" meta_type="CPS Schema">
+ <field name="review_state" meta_type="CPS String Field"/>
+ <field name="search_mode" meta_type="CPS String Field"/>
+ <field name="search_string" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_study_course.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_study_course.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_study_course.xml	(revision 2226)
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="student_study_course" meta_type="CPS Schema">
+  <field name="title" meta_type="CPS String Field"/>
+  <field name="study_course" meta_type="CPS String Field">
+    <property name="is_searchabletext">True</property>
+  </field>
+  <field name="study_course_history" meta_type="CPS String List Field">
+  </field>
+  <field name="current_session" meta_type="CPS String Field"/>
+  <field name="current_mode" meta_type="CPS String Field"/>
+  <field name="current_level" meta_type="CPS String Field"/>
+  <field name="current_verdict" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_study_level.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_study_level.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/student_study_level.xml	(revision 2226)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="student_study_level" meta_type="CPS Schema">
+ <field name="code" meta_type="CPS String Field"/>
+ <field name="session" meta_type="CPS String Field"/>
+ <field name="verdict" meta_type="CPS String Field"/>
+ <field name="validated_by" meta_type="CPS String Field"/>
+ <field name="validation_date" meta_type="CPS DateTime Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/students.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/students.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/students.xml	(revision 2226)
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="students" meta_type="CPS Schema"/>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/study_level.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/study_level.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/study_level.xml	(revision 2226)
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="study_level" meta_type="CPS Schema">
+ <field name="code" meta_type="CPS String Field"/>
+</object>
+
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/university.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/university.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/university.xml	(revision 2226)
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="university" meta_type="CPS Schema"/>
Index: WAeUP_SRP/trunk_not_used/profiles/default/schemas/waeup_common.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/schemas/waeup_common.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/schemas/waeup_common.xml	(revision 2226)
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="waeup_common" meta_type="CPS Schema">
+ <field name="code" meta_type="CPS String Field"/>
+ <field name="title" meta_type="CPS String Field"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/skins.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/skins.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/skins.xml	(revision 2226)
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<object name="portal_skins" meta_type="CMF Skins Tool" allow_any="False"
+   cookie_persistence="False" default_skin="CPSSkins"
+   request_varname="portal_skin">
+ <object name="waeup_custom" meta_type="Filesystem Directory View"
+    directory="WAeUP_SRP/skins/waeup_custom"/>
+ <object name="waeup_default" meta_type="Filesystem Directory View"
+    directory="WAeUP_SRP/skins/waeup_default"/>
+ <object name="waeup_design" meta_type="Filesystem Directory View"
+    directory="WAeUP_SRP/skins/waeup_design"/>
+ <object name="waeup_images" meta_type="Filesystem Directory View"
+    directory="WAeUP_SRP/skins/waeup_images"/>
+ <object name="waeup_directory" meta_type="Filesystem Directory View"
+    directory="WAeUP_SRP/skins/waeup_directory"/>
+ <object name="waeup_epayment" meta_type="Filesystem Directory View"
+    directory="WAeUP_SRP/skins/waeup_epayment"/>
+ <object name="waeup_academics" meta_type="Filesystem Directory View"
+    directory="WAeUP_SRP/skins/waeup_academics"/>
+ <object name="waeup_accommodation" meta_type="Filesystem Directory View"
+    directory="WAeUP_SRP/skins/waeup_accommodation"/>
+ <object name="waeup_pins" meta_type="Filesystem Directory View"
+    directory="WAeUP_SRP/skins/waeup_pins"/>
+ <object name="waeup_student" meta_type="Filesystem Directory View"
+    directory="WAeUP_SRP/skins/waeup_student"/>
+ <object name="waeup_utilities" meta_type="Filesystem Directory View"
+    directory="WAeUP_SRP/skins/waeup_utilities"/>
+ <object name="waeup_documents" meta_type="Filesystem Directory View"
+    directory="WAeUP_SRP/skins/waeup_documents"/>    
+    
+ <skin-path name="CPSSkins">
+  <layer name="waeup_custom" insert-after="custom"/>
+  <layer name="waeup_default" insert-after="waeup_custom"/>
+  <layer name="waeup_directory" insert-after="waeup_custom"/>
+  <layer name="waeup_epayment" insert-after="waeup_custom"/>
+  <layer name="waeup_pins" insert-after="waeup_custom"/>
+  <layer name="waeup_student" insert-after="waeup_custom"/>
+  <layer name="waeup_academics" insert-after="waeup_custom"/>
+  <layer name="waeup_documents" insert-after="waeup_custom"/>
+  <layer name="waeup_accommodation" insert-after="waeup_custom"/>
+  <layer name="waeup_utilities" insert-after="waeup_custom"/>
+  <layer name="waeup_images" insert-after="waeup_custom"/>
+  <layer name="waeup_design" insert-after="waeup_custom"/>
+  <layer name="CPSSkins" remove="" />
+  <layer name="cpsskins_icons" remove="" />
+  <layer name="cpsskins_cps3" remove="" />
+  <layer name="cpsskins_cmf" remove="" />
+
+ </skin-path>
+ <skin-path name="CPSSkins-macroless">
+  <layer name="waeup_custom" insert-after="custom"/>
+  <layer name="waeup_default" insert-after="waeup_custom"/>
+  <layer name="waeup_directory" insert-after="waeup_custom"/>
+  <layer name="waeup_epayment" insert-after="waeup_custom"/>
+  <layer name="waeup_pins" insert-after="waeup_custom"/>
+  <layer name="waeup_student" insert-after="waeup_custom"/>
+  <layer name="waeup_academics" insert-after="waeup_custom"/>
+  <layer name="waeup_documents" insert-after="waeup_custom"/>
+  <layer name="waeup_accommodation" insert-after="waeup_custom"/>
+  <layer name="waeup_utilities" insert-after="waeup_custom"/>
+  <layer name="waeup_images" insert-after="waeup_custom"/>
+  <layer name="waeup_design" insert-after="waeup_custom"/>
+  <layer name="CPSSkins" remove="" />
+  <layer name="cpsskins_icons" remove="" />
+  <layer name="cpsskins_cps3" remove="" />
+  <layer name="cpsskins_cmf" remove="" />
+ </skin-path>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/skins/custom.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/skins/custom.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/skins/custom.xml	(revision 2226)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<object name="custom" meta_type="Folder">
+ <property name="title"></property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_academics.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_academics.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_academics.xml	(revision 2226)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<object name="waeup_academics" meta_type="Folder">
+ <property name="title"></property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_accommodation.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_accommodation.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_accommodation.xml	(revision 2226)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<object name="waeup_accommodation" meta_type="Folder">
+ <property name="title"></property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_custom.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_custom.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_custom.xml	(revision 2226)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<object name="waeup_custom" meta_type="Folder">
+ <property name="title"></property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_default.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_default.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_default.xml	(revision 2226)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<object name="waeup_default" meta_type="Folder">
+ <property name="title"></property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_directory.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_directory.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_directory.xml	(revision 2226)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<object name="waeup_directory" meta_type="Folder">
+ <property name="title"></property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_pins.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_pins.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_pins.xml	(revision 2226)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<object name="waeup_pins" meta_type="Folder">
+ <property name="title"></property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_student.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_student.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/skins/waeup_student.xml	(revision 2226)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<object name="waeup_student" meta_type="Folder">
+ <property name="title"></property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/students_catalog.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/students_catalog.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/students_catalog.xml	(revision 2226)
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="catalog.xsl"?>
+<object name="students_catalog" meta_type="WAeUP Table">
+ <object name="plaintext_lexicon" meta_type="ZCTextIndex Lexicon">
+  <element name="Whitespace splitter" group="Word Splitter"/>
+  <element name="Case Normalizer" group="Case Normalizer"/>
+  <element name="Remove listed stop words only" group="Stop Words"/>
+ </object>
+ <index name="id" meta_type="FieldIndex">
+  <indexed_attr value="id"/>
+ </index>
+ <index name="review_state" meta_type="FieldIndex">
+  <indexed_attr value="review_state"/>
+ </index>
+ <index name="name" meta_type="TextIndex">
+  <indexed_attr value="name"/>
+ </index>
+ <index name="perm_address" meta_type="TextIndex">
+  <indexed_attr value="perm_address"/>
+ </index>
+ <index name="jamb_reg_no" meta_type="FieldIndex">
+  <indexed_attr value="jamb_reg_no"/>
+ </index>
+ <index name="matric_no" meta_type="FieldIndex">
+  <indexed_attr value="matric_no"/>
+ </index>
+ <index name="faculty" meta_type="FieldIndex">
+  <indexed_attr value="faculty"/>
+ </index>
+ <index name="entry_mode" meta_type="FieldIndex">
+  <indexed_attr value="entry_mode"/>
+ </index>
+ <index name="entry_session" meta_type="FieldIndex">
+  <indexed_attr value="entry_session"/>
+ </index>
+ <index name="session" meta_type="FieldIndex">
+  <indexed_attr value="session"/>
+ </index>
+ <index name="department" meta_type="FieldIndex">
+  <indexed_attr value="department"/>
+ </index>
+ <index name="level" meta_type="FieldIndex">
+  <indexed_attr value="level"/>
+ </index>
+ <index name="end_level" meta_type="FieldIndex">
+  <indexed_attr value="end_level"/>
+ </index>
+ <index name="lga" meta_type="FieldIndex">
+  <indexed_attr value="lga"/>
+ </index>
+ <index name="mode" meta_type="FieldIndex">
+  <indexed_attr value="mode"/>
+ </index>
+ <index name="verdict" meta_type="FieldIndex">
+  <indexed_attr value="verdict"/>
+ </index>
+ <index name="course" meta_type="FieldIndex">
+  <indexed_attr value="course"/>
+ </index>
+ <index name="registered_courses" meta_type="KeywordIndex">
+  <indexed_attr value="registered_courses"/>
+ </index>
+ <column value="id"/>
+ <column value="review_state"/>
+ <column value="matric_no"/>
+ <column value="jamb_reg_no"/>
+ <column value="name"/>
+ <column value="sex"/>
+ <column value="faculty"/>
+ <column value="department"/>
+ <column value="course"/>
+ <column value="registered_courses"/>
+ <column value="lga"/>
+ <column value="perm_address"/>
+ <column value="email"/>
+ <column value="phone"/>
+ <column value="level"/>
+ <column value="end_level"/>
+ <column value="mode"/>
+ <column value="verdict"/>
+ <column value="entry_mode"/>
+ <column value="entry_session"/>
+ <column value="session"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/themes.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/themes.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/themes.xml	(revision 2226)
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<object name="portal_themes" meta_type="Portal Themes Tool">
+ <property name="accesskey">*</property>
+ <property name="debug_mode">True</property>
+ <property name="method_themes"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/toolset.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/toolset.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/toolset.xml	(revision 2226)
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<tool-setup>
+ <required tool_id="portal_catalog"
+           class="Products.QueueCatalog.QueueCatalog"/>
+ <required tool_id="portal_catalog_real"
+           class="Products.CMFCore.CatalogTool.CatalogTool"/>
+ <required tool_id="portal_accommodation"
+           class="Products.WAeUP_SRP.WAeUPTables.AccommodationTable"/>
+ <required tool_id="courses_catalog"
+           class="Products.WAeUP_SRP.WAeUPTables.CoursesCatalog"/>
+ <required tool_id="payments_catalog"
+           class="Products.WAeUP_SRP.WAeUPTables.PaymentsCatalog"/>
+ <required tool_id="online_payments_import"
+           class="Products.WAeUP_SRP.WAeUPTables.OnlinePaymentsImport"/>
+ <required tool_id="portal_pins"
+           class="Products.WAeUP_SRP.WAeUPTables.PinTable"/>
+ <required tool_id="portal_pumeresults"
+           class="Products.WAeUP_SRP.WAeUPTables.PumeResultsTable"/>
+ <required tool_id="returning_import"
+           class="Products.WAeUP_SRP.WAeUPTables.ReturningImport"/>
+ <required tool_id="results_import"
+           class="Products.WAeUP_SRP.WAeUPTables.ResultsImport"/>
+ <required tool_id="students_catalog"
+           class="Products.WAeUP_SRP.WAeUPTables.StudentsCatalog"/>
+ <required tool_id="applicants_catalog"
+           class="Products.WAeUP_SRP.WAeUPTables.ApplicantsCatalog"/>
+ <required tool_id="course_results"
+           class="Products.WAeUP_SRP.WAeUPTables.CourseResults"/>
+ <required tool_id="waeup_tool"
+           class="Products.WAeUP_SRP.WAeUPTool.WAeUPTool"/>
+</tool-setup>
Index: WAeUP_SRP/trunk_not_used/profiles/default/trees.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/trees.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/trees.xml	(revision 2226)
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<object name="portal_trees" meta_type="CPS Trees Tool">
+ <object name="sections" meta_type="CPS Tree Cache"/>
+ <object name="workspaces" meta_type="CPS Tree Cache"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/trees/sections.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/trees/sections.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/trees/sections.xml	(revision 2226)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<object name="sections" meta_type="CPS Tree Cache">
+ <property name="title">sections Cache</property>
+ <property name="root">sections</property>
+ <property name="type_names">
+  <element value="Section"/>
+  <element value="FAQ"/>
+  <element value="ImageGallery"/>
+  <element value="Glossary"/>
+  <element value="Book"/>
+  <element value="Chapter"/>
+  <element value="Wiki"/>
+ </property>
+ <property name="meta_types">
+  <element value="CPS Proxy Folder"/>
+  <element value="CPS Proxy Document"/>
+  <element value="CPS Proxy Folderish Document"/>
+  <element value="CPS Proxy BTree Folder"/>
+  <element value="CPS Proxy BTree Folderish Folder"/>
+ </property>
+ <property name="excluded_rpaths"/>
+ <property name="info_method">getFolderInfo</property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/trees/workspaces.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/trees/workspaces.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/trees/workspaces.xml	(revision 2226)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<object name="workspaces" meta_type="CPS Tree Cache">
+ <property name="title">workspaces Cache</property>
+ <property name="root">workspaces</property>
+ <property name="type_names">
+  <element value="Workspace"/>
+  <element value="FAQ"/>
+  <element value="ImageGallery"/>
+  <element value="Glossary"/>
+  <element value="Book"/>
+  <element value="Chapter"/>
+  <element value="Wiki"/>
+ </property>
+ <property name="meta_types">
+  <element value="CPS Proxy Folder"/>
+  <element value="CPS Proxy Document"/>
+  <element value="CPS Proxy Folderish Document"/>
+  <element value="CPS Proxy BTree Folder"/>
+  <element value="CPS Proxy BTree Folderish Folder"/>
+ </property>
+ <property name="excluded_rpaths"/>
+ <property name="info_method">getFolderInfo</property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types.xml	(revision 2226)
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="content.xsl"?>
+<object name="portal_types" meta_type="CMF Types Tool">
+ <property name="title"></property>
+ <object name="AcademicsFolder" meta_type="CPS Flexible Type Information"/>
+ <object name="AccoFolder" meta_type="CPS Flexible Type Information"/>
+ <object name="AccoHall" meta_type="CPS Flexible Type Information"/>
+ <object name="CertificatesFolder" meta_type="CPS Flexible Type Information"/>
+ <object name="Certificate" meta_type="CPS Flexible Type Information"/>
+ <object name="CoursesFolder" meta_type="CPS Flexible Type Information"/>
+ <object name="Course" meta_type="CPS Flexible Type Information"/>
+ <object name="CertificateCourse" meta_type="CPS Flexible Type Information"/>
+ <object name="Department" meta_type="CPS Flexible Type Information"/>
+ <object name="Faculty" meta_type="CPS Flexible Type Information"/>
+ <object name="PaymentsFolder" meta_type="CPS Flexible Type Information"/>
+ <object name="Payment" meta_type="CPS Flexible Type Information"/>
+ <object name="ScratchCardBatch" meta_type="CPS Flexible Type Information"/>
+ <object name="ScratchCardBatchesFolder" meta_type="CPS Flexible Type Information"/>
+ <object name="Student" meta_type="CPS Flexible Type Information"/>
+ <object name="StudentAccommodation" meta_type="CPS Flexible Type Information"/>
+ <object name="StudentStudyLevel" meta_type="CPS Flexible Type Information"/>
+ <object name="StudentStudyCourse" meta_type="CPS Flexible Type Information"/>
+ <object name="StudentClearance" meta_type="CPS Flexible Type Information"/>
+ <object name="StudentCourseResult" meta_type="CPS Flexible Type Information"/>
+ <object name="StudentPersonal" meta_type="CPS Flexible Type Information"/>
+ <object name="StudentPume" meta_type="CPS Flexible Type Information"/>
+ <object name="StudentApplication" meta_type="CPS Flexible Type Information"/>
+ <object name="StudentSemester" meta_type="CPS Flexible Type Information"/>
+ <object name="StudentsFolder" meta_type="CPS Flexible Type Information"/>
+ <object name="ScratchCardBatchesFolder" meta_type="CPS Flexible Type Information"/>
+ <object name="ScratchCardBatch" meta_type="CPS Flexible Type Information"/>
+ <object name="StudyLevel" meta_type="CPS Flexible Type Information"/>
+ <object name="University" meta_type="CPS Flexible Type Information"/>
+ <object name="DocumentsFolder" meta_type="CPS Flexible Type Information"/>
+ <object name="WAeUPDocument" meta_type="CPS Flexible Type Information"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/AcademicsFolder.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/AcademicsFolder.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/AcademicsFolder.xml	(revision 2226)
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="AcademicsFolder" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Academics Folder</property>
+ <property name="description">The WAeUP Academics Folder</property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">AcademicsFolder</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addAcademicsFolder</property>
+ <property name="immediate_view">academics_index</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">False</property>
+ <property name="allowed_content_types">
+  <element value="Faculty"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="metadata"/>
+  <element value="common"/>
+  <element value="folder"/>
+ </property>
+ <property name="layouts"/>
+ <property name="layout_clusters">
+  <element value="metadata:metadata"/>
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="academics_index"/>
+ <alias from="view" to="academics_index"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/academics_index" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Add Faculty" action_id="new_entry" category="object"
+    condition_expr="here/isSectionOfficer"
+    url_expr="string:${object/absolute_url}/content_create?type_name=Faculty"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_folder_contents" action_id="contents" category="object"
+    condition_expr="" url_expr="string:${object/absolute_url}/folder_contents"
+    visible="False"/>
+ <action title="Delegate" action_id="localroles" category="object"
+    condition_expr="here/isSectionOfficer" url_expr="string:${object_url}/folder_localrole_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/AccoFolder.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/AccoFolder.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/AccoFolder.xml	(revision 2226)
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="AccoFolder" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Accommodation Folder</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">AccoFolder</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addAccoFolder</property>
+ <property name="immediate_view">acco_folder_index</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="AccoHall"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+ </property>
+ <property name="layouts"/>
+ <property name="layout_clusters">
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="acco_folder_index"/>
+ <alias from="view" to="acco_folder_index"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/acco_folder_index" visible="True">
+  <permission value="View"/>
+ </action>
+<action title="Add Hall" action_id="new_entry"
+    category="object" condition_expr=""
+    url_expr="string:${object_url}/content_create?type_name=AccoHall"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+<action title="Update Bed List" action_id="new_bed_list"
+    category="object" condition_expr=""
+    url_expr="string:${object_url}/generateFreeBedsList"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Delegate" action_id="localroles" category="object"
+    condition_expr="here/isSectionOfficer" url_expr="string:${object_url}/folder_localrole_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/AccoHall.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/AccoHall.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/AccoHall.xml	(revision 2226)
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="AccoHall" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP AccoHall</property>
+ <property name="description"></property>
+ <property name="content_icon">student.gif</property>
+ <property name="content_meta_type">AccoHall</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addAccoHall</property>
+ <property name="immediate_view">acco_folder_index</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="metadata"/>
+  <element value="common"/>
+  <element value="acco_hall"/>
+ </property>
+ <property name="layouts">
+  <element value="acco_hall"/>
+ </property>
+ <property name="layout_clusters">
+  <element value="metadata:metadata"/>
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="acco_folder_index"/>
+ <alias from="view" to="acco_folder_index"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/acco_folder_index" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="" url_expr="string:${object_url}/waeup_edit_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Allocate/Release Reserved Bed" action_id="allocate_reserved_bed" category="object"
+    condition_expr="" url_expr="string:${object_url}/allocate_reserved_bed"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/Certificate.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/Certificate.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/Certificate.xml	(revision 2226)
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="Certificate" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Certificate</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">Certificate</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addCertificate</property>
+ <property name="immediate_view">folder_view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="StudyLevel"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="metadata"/>
+  <element value="common"/>
+  <element value="certificate"/>
+ </property>
+ <property name="layouts">
+  <element value="certificate"/>
+ </property>
+ <property name="layout_clusters">
+  <element value="metadata:metadata"/>
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="academics_index"/>
+ <alias from="create_do" to="waeup_document_create_do"/>
+ <alias from="view" to="academics_index"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/academics_index" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="" url_expr="string:${object_url}/waeup_edit_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="action_metadata" action_id="metadata" category="object"
+    condition_expr="" url_expr="string:${object_url}/cpsdocument_metadata"
+    visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Delegate" action_id="localroles" category="object"
+    condition_expr="" url_expr="string:${object_url}/folder_localrole_form"
+    visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Add Level" action_id="new_entry" category="object"
+    condition_expr=""
+    url_expr="string:${object/absolute_url}/content_create?type_name=StudyLevel"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/CertificateCourse.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/CertificateCourse.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/CertificateCourse.xml	(revision 2226)
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="CertificateCourse" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Certificate Course </property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">CertificateCourse</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addCertificateCourse</property>
+ <property name="immediate_view">academics_index</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="metadata"/>
+  <element value="common"/>
+  <element value="certificate_course"/>
+ </property>
+ <property name="layouts">
+  <element value="certificate_course"/>
+ </property>
+ <property name="layout_clusters">
+  <element value="metadata:metadata"/>
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="academics_index"/>
+ <alias from="create_do" to="waeup_document_create_do"/>
+ <alias from="view" to="academics_index"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/academics_index" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="" url_expr="string:${object_url}/waeup_edit_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="action_metadata" action_id="metadata" category="object"
+    condition_expr="" url_expr="string:${object_url}/cpsdocument_metadata"
+    visible="False"/>
+ <action title="Delegate" action_id="localroles" category="object"
+    condition_expr="" url_expr="string:${object_url}/folder_localrole_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/CertificatesFolder.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/CertificatesFolder.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/CertificatesFolder.xml	(revision 2226)
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="CertificatesFolder" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Certificates Folder</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">CertificatesFolder</property>
+ <property name="product">CPSDefault</property>
+ <property name="factory">addFolder</property>
+ <property name="immediate_view">academics_index</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="Certificate"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">False</property>
+ <property name="schemas">
+  <element value="common"/>
+  <element value="metadata"/>
+ </property>
+ <property name="layouts" />
+ <property name="layout_clusters">
+  <element value="metadata:metadata"/>
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="academics_index"/>
+ <alias from="view" to="academics_index"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/academics_index" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Delegate" action_id="localroles" category="object"
+    condition_expr="" url_expr="string:${object_url}/folder_localrole_form"
+    visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Add Certificate" action_id="new_entry" category="object"
+    condition_expr=""
+    url_expr="string:${object/absolute_url}/content_create?type_name=Certificate"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/Course.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/Course.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/Course.xml	(revision 2226)
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="Course" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Course</property>
+ <property name="description"></property>
+ <property name="content_icon">student.gif</property>
+ <property name="content_meta_type">Course</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addCourse</property>
+ <property name="immediate_view">academics_index</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="metadata"/>
+  <element value="common"/>
+  <element value="course"/>
+ </property>
+ <property name="layouts">
+  <element value="course"/>
+ </property>
+ <property name="layout_clusters">
+  <element value="metadata:metadata"/>
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="academics_index"/>
+ <alias from="create_do" to="waeup_document_create_do"/>
+ <alias from="view" to="academics_index"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/academics_index" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="" url_expr="string:${object_url}/waeup_edit_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="action_metadata" action_id="metadata" category="object"
+    condition_expr="" url_expr="string:${object_url}/cpsdocument_metadata"
+    visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Delegate" action_id="localroles" category="object"
+    condition_expr="" url_expr="string:${object_url}/folder_localrole_form"
+    visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/CoursesFolder.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/CoursesFolder.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/CoursesFolder.xml	(revision 2226)
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="CoursesFolder" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Courses Folder</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">CoursesFolder</property>
+ <property name="product">CPSDefault</property>
+ <property name="factory">addFolder</property>
+ <property name="immediate_view">academics_index</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="Course"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">False</property>
+ <property name="schemas">
+  <element value="common"/>
+  <element value="metadata"/>
+ </property>
+ <property name="layouts" />
+ <property name="layout_clusters">
+  <element value="metadata:metadata"/>
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="academics_index"/>
+ <alias from="view" to="academics_index"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/academics_index" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Delegate" action_id="localroles" category="object"
+    condition_expr="" url_expr="string:${object_url}/folder_localrole_form"
+    visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Add Course" action_id="new_entry" category="object"
+    condition_expr=""
+    url_expr="string:${object/absolute_url}/content_create?type_name=Course"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/Department.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/Department.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/Department.xml	(revision 2226)
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="Department" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Department</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">Department</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addDepartment</property>
+ <property name="immediate_view">academics_index</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="CertificatesFolder"/>
+  <element value="CoursesFolder"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type">btreefolder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="metadata"/>
+  <element value="common"/>
+  <element value="department"/>
+ </property>
+ <property name="layouts">
+  <element value="department"/>
+ </property>
+ <property name="layout_clusters">
+  <element value="metadata:metadata"/>
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="academics_index"/>
+ <alias from="create_do" to="waeup_document_create_do"/>
+ <alias from="created" to="department_created"/>
+ <alias from="view" to="academics_index"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/academics_index" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="" url_expr="string:${object_url}/waeup_edit_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="action_metadata" action_id="metadata" category="object"
+    condition_expr="" url_expr="string:${object_url}/cpsdocument_metadata"
+    visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Delegate" action_id="localroles" category="object"
+    condition_expr="" url_expr="string:${object_url}/folder_localrole_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/DocumentsFolder.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/DocumentsFolder.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/DocumentsFolder.xml	(revision 2226)
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="DocumentsFolder" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Documents Folder</property>
+ <property name="description">The WAeUP Documents Folder</property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">DocumentsFolder</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addDocumentsFolder</property>
+ <property name="immediate_view">documents_index</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">False</property>
+ <property name="allowed_content_types">
+  <element value="WAeUPDocument"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="metadata"/>
+  <element value="common"/>
+  <element value="folder"/>
+ </property>
+ <property name="layouts"/>
+ <property name="layout_clusters">
+  <element value="metadata:metadata"/>
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="documents_index"/>
+ <alias from="view" to="documents_index"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/documents_index" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Add Document" action_id="new_entry" category="object"
+    condition_expr="here/isSectionOfficer"
+    url_expr="string:${object/absolute_url}/content_create?type_name=WAeUPDocument"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_folder_contents" action_id="contents" category="object"
+    condition_expr="" url_expr="string:${object/absolute_url}/folder_contents"
+    visible="False"/>
+ <action title="Delegate" action_id="localroles" category="object"
+    condition_expr="here/isSectionOfficer" url_expr="string:${object_url}/folder_localrole_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/Faculty.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/Faculty.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/Faculty.xml	(revision 2226)
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="Faculty" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Faculty</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">Faculty</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addFaculty</property>
+ <property name="immediate_view">academics_index</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="Department"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type">btreefolder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="metadata"/>
+  <element value="common"/>
+  <element value="faculty"/>
+ </property>
+ <property name="layouts">
+  <element value="faculty"/>
+ </property>
+ <property name="layout_clusters">
+  <element value="metadata:metadata"/>
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="academics_index"/>
+ <alias from="create_do" to="waeup_document_create_do"/>
+ <alias from="edit" to=""/>
+ <alias from="edit_form" to=""/>
+ <alias from="view" to="academics_index"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/academics_index" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="" url_expr="string:${object_url}/waeup_edit_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="action_metadata" action_id="metadata" category="object"
+    condition_expr="" url_expr="string:${object_url}/cpsdocument_metadata"
+    visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Delegate" action_id="localroles" category="object"
+    condition_expr="" url_expr="string:${object_url}/folder_localrole_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Add Department" action_id="new_entry" category="object"
+    condition_expr=""
+    url_expr="string:${object/absolute_url}/content_create?type_name=Department"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/Payment.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/Payment.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/Payment.xml	(revision 2226)
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="Payment" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Payment Data</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">Payment</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addPayment</property>
+ <property name="immediate_view">student_index</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">False</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="payment"/>
+ </property>
+ <property name="layouts">
+  <element value="payment"/>
+ </property>
+ <property name="layout_clusters"/>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="student_index"/>
+ <alias from="view" to="student_index"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/student_index" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="" url_expr="string:${object_url}/waeup_edit_form"
+    visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/PaymentsFolder.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/PaymentsFolder.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/PaymentsFolder.xml	(revision 2226)
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="PaymentsFolder" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Payments Folder</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">PaymentsFolder</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addPaymentsFolder</property>
+ <property name="immediate_view">student_index</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="Payment"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type">btreefolder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="metadata"/>
+  <element value="common"/>
+ </property>
+ <property name="layouts"/>
+ <property name="layout_clusters"/>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="student_index"/>
+ <alias from="view" to="student_index"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/student_index" visible="True">
+  <permission value="View"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/ScratchCardBatch.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/ScratchCardBatch.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/ScratchCardBatch.xml	(revision 2226)
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="ScratchCardBatch" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Scratch Card Batch</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">ScratchCardBatch</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addScratchCardBatch</property>
+ <property name="immediate_view">search_pins</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">False</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="scratch_card_batch"/>
+ </property>
+ <property name="layouts">
+  <element value="scratch_card_batch"/>
+ </property>
+ <property name="layout_clusters"/>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="search_pins"/>
+ <alias from="create_do" to="scratch_card_batch_create_do"/>
+ <alias from="created" to="scratch_card_batch_created"/>
+ <alias from="view" to="search_pins"/>
+ <action title="View" action_id="view" category="object"
+    condition_expr="" url_expr="string:${object_url}/search_pins"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/ScratchCardBatchesFolder.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/ScratchCardBatchesFolder.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/ScratchCardBatchesFolder.xml	(revision 2226)
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="ScratchCardBatchesFolder"
+   meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Scratchcard Batch</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">ScratchCardBatchesFolder</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addScratchCardBatchesFolder</property>
+ <property name="immediate_view">folder_view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="ScratchCardBatch"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">False</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas"/>
+ <property name="layouts"/>
+ <property name="layout_clusters"/>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="search_pins"/>
+ <alias from="create_do" to=""/>
+ <alias from="created" to=""/>
+ <alias from="view" to="search_pins"/>
+ <action title="View" action_id="view" category="object"
+    condition_expr="" url_expr="string:${object_url}/search_pins"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Add Scratch Card Batch " action_id="new_entry"
+    category="object" condition_expr=""
+    url_expr="string:${object/absolute_url}/content_create?type_name=ScratchCardBatch"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Delegate" action_id="localroles" category="object"
+    condition_expr="here/isSectionOfficer" url_expr="string:${object_url}/folder_localrole_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="PIN Batches" action_id="import_pin_batches" category="import"
+    condition_expr="here/isSectionManager" url_expr="string:${object_url}/importPinBatch"
+    visible="True">
+  <permission value="View"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/Student.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/Student.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/Student.xml	(revision 2226)
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="Student" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Student</property>
+ <property name="description"></property>
+ <property name="content_icon">student.gif</property>
+ <property name="content_meta_type">Student</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addStudent</property>
+ <property name="immediate_view">student_index</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="PaymentsFolder"/>
+  <element value="StudentAccommodation"/>
+  <element value="StudentApplication"/>
+  <element value="StudentPume"/>
+  <element value="StudentPersonal"/>
+  <element value="StudentStudyCourse"/>
+  <element value="StudentClearance"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">False</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="student"/>
+ </property>
+ <property name="layouts">
+  <element value="student"/>
+ </property>
+ <property name="layout_clusters">
+  <element value=""/>
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="student_index"/>
+ <alias from="view" to="student_index"/>
+ <action title="View" action_id="view" category="object"
+    condition_expr=""
+    url_expr="string:${object_url}/student_index" visible="True">
+  <permission value="View"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/StudentAccommodation.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/StudentAccommodation.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/StudentAccommodation.xml	(revision 2226)
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="StudentAccommodation" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Student Accommodation Data</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">StudentAccommodation</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addStudentAccommodation</property>
+ <property name="immediate_view">waeup_document_view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">False</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="student_accommodation"/>
+ </property>
+ <property name="layouts">
+  <element value="student_accommodation"/>
+ </property>
+ <property name="layout_clusters"/>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="student_index"/>
+ <alias from="view" to="student_index"/>
+ <action title="View" action_id="view" category="object"
+    condition_expr="" url_expr="string:${object_url}/student_index"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="" url_expr="string:${object_url}/waeup_edit_form"
+    visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Change Bed" action_id="change_bed" category="object"
+    condition_expr="" url_expr="string:${object_url}/change_bed"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Release Bed" action_id="release_bed" category="object"
+         condition_expr="" 
+         url_expr="string:${object_url}/release_bed"
+         visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/StudentApplication.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/StudentApplication.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/StudentApplication.xml	(revision 2226)
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="StudentApplication" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Student Application Data</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">StudentApplication</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addStudentApplication</property>
+ <property name="immediate_view">waeup_document_view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">False</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="student_application"/>
+ </property>
+ <property name="layouts">
+  <element value="student_application"/>
+ </property>
+ <property name="layout_clusters"/>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="student_index"/>
+ <alias from="view" to="student_index"/>
+ <action title="View" action_id="view" category="object"
+    condition_expr="" url_expr="string:${object_url}/student_index"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="" url_expr="string:${object_url}/waeup_edit_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/StudentClearance.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/StudentClearance.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/StudentClearance.xml	(revision 2226)
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="StudentClearance" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Student Clearance/Eligibility Data</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">StudentClearance</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addStudentClearance</property>
+ <property name="immediate_view">waeup_document_view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">False</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="student_clearance"/>
+ </property>
+ <property name="layouts">
+  <element value="student_clearance"/>
+ </property>
+ <property name="layout_clusters">
+  <element value="adm_slip:student_clearance_fe"/>
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="student_index"/>
+ <alias from="view" to="student_index"/>
+ <action title="View" action_id="view" category="object"
+    condition_expr=""
+    url_expr="string:${object_url}/student_index"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr=""
+    url_expr="string:${object_url}/clearance_edit_form"
+    visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/StudentCourseResult.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/StudentCourseResult.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/StudentCourseResult.xml	(revision 2226)
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="StudentCourseResult" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Course Result</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">StudentCourseResult</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addStudentCourseResult</property>
+ <property name="immediate_view">waeup_document_view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="student_course_result"/>
+ </property>
+ <property name="layouts">
+  <element value="student_course_result"/>
+ </property>
+ <property name="layout_clusters"/>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="student_index"/>
+ <alias from="create_do" to="waeup_document_create_do"/>
+ <alias from="created" to="student_course_result_created"/>
+ <alias from="view" to="student_index"/>
+ <action title="View" action_id="view" category="object"
+    condition_expr="" url_expr="string:${object_url}/student_index"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="" url_expr="string:${object_url}/waeup_edit_form"
+    visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/StudentPersonal.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/StudentPersonal.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/StudentPersonal.xml	(revision 2226)
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="StudentPersonal" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Student Personal Data</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">StudentPersonal</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addStudentPersonal</property>
+ <property name="immediate_view">waeup_document_view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">False</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="student_personal"/>
+ </property>
+ <property name="layouts">
+  <element value="student_personal"/>
+ </property>
+ <property name="layout_clusters"/> 
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="student_index"/>
+ <alias from="view" to="student_index"/>
+ <action title="View" action_id="view" category="object"
+    condition_expr="" url_expr="string:${object_url}/student_index"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="" url_expr="string:${object_url}/waeup_edit_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/StudentPume.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/StudentPume.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/StudentPume.xml	(revision 2226)
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="StudentPume" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Student PUME Data</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">StudentPume</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addStudentPume</property>
+ <property name="immediate_view">waeup_document_view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">False</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="student_pume"/>
+ </property>
+ <property name="layouts">
+  <element value="student_pume"/>
+ </property>
+ <property name="layout_clusters"/>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="student_index"/>
+ <alias from="view" to="student_index"/>
+ <action title="View" action_id="view" category="object"
+    condition_expr="" url_expr="string:${object_url}/student_index"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="" url_expr="string:${object_url}/waeup_edit_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/StudentStudyCourse.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/StudentStudyCourse.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/StudentStudyCourse.xml	(revision 2226)
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="StudentStudyCourse" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Student Study Course</property>
+ <property name="description"></property>
+ <property name="content_icon">student.gif</property>
+ <property name="content_meta_type">StudentStudyCourse</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addStudentStudyCourse</property>
+ <property name="immediate_view">folder_view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="StudentStudyLevel"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">False</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="student_study_course"/>
+ </property>
+ <property name="layouts">
+  <element value="student_study_course"/>
+ </property>
+ <property name="layout_clusters">
+  <element value=""/>
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="student_index"/>
+ <alias from="view" to="student_index"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/student_index" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object" condition_expr=""
+    url_expr="string:${object_url}/waeup_edit_form" visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Delegate" action_id="localroles" category="object"
+    condition_expr="" url_expr="string:${object_url}/folder_localrole_form"
+    visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Add Level" action_id="new_entry" category="object"
+    condition_expr=""
+    url_expr="string:${object/absolute_url}/content_create?type_name=StudentStudyLevel"
+    visible="False">
+  <permission value="Add portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/StudentStudyLevel.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/StudentStudyLevel.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/StudentStudyLevel.xml	(revision 2226)
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="StudentStudyLevel" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Study Level Folder</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">StudentStudyLevel</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addStudentStudyLevel</property>
+ <property name="immediate_view">student_index</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="Semester"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">False</property>
+ <property name="cps_proxy_type">btreefolder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="student_study_level"/>
+ </property>
+ <property name="layouts">
+  <element value="student_study_level"/>
+ </property>
+ <property name="layout_clusters"/>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="student_index"/>
+ <alias from="create_do" to="waeup_document_create_do"/>
+ <alias from="created" to=""/>
+ <alias from="view" to="student_index"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/student_index" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Add Course" action_id="new_entry" category="object"
+    condition_expr=""
+    url_expr="string:${object_url}/content_create?type_name=StudentCourseResult"
+    visible="True">
+  <permission value="Add portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/StudentsFolder.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/StudentsFolder.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/StudentsFolder.xml	(revision 2226)
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="StudentsFolder" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Student Folder</property>
+ <property name="description">The WAeUP Student Folder</property>
+ <property name="content_icon">students_folder.gif</property>
+ <property name="content_meta_type">StudentsFolder</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addStudentsFolder</property>
+ <property name="immediate_view">students_index</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="Student"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type">btreefolder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="metadata"/>
+  <element value="common"/>
+  <element value="students"/>
+ </property>
+ <property name="layouts"/>
+ <property name="layout_clusters">
+  <element value="metadata:metadata"/>
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="students_index"/>
+ <alias from="view" to="students_index"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/students_index" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="python:member and 'Manager' in member.getRoles()"
+    url_expr="string:${object_url}/waeup_edit_form" visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Delegate" action_id="localroles" category="object"
+    condition_expr="here/isSectionOfficer" url_expr="string:${object_url}/folder_localrole_form"
+    visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="action_folder_contents" action_id="contents" category="object"
+    condition_expr="" url_expr="string:${object/absolute_url}/folder_contents"
+    visible="False"/>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/StudyLevel.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/StudyLevel.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/StudyLevel.xml	(revision 2226)
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="StudyLevel" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Study Level Folder</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">StudyLevel</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addStudyLevel</property>
+ <property name="immediate_view">academics_index</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="CertificateCourse"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">False</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="study_level"/>
+ </property>
+ <property name="layouts">
+  <element value="study_level"/>
+ </property>
+ <property name="layout_clusters"/>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="academics_index"/>
+ <alias from="create_do" to="waeup_document_create_do"/>
+ <alias from="created" to=""/>
+ <alias from="view" to="academics_index"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/academics_index" visible="True">
+  <permission value="View"/>
+ </action>
+  <action title="Add Course" action_id="new_entry" category="object"
+          condition_expr=""
+          url_expr="string:${object_url}/content_create?type_name=CertificateCourse"
+          visible="True">
+    <permission value="Modify portal content"/>
+  </action>
+  <action title="Delegate" action_id="localroles" category="object"
+          condition_expr="" url_expr="string:${object_url}/folder_localrole_form"
+          visible="True">
+    <permission value="Modify portal content"/>
+ </action>
+
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/University.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/University.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/University.xml	(revision 2226)
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="University" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Base Folder</property>
+ <property name="description">The WAeUP Container</property>
+ <property name="content_icon">students_folder.gif</property>
+ <property name="content_meta_type">University</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addUniversity</property>
+ <property name="immediate_view">campus_index</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="AcademicsFolder"/>
+  <element value="AccoFolder"/>
+  <element value="StudentsFolder"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="metadata"/>
+  <element value="common"/>
+  <element value="folder"/>
+ </property>
+ <property name="layouts">
+  <element value="common"/>
+ </property>
+ <property name="layout_clusters">
+  <element value="metadata:metadata"/>
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="campus_index"/>
+ <alias from="view" to="campus_index"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/campus_index" visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="New content" action_id="new_content" category="object"
+    condition_expr="python:member and  'Manager' in member.getRoles()"
+    url_expr="string:${object_url}/folder_factories" visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="action_folder_contents" action_id="contents" category="object"
+    condition_expr="python:member and  'Manager' in member.getRoles()"
+    url_expr="string:${object_url}/folder_contents" visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="python:member and 'Manager' in member.getRoles()"
+    url_expr="string:${object_url}/waeup_edit_form" visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="action_metadata" action_id="metadata" category="object"
+    condition_expr="python:member and 'Manager' in member.getRoles()"
+    url_expr="string:${object_url}/cpsdocument_metadata" visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Delegate" action_id="localroles" category="object"
+    condition_expr="here/isSectionOfficer" url_expr="string:${object_url}/folder_localrole_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/WAeUPDocument.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/WAeUPDocument.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/WAeUPDocument.xml	(revision 2226)
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="WAeUPDocument" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Document</property>
+ <property name="description"></property>
+ <property name="content_meta_type">WAeUPDocument</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addWAeUPDocument</property>
+ <property name="immediate_view">waeup_document_view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="metadata"/>
+  <element value="waeup_common"/>
+  <element value="document"/>
+ </property>
+ <property name="layouts">
+  <element value="waeup_common"/>
+  <element value="document"/>
+ </property>
+ <property name="layout_clusters">
+  <element value="metadata:metadata"/>
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="create_do" to="waeup_document_create_do"/>
+ <alias from="(Default)" to="waeup_document_view"/>
+ <alias from="view" to="waeup_document_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/waeup_document_view" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="" url_expr="string:${object_url}/waeup_edit_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="action_metadata" action_id="metadata" category="object"
+    condition_expr="" url_expr="string:${object_url}/cpsdocument_metadata"
+    visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Delegate" action_id="localroles" category="object"
+    condition_expr="" url_expr="string:${object_url}/folder_localrole_form"
+    visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/types/types.xsl
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/types/types.xsl	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/types/types.xsl	(revision 2226)
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:output method="html"/>
+  <xsl:template match="/">
+    <html>
+      <head>
+        <title>
+          <xsl:for-each select="object">
+            <xsl:value-of select="@name"/>
+          </xsl:for-each>
+        </title>
+        <link rel="stylesheet" type="text/css" media="all"
+              href="../xsl.css" />      
+      </head>
+      <body>
+        <xsl:for-each select="object">
+          <h2>
+            <xsl:value-of select="@name"/>
+          </h2> 
+        </xsl:for-each>
+        <h1>Properties</h1>
+        <table>
+          <xsl:for-each select="object/property">
+            <xsl:variable name="color">
+              <xsl:choose>
+                <xsl:when test="position() mod 2 = 0">
+                  <xsl:text>#ffffff</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>#eeeeee</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+            <tr style="background-color:{$color}">
+              <td colspan="">
+                <xsl:value-of select="@name"/>
+              </td>
+              <td colspan="">
+                <xsl:value-of select="text()"/>
+              </td>
+              <td>
+                <xsl:for-each select="element">
+                  <xsl:value-of select="@value"/><br />
+                </xsl:for-each>
+              </td>
+            </tr>
+          </xsl:for-each>
+        </table>
+        <h1>Alias</h1>
+        <table>
+          <th>From</th><th>To</th>
+          <xsl:for-each select="object/alias">
+            <xsl:variable name="color">
+              <xsl:choose>
+                <xsl:when test="position() mod 2 = 0">
+                  <xsl:text>#ffffff</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>#eeeeee</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+            <tr style="background-color:{$color}">
+              <td colspan="">
+                <xsl:value-of select="@from"/>
+              </td>
+              <td colspan="">
+                <xsl:value-of select="@to"/>
+              </td>
+            </tr>
+          </xsl:for-each>
+        </table>
+        <h1>Actions</h1>
+        <table>
+          <tr>
+            <th>Id</th>
+            <th>Title</th>
+            <th>Permission</th>
+            <th>Category</th>
+            <th>Visible</th>
+          </tr>
+          <xsl:for-each select="object/action">
+            <xsl:sort select="@action_id"
+                      order="ascending" />
+            <xsl:variable name="color">
+              <xsl:choose>
+                <xsl:when test="position() mod 2 = 0">
+                  <xsl:text>#ffffff</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>#eeeeee</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+            <tr style="background-color:{$color}">
+              <td>
+                <xsl:value-of select="@action_id"/>
+              </td>
+              <td>
+                <xsl:value-of select="@title"/>
+              </td>
+              <td>
+                <xsl:for-each select="permission">
+                  <xsl:value-of select="@value"/>
+                </xsl:for-each>
+              </td>
+              <td>
+                <xsl:value-of select="@category"/>
+              </td>
+              <td>
+                <xsl:value-of select="@visible"/>
+              </td>
+              <xsl:for-each select="element">
+                <td>
+                  <xsl:value-of select="@value"/>
+                </td>
+              </xsl:for-each>
+            </tr>
+            <tr style="background-color:{$color}">
+              <th>url_expression</th>
+              <td colspan="4">
+                <xsl:value-of select="@url_expr"/>
+              </td>
+            </tr>
+            <tr style="background-color:{$color}">
+              <th>condition_expression</th>
+              <td colspan="4">
+                <xsl:value-of select="@condition_expr"/>
+              </td>
+            </tr>
+          </xsl:for-each>
+        </table>
+      </body>
+    </html>
+  </xsl:template>
+</xsl:stylesheet>
Index: WAeUP_SRP/trunk_not_used/profiles/default/users.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/users.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/users.xml	(revision 2226)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<object name="acl_users" meta_type="CPS User Folder">
+ <property name="users_dir">waeup_stacking_dir</property>
+ <property name="groups_dir">groups</property>
+ <property name="groups_members_field">members</property>
+ <property name="roles_dir">roles</property>
+ <property name="roles_members_field">members</property>
+ <property name="users_groups_field">groups</property>
+ <property name="users_login_field">id</property>
+ <property name="users_password_field">password</property>
+ <property name="users_roles_field">roles</property>
+ <property name="cache_timeout">1</property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies.xml	(revision 2226)
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="content.xsl"?>
+<object name="portal_vocabularies" meta_type="CPS Vocabularies Tool">
+ <property name="title"></property>
+ <object name="acco_hall_beds" meta_type="CPS Method Vocabulary"/>
+ <object name="acco_hall_reserved_rooms" meta_type="CPS Method Vocabulary"/>
+ <object name="levels" meta_type="CPS Vocabulary"/>
+ <object name="csv_names" meta_type="CPS Method Vocabulary"/>
+ <object name="entry_modes" meta_type="CPS Vocabulary"/>
+ <object name="jamb_subjects" meta_type="CPS Vocabulary"/>
+ <object name="exam_subjects" meta_type="CPS Vocabulary"/>
+ <object name="exam_types" meta_type="CPS Vocabulary"/>
+ <object name="exam_grades" meta_type="CPS Vocabulary"/>
+ <object name="import_names" meta_type="CPS Vocabulary"/>
+ <object name="institution_types_voc" meta_type="CPS Vocabulary"/>
+ <object name="get_departments_voc" meta_type="CPS Method Vocabulary"/>
+ <object name="get_faculties_voc" meta_type="CPS Method Vocabulary"/>
+ <object name="levels_voc" meta_type="CPS Method Vocabulary"/>
+ <object name="groups_voc" meta_type="CPS Method Vocabulary"/>
+ <object name="waeup_bed_letters" meta_type="CPS Vocabulary"/>
+ <object name="waeup_block_letters" meta_type="CPS Vocabulary"/>
+ <object name="nigerian_states" meta_type="CPS Vocabulary"/>
+ <object name="semester_voc" meta_type="CPS Vocabulary"/>
+ <object name="local_gov_areas" meta_type="CPS Vocabulary"/>
+ <object name="states" meta_type="CPS Vocabulary"/>
+ <object name="high_grade" meta_type="CPS Vocabulary"/>
+ <object name="high_qual" meta_type="CPS Vocabulary"/>
+ <object name="religion" meta_type="CPS Vocabulary"/>
+ <object name="sessions" meta_type="CPS Method Vocabulary"/>
+ <object name="exam_types" meta_type="CPS Vocabulary"/>
+ <object name="pin_prefixes" meta_type="CPS Vocabulary"/>
+ <object name="student_search_mode" meta_type="CPS Vocabulary"/>
+ <object name="scratch_card_search_mode" meta_type="CPS Vocabulary"/>
+ <object name="student_status_voc" meta_type="CPS Vocabulary"/>
+ <object name="searchable_student_states" meta_type="CPS Vocabulary"/>
+ <object name="get_searchable_student_states" meta_type="CPS Method Vocabulary"/>
+ <object name="acco_special_handling" meta_type="CPS Vocabulary"/>
+ <object name="academics_search_mode" meta_type="CPS Vocabulary"/>
+ <object name="searchable_academics_states" meta_type="CPS Vocabulary"/>
+ <object name="verdicts" meta_type="CPS Vocabulary"/>
+ <object name="global_roles" meta_type="CPS Vocabulary"/>
+ <object name="cos" meta_type="CPS Vocabulary"/>
+ </object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/academics_search_mode.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/academics_search_mode.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/academics_search_mode.xml	(revision 2226)
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="search_mode_voc" meta_type="CPS Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="acl_write_roles">Manager</property>
+ <item key="course" msgid="">Course</item>
+ <item key="cert_course" msgid="">Certificate Course</item>
+ <item key="department" msgid="">Department</item>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/acco_hall_beds.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/acco_hall_beds.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/acco_hall_beds.xml	(revision 2226)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="acco_hall_beds" meta_type="CPS Method Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="get_vocabulary_method">getAccoHallBeds</property>
+ <property name="add_empty_key">False</property>
+ <property name="empty_key_pos">first</property>
+ <property name="empty_key_value"></property>
+ <property name="empty_key_value_i18n"></property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/acco_hall_reserved_rooms.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/acco_hall_reserved_rooms.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/acco_hall_reserved_rooms.xml	(revision 2226)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="acco_hall_reserved_rooms" meta_type="CPS Method Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="get_vocabulary_method">reservedRoomsVoc</property>
+ <property name="add_empty_key">False</property>
+ <property name="empty_key_pos">first</property>
+ <property name="empty_key_value"></property>
+ <property name="empty_key_value_i18n"></property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/acco_special_handling.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/acco_special_handling.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/acco_special_handling.xml	(revision 2226)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="acco_special_handling" meta_type="CPS Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="acl_write_roles">Manager</property>
+ <item key="no" msgid="">---</item>
+ <item key="pg" msgid="">Postgraduate</item>
+ <item key="med" msgid="">Medical (Level 500/600)</item>
+ <item key="no_ekenhuan" msgid="">Ekenhuan Campus</item>
+ <item key="no_pti" msgid="">PTI</item>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/cos.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/cos.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/cos.xml	(revision 2226)
@@ -0,0 +1,111 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="cos" meta_type="CPS Vocabulary">
+    <property name="title"></property>
+    <property name="title_msgid"></property>
+    <property name="description"></property>
+    <property name="acl_write_roles">Manager</property>
+
+    <item key="" msgid="">N/A</item>
+    <item key="None" msgid=""></item>
+    <item key="BSCANA" msgid="">B.SC (ANATOMY)</item>
+    <item key="BARTEDL" msgid="">B.ART (EDO LINGUSTICS)</item>
+    <item key="BARTLAL" msgid="">B.ART (LINGUSTICS AND AFRICAN LANGUAGES)</item>
+    <item key="BAEDEL" msgid="">B.A(ED) ADULT EDUCATION/ENGLISH AND LIT.</item>
+    <item key="BAEDCRM" msgid="">B.A(ED) CERAMICS</item>
+    <item key="BAEDEDO" msgid="">B.A(ED) EDO</item>
+    <item key="BAEDENG" msgid="">B.A(ED) ENGLISH</item>
+    <item key="BAEDFAA" msgid="">B.A(ED) FINE ARTS</item>
+    <item key="BAEDFRC" msgid="">B.A(ED) FRENCH</item>
+    <item key="BAEDHIS" msgid="">B.A(ED) HISTORY</item>
+    <item key="BEDADT" msgid="">B.ED ADULT EDUCATION</item>
+    <item key="BSCEDHK" msgid="">B.SC (ED) HUMAN KINETICS</item>
+    <item key="BSCEDE" msgid="">B.SC(ED) ADULT EDUCATION/ECONOMICS $ ST</item>
+    <item key="BSCEDG" msgid="">B.SC(ED) ADULT EDUCATION/GEOGRAPHY AND REGIONAL PLANNING</item>
+    <item key="BSCEDAC" msgid="">B.SC(ED) ACCOUNTING EDUCATION</item>
+    <item key="BSCEDAP" msgid="">B.SC(ED) ADULT EDUCATION/POL SCI</item>
+    <item key="BSCEDAG" msgid="">B.SC(ED) AGRICULTURE EDUCATION</item>
+    <item key="BSCEDB" msgid="">B.SC(ED) BIOLOGY</item>
+    <item key="BSCEDBC" msgid="">B.SC(ED) BUILDING CONSTRUCTION EDUCATION</item>
+    <item key="BSCEDBE" msgid="">B.SC(ED) BUSINESS EDUCATION (ACCOUNTING)</item>
+    <item key="BSCEDC" msgid="">B.SC(ED) CHEMISTRY</item>
+    <item key="BSCEDCO" msgid="">B.SC(ED) COMPUTER</item>
+    <item key="BSCEDES" msgid="">B.SC(ED) ECONOMICS AND STATISTICS</item>
+    <item key="BSCEDEE" msgid="">B.SC(ED) ELECTRICAL ELECTONICS EDUCATION</item>
+    <item key="BSCEDGR" msgid="">B.SC(ED) GEOGRAPHY AND REGIONAL PLANNING</item>
+    <item key="BSCEDHE" msgid="">B.SC(ED) HEALTH EDUCATION</item>
+    <item key="BSCEDHM" msgid="">B.SC(ED) HOME ECONOMICS EDUCATION</item>
+    <item key="BSCEDTE" msgid="">B.SC(ED) INDUSTRIAL TECHNICAL EDUCATION</item>
+    <item key="BSCEDIS" msgid="">B.SC(ED) INTEGRATED SCIENCE</item>
+    <item key="BSCEDM" msgid="">B.SC(ED) MATHENATICS</item>
+    <item key="BSCEDME" msgid="">B.SC(ED) MECHANICAL ENGINEERING</item>
+    <item key="BSCEDPE" msgid="">B.SC(ED) PHYSICAL EDUCATION</item>
+    <item key="BSCEDP" msgid="">B.SC(ED) PHYSICS</item>
+    <item key="BSCEDPS" msgid="">B.SC(ED) POLITICAL SCIENCE AND PUBLIC AD</item>
+    <item key="BSCEDSE" msgid="">B.SC(ED) SECRETATIAL EDUCATION</item>
+    <item key="BSCEDSS" msgid="">B.SC(ED) SOCIAL STUDIES</item>
+    <item key="BSCEDWB" msgid="">B.SC(ED) WOODWORK AND BUILDING</item>
+    <item key="BAGAEE" msgid="">BACHELOR OF AGRICULTURE (AGRIC ECONS)</item>
+    <item key="BAGANS" msgid="">BACHELOR OF AGRICULTURE (ANIMAL SCIENCE)</item>
+    <item key="BAGCRS" msgid="">BACHELOR OF AGRICULTURE (CROP SCIENCE)</item>
+    <item key="BAGFIS" msgid="">BACHELOR OF AGRICULTURE (FISHERIES)</item>
+    <item key="BAGSOS" msgid="">BACHELOR OF AGRICULTURE (SOIL SCIENCE)</item>
+    <item key="BARTREL" msgid="">BACHELOR OF ART(RELIGIOUS STUDIES)</item>
+    <item key="BARTENL" msgid="">BACHELOR OF ARTS (ENGLISH AND LITERATURE)</item>
+    <item key="BARTCER" msgid="">BACHELOR OF ARTS (FAA CERAMICS)</item>
+    <item key="BARTAPG" msgid="">BACHELOR OF ARTS (FAA GRAPHICS)</item>
+    <item key="BARTAPM" msgid="">BACHELOR OF ARTS (FAA METAL)</item>
+    <item key="BARTFAP" msgid="">BACHELOR OF ARTS (FAA PAINTING)</item>
+    <item key="BARTSCP" msgid="">BACHELOR OF ARTS (FAA SCULPTURE)</item>
+    <item key="BARTTXT" msgid="">BACHELOR OF ARTS (FAA TEXTILE)</item>
+    <item key="BARTFAA" msgid="">BACHELOR OF ARTS (FINE AND APPLIED ARTS)</item>
+    <item key="BARTISD" msgid="">BACHELOR OF ARTS (INTER.STUDIES)</item>
+    <item key="BARTPHL" msgid="">BACHELOR OF ARTS (PHILOSOPHY)</item>
+    <item key="BARTFOL" msgid="">BACHELOR OF ARTS FOREIGN LANGUAGES</item>
+    <item key="BARTHIS" msgid="">BACHELOR OF ARTS(HISTORY</item>
+    <item key="BDS" msgid="">BACHELOR OF DENTAL SURGERY</item>
+    <item key="BENGCHE" msgid="">BACHELOR OF ENGINEERING (CHEMICAL)</item>
+    <item key="BENGCVE" msgid="">BACHELOR OF ENGINEERING (CIVIL)</item>
+    <item key="BENGCOM" msgid="">BACHELOR OF ENGINEERING (COMPUTER)</item>
+    <item key="BENGEEE" msgid="">BACHELOR OF ENGINEERING (ELECT/ELECT)</item>
+    <item key="BENGEEP" msgid="">BACHELOR OF ENGINEERING (ELECTRIC/ELECTRONICS) PTI</item>
+    <item key="BENGMCH" msgid="">BACHELOR OF ENGINEERING (MECHANICAL)</item>
+    <item key="BENGPEE" msgid="">BACHELOR OF ENGINEERING (PETROLEUM)</item>
+    <item key="BENGPRE" msgid="">BACHELOR OF ENGINEERING (PRODUCTION)</item>
+    <item key="BAGFOW" msgid="">BACHELOR OF FORESTRY AND WILDFIFE</item>
+    <item key="LLB" msgid="">BACHELOR OF LAWS</item>
+    <item key="MBBSMED" msgid="">BACHELOR OF MEDICINE AND SURGERY</item>
+    <item key="BSCACC" msgid="">BACHELOR OF SCIENCE (ACCOUNTING)</item>
+    <item key="BSCBOT" msgid="">BACHELOR OF SCIENCE (BOTANY)</item>
+    <item key="BSCBUS" msgid="">BACHELOR OF SCIENCE (BUSINESS ADMIN.)</item>
+    <item key="BSCCHM" msgid="">BACHELOR OF SCIENCE (CHEMISTRY)</item>
+    <item key="BSCECO" msgid="">BACHELOR OF SCIENCE (ECO.AND STATISTICS)</item>
+    <item key="BSCEVL" msgid="">BACHELOR OF SCIENCE (ENVIROMENT)</item>
+    <item key="BSCGEO" msgid="">BACHELOR OF SCIENCE (GEO.AND REG.PLANN.)</item>
+    <item key="BSCGLY" msgid="">BACHELOR OF SCIENCE (GEOLOGY)</item>
+    <item key="BSCMCB" msgid="">BACHELOR OF SCIENCE (MICROBIOLOGY)</item>
+    <item key="BSCSAA" msgid="">BACHELOR OF SCIENCE (SOC.AND ANTHRO.)</item>
+    <item key="BSCAEB" msgid="">BACHELOR OF SCIENCE IN ANIMAL AND ENVIRONMENTAL BIOLOGY</item>
+    <item key="BSCBCH" msgid="">BACHELOR OF SCIENCE(BIOCHEM)</item>
+    <item key="BSCCSC" msgid="">BACHELOR OF SCIENCE(COMPUTER SCIENCE)</item>
+    <item key="BSCINC" msgid="">BACHELOR OF SCIENCE(INDUSTRIAL CHEMISTRY)</item>
+    <item key="BSCINM" msgid="">BACHELOR OF SCIENCE(INDUSTRIAL MATHEMATICS)</item>
+    <item key="BSCINP" msgid="">BACHELOR OF SCIENCE(INDUSTRIAL PHYSICS)</item>
+    <item key="BSCME" msgid="">BACHELOR OF SCIENCE(MATHEMATICS$ECONS)</item>
+    <item key="BSCMTH" msgid="">BACHELOR OF SCIENCE(MATHEMATICS)</item>
+    <item key="BSCPHY" msgid="">BACHELOR OF SCIENCE(PHYSICS)</item>
+    <item key="BSCPOL" msgid="">BACHELOR OF SCIENCE(POL.SCI AND PUB.ADM)</item>
+    <item key="BSCPAM" msgid="">BACHELOR OF SCIENCE(PURE AND APPLIED MATH)</item>
+    <item key="BSCZOO" msgid="">BACHELOR OF SCIENCE(ZOOLOGY)</item>
+    <item key="BARTMAS" msgid="">BACHELOR OF ART (MASS COMMUNICATION)</item>
+    <item key="BARTTHR" msgid="">BACHELOR OF ART (THEARTER ARTS)</item>
+    <item key="OD" msgid="">DOCTOR OF OPTOMETRY</item>
+    <item key="PHARMD" msgid="">DOCTOR OF PHARMACY</item>
+    <item key="BSCMBC" msgid="">MEDICAL BIOCHEMISTRY</item>
+    <item key="BSCPHS" msgid="">PHYSIOLOGY</item>
+    <item key="BARTIBO" msgid="">B.ART (IGBO LINGUSTICS)</item>
+    <item key="BSCNUR" msgid="">B.SC (NURSING)</item>
+    <item key="BENGGSE" msgid="">BACHELOR OF ENGINEERING (GAS)</item>
+    <item key="BSCBNK" msgid="">BACHELOR OF SCIENCE (BANKING)</item>
+
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/csv_names.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/csv_names.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/csv_names.xml	(revision 2226)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="csv_names" meta_type="CPS Method Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="get_vocabulary_method">get_csv_names</property>
+ <property name="add_empty_key">False</property>
+ <property name="empty_key_pos">first</property>
+ <property name="empty_key_value"></property>
+ <property name="empty_key_value_i18n"></property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/entry_modes.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/entry_modes.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/entry_modes.xml	(revision 2226)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="entry_modes" meta_type="CPS Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="acl_write_roles">Manager</property>
+ <item key="unknown" msgid="">N/A</item>
+ <item key="ume_ft" msgid="">UME Full Time</item>
+ <item key="de_ft" msgid="">Direct Entry Full Time</item>
+ <item key="de_pt" msgid="">Direct Entry Part Time</item>
+ <item key="dp_ft" msgid="">Diploma Full Time</item>
+ <item key="dp_pt" msgid="">Diploma Part Time</item>
+ <item key="ug_ft" msgid="">Undergraduate Full Time</item>
+ <item key="ug_pt" msgid="">Undergraduate Part Time</item>
+ <item key="pg_ft" msgid="">Postgraduate Full Time</item>
+ <item key="pg_pt" msgid="">Postgraduate Part Time</item>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/exam_grades.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/exam_grades.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/exam_grades.xml	(revision 2226)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="high_grade" meta_type="CPS Vocabulary">
+  <property name="title"></property>
+  <property name="title_msgid"></property>
+  <property name="description"></property>
+
+  <item key="" msgid="">None</item>
+  <item key="A1" msgid="">Excellent (A1)</item>
+  <item key="B2" msgid="">Very Good (B2)</item>
+  <item key="B3" msgid="">Good (B3)</item>
+  <item key="C4" msgid="">Credit (C4)</item>
+  <item key="C5" msgid="">Credit (C5)</item>
+  <item key="C6" msgid="">Credit (C6)</item>
+  <item key="D7" msgid="">Pass (D7)</item>
+  <item key="E8" msgid="">Pass (E8)</item>
+  <item key="F9" msgid="">Fail (F9)</item>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/exam_subjects.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/exam_subjects.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/exam_subjects.xml	(revision 2226)
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="high_grade" meta_type="CPS Vocabulary">
+  <property name="title"></property>
+  <property name="title_msgid"></property>
+  <property name="description"></property>
+
+  <item key="" msgid="">None</item>
+  <item key="Agricultural_Science" msgid="">Agricultural Science</item>
+  <item key="Applied_Electricity" msgid="">Applied Electricity</item>
+  <item key="Arabi" msgid="">Arabi</item>
+  <item key="Auto_Mechanics" msgid="">Auto Mechanics</item>
+  <item key="Biology" msgid="">Biology</item>
+  <item key="Building_Construction" msgid="">Building Construction</item>
+  <item key="Business_Management" msgid="">Business Management</item>
+  <item key="Chemistry" msgid="">Chemistry</item>
+  <item key="Christian_Religious_Studies" msgid="">Christian Religious Studies</item>
+  <item key="Clerical_Office_Duties" msgid="">Clerical Office Duties</item>
+  <item key="Clothing_and_Textiles" msgid="">Clothing and Textiles</item>
+  <item key="Commerce" msgid="">Commerce</item>
+  <item key="Economics" msgid="">Economics</item>
+  <item key="Education" msgid="">Education</item>
+  <item key="Electronics" msgid="">Electronics</item>
+  <item key="English_Language" msgid="">English Language</item>
+  <item key="Engineering_Science" msgid="">Engineering Science</item>
+  <item key="Financial_Accounting" msgid="">Financial Accounting</item>
+  <item key="Food_and_Nutrition" msgid="">Food and Nutrition</item>
+  <item key="French" msgid="">French</item>
+  <item key="Further_Mathematics" msgid="">Further Mathematics</item>
+  <item key="Geography" msgid="">Geography</item>
+  <item key="Government" msgid="">Government</item>
+  <item key="Health_Science" msgid="">Health Science</item>
+  <item key="History" msgid="">History</item>
+  <item key="Home_Management" msgid="">Home Management</item>
+  <item key="Intergrated_Science" msgid="">Intergrated Science</item>
+  <item key="Islamic_Studies" msgid="">Islamic Studies</item>
+  <item key="Literature_in_English" msgid="">Literature in English</item>
+  <item key="Literature_in_Nigerian_Languages" msgid="">Literature in Nigerian Languages</item>
+  <item key="Hausa" msgid="">Hausa</item>
+  <item key="Igbo" msgid="">Igbo</item>
+  <item key="Yoruba" msgid="">Yoruba</item>
+  <item key="Management_in_Living" msgid="">Management in Living</item>
+  <item key="Mathematics" msgid="">Mathematics</item>
+  <item key="Metalwork" msgid="">Metalwork</item>
+  <item key="Music" msgid="">Music</item>
+  <item key="Nigerian_Language" msgid="">Nigerian Language</item>
+  <item key="Physical_Education" msgid="">Physical Education</item>
+  <item key="Physical_Health_Education" msgid="">Physical and Health Education</item>
+  <item key="Physics" msgid="">Physics</item>
+  <item key="Principles_of_Cost_Accounting" msgid="">Principles of Cost Accounting</item>
+  <item key="Science" msgid="">Science</item>
+  <item key="Shorthand" msgid="">Shorthand</item>
+  <item key="Sierra_Leone_Studies" msgid="">Sierra Leone Studies</item>
+  <item key="Sierra_Leone_Languages" msgid="">Sierra Leone Languages</item>
+  <item key="Social_Studies" msgid="">Social Studies</item>
+  <item key="Teaching_Practice" msgid="">Teaching Practice</item>
+  <item key="Technical_Drawing" msgid="">Technical Drawing</item>
+  <item key="Typewriting" msgid="">Typewriting</item>
+  <item key="Visual_Art" msgid="">Visual Art</item>
+  <item key="Woodwork" msgid="">Woodwork</item>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/exam_types.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/exam_types.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/exam_types.xml	(revision 2226)
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="exam_types" meta_type="CPS Vocabulary">
+    <property name="title"></property>
+    <property name="title_msgid"></property>
+    <property name="description"></property>
+    <property name="acl_write_roles">Manager</property>
+
+    <item key="" msgid="">None</item>
+    <item key="ssce" msgid="">SSCE</item>
+    <item key="waec" msgid="">WAEC</item>
+    <item key="gce_o_level" msgid="">GCE O' LEVEL</item>
+    <item key="tc_ii" msgid="">TC II</item>
+    <item key="rsa" msgid="">RSA</item>
+    <item key="nabtec" msgid="">NABTEB</item>
+    <item key="neco" msgid="">NECO</item>
+    <item key="ace" msgid="">ACE</item>
+    <item key="gce_a_level" msgid="">GCE A' LEVEL</item>
+
+
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/get_departments_voc.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/get_departments_voc.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/get_departments_voc.xml	(revision 2226)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="get_departments_voc" meta_type="CPS Method Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="get_vocabulary_method">get_departments_voc</property>
+ <property name="add_empty_key">False</property>
+ <property name="empty_key_pos">first</property>
+ <property name="empty_key_value"></property>
+ <property name="empty_key_value_i18n"></property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/get_faculties_voc.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/get_faculties_voc.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/get_faculties_voc.xml	(revision 2226)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="get_faculties_voc" meta_type="CPS Method Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="get_vocabulary_method">get_faculties_voc</property>
+ <property name="add_empty_key">False</property>
+ <property name="empty_key_pos">first</property>
+ <property name="empty_key_value"></property>
+ <property name="empty_key_value_i18n"></property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/get_searchable_student_states.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/get_searchable_student_states.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/get_searchable_student_states.xml	(revision 2226)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="get_searchable_student_states" meta_type="CPS Method Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="get_vocabulary_method">get_searchable_student_states</property>
+ <property name="add_empty_key">False</property>
+ <property name="empty_key_pos">first</property>
+ <property name="empty_key_value"></property>
+ <property name="empty_key_value_i18n"></property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/global_roles.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/global_roles.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/global_roles.xml	(revision 2226)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="global_roles" meta_type="CPS Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="acl_write_roles">Manager</property>
+ <item key="Member" msgid="label_cpsdir_roles_Member">Member</item>
+ <item key="Manager" msgid="label_cpsdir_roles_Manager">Manager</item>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/groups_voc.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/groups_voc.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/groups_voc.xml	(revision 2226)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="get_groups_voc" meta_type="CPS Method Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="get_vocabulary_method">getWAeUPGroups</property>
+ <property name="add_empty_key">False</property>
+ <property name="empty_key_pos">first</property>
+ <property name="empty_key_value"></property>
+ <property name="empty_key_value_i18n"></property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/high_grade.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/high_grade.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/high_grade.xml	(revision 2226)
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="high_grade" meta_type="CPS Vocabulary">
+    <property name="title"></property>
+    <property name="title_msgid"></property>
+    <property name="description"></property>
+
+    <item key="" msgid="">None</item>
+    <item key="upper_credit" msgid="">Upper Credit</item>
+    <item key="distinction" msgid="">Distinction</item>
+    <item key="upper_credit" msgid="">Upper Credit</item>
+    <item key="credit" msgid="">Credit</item>
+    <item key="merit" msgid="">Merit</item>
+    <item key="lower_credit" msgid="">Lower Credit</item>
+    <item key="first_class" msgid="">First Class</item>
+    <item key="second_class_upper" msgid="">Second Class Upper</item>
+    <item key="second_class_lower" msgid="">Second Class Lower</item>
+    <item key="third_class" msgid="">Third Class</item>
+    <item key="pass" msgid="">Pass </item>
+
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/high_qual.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/high_qual.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/high_qual.xml	(revision 2226)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="high_qual" meta_type="CPS Vocabulary">
+    <property name="title"></property>
+    <property name="title_msgid"></property>
+    <property name="description"></property>
+    <property name="acl_write_roles">Manager</property>
+    
+    <item key="" msgid="">None</item>
+    <item key="nce" msgid="">National Certificate Of Education</item>
+    <item key="pre" msgid="">Pre Degree Programme</item>
+    <item key="dip" msgid="">Diploma Programme</item>
+    <item key="ond" msgid="">Ordinary National Diploma</item>
+    <item key="nce" msgid="">National Certificate Of Education</item>
+    <item key="bd" msgid="">Bachelors Degree</item>
+    <item key="md" msgid="">Masters Degree</item>
+    <item key="pq" msgid="">Professional Qualification</item>
+    <item key="oc" msgid="">Other Certification</item>
+    <item key="hnd" msgid="">Higher National Diploma</item>
+
+
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/import_names.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/import_names.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/import_names.xml	(revision 2226)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="entry_modes" meta_type="CPS Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="acl_write_roles">Manager</property>
+ <item key="student" msgid="">Student Data</item>
+ <item key="department" msgid="">Department Data</item>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/institution_types_voc.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/institution_types_voc.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/institution_types_voc.xml	(revision 2226)
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="institute_types_voc" meta_type="CPS Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="acl_write_roles">Manager</property>
+ <item key="none" msgid=""></item>
+ <item key="faculty" msgid="">Faculty of</item>
+ <item key="department" msgid="">Department of</item>
+ <item key="school" msgid="">School of</item>
+ <item key="school_for" msgid="">School for</item>
+ <item key="institute" msgid="">Institute of</item>
+ <item key="office" msgid="">Office for</item>
+ <item key="centre" msgid="">Centre for</item>
+ <item key="college" msgid="">College of</item>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/jamb_subjects.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/jamb_subjects.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/jamb_subjects.xml	(revision 2226)
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="high_grade" meta_type="CPS Vocabulary">
+  <property name="title"></property>
+  <property name="title_msgid"></property>
+  <property name="description"></property>
+
+  <item key="" msgid="">None</item>
+  <item key="AGR" msgid="">'Agriculture' Score</item>
+  <item key="ART" msgid="">'Fine Arts' Score</item>
+  <item key="BIO" msgid="">'Biology' Score</item>
+  <item key="CHE" msgid="">'Chemistry' Score</item>
+  <item key="COM" msgid="">'Commerce' Score</item>
+  <item key="CRK" msgid="">'Christian Rel. Knowledge' Score</item>
+  <item key="ECO" msgid="">'Economics' Score</item>
+  <item key="FRE" msgid="">'French' Score</item>
+  <item key="GEO" msgid="">'Geography' Score</item>
+  <item key="GOV" msgid="">'Government' Score</item>
+  <item key="HIS" msgid="">'History' Score</item>
+  <item key="IRK" msgid="">'Islamic Rel. Knowledge' Score</item>
+  <item key="MAT" msgid="">'Mathematics' Score</item>
+  <item key="IGB" msgid="">'Igbo Language' Score</item>
+  <item key="H/E" msgid="">'Home Economics' Score</item>
+  <item key="LIT" msgid="">'Literature In English' Score</item>
+  <item key="MUS" msgid="">'Music' Score</item>
+  <item key="PHY" msgid="">'Physics' Score</item>
+  <item key="YOR" msgid="">'Yoruba Language' Score</item>
+  <item key="P/A" msgid="">'Principles of Accounting' Score</item>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/levels.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/levels.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/levels.xml	(revision 2226)
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="levels" meta_type="CPS Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="acl_write_roles">Manager</property>
+ <item key="000" msgid="">N/A</item>
+ <item key="100" msgid="">Year 1 (100 Level)</item>
+ <item key="200" msgid="">Year 2 (200 Level)</item>
+ <item key="300" msgid="">Year 3 (300 Level)</item>
+ <item key="400" msgid="">Year 4 (400 Level)</item>
+ <item key="500" msgid="">Year 5 (500 Level)</item>
+ <item key="600" msgid="">Year 6 (600 Level)</item>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/levels_voc.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/levels_voc.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/levels_voc.xml	(revision 2226)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="levels_voc" meta_type="CPS Method Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="get_vocabulary_method">get_levels_voc</property>
+ <property name="add_empty_key">False</property>
+ <property name="empty_key_pos">first</property>
+ <property name="empty_key_value"></property>
+ <property name="empty_key_value_i18n"></property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/local_gov_areas.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/local_gov_areas.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/local_gov_areas.xml	(revision 2226)
@@ -0,0 +1,882 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="local_gov_areas" meta_type="CPS Vocabulary">
+    <property name="title"></property>
+    <property name="title_msgid"></property>
+    <property name="description"></property>
+    <property name="acl_write_roles">Manager</property>
+
+    <item key="abia_aba_north" msgid="">Abia / Aba North</item>
+    <item key="abia_aba_south" msgid="">Abia / Aba South</item>
+    <item key="abia_arochukwu" msgid="">Abia / Arochukwu</item>
+    <item key="abia_bende" msgid="">Abia / Bende</item>
+    <item key="abia_ikawuno" msgid="">Abia / Ikawuno</item>
+    <item key="abia_ikwuano" msgid="">Abia / Ikwuano</item>
+    <item key="abia_isiala-ngwa_north" msgid="">Abia / Isiala-Ngwa North</item>
+    <item key="abia_isiala-ngwa_south" msgid="">Abia / Isiala-Ngwa South</item>
+    <item key="abia_isikwuato" msgid="">Abia / Isikwuato</item>
+    <item key="abia_isuikwuato" msgid="">Abia / Isuikwuato</item>
+    <item key="abia_nneochi" msgid="">Abia / Nneochi</item>
+    <item key="abia_obi_ngwa" msgid="">Abia / Obi Ngwa</item>
+    <item key="abia_obioma_ngwa_" msgid="">Abia / Obioma Ngwa</item>
+    <item key="abia_obioma-ngwa" msgid="">Abia / Obioma-Ngwa</item>
+    <item key="abia_ohafia" msgid="">Abia / Ohafia</item>
+    <item key="abia_ohaozara" msgid="">Abia / Ohaozara</item>
+    <item key="abia_osisioma" msgid="">Abia / Osisioma</item>
+    <item key="abia_ugwunagbo" msgid="">Abia / Ugwunagbo</item>
+    <item key="abia_ukwa_west" msgid="">Abia / Ukwa West</item>
+    <item key="abia_ukwu_east" msgid="">Abia / Ukwu East</item>
+    <item key="abia_umuahia" msgid="">Abia / Umuahia</item>
+    <item key="abia_umuahia_south" msgid="">Abia / Umuahia South</item>
+    <item key="abia_umuahia-north" msgid="">Abia / Umuahia-North</item>
+    <item key="abuja_amac" msgid="">Abuja / Amac</item>
+    <item key="adamawa_demsa" msgid="">Adamawa / Demsa</item>
+    <item key="adamawa_fufore" msgid="">Adamawa / Fufore</item>
+    <item key="adamawa_ganye" msgid="">Adamawa / Ganye</item>
+    <item key="adamawa_girei" msgid="">Adamawa / Girei</item>
+    <item key="adamawa_gombi" msgid="">Adamawa / Gombi</item>
+    <item key="adamawa_guyuk" msgid="">Adamawa / Guyuk</item>
+    <item key="adamawa_hong" msgid="">Adamawa / Hong</item>
+    <item key="adamawa_jada" msgid="">Adamawa / Jada</item>
+    <item key="adamawa_jimeta" msgid="">Adamawa / Jimeta</item>
+    <item key="adamawa_lamurde" msgid="">Adamawa / Lamurde</item>
+    <item key="adamawa_madagali" msgid="">Adamawa / Madagali</item>
+    <item key="adamawa_maiha" msgid="">Adamawa / Maiha</item>
+    <item key="adamawa_mayo-belwa" msgid="">Adamawa / Mayo-Belwa</item>
+    <item key="adamawa_michika" msgid="">Adamawa / Michika</item>
+    <item key="adamawa_mubi-north" msgid="">Adamawa / Mubi-North</item>
+    <item key="adamawa_mubi-south" msgid="">Adamawa / Mubi-South</item>
+    <item key="adamawa_numan" msgid="">Adamawa / Numan</item>
+    <item key="adamawa_shelleng" msgid="">Adamawa / Shelleng</item>
+    <item key="adamawa_song" msgid="">Adamawa / Song</item>
+    <item key="adamawa_toungo" msgid="">Adamawa / Toungo</item>
+    <item key="adamawa_yola" msgid="">Adamawa / Yola</item>
+    <item key="akwa_ibom_abak" msgid="">Akwa Ibom / Abak</item>
+    <item key="akwa_ibom_eastern-obolo" msgid="">Akwa Ibom / Eastern-Obolo</item>
+    <item key="akwa_ibom_eket" msgid="">Akwa Ibom / Eket</item>
+    <item key="akwa_ibom_ekpe-atani" msgid="">Akwa Ibom / Ekpe-Atani</item>
+    <item key="akwa_ibom_esit_ekit" msgid="">Akwa Ibom / Esit Ekit</item>
+    <item key="akwa_ibom_essien-udim" msgid="">Akwa Ibom / Essien-Udim</item>
+    <item key="akwa_ibom_etim-ekpo" msgid="">Akwa Ibom / Etim-Ekpo</item>
+    <item key="akwa_ibom_etinam" msgid="">Akwa Ibom / Etinam</item>
+    <item key="akwa_ibom_ibeno" msgid="">Akwa Ibom / Ibeno</item>
+    <item key="akwa_ibom_ibesikpo-asutan" msgid="">Akwa Ibom / Ibesikpo-Asutan</item>
+    <item key="akwa_ibom_ibiono-ibom" msgid="">Akwa Ibom / Ibiono-Ibom</item>
+    <item key="akwa_ibom_ika" msgid="">Akwa Ibom / Ika</item>
+    <item key="akwa_ibom_ikono" msgid="">Akwa Ibom / Ikono</item>
+    <item key="akwa_ibom_ikot-abasi" msgid="">Akwa Ibom / Ikot-Abasi</item>
+    <item key="akwa_ibom_ikot-ekpene" msgid="">Akwa Ibom / Ikot-Ekpene</item>
+    <item key="akwa_ibom_ini" msgid="">Akwa Ibom / Ini</item>
+    <item key="akwa_ibom_itu" msgid="">Akwa Ibom / Itu</item>
+    <item key="akwa_ibom_mbo" msgid="">Akwa Ibom / Mbo</item>
+    <item key="akwa_ibom_mkpat-enin" msgid="">Akwa Ibom / Mkpat-Enin</item>
+    <item key="akwa_ibom_nsit-ibom" msgid="">Akwa Ibom / Nsit-Ibom</item>
+    <item key="akwa_ibom_nsit-ubium" msgid="">Akwa Ibom / Nsit-Ubium</item>
+    <item key="akwa_ibom_obot-akara" msgid="">Akwa Ibom / Obot-Akara</item>
+    <item key="akwa_ibom_okobo" msgid="">Akwa Ibom / Okobo</item>
+    <item key="akwa_ibom_onna" msgid="">Akwa Ibom / Onna</item>
+    <item key="akwa_ibom_oron" msgid="">Akwa Ibom / Oron</item>
+    <item key="akwa_ibom_oruk_anam" msgid="">Akwa Ibom / Oruk-Anam</item>
+    <item key="akwa_ibom_udung-uko" msgid="">Akwa Ibom / Udung-Uko</item>
+    <item key="akwa_ibom_ukanefun" msgid="">Akwa Ibom / Ukanefun</item>
+    <item key="akwa_ibom_uquo_ibeno" msgid="">Akwa Ibom / Uquo Ibeno</item>
+    <item key="akwa_ibom_uru_offong_oruko" msgid="">Akwa Ibom / Urue-Offong-Oruko</item>
+    <item key="akwa_ibom_uruan" msgid="">Akwa Ibom / Uruan</item>
+    <item key="akwa_ibom_uruk-anam" msgid="">Akwa Ibom / Uruk-Anam</item>
+    <item key="akwa_ibom_uyo" msgid="">Akwa Ibom / Uyo</item>
+    <item key="anambra_aguata" msgid="">Anambra / Aguata</item>
+    <item key="anambra_anambra-east" msgid="">Anambra / Anambra-East</item>
+    <item key="anambra_anambra-west" msgid="">Anambra / Anambra-West</item>
+    <item key="anambra_anaocha" msgid="">Anambra / Anaocha</item>
+    <item key="anambra_awka-north" msgid="">Anambra / Awka-North</item>
+    <item key="anambra_awka-south" msgid="">Anambra / Awka-South</item>
+    <item key="anambra_ayamelum" msgid="">Anambra / Ayamelum</item>
+    <item key="anambra_dunukofia" msgid="">Anambra / Dunukofia</item>
+    <item key="anambra_ekwusigo" msgid="">Anambra / Ekwusigo</item>
+    <item key="anambra_idemili" msgid="">Anambra / Idemili</item>
+    <item key="anambra_idemili-north" msgid="">Anambra / Idemili-North</item>
+    <item key="anambra_idemili-south" msgid="">Anambra / Idemili-South</item>
+    <item key="anambra_ihiala" msgid="">Anambra / Ihiala</item>
+    <item key="anambra_nibo" msgid="">Anambra / Nibo</item>
+    <item key="anambra_njikoka" msgid="">Anambra / Njikoka</item>
+    <item key="anambra_nnewi" msgid="">Anambra / Nnewi</item>
+    <item key="anambra_nnewi-north" msgid="">Anambra / Nnewi-North</item>
+    <item key="anambra_nnewi-south" msgid="">Anambra / Nnewi-South</item>
+    <item key="anambra_ogbaru" msgid="">Anambra / Ogbaru</item>
+    <item key="anambra_olumba" msgid="">Anambra / Olumba</item>
+    <item key="anambra_onitsha-north" msgid="">Anambra / Onitsha-North</item>
+    <item key="anambra_onitsha-south" msgid="">Anambra / Onitsha-South</item>
+    <item key="anambra_orumba-north" msgid="">Anambra / Orumba-North</item>
+    <item key="anambra_orumba-south" msgid="">Anambra / Orumba-South</item>
+    <item key="anambra_oti" msgid="">Anambra / Oti</item>
+    <item key="anambra_oyi" msgid="">Anambra / Oyi</item>
+    <item key="anambra_ubuluizor_ihiala" msgid="">Anambra / Ubuluizor Ihiala</item>
+    <item key="anambra_uyi" msgid="">Anambra / Uyi</item>
+    <item key="bauchi_alkaleri" msgid="">Bauchi / Alkaleri</item>
+    <item key="bauchi_bauchi" msgid="">Bauchi / Bauchi</item>
+    <item key="bauchi_bogoro" msgid="">Bauchi / Bogoro</item>
+    <item key="bauchi_damban" msgid="">Bauchi / Damban</item>
+    <item key="bauchi_darazo" msgid="">Bauchi / Darazo</item>
+    <item key="bauchi_dass" msgid="">Bauchi / Dass</item>
+    <item key="bauchi_gamawa" msgid="">Bauchi / Gamawa</item>
+    <item key="bauchi_ganjuwa" msgid="">Bauchi / Ganjuwa</item>
+    <item key="bauchi_giade" msgid="">Bauchi / Giade</item>
+    <item key="bauchi_itas/gadau" msgid="">Bauchi / Itas/Gadau</item>
+    <item key="bauchi_jama'are" msgid="">Bauchi / Jama'are</item>
+    <item key="bauchi_katagum" msgid="">Bauchi / Katagum</item>
+    <item key="bauchi_kirfi" msgid="">Bauchi / Kirfi</item>
+    <item key="bauchi_misau" msgid="">Bauchi / Misau</item>
+    <item key="bauchi_ningi" msgid="">Bauchi / Ningi</item>
+    <item key="bauchi_shira" msgid="">Bauchi / Shira</item>
+    <item key="bauchi_tafawa-balewa" msgid="">Bauchi / Tafawa-Balewa</item>
+    <item key="bauchi_toro" msgid="">Bauchi / Toro</item>
+    <item key="bauchi_warji" msgid="">Bauchi / Warji</item>
+    <item key="bauchi_zaki" msgid="">Bauchi / Zaki</item>
+    <item key="bayelsa_brass" msgid="">Bayelsa / Brass</item>
+    <item key="bayelsa_ekeremor" msgid="">Bayelsa / Ekeremor</item>
+    <item key="bayelsa_kembe" msgid="">Bayelsa / Kembe</item>
+    <item key="bayelsa_kolokuma" msgid="">Bayelsa / Kolokuma</item>
+    <item key="bayelsa_kolokuma/opkuma" msgid="">Bayelsa / Kolokuma/Opkuma</item>
+    <item key="bayelsa_nembe" msgid="">Bayelsa / Nembe</item>
+    <item key="bayelsa_ogbia" msgid="">Bayelsa / Ogbia</item>
+    <item key="bayelsa_sagbama" msgid="">Bayelsa / Sagbama</item>
+    <item key="bayelsa_southern-ijaw" msgid="">Bayelsa / Southern-Ijaw</item>
+    <item key="bayelsa_toru-abubo" msgid="">Bayelsa / Toru-Abubo</item>
+    <item key="bayelsa_yenegoa" msgid="">Bayelsa / Yenegoa</item>
+    <item key="benue_ado" msgid="">Benue / Ado</item>
+    <item key="benue_agatu" msgid="">Benue / Agatu</item>
+    <item key="benue_apa" msgid="">Benue / Apa</item>
+    <item key="benue_buruku" msgid="">Benue / Buruku</item>
+    <item key="benue_gboko" msgid="">Benue / Gboko</item>
+    <item key="benue_guma" msgid="">Benue / Guma</item>
+    <item key="benue_gwer-east" msgid="">Benue / Gwer-East</item>
+    <item key="benue_gwer-west" msgid="">Benue / Gwer-West</item>
+    <item key="benue_katsina-ala" msgid="">Benue / Katsina-Ala</item>
+    <item key="benue_konshisha" msgid="">Benue / Konshisha</item>
+    <item key="benue_kwande" msgid="">Benue / Kwande</item>
+    <item key="benue_logo" msgid="">Benue / Logo</item>
+    <item key="benue_makurdi" msgid="">Benue / Makurdi</item>
+    <item key="benue_ogbadibo" msgid="">Benue / Ogbadibo</item>
+    <item key="benue_ohimini" msgid="">Benue / Ohimini</item>
+    <item key="benue_oju" msgid="">Benue / Oju</item>
+    <item key="benue_okpokwu" msgid="">Benue / Okpokwu</item>
+    <item key="benue_otukpo" msgid="">Benue / Otukpo</item>
+    <item key="benue_oturkpa" msgid="">Benue / Oturkpa</item>
+    <item key="benue_tarka" msgid="">Benue / Tarka</item>
+    <item key="benue_ukum" msgid="">Benue / Ukum</item>
+    <item key="benue_ushongo" msgid="">Benue / Ushongo</item>
+    <item key="benue_vandeikya" msgid="">Benue / Vandeikya</item>
+    <item key="borno_abadan" msgid="">Borno / Abadan</item>
+    <item key="borno_askira-uba" msgid="">Borno / Askira-Uba</item>
+    <item key="borno_bama" msgid="">Borno / Bama</item>
+    <item key="borno_bayo" msgid="">Borno / Bayo</item>
+    <item key="borno_biu" msgid="">Borno / Biu</item>
+    <item key="borno_chibok" msgid="">Borno / Chibok</item>
+    <item key="borno_damboa" msgid="">Borno / Damboa</item>
+    <item key="borno_dikwa" msgid="">Borno / Dikwa</item>
+    <item key="borno_gubio" msgid="">Borno / Gubio</item>
+    <item key="borno_guzamala" msgid="">Borno / Guzamala</item>
+    <item key="borno_gwoza" msgid="">Borno / Gwoza</item>
+    <item key="borno_hawul" msgid="">Borno / Hawul</item>
+    <item key="borno_jere" msgid="">Borno / Jere</item>
+    <item key="borno_kaga" msgid="">Borno / Kaga</item>
+    <item key="borno_kala/balge" msgid="">Borno / Kala/Balge</item>
+    <item key="borno_konduga" msgid="">Borno / Konduga</item>
+    <item key="borno_kukawa" msgid="">Borno / Kukawa</item>
+    <item key="borno_kwaya-kusar" msgid="">Borno / Kwaya-Kusar</item>
+    <item key="borno_mafa" msgid="">Borno / Mafa</item>
+    <item key="borno_magumeri" msgid="">Borno / Magumeri</item>
+    <item key="borno_maiduguri" msgid="">Borno / Maiduguri</item>
+    <item key="borno_marte" msgid="">Borno / Marte</item>
+    <item key="borno_mobbar" msgid="">Borno / Mobbar</item>
+    <item key="borno_mongunu" msgid="">Borno / Mongunu</item>
+    <item key="borno_ngala" msgid="">Borno / Ngala</item>
+    <item key="borno_nganzai" msgid="">Borno / Nganzai</item>
+    <item key="borno_shani" msgid="">Borno / Shani</item>
+    <item key="cross_river_abi" msgid="">Cross River / Abi</item>
+    <item key="cross_river_abuochichie" msgid="">Cross River / Abuochichie</item>
+    <item key="cross_river_akamkpa" msgid="">Cross River / Akamkpa</item>
+    <item key="cross_river_akpabuyo" msgid="">Cross River / Akpabuyo</item>
+    <item key="cross_river_bakassi" msgid="">Cross River / Bakassi</item>
+    <item key="cross_river_bekwara" msgid="">Cross River / Bekwara</item>
+    <item key="cross_river_biasi" msgid="">Cross River / Biasi</item>
+    <item key="cross_river_boki" msgid="">Cross River / Boki</item>
+    <item key="cross_river_calabar-municipal" msgid="">Cross River / Calabar-Municipal</item>
+    <item key="cross_river_calabar-south" msgid="">Cross River / Calabar-South</item>
+    <item key="cross_river_etunk" msgid="">Cross River / Etunk</item>
+    <item key="cross_river_ikom" msgid="">Cross River / Ikom</item>
+    <item key="cross_river_obanliku" msgid="">Cross River / Obanliku</item>
+    <item key="cross_river_obubra" msgid="">Cross River / Obubra</item>
+    <item key="cross_river_obudu" msgid="">Cross River / Obudu</item>
+    <item key="cross_river_odukpani" msgid="">Cross River / Odukpani</item>
+    <item key="cross_river_ogoja" msgid="">Cross River / Ogoja</item>
+    <item key="cross_river_ugep-north" msgid="">Cross River / Ugep-North</item>
+    <item key="cross_river_yakurr" msgid="">Cross River / Yakurr</item>
+    <item key="cross_river_yala" msgid="">Cross River / Yala</item>
+    <item key="delta_aniocha_north" msgid="">Delta / Aniocha North</item>
+    <item key="delta_aniocha-north" msgid="">Delta / Aniocha-North</item>
+    <item key="delta_aniocha-south" msgid="">Delta / Aniocha-South</item>
+    <item key="delta_bomadi" msgid="">Delta / Bomadi</item>
+    <item key="delta_burutu" msgid="">Delta / Burutu</item>
+    <item key="delta_effurun" msgid="">Delta / Effurun</item>
+    <item key="delta_ethiope-east" msgid="">Delta / Ethiope-East</item>
+    <item key="delta_ethiope-west" msgid="">Delta / Ethiope-West</item>
+    <item key="delta_idu" msgid="">Delta / Idu</item>
+    <item key="delta_ika-ne" msgid="">Delta / Ika-Ne</item>
+    <item key="delta_ika-north-east" msgid="">Delta / Ika-North-East</item>
+    <item key="delta_ika-south" msgid="">Delta / Ika-South</item>
+    <item key="delta_ikpemili" msgid="">Delta / Ikpemili</item>
+    <item key="delta_isoko-north" msgid="">Delta / Isoko-North</item>
+    <item key="delta_isoko-south" msgid="">Delta / Isoko-South</item>
+    <item key="delta_ndokwa-east" msgid="">Delta / Ndokwa-East</item>
+    <item key="delta_ndokwa-north" msgid="">Delta / Ndokwa-North</item>
+    <item key="delta_ndokwa-south" msgid="">Delta / Ndokwa-South</item>
+    <item key="delta_ndokwa-west" msgid="">Delta / Ndokwa-West</item>
+    <item key="delta_okpe" msgid="">Delta / Okpe</item>
+    <item key="delta_oleh" msgid="">Delta / Oleh</item>
+    <item key="delta_oshielli-north" msgid="">Delta / Oshielli-North</item>
+    <item key="delta_oshimili" msgid="">Delta / Oshimili</item>
+    <item key="delta_oshimili-north" msgid="">Delta / Oshimili-North</item>
+    <item key="delta_oshimili-south" msgid="">Delta / Oshimili-South</item>
+    <item key="delta_osimili" msgid="">Delta / Osimili</item>
+    <item key="delta_osimili-north" msgid="">Delta / Osimili-North</item>
+    <item key="delta_osimili-south" msgid="">Delta / Osimili-South</item>
+    <item key="delta_patani" msgid="">Delta / Patani</item>
+    <item key="delta_sapele" msgid="">Delta / Sapele</item>
+    <item key="delta_udokwa" msgid="">Delta / Udokwa</item>
+    <item key="delta_udu" msgid="">Delta / Udu</item>
+    <item key="delta_ughelli-north" msgid="">Delta / Ughelli-North</item>
+    <item key="delta_ughelli-south" msgid="">Delta / Ughelli-South</item>
+    <item key="delta_ukwuani" msgid="">Delta / Ukwuani</item>
+    <item key="delta_urwie" msgid="">Delta / Urwie</item>
+    <item key="delta_uvie" msgid="">Delta / Uvie</item>
+    <item key="delta_uvwei" msgid="">Delta / Uvwei</item>
+    <item key="delta_uvwie" msgid="">Delta / Uvwie</item>
+    <item key="delta_warri-central" msgid="">Delta / Warri-Central</item>
+    <item key="delta_warri-north" msgid="">Delta / Warri-North</item>
+    <item key="delta_warri-south" msgid="">Delta / Warri-South</item>
+    <item key="ebonyi_abakaliki" msgid="">Ebonyi / Abakaliki</item>
+    <item key="ebonyi_afikpo-north" msgid="">Ebonyi / Afikpo-North</item>
+    <item key="ebonyi_afikpo-south" msgid="">Ebonyi / Afikpo-South</item>
+    <item key="ebonyi_bomadim" msgid="">Ebonyi / Bomadim</item>
+    <item key="ebonyi_ebonyi" msgid="">Ebonyi / Ebonyi</item>
+    <item key="ebonyi_ezza-north" msgid="">Ebonyi / Ezza-North</item>
+    <item key="ebonyi_ezza-south" msgid="">Ebonyi / Ezza-South</item>
+    <item key="ebonyi_ikwo" msgid="">Ebonyi / Ikwo</item>
+    <item key="ebonyi_ishielu" msgid="">Ebonyi / Ishielu</item>
+    <item key="ebonyi_ivo" msgid="">Ebonyi / Ivo</item>
+    <item key="ebonyi_izzi" msgid="">Ebonyi / Izzi</item>
+    <item key="ebonyi_obaukwu" msgid="">Ebonyi / Obaukwu</item>
+    <item key="ebonyi_ohakwu" msgid="">Ebonyi / Ohakwu</item>
+    <item key="ebonyi_ohaozara" msgid="">Ebonyi / Ohaozara</item>
+    <item key="ebonyi_onicha" msgid="">Ebonyi / Onicha</item>
+    <item key="ebonyi_ukaba" msgid="">Ebonyi / Ukaba</item>
+    <item key="edo_afokpella" msgid="">Edo / Afokpella</item>
+    <item key="edo_afuze" msgid="">Edo / Afuze</item>
+    <item key="edo_agbazilo" msgid="">Edo / Agbazilo</item>
+    <item key="edo_akoko_edo" msgid="">Edo / Akoko Edo</item>
+    <item key="edo_akoko-edo" msgid="">Edo / Akoko-Edo</item>
+    <item key="edo_egor" msgid="">Edo / Egor</item>
+    <item key="edo_esan-central" msgid="">Edo / Esan-Central</item>
+    <item key="edo_esan-north-east_" msgid="">Edo / Esan-North-East</item>
+    <item key="edo_esan-south-east" msgid="">Edo / Esan-South-East</item>
+    <item key="edo_esan-west" msgid="">Edo / Esan-West</item>
+    <item key="edo_etsako-central" msgid="">Edo / Etsako-Central</item>
+    <item key="edo_etsako-east" msgid="">Edo / Etsako-East</item>
+    <item key="edo_etsako-west" msgid="">Edo / Etsako-West</item>
+    <item key="edo_igueben" msgid="">Edo / Igueben</item>
+    <item key="edo_ikpoba-okha" msgid="">Edo / Ikpoba-Okha</item>
+    <item key="edo_ohunmwode" msgid="">Edo / Ohunmwode</item>
+    <item key="edo_ologbo" msgid="">Edo / Ologbo</item>
+    <item key="edo_opoji_irrua" msgid="">Edo / Opoji Irrua</item>
+    <item key="edo_oredo" msgid="">Edo / Oredo</item>
+    <item key="edo_orhionmwon" msgid="">Edo / Orhionmwon</item>
+    <item key="edo_ovia-north-east" msgid="">Edo / Ovia-North-East</item>
+    <item key="edo_ovia-south-west" msgid="">Edo / Ovia-South-West</item>
+    <item key="edo_owan_east" msgid="">Edo / Owan East</item>
+    <item key="edo_owan-east" msgid="">Edo / Owan-East</item>
+    <item key="edo_owan-west" msgid="">Edo / Owan-West</item>
+    <item key="edo_uhunmwonde" msgid="">Edo / Uhunmwonde</item>
+    <item key="ekiti_ado-ekiti" msgid="">Ekiti / Ado-Ekiti</item>
+    <item key="ekiti_aiyekire" msgid="">Ekiti / Aiyekire</item>
+    <item key="ekiti_efon" msgid="">Ekiti / Efon</item>
+    <item key="ekiti_ekiti-east" msgid="">Ekiti / Ekiti-East</item>
+    <item key="ekiti_ekiti-south-west" msgid="">Ekiti / Ekiti-South-West</item>
+    <item key="ekiti_ekiti-west" msgid="">Ekiti / Ekiti-West</item>
+    <item key="ekiti_emure/ise/orun" msgid="">Ekiti / Emure/Ise/Orun</item>
+    <item key="ekiti_gbonyin" msgid="">Ekiti / Gbonyin</item>
+    <item key="ekiti_ido-osi" msgid="">Ekiti / Ido-Osi</item>
+    <item key="ekiti_ijero" msgid="">Ekiti / Ijero</item>
+    <item key="ekiti_ikare" msgid="">Ekiti / Ikare</item>
+    <item key="ekiti_ikere" msgid="">Ekiti / Ikere</item>
+    <item key="ekiti_ikole" msgid="">Ekiti / Ikole</item>
+    <item key="ekiti_ilejemeje" msgid="">Ekiti / Ilejemeje</item>
+    <item key="ekiti_irepodun/ifelodun" msgid="">Ekiti / Irepodun/Ifelodun</item>
+    <item key="ekiti_ise-orun" msgid="">Ekiti / Ise-Orun</item>
+    <item key="ekiti_moba" msgid="">Ekiti / Moba</item>
+    <item key="ekiti_oye" msgid="">Ekiti / Oye</item>
+    <item key="enugu_aninri" msgid="">Enugu / Aninri</item>
+    <item key="enugu_awgu" msgid="">Enugu / Awgu</item>
+    <item key="enugu_enugu-east" msgid="">Enugu / Enugu-East</item>
+    <item key="enugu_enugu-north" msgid="">Enugu / Enugu-North</item>
+    <item key="enugu_enugu-south" msgid="">Enugu / Enugu-South</item>
+    <item key="enugu_ezeagu" msgid="">Enugu / Ezeagu</item>
+    <item key="enugu_igbo-etiti" msgid="">Enugu / Igbo-Etiti</item>
+    <item key="enugu_igbo-eze-north" msgid="">Enugu / Igbo-Eze-North</item>
+    <item key="enugu_igbo-eze-south" msgid="">Enugu / Igbo-Eze-South</item>
+    <item key="enugu_isi-uzo" msgid="">Enugu / Isi-Uzo</item>
+    <item key="enugu_nkanu-east" msgid="">Enugu / Nkanu-East</item>
+    <item key="enugu_nkanu-west" msgid="">Enugu / Nkanu-West</item>
+    <item key="enugu_nsukka" msgid="">Enugu / Nsukka</item>
+    <item key="enugu_nukanu_east" msgid="">Enugu / Nukanu East</item>
+    <item key="enugu_oji-river" msgid="">Enugu / Oji-River</item>
+    <item key="enugu_udenu" msgid="">Enugu / Udenu</item>
+    <item key="enugu_udi" msgid="">Enugu / Udi</item>
+    <item key="enugu_uzo-uwani" msgid="">Enugu / Uzo-Uwani</item>
+    <item key="gombe_akko" msgid="">Gombe / Akko</item>
+    <item key="gombe_balanga" msgid="">Gombe / Balanga</item>
+    <item key="gombe_billiri" msgid="">Gombe / Billiri</item>
+    <item key="gombe_dukku" msgid="">Gombe / Dukku</item>
+    <item key="gombe_funakaye" msgid="">Gombe / Funakaye</item>
+    <item key="gombe_gombe" msgid="">Gombe / Gombe</item>
+    <item key="gombe_kaltungo" msgid="">Gombe / Kaltungo</item>
+    <item key="gombe_kwami" msgid="">Gombe / Kwami</item>
+    <item key="gombe_nafada/bajoga" msgid="">Gombe / Nafada/Bajoga</item>
+    <item key="gombe_shomgom" msgid="">Gombe / Shomgom</item>
+    <item key="gombe_yamaltu/deba" msgid="">Gombe / Yamaltu/Deba</item>
+    <item key="imo_aboh-mbaise" msgid="">Imo / Aboh-Mbaise</item>
+    <item key="imo_ahiazu-mbaise" msgid="">Imo / Ahiazu-Mbaise</item>
+    <item key="imo_dral-esat" msgid="">Imo / Dral-Esat</item>
+    <item key="imo_ehime-mbano" msgid="">Imo / Ehime-Mbano</item>
+    <item key="imo_ezinihitte" msgid="">Imo / Ezinihitte</item>
+    <item key="imo_ideato" msgid="">Imo / Ideato</item>
+    <item key="imo_ideato-north" msgid="">Imo / Ideato-North</item>
+    <item key="imo_ideato-south" msgid="">Imo / Ideato-South</item>
+    <item key="imo_ihitte/uboma" msgid="">Imo / Ihitte/Uboma</item>
+    <item key="imo_ikeduru" msgid="">Imo / Ikeduru</item>
+    <item key="imo_isiala-mbano" msgid="">Imo / Isiala-Mbano</item>
+    <item key="imo_isu" msgid="">Imo / Isu</item>
+    <item key="imo_mbaitoli" msgid="">Imo / Mbaitoli</item>
+    <item key="imo_mbano" msgid="">Imo / Mbano</item>
+    <item key="imo_ngor-okpala" msgid="">Imo / Ngor-Okpala</item>
+    <item key="imo_njaba" msgid="">Imo / Njaba</item>
+    <item key="imo_nkwerre" msgid="">Imo / Nkwerre</item>
+    <item key="imo_nwangele" msgid="">Imo / Nwangele</item>
+    <item key="imo_obowo" msgid="">Imo / Obowo</item>
+    <item key="imo_oguta" msgid="">Imo / Oguta</item>
+    <item key="imo_ohaji-egbema" msgid="">Imo / Ohaji-Egbema</item>
+    <item key="imo_okigwe" msgid="">Imo / Okigwe</item>
+    <item key="imo_onuimo" msgid="">Imo / Onuimo</item>
+    <item key="imo_orlu" msgid="">Imo / Orlu</item>
+    <item key="imo_orsu" msgid="">Imo / Orsu</item>
+    <item key="imo_oru-east" msgid="">Imo / Oru-East</item>
+    <item key="imo_oru-west" msgid="">Imo / Oru-West</item>
+    <item key="imo_owerri-municipal" msgid="">Imo / Owerri-Municipal</item>
+    <item key="imo_owerri-north" msgid="">Imo / Owerri-North</item>
+    <item key="imo_owerri-west" msgid="">Imo / Owerri-West</item>
+    <item key="imo_ugiri-ike_ikeduru" msgid="">Imo / Ugiri-Ike Ikeduru</item>
+    <item key="imo_ugiri-ikedikeduru" msgid="">Imo / Ugiri-Ikedikeduru</item>
+    <item key="imo_unbano" msgid="">Imo / Unbano</item>
+    <item key="imo_zinihitte" msgid="">Imo / Zinihitte</item>
+    <item key="jigawa_auyo" msgid="">Jigawa / Auyo</item>
+    <item key="jigawa_babura" msgid="">Jigawa / Babura</item>
+    <item key="jigawa_biriniwa" msgid="">Jigawa / Biriniwa</item>
+    <item key="jigawa_birnin-kudu" msgid="">Jigawa / Birnin-Kudu</item>
+    <item key="jigawa_bosuwa" msgid="">Jigawa / Bosuwa</item>
+    <item key="jigawa_buji" msgid="">Jigawa / Buji</item>
+    <item key="jigawa_dutse" msgid="">Jigawa / Dutse</item>
+    <item key="jigawa_gagarawa" msgid="">Jigawa / Gagarawa</item>
+    <item key="jigawa_garki" msgid="">Jigawa / Garki</item>
+    <item key="jigawa_gumel" msgid="">Jigawa / Gumel</item>
+    <item key="jigawa_guri" msgid="">Jigawa / Guri</item>
+    <item key="jigawa_gwaram" msgid="">Jigawa / Gwaram</item>
+    <item key="jigawa_gwiwa" msgid="">Jigawa / Gwiwa</item>
+    <item key="jigawa_hadejia" msgid="">Jigawa / Hadejia</item>
+    <item key="jigawa_jahun" msgid="">Jigawa / Jahun</item>
+    <item key="jigawa_kafin-hausa" msgid="">Jigawa / Kafin-Hausa</item>
+    <item key="jigawa_kaugama" msgid="">Jigawa / Kaugama</item>
+    <item key="jigawa_kazaure" msgid="">Jigawa / Kazaure</item>
+    <item key="jigawa_kirkasamma" msgid="">Jigawa / Kirkasamma</item>
+    <item key="jigawa_maigatari" msgid="">Jigawa / Maigatari</item>
+    <item key="jigawa_malam-maduri" msgid="">Jigawa / Malam-Maduri</item>
+    <item key="jigawa_miga" msgid="">Jigawa / Miga</item>
+    <item key="jigawa_ringim" msgid="">Jigawa / Ringim</item>
+    <item key="jigawa_roni" msgid="">Jigawa / Roni</item>
+    <item key="jigawa_sule-tankarkar" msgid="">Jigawa / Sule-Tankarkar</item>
+    <item key="jigawa_taura" msgid="">Jigawa / Taura</item>
+    <item key="jigawa_yankwashi" msgid="">Jigawa / Yankwashi</item>
+    <item key="kaduna_birnin-gwari" msgid="">Kaduna / Birnin-Gwari</item>
+    <item key="kaduna_chikun" msgid="">Kaduna / Chikun</item>
+    <item key="kaduna_giwa" msgid="">Kaduna / Giwa</item>
+    <item key="kaduna_gwagwada" msgid="">Kaduna / Gwagwada</item>
+    <item key="kaduna_igabi" msgid="">Kaduna / Igabi</item>
+    <item key="kaduna_ikara" msgid="">Kaduna / Ikara</item>
+    <item key="kaduna_jaba" msgid="">Kaduna / Jaba</item>
+    <item key="kaduna_jema'a" msgid="">Kaduna / Jema'a</item>
+    <item key="kaduna_kachia" msgid="">Kaduna / Kachia</item>
+    <item key="kaduna_kaduna-north" msgid="">Kaduna / Kaduna-North</item>
+    <item key="kaduna_kagarko" msgid="">Kaduna / Kagarko</item>
+    <item key="kaduna_kajuru" msgid="">Kaduna / Kajuru</item>
+    <item key="kaduna_kaura" msgid="">Kaduna / Kaura</item>
+    <item key="kaduna_kauru" msgid="">Kaduna / Kauru</item>
+    <item key="kaduna_koka/kawo" msgid="">Kaduna / Koka/Kawo</item>
+    <item key="kaduna_kubah" msgid="">Kaduna / Kubah</item>
+    <item key="kaduna_kudan" msgid="">Kaduna / Kudan</item>
+    <item key="kaduna_lere" msgid="">Kaduna / Lere</item>
+    <item key="kaduna_makarfi" msgid="">Kaduna / Makarfi</item>
+    <item key="kaduna_sabon-gari" msgid="">Kaduna / Sabon-Gari</item>
+    <item key="kaduna_sanga" msgid="">Kaduna / Sanga</item>
+    <item key="kaduna_soba" msgid="">Kaduna / Soba</item>
+    <item key="kaduna_tudun-wada/makera" msgid="">Kaduna / Tudun-Wada/Makera</item>
+    <item key="kaduna_zango-kataf" msgid="">Kaduna / Zango-Kataf</item>
+    <item key="kaduna_zaria" msgid="">Kaduna / Zaria</item>
+    <item key="kano_ajingi" msgid="">Kano / Ajingi</item>
+    <item key="kano_albasu" msgid="">Kano / Albasu</item>
+    <item key="kano_bagwai" msgid="">Kano / Bagwai</item>
+    <item key="kano_bebeji" msgid="">Kano / Bebeji</item>
+    <item key="kano_bichi" msgid="">Kano / Bichi</item>
+    <item key="kano_bunkure" msgid="">Kano / Bunkure</item>
+    <item key="kano_dala" msgid="">Kano / Dala</item>
+    <item key="kano_dambatta" msgid="">Kano / Dambatta</item>
+    <item key="kano_dawakin-kudu" msgid="">Kano / Dawakin-Kudu</item>
+    <item key="kano_dawakin-tofa" msgid="">Kano / Dawakin-Tofa</item>
+    <item key="kano_doguwa" msgid="">Kano / Doguwa</item>
+    <item key="kano_fagge" msgid="">Kano / Fagge</item>
+    <item key="kano_gabasawa" msgid="">Kano / Gabasawa</item>
+    <item key="kano_garko" msgid="">Kano / Garko</item>
+    <item key="kano_garun-mallam" msgid="">Kano / Garun-Mallam</item>
+    <item key="kano_gaya" msgid="">Kano / Gaya</item>
+    <item key="kano_gezawa" msgid="">Kano / Gezawa</item>
+    <item key="kano_gwale" msgid="">Kano / Gwale</item>
+    <item key="kano_gwarzo" msgid="">Kano / Gwarzo</item>
+    <item key="kano_kano-municipal" msgid="">Kano / Kano-Municipal</item>
+    <item key="kano_karaye" msgid="">Kano / Karaye</item>
+    <item key="kano_kibiya" msgid="">Kano / Kibiya</item>
+    <item key="kano_kiru" msgid="">Kano / Kiru</item>
+    <item key="kano_kumbotso" msgid="">Kano / Kumbotso</item>
+    <item key="kano_kunchi" msgid="">Kano / Kunchi</item>
+    <item key="kano_kura" msgid="">Kano / Kura</item>
+    <item key="kano_madobi" msgid="">Kano / Madobi</item>
+    <item key="kano_makoda" msgid="">Kano / Makoda</item>
+    <item key="kano_minjibir" msgid="">Kano / Minjibir</item>
+    <item key="kano_nasarawa" msgid="">Kano / Nasarawa</item>
+    <item key="kano_rano" msgid="">Kano / Rano</item>
+    <item key="kano_rimin-gado" msgid="">Kano / Rimin-Gado</item>
+    <item key="kano_rogo" msgid="">Kano / Rogo</item>
+    <item key="kano_shanono" msgid="">Kano / Shanono</item>
+    <item key="kano_sumaila" msgid="">Kano / Sumaila</item>
+    <item key="kano_takai" msgid="">Kano / Takai</item>
+    <item key="kano_tarauni" msgid="">Kano / Tarauni</item>
+    <item key="kano_tofa" msgid="">Kano / Tofa</item>
+    <item key="kano_tsanyawa" msgid="">Kano / Tsanyawa</item>
+    <item key="kano_tudun-wada" msgid="">Kano / Tudun-Wada</item>
+    <item key="kano_ungogo" msgid="">Kano / Ungogo</item>
+    <item key="kano_warawa" msgid="">Kano / Warawa</item>
+    <item key="kano_wudil" msgid="">Kano / Wudil</item>
+    <item key="katsina_bakori" msgid="">Katsina / Bakori</item>
+    <item key="katsina_batagarawa" msgid="">Katsina / Batagarawa</item>
+    <item key="katsina_batsari" msgid="">Katsina / Batsari</item>
+    <item key="katsina_baure" msgid="">Katsina / Baure</item>
+    <item key="katsina_bindawa" msgid="">Katsina / Bindawa</item>
+    <item key="katsina_charanchi" msgid="">Katsina / Charanchi</item>
+    <item key="katsina_dan-musa" msgid="">Katsina / Dan-Musa</item>
+    <item key="katsina_dandume" msgid="">Katsina / Dandume</item>
+    <item key="katsina_danji" msgid="">Katsina / Danji</item>
+    <item key="katsina_daura" msgid="">Katsina / Daura</item>
+    <item key="katsina_dutsi" msgid="">Katsina / Dutsi</item>
+    <item key="katsina_dutsinma" msgid="">Katsina / Dutsinma</item>
+    <item key="katsina_faskari" msgid="">Katsina / Faskari</item>
+    <item key="katsina_funtua" msgid="">Katsina / Funtua</item>
+    <item key="katsina_ingawa" msgid="">Katsina / Ingawa</item>
+    <item key="katsina_jibia" msgid="">Katsina / Jibia</item>
+    <item key="katsina_kafur" msgid="">Katsina / Kafur</item>
+    <item key="katsina_kaita" msgid="">Katsina / Kaita</item>
+    <item key="katsina_kankara" msgid="">Katsina / Kankara</item>
+    <item key="katsina_kankia" msgid="">Katsina / Kankia</item>
+    <item key="katsina_katsina" msgid="">Katsina / Katsina</item>
+    <item key="katsina_kurfi" msgid="">Katsina / Kurfi</item>
+    <item key="katsina_kusada" msgid="">Katsina / Kusada</item>
+    <item key="katsina_mai-adua" msgid="">Katsina / Mai-Adua</item>
+    <item key="katsina_malumfashi" msgid="">Katsina / Malumfashi</item>
+    <item key="katsina_mani" msgid="">Katsina / Mani</item>
+    <item key="katsina_mashi" msgid="">Katsina / Mashi</item>
+    <item key="katsina_matazu" msgid="">Katsina / Matazu</item>
+    <item key="katsina_musawa" msgid="">Katsina / Musawa</item>
+    <item key="katsina_rimi" msgid="">Katsina / Rimi</item>
+    <item key="katsina_sabuwa" msgid="">Katsina / Sabuwa</item>
+    <item key="katsina_safana" msgid="">Katsina / Safana</item>
+    <item key="katsina_sandamu" msgid="">Katsina / Sandamu</item>
+    <item key="katsina_zango" msgid="">Katsina / Zango</item>
+    <item key="kebbi_aleiro" msgid="">Kebbi / Aleiro</item>
+    <item key="kebbi_arewa-dandi" msgid="">Kebbi / Arewa-Dandi</item>
+    <item key="kebbi_argungu" msgid="">Kebbi / Argungu</item>
+    <item key="kebbi_augie" msgid="">Kebbi / Augie</item>
+    <item key="kebbi_bagudo" msgid="">Kebbi / Bagudo</item>
+    <item key="kebbi_birnin-kebbi" msgid="">Kebbi / Birnin-Kebbi</item>
+    <item key="kebbi_bumza" msgid="">Kebbi / Bumza</item>
+    <item key="kebbi_dandi" msgid="">Kebbi / Dandi</item>
+    <item key="kebbi_danko" msgid="">Kebbi / Danko</item>
+    <item key="kebbi_fakai" msgid="">Kebbi / Fakai</item>
+    <item key="kebbi_gwandu" msgid="">Kebbi / Gwandu</item>
+    <item key="kebbi_jega" msgid="">Kebbi / Jega</item>
+    <item key="kebbi_kalgo" msgid="">Kebbi / Kalgo</item>
+    <item key="kebbi_koko-besse" msgid="">Kebbi / Koko-Besse</item>
+    <item key="kebbi_maiyama" msgid="">Kebbi / Maiyama</item>
+    <item key="kebbi_ngaski" msgid="">Kebbi / Ngaski</item>
+    <item key="kebbi_sakaba" msgid="">Kebbi / Sakaba</item>
+    <item key="kebbi_shanga" msgid="">Kebbi / Shanga</item>
+    <item key="kebbi_suru" msgid="">Kebbi / Suru</item>
+    <item key="kebbi_wasagu" msgid="">Kebbi / Wasagu</item>
+    <item key="kebbi_yauri" msgid="">Kebbi / Yauri</item>
+    <item key="kebbi_zuru" msgid="">Kebbi / Zuru</item>
+    <item key="kogi_adavi" msgid="">Kogi / Adavi</item>
+    <item key="kogi_ajaokuta" msgid="">Kogi / Ajaokuta</item>
+    <item key="kogi_ankpa" msgid="">Kogi / Ankpa</item>
+    <item key="kogi_dekina" msgid="">Kogi / Dekina</item>
+    <item key="kogi_ibaji" msgid="">Kogi / Ibaji</item>
+    <item key="kogi_idah" msgid="">Kogi / Idah</item>
+    <item key="kogi_igalamela" msgid="">Kogi / Igalamela</item>
+    <item key="kogi_ijumu" msgid="">Kogi / Ijumu</item>
+    <item key="kogi_ikoyi-ijumu" msgid="">Kogi / Ikoyi-Ijumu</item>
+    <item key="kogi_kabba/bunu" msgid="">Kogi / Kabba/Bunu</item>
+    <item key="kogi_kogi" msgid="">Kogi / Kogi</item>
+    <item key="kogi_lokoja" msgid="">Kogi / Lokoja</item>
+    <item key="kogi_mopa-muro-mopi" msgid="">Kogi / Mopa-Muro</item>
+    <item key="kogi_obaji" msgid="">Kogi / Obaji</item>
+    <item key="kogi_ofu" msgid="">Kogi / Ofu</item>
+    <item key="kogi_ogori/magongo" msgid="">Kogi / Ogori/Magongo</item>
+    <item key="kogi_okehi" msgid="">Kogi / Okehi</item>
+    <item key="kogi_okene" msgid="">Kogi / Okene</item>
+    <item key="kogi_olamaboro" msgid="">Kogi / Olamaboro</item>
+    <item key="kogi_omala" msgid="">Kogi / Omala</item>
+    <item key="kogi_oru" msgid="">Kogi / Oru</item>
+    <item key="kogi_oyi" msgid="">Kogi / Oyi</item>
+    <item key="kogi_yagba-east" msgid="">Kogi / Yagba-East</item>
+    <item key="kogi_yagba-west" msgid="">Kogi / Yagba-West</item>
+    <item key="kwara_asa" msgid="">Kwara / Asa</item>
+    <item key="kwara_baruten" msgid="">Kwara / Baruten</item>
+    <item key="kwara_edu" msgid="">Kwara / Edu</item>
+    <item key="kwara_ekiti" msgid="">Kwara / Ekiti</item>
+    <item key="kwara_ilorin-east" msgid="">Kwara / Ilorin-East</item>
+    <item key="kwara_ilorin-south" msgid="">Kwara / Ilorin-South</item>
+    <item key="kwara_ilorin-west" msgid="">Kwara / Ilorin-West</item>
+    <item key="kwara_isin" msgid="">Kwara / Isin</item>
+    <item key="kwara_kaiama" msgid="">Kwara / Kaiama</item>
+    <item key="kwara_moro" msgid="">Kwara / Moro</item>
+    <item key="kwara_offa" msgid="">Kwara / Offa</item>
+    <item key="kwara_oke-ero" msgid="">Kwara / Oke-Ero</item>
+    <item key="kwara_oyun" msgid="">Kwara / Oyun</item>
+    <item key="kwara_pategi" msgid="">Kwara / Pategi</item>
+    <item key="lagos_agege" msgid="">Lagos / Agege</item>
+    <item key="lagos_ajeromi-ifelodun" msgid="">Lagos / Ajeromi-Ifelodun</item>
+    <item key="lagos_alimosho" msgid="">Lagos / Alimosho</item>
+    <item key="lagos_amuwo-odofin" msgid="">Lagos / Amuwo-Odofin</item>
+    <item key="lagos_apapa" msgid="">Lagos / Apapa</item>
+    <item key="lagos_badagry" msgid="">Lagos / Badagry</item>
+    <item key="lagos_epe" msgid="">Lagos / Epe</item>
+    <item key="lagos_eti-osa" msgid="">Lagos / Eti-Osa</item>
+    <item key="lagos_ibeju-lekki" msgid="">Lagos / Ibeju-Lekki</item>
+    <item key="lagos_ifako-ijaiye" msgid="">Lagos / Ifako-Ijaiye</item>
+    <item key="lagos_ikeja" msgid="">Lagos / Ikeja</item>
+    <item key="lagos_ikorodu" msgid="">Lagos / Ikorodu</item>
+    <item key="lagos_island" msgid="">Lagos / Island</item>
+    <item key="lagos_kosofe" msgid="">Lagos / Kosofe</item>
+    <item key="lagos_lagos-island" msgid="">Lagos / Lagos-Island</item>
+    <item key="lagos_lagos-mainland" msgid="">Lagos / Lagos-Mainland</item>
+    <item key="lagos_mushin" msgid="">Lagos / Mushin</item>
+    <item key="lagos_ojo" msgid="">Lagos / Ojo</item>
+    <item key="lagos_oshodi-isolo" msgid="">Lagos / Oshodi-Isolo</item>
+    <item key="lagos_shomolu" msgid="">Lagos / Shomolu</item>
+    <item key="lagos_somolu" msgid="">Lagos / Somolu</item>
+    <item key="lagos_suru-lere" msgid="">Lagos / Suru-Lere</item>
+    <item key="nassarawa_akwanga" msgid="">Nassarawa / Akwanga</item>
+    <item key="nassarawa_awe" msgid="">Nassarawa / Awe</item>
+    <item key="nassarawa_doma" msgid="">Nassarawa / Doma</item>
+    <item key="nassarawa_karu" msgid="">Nassarawa / Karu</item>
+    <item key="nassarawa_keana" msgid="">Nassarawa / Keana</item>
+    <item key="nassarawa_keffi" msgid="">Nassarawa / Keffi</item>
+    <item key="nassarawa_kokona" msgid="">Nassarawa / Kokona</item>
+    <item key="nassarawa_lafia" msgid="">Nassarawa / Lafia</item>
+    <item key="nassarawa_nassawara" msgid="">Nassarawa / Nassawara</item>
+    <item key="nassarawa_nassarawa" msgid="">Nassarawa / Nassarawa</item>
+    <item key="nassarawa_nassawara_eggon" msgid="">Nassarawa / Nassawara Eggon</item>
+    <item key="nassarawa_obi" msgid="">Nassarawa / Obi</item>
+    <item key="nassarawa_wambu" msgid="">Nassarawa / Wambu</item>
+    <item key="niger_agaie" msgid="">Niger / Agaie</item>
+    <item key="niger_agwara" msgid="">Niger / Agwara</item>
+    <item key="niger_bida" msgid="">Niger / Bida</item>
+    <item key="niger_borgu" msgid="">Niger / Borgu</item>
+    <item key="niger_bosso" msgid="">Niger / Bosso</item>
+    <item key="niger_chanchaga" msgid="">Niger / Chanchaga</item>
+    <item key="niger_edati" msgid="">Niger / Edati</item>
+    <item key="niger_gbako" msgid="">Niger / Gbako</item>
+    <item key="niger_gurara" msgid="">Niger / Gurara</item>
+    <item key="niger_katcha" msgid="">Niger / Katcha</item>
+    <item key="niger_kontagora" msgid="">Niger / Kontagora</item>
+    <item key="niger_lapai" msgid="">Niger / Lapai</item>
+    <item key="niger_lavun" msgid="">Niger / Lavun</item>
+    <item key="niger_magama" msgid="">Niger / Magama</item>
+    <item key="niger_mariga" msgid="">Niger / Mariga</item>
+    <item key="niger_mashegu" msgid="">Niger / Mashegu</item>
+    <item key="niger_mokwa" msgid="">Niger / Mokwa</item>
+    <item key="niger_muya" msgid="">Niger / Muya</item>
+    <item key="niger_paikoro" msgid="">Niger / Paikoro</item>
+    <item key="niger_rafi" msgid="">Niger / Rafi</item>
+    <item key="niger_rijau" msgid="">Niger / Rijau</item>
+    <item key="niger_shiroro" msgid="">Niger / Shiroro</item>
+    <item key="niger_suleja" msgid="">Niger / Suleja</item>
+    <item key="niger_tafa" msgid="">Niger / Tafa</item>
+    <item key="niger_wushishi" msgid="">Niger / Wushishi</item>
+    <item key="ogun_abeokuta-north" msgid="">Ogun / Abeokuta-North</item>
+    <item key="ogun_abeokuta-south" msgid="">Ogun / Abeokuta-South</item>
+    <item key="ogun_ado-odo/ota" msgid="">Ogun / Ado-Odo/Ota</item>
+    <item key="ogun_adoodo-ota" msgid="">Ogun / Adoodo-Ota</item>
+    <item key="ogun_ewekoro" msgid="">Ogun / Ewekoro</item>
+    <item key="ogun_idarapo" msgid="">Ogun / Idarapo</item>
+    <item key="ogun_iffo-otta" msgid="">Ogun / Iffo-Otta</item>
+    <item key="ogun_ifo" msgid="">Ogun / Ifo</item>
+    <item key="ogun_igbado-north" msgid="">Ogun / Igbado-North</item>
+    <item key="ogun_igbado-south" msgid="">Ogun / Igbado-South</item>
+    <item key="ogun_ijebu-east" msgid="">Ogun / Ijebu-East</item>
+    <item key="ogun_ijebu-north" msgid="">Ogun / Ijebu-North</item>
+    <item key="ogun_ijebu-north-east" msgid="">Ogun / Ijebu-North-East</item>
+    <item key="ogun_ijebu-ode" msgid="">Ogun / Ijebu-Ode</item>
+    <item key="ogun_ikenne" msgid="">Ogun / Ikenne</item>
+    <item key="ogun_ilishan_remo" msgid="">Ogun / Ilishan Remo</item>
+    <item key="ogun_ilugun-alaro" msgid="">Ogun / Ilugun-Alaro</item>
+    <item key="ogun_imeko-afon" msgid="">Ogun / Imeko-Afon</item>
+    <item key="ogun_ipokia" msgid="">Ogun / Ipokia</item>
+    <item key="ogun_lgayekpe_" msgid="">Ogun / Lgayekpe</item>
+    <item key="ogun_obafemi-owode" msgid="">Ogun / Obafemi-Owode</item>
+    <item key="ogun_odedah" msgid="">Ogun / Odedah</item>
+    <item key="ogun_odogbolu" msgid="">Ogun / Odogbolu</item>
+    <item key="ogun_ogun-waterside" msgid="">Ogun / Ogun-Waterside</item>
+    <item key="ogun_remo-north" msgid="">Ogun / Remo-North</item>
+    <item key="ogun_sagamu" msgid="">Ogun / Sagamu</item>
+    <item key="ogun_shagamu" msgid="">Ogun / Shagamu</item>
+    <item key="ogun_yewa" msgid="">Ogun / Yewa</item>
+    <item key="ondo_akoko" msgid="">Ondo / Akoko</item>
+    <item key="ondo_akoko-north" msgid="">Ondo / Akoko-North</item>
+    <item key="ondo_akoko-north-west" msgid="">Ondo / Akoko-North-West</item>
+    <item key="ondo_akoko-south" msgid="">Ondo / Akoko-South</item>
+    <item key="ondo_akoko-south-east" msgid="">Ondo / Akoko-South-East</item>
+    <item key="ondo_akure" msgid="">Ondo / Akure</item>
+    <item key="ondo_akure-north" msgid="">Ondo / Akure-North</item>
+    <item key="ondo_akure-south" msgid="">Ondo / Akure-South</item>
+    <item key="ondo_ese-odo" msgid="">Ondo / Ese-Odo</item>
+    <item key="ondo_idanre" msgid="">Ondo / Idanre</item>
+    <item key="ondo_ifedore" msgid="">Ondo / Ifedore</item>
+    <item key="ondo_ikale" msgid="">Ondo / Ikale</item>
+    <item key="ondo_ilaje" msgid="">Ondo / Ilaje</item>
+    <item key="ondo_ilaje-west" msgid="">Ondo / Ilaje-West</item>
+    <item key="ondo_ile-oluji-okeigbo" msgid="">Ondo / Ile-Oluji-Okeigbo</item>
+    <item key="ondo_irele" msgid="">Ondo / Irele</item>
+    <item key="ondo_odigbo" msgid="">Ondo / Odigbo</item>
+    <item key="ondo_okiti-pupa" msgid="">Ondo / Okiti-Pupa</item>
+    <item key="ondo_ondo" msgid="">Ondo / Ondo</item>
+    <item key="ondo_ondo-east" msgid="">Ondo / Ondo-East</item>
+    <item key="ondo_ose" msgid="">Ondo / Ose</item>
+    <item key="ondo_owo" msgid="">Ondo / Owo</item>
+    <item key="osun_atakumosa" msgid="">Osun / Atakumosa</item>
+    <item key="osun_atakumosa_east" msgid="">Osun / Atakumosa East</item>
+    <item key="osun_ayeda-ade" msgid="">Osun / Ayeda-Ade</item>
+    <item key="osun_ayedire" msgid="">Osun / Ayedire</item>
+    <item key="osun_boluwaduro" msgid="">Osun / Boluwaduro</item>
+    <item key="osun_boripe" msgid="">Osun / Boripe</item>
+    <item key="osun_ede" msgid="">Osun / Ede</item>
+    <item key="osun_ede_north" msgid="">Osun / Ede North</item>
+    <item key="osun_egbedore" msgid="">Osun / Egbedore</item>
+    <item key="osun_ejigbo" msgid="">Osun / Ejigbo</item>
+    <item key="osun_ife" msgid="">Osun / Ife</item>
+    <item key="osun_ife_north" msgid="">Osun / Ife North</item>
+    <item key="osun_ife_south" msgid="">Osun / Ife South</item>
+    <item key="osun_ife-central" msgid="">Osun / Ife-Central</item>
+    <item key="osun_ife-east" msgid="">Osun / Ife-East</item>
+    <item key="osun_ifelodun" msgid="">Osun / Ifelodun</item>
+    <item key="osun_ila" msgid="">Osun / Ila</item>
+    <item key="osun_ilesa-east" msgid="">Osun / Ilesa-East</item>
+    <item key="osun_ilesa-west" msgid="">Osun / Ilesa-West</item>
+    <item key="osun_ilesha" msgid="">Osun / Ilesha</item>
+    <item key="osun_ilesha_west" msgid="">Osun / Ilesha West</item>
+    <item key="osun_irepodun" msgid="">Osun / Irepodun</item>
+    <item key="osun_irewole" msgid="">Osun / Irewole</item>
+    <item key="osun_isokan" msgid="">Osun / Isokan</item>
+    <item key="osun_iwo" msgid="">Osun / Iwo</item>
+    <item key="osun_obokun" msgid="">Osun / Obokun</item>
+    <item key="osun_odo-otin" msgid="">Osun / Odo-Otin</item>
+    <item key="osun_ola_oluwa" msgid="">Osun / Ola Oluwa</item>
+    <item key="osun_olorunda" msgid="">Osun / Olorunda</item>
+    <item key="osun_ori-ade" msgid="">Osun / Ori-Ade</item>
+    <item key="osun_orolu" msgid="">Osun / Orolu</item>
+    <item key="osun_osogbo" msgid="">Osun / Osogbo</item>
+    <item key="oyo_afijio" msgid="">Oyo / Afijio</item>
+    <item key="oyo_akinyele" msgid="">Oyo / Akinyele</item>
+    <item key="oyo_atiba" msgid="">Oyo / Atiba</item>
+    <item key="oyo_atigbo" msgid="">Oyo / Atigbo</item>
+    <item key="oyo_egbeda" msgid="">Oyo / Egbeda</item>
+    <item key="oyo_ibadan-central" msgid="">Oyo / Ibadan-Central</item>
+    <item key="oyo_ibadan-north-east" msgid="">Oyo / Ibadan-North-East</item>
+    <item key="oyo_ibadan-north-west" msgid="">Oyo / Ibadan-North-West</item>
+    <item key="oyo_ibadan-south-east" msgid="">Oyo / Ibadan-South-East</item>
+    <item key="oyo_ibadan-south-west" msgid="">Oyo / Ibadan-South-West</item>
+    <item key="oyo_ibarapa-central" msgid="">Oyo / Ibarapa-Central</item>
+    <item key="oyo_ibarapa-east" msgid="">Oyo / Ibarapa-East</item>
+    <item key="oyo_ibarapa-north" msgid="">Oyo / Ibarapa-North</item>
+    <item key="oyo_ido" msgid="">Oyo / Ido</item>
+    <item key="oyo_ifedayo" msgid="">Oyo / Ifedayo</item>
+    <item key="oyo_ifeloju" msgid="">Oyo / Ifeloju</item>
+    <item key="oyo_irepo" msgid="">Oyo / Irepo</item>
+    <item key="oyo_iseyin" msgid="">Oyo / Iseyin</item>
+    <item key="oyo_itseiwaju" msgid="">Oyo / Itseiwaju</item>
+    <item key="oyo_iwajowa" msgid="">Oyo / Iwajowa</item>
+    <item key="oyo_kajola" msgid="">Oyo / Kajola</item>
+    <item key="oyo_lagelu" msgid="">Oyo / Lagelu</item>
+    <item key="oyo_odo-oluwa" msgid="">Oyo / Odo-Oluwa</item>
+    <item key="oyo_ogbomosho-north" msgid="">Oyo / Ogbomosho-North</item>
+    <item key="oyo_ogbomosho-south" msgid="">Oyo / Ogbomosho-South</item>
+    <item key="oyo_olorunsogo" msgid="">Oyo / Olorunsogo</item>
+    <item key="oyo_oluyole" msgid="">Oyo / Oluyole</item>
+    <item key="oyo_ona-ara" msgid="">Oyo / Ona-Ara</item>
+    <item key="oyo_orelope" msgid="">Oyo / Orelope</item>
+    <item key="oyo_ori-ire" msgid="">Oyo / Ori-Ire</item>
+    <item key="oyo_oyo-west" msgid="">Oyo / Oyo-West</item>
+    <item key="oyo_saki-east" msgid="">Oyo / Saki-East</item>
+    <item key="oyo_saki-west" msgid="">Oyo / Saki-West</item>
+    <item key="oyo_surulere" msgid="">Oyo / Surulere</item>
+    <item key="plateau_barkin-ladi" msgid="">Plateau / Barkin-Ladi</item>
+    <item key="plateau_bassa" msgid="">Plateau / Bassa</item>
+    <item key="plateau_bokkos" msgid="">Plateau / Bokkos</item>
+    <item key="plateau_jos-east" msgid="">Plateau / Jos-East</item>
+    <item key="plateau_jos-north" msgid="">Plateau / Jos-North</item>
+    <item key="plateau_jos-south" msgid="">Plateau / Jos-South</item>
+    <item key="plateau_kanam" msgid="">Plateau / Kanam</item>
+    <item key="plateau_kanke" msgid="">Plateau / Kanke</item>
+    <item key="plateau_langtang-north" msgid="">Plateau / Langtang-North</item>
+    <item key="plateau_langtang-south" msgid="">Plateau / Langtang-South</item>
+    <item key="plateau_mangu" msgid="">Plateau / Mangu</item>
+    <item key="plateau_mikang" msgid="">Plateau / Mikang</item>
+    <item key="plateau_pankshin" msgid="">Plateau / Pankshin</item>
+    <item key="plateau_quan'anpan" msgid="">Plateau / Quan'anpan</item>
+    <item key="plateau_riyom" msgid="">Plateau / Riyom</item>
+    <item key="plateau_shendam" msgid="">Plateau / Shendam</item>
+    <item key="plateau_wase" msgid="">Plateau / Wase</item>
+    <item key="rivers_aboa/odual" msgid="">Rivers / Aboa/Odual</item>
+    <item key="rivers_ahoada-east" msgid="">Rivers / Ahoada-East</item>
+    <item key="rivers_ahoada-west" msgid="">Rivers / Ahoada-West</item>
+    <item key="rivers_akukutoru" msgid="">Rivers / Akukutoru</item>
+    <item key="rivers_andoni" msgid="">Rivers / Andoni</item>
+    <item key="rivers_asari-toru" msgid="">Rivers / Asari-Toru</item>
+    <item key="rivers_bonny" msgid="">Rivers / Bonny</item>
+    <item key="rivers_buguma" msgid="">Rivers / Buguma</item>
+    <item key="rivers_degema" msgid="">Rivers / Degema</item>
+    <item key="rivers_eleme" msgid="">Rivers / Eleme</item>
+    <item key="rivers_elfane" msgid="">Rivers / Elfane</item>
+    <item key="rivers_emuoha" msgid="">Rivers / Emuoha</item>
+    <item key="rivers_etche" msgid="">Rivers / Etche</item>
+    <item key="rivers_gokana" msgid="">Rivers / Gokana</item>
+    <item key="rivers_ikwerre" msgid="">Rivers / Ikwerre</item>
+    <item key="rivers_khana" msgid="">Rivers / Khana</item>
+    <item key="rivers_obia/akpor" msgid="">Rivers / Obia/Akpor</item>
+    <item key="rivers_ogba-egbema-ndoni" msgid="">Rivers / Ogba-Egbema-Ndoni</item>
+    <item key="rivers_ogba/egbema/ndoni" msgid="">Rivers / Ogba/Egbema/Ndoni</item>
+    <item key="rivers_ogu/bolo" msgid="">Rivers / Ogu/Bolo</item>
+    <item key="rivers_okirika" msgid="">Rivers / Okirika</item>
+    <item key="rivers_omuma" msgid="">Rivers / Omuma</item>
+    <item key="rivers_opobo/nkoro" msgid="">Rivers / Opobo/Nkoro</item>
+    <item key="rivers_oyigbo" msgid="">Rivers / Oyigbo</item>
+    <item key="rivers_port-harcourt" msgid="">Rivers / Port-Harcourt</item>
+    <item key="rivers_tai" msgid="">Rivers / Tai</item>
+    <item key="sokoto_binji" msgid="">Sokoto / Binji</item>
+    <item key="sokoto_bodinga" msgid="">Sokoto / Bodinga</item>
+    <item key="sokoto_dange-shuni" msgid="">Sokoto / Dange-Shuni</item>
+    <item key="sokoto_gada" msgid="">Sokoto / Gada</item>
+    <item key="sokoto_goronyo" msgid="">Sokoto / Goronyo</item>
+    <item key="sokoto_gudu" msgid="">Sokoto / Gudu</item>
+    <item key="sokoto_gwadabawa" msgid="">Sokoto / Gwadabawa</item>
+    <item key="sokoto_illela" msgid="">Sokoto / Illela</item>
+    <item key="sokoto_kebbe" msgid="">Sokoto / Kebbe</item>
+    <item key="sokoto_kware" msgid="">Sokoto / Kware</item>
+    <item key="sokoto_raba" msgid="">Sokoto / Raba</item>
+    <item key="sokoto_sabo-birni" msgid="">Sokoto / Sabo-Birni</item>
+    <item key="sokoto_shagari" msgid="">Sokoto / Shagari</item>
+    <item key="sokoto_silame" msgid="">Sokoto / Silame</item>
+    <item key="sokoto_sokoto-north" msgid="">Sokoto / Sokoto-North</item>
+    <item key="sokoto_sokoto-south" msgid="">Sokoto / Sokoto-South</item>
+    <item key="sokoto_tambuwal" msgid="">Sokoto / Tambuwal</item>
+    <item key="sokoto_tangaza" msgid="">Sokoto / Tangaza</item>
+    <item key="sokoto_tureta" msgid="">Sokoto / Tureta</item>
+    <item key="sokoto_wamakko" msgid="">Sokoto / Wamakko</item>
+    <item key="sokoto_wurno" msgid="">Sokoto / Wurno</item>
+    <item key="sokoto_yabo" msgid="">Sokoto / Yabo</item>
+    <item key="taraba_ardo-kola" msgid="">Taraba / Ardo-Kola</item>
+    <item key="taraba_bali" msgid="">Taraba / Bali</item>
+    <item key="taraba_donga" msgid="">Taraba / Donga</item>
+    <item key="taraba_gashaka" msgid="">Taraba / Gashaka</item>
+    <item key="taraba_gassol" msgid="">Taraba / Gassol</item>
+    <item key="taraba_ibi" msgid="">Taraba / Ibi</item>
+    <item key="taraba_jalingo" msgid="">Taraba / Jalingo</item>
+    <item key="taraba_karim-lamido" msgid="">Taraba / Karim-Lamido</item>
+    <item key="taraba_kurmi" msgid="">Taraba / Kurmi</item>
+    <item key="taraba_lau" msgid="">Taraba / Lau</item>
+    <item key="taraba_oilingo" msgid="">Taraba / Oilingo</item>
+    <item key="taraba_sardauna" msgid="">Taraba / Sardauna</item>
+    <item key="taraba_takum" msgid="">Taraba / Takum</item>
+    <item key="taraba_ussa" msgid="">Taraba / Ussa</item>
+    <item key="taraba_wukari" msgid="">Taraba / Wukari</item>
+    <item key="taraba_yorro" msgid="">Taraba / Yorro</item>
+    <item key="taraba_zing" msgid="">Taraba / Zing</item>
+    <item key="yobe_bade" msgid="">Yobe / Bade</item>
+    <item key="yobe_borsali" msgid="">Yobe / Borsali</item>
+    <item key="yobe_damaturu" msgid="">Yobe / Damaturu</item>
+    <item key="yobe_fika" msgid="">Yobe / Fika</item>
+    <item key="yobe_fune" msgid="">Yobe / Fune</item>
+    <item key="yobe_geidam" msgid="">Yobe / Geidam</item>
+    <item key="yobe_gogaram" msgid="">Yobe / Gogaram</item>
+    <item key="yobe_gujba" msgid="">Yobe / Gujba</item>
+    <item key="yobe_gulani" msgid="">Yobe / Gulani</item>
+    <item key="yobe_jakusko" msgid="">Yobe / Jakusko</item>
+    <item key="yobe_karasuwa" msgid="">Yobe / Karasuwa</item>
+    <item key="yobe_machina" msgid="">Yobe / Machina</item>
+    <item key="yobe_nangere" msgid="">Yobe / Nangere</item>
+    <item key="yobe_nguru" msgid="">Yobe / Nguru</item>
+    <item key="yobe_potiskum" msgid="">Yobe / Potiskum</item>
+    <item key="yobe_tarmua" msgid="">Yobe / Tarmua</item>
+    <item key="yobe_yunusari" msgid="">Yobe / Yunusari</item>
+    <item key="yobe_yusufari" msgid="">Yobe / Yusufari</item>
+    <item key="zamfara_anka" msgid="">Zamfara / Anka</item>
+    <item key="zamfara_bakura" msgid="">Zamfara / Bakura</item>
+    <item key="zamfara_bukkuyum" msgid="">Zamfara / Bukkuyum</item>
+    <item key="zamfara_bungudu" msgid="">Zamfara / Bungudu</item>
+    <item key="zamfara_gumi" msgid="">Zamfara / Gumi</item>
+    <item key="zamfara_gusau" msgid="">Zamfara / Gusau</item>
+    <item key="zamfara_isa" msgid="">Zamfara / Isa</item>
+    <item key="zamfara_kaura-namoda" msgid="">Zamfara / Kaura-Namoda</item>
+    <item key="zamfara_kiyawa" msgid="">Zamfara / Kiyawa</item>
+    <item key="zamfara_maradun" msgid="">Zamfara / Maradun</item>
+    <item key="zamfara_maru" msgid="">Zamfara / Maru</item>
+    <item key="zamfara_shinkafi" msgid="">Zamfara / Shinkafi</item>
+    <item key="zamfara_talata-mafara" msgid="">Zamfara / Talata-Mafara</item>
+    <item key="zamfara_tsafe" msgid="">Zamfara / Tsafe</item>
+    <item key="zamfara_zurmi" msgid="">Zamfara / Zurmi</item>
+    <item key="osun_aiyedire" msgid="">Osun / Aiyedire</item>
+    <item key="cross_river_biase" msgid="">Cross River / Biase</item>
+    <item key="ogun_egbado-north" msgid="">Ogun / Egbado-North</item>
+    <item key="ogun_egbado-south" msgid="">Ogun / Egbado-South</item>
+    <item key="bayelsa_southern-ijaw" msgid="">Bayelsa / Southern-Ijaw</item>
+    <item key="akwa_ibom_ibiono-ibom" msgid="">Akwa Ibom / Ibiono-Ibom</item>
+    <item key="delta_idemili-south" msgid="">Delta / Idemili-South</item>
+    <item key="oyo_itesiwaju" msgid="">Oyo / Itesiwaju</item>
+    <item key="kogi_mopa-muro" msgid="">Kogi / Mopa-Muro</item>
+    <item key="oyo_ogo-oluwa" msgid="">Oyo / Ogo-Oluwa</item>
+    <item key="ebonyi_ohaukwu" msgid="">Ebonyi / Ohaukwu</item>
+    <item key="ondo_okitipupa" msgid="">Ondo / Okitipupa</item>
+    <item key="osun_oriade" msgid="">Osun / Oriade</item>
+    <item key="benue_oturkpo" msgid="">Benue / Oturkpo</item>
+    <item key="oyo_oyo-east" msgid="">Oyo / Oyo-East</item>
+    <item key="abia_ukwa-east" msgid="">Abia / Ukwa-East</item>
+    <item key="akwa_ibom_urue-Offong-oruko" msgid="">Akwa Ibom / Urue-Offong-Oruko</item>
+    <item key="cross_river_yakurr" msgid="">Cross River / Yakurr</item>
+    <item key="foreigner" msgid="">Foreigner</item>
+
+
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/local_gov_areas.xml_old
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/local_gov_areas.xml_old	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/local_gov_areas.xml_old	(revision 2226)
@@ -0,0 +1,862 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="local_gov_areas" meta_type="CPS Vocabulary">
+    <property name="title"></property>
+    <property name="title_msgid"></property>
+    <property name="description"></property>
+    <property name="acl_write_roles">Manager</property>
+
+    <item key="abia_aba_north" msgid="">Abia / Aba North</item>
+    <item key="abia_aba_south" msgid="">Abia / Aba South</item>
+    <item key="abia_arochukwu" msgid="">Abia / Arochukwu</item>
+    <item key="abia_bende" msgid="">Abia / Bende</item>
+    <item key="abia_ikawuno" msgid="">Abia / Ikawuno</item>
+    <item key="abia_ikwuano" msgid="">Abia / Ikwuano</item>
+    <item key="abia_isiala-ngwa_north" msgid="">Abia / Isiala-Ngwa North</item>
+    <item key="abia_isiala-ngwa_south" msgid="">Abia / Isiala-Ngwa South</item>
+    <item key="abia_isikwuato" msgid="">Abia / Isikwuato</item>
+    <item key="abia_isuikwuato" msgid="">Abia / Isuikwuato</item>
+    <item key="abia_nneochi" msgid="">Abia / Nneochi</item>
+    <item key="abia_obi_ngwa" msgid="">Abia / Obi Ngwa</item>
+    <item key="abia_obioma_ngwa_" msgid="">Abia / Obioma Ngwa</item>
+    <item key="abia_obioma-ngwa" msgid="">Abia / Obioma-Ngwa</item>
+    <item key="abia_ohafia" msgid="">Abia / Ohafia</item>
+    <item key="abia_ohaozara" msgid="">Abia / Ohaozara</item>
+    <item key="abia_osisioma" msgid="">Abia / Osisioma</item>
+    <item key="abia_ugwunagbo" msgid="">Abia / Ugwunagbo</item>
+    <item key="abia_ukwa_west" msgid="">Abia / Ukwa West</item>
+    <item key="abia_ukwu_east" msgid="">Abia / Ukwu East</item>
+    <item key="abia_umuahia" msgid="">Abia / Umuahia</item>
+    <item key="abia_umuahia_south" msgid="">Abia / Umuahia South</item>
+    <item key="abia_umuahia-north" msgid="">Abia / Umuahia-North</item>
+    <item key="abuja_amac" msgid="">Abuja / Amac</item>
+    <item key="adamawa_demsa" msgid="">Adamawa / Demsa</item>
+    <item key="adamawa_fufore" msgid="">Adamawa / Fufore</item>
+    <item key="adamawa_ganye" msgid="">Adamawa / Ganye</item>
+    <item key="adamawa_girei" msgid="">Adamawa / Girei</item>
+    <item key="adamawa_gombi" msgid="">Adamawa / Gombi</item>
+    <item key="adamawa_guyuk" msgid="">Adamawa / Guyuk</item>
+    <item key="adamawa_hong" msgid="">Adamawa / Hong</item>
+    <item key="adamawa_jada" msgid="">Adamawa / Jada</item>
+    <item key="adamawa_jimeta" msgid="">Adamawa / Jimeta</item>
+    <item key="adamawa_lamurde" msgid="">Adamawa / Lamurde</item>
+    <item key="adamawa_madagali" msgid="">Adamawa / Madagali</item>
+    <item key="adamawa_maiha" msgid="">Adamawa / Maiha</item>
+    <item key="adamawa_mayo-belwa" msgid="">Adamawa / Mayo-Belwa</item>
+    <item key="adamawa_michika" msgid="">Adamawa / Michika</item>
+    <item key="adamawa_mubi-north" msgid="">Adamawa / Mubi-North</item>
+    <item key="adamawa_mubi-south" msgid="">Adamawa / Mubi-South</item>
+    <item key="adamawa_numan" msgid="">Adamawa / Numan</item>
+    <item key="adamawa_shelleng" msgid="">Adamawa / Shelleng</item>
+    <item key="adamawa_song" msgid="">Adamawa / Song</item>
+    <item key="adamawa_toungo" msgid="">Adamawa / Toungo</item>
+    <item key="adamawa_yola" msgid="">Adamawa / Yola</item>
+    <item key="akwa_ibom_abak" msgid="">Akwa Ibom / Abak</item>
+    <item key="akwa_ibom_eastern-obolo" msgid="">Akwa Ibom / Eastern-Obolo</item>
+    <item key="akwa_ibom_eket" msgid="">Akwa Ibom / Eket</item>
+    <item key="akwa_ibom_ekpe-atani" msgid="">Akwa Ibom / Ekpe-Atani</item>
+    <item key="akwa_ibom_esit_ekit" msgid="">Akwa Ibom / Esit Ekit</item>
+    <item key="akwa_ibom_essien-udim" msgid="">Akwa Ibom / Essien-Udim</item>
+    <item key="akwa_ibom_etim-ekpo" msgid="">Akwa Ibom / Etim-Ekpo</item>
+    <item key="akwa_ibom_etinam" msgid="">Akwa Ibom / Etinam</item>
+    <item key="akwa_ibom_ibeno" msgid="">Akwa Ibom / Ibeno</item>
+    <item key="akwa_ibom_ibesikpo-asutan" msgid="">Akwa Ibom / Ibesikpo-Asutan</item>
+    <item key="akwa_ibom_ibiono-ibom" msgid="">Akwa Ibom / Ibiono-Ibom</item>
+    <item key="akwa_ibom_ika" msgid="">Akwa Ibom / Ika</item>
+    <item key="akwa_ibom_ikono" msgid="">Akwa Ibom / Ikono</item>
+    <item key="akwa_ibom_ikot-abasi" msgid="">Akwa Ibom / Ikot-Abasi</item>
+    <item key="akwa_ibom_ikot-ekpene" msgid="">Akwa Ibom / Ikot-Ekpene</item>
+    <item key="akwa_ibom_ini" msgid="">Akwa Ibom / Ini</item>
+    <item key="akwa_ibom_itu" msgid="">Akwa Ibom / Itu</item>
+    <item key="akwa_ibom_mbo" msgid="">Akwa Ibom / Mbo</item>
+    <item key="akwa_ibom_mkpat-enin" msgid="">Akwa Ibom / Mkpat-Enin</item>
+    <item key="akwa_ibom_nsit-ibom" msgid="">Akwa Ibom / Nsit-Ibom</item>
+    <item key="akwa_ibom_nsit-ubium" msgid="">Akwa Ibom / Nsit-Ubium</item>
+    <item key="akwa_ibom_obot-akara" msgid="">Akwa Ibom / Obot-Akara</item>
+    <item key="akwa_ibom_okobo" msgid="">Akwa Ibom / Okobo</item>
+    <item key="akwa_ibom_onna" msgid="">Akwa Ibom / Onna</item>
+    <item key="akwa_ibom_oron" msgid="">Akwa Ibom / Oron</item>
+    <item key="akwa_ibom_oruk_anam" msgid="">Akwa Ibom / Oruk Anam</item>
+    <item key="akwa_ibom_udung-uko" msgid="">Akwa Ibom / Udung-Uko</item>
+    <item key="akwa_ibom_ukanefun" msgid="">Akwa Ibom / Ukanefun</item>
+    <item key="akwa_ibom_uquo_ibeno" msgid="">Akwa Ibom / Uquo Ibeno</item>
+    <item key="akwa_ibom_uru_offong_oruko" msgid="">Akwa Ibom / Uru Offong Oruko</item>
+    <item key="akwa_ibom_uruan" msgid="">Akwa Ibom / Uruan</item>
+    <item key="akwa_ibom_uruk-anam" msgid="">Akwa Ibom / Uruk-Anam</item>
+    <item key="akwa_ibom_uyo" msgid="">Akwa Ibom / Uyo</item>
+    <item key="anambra_aguata" msgid="">Anambra / Aguata</item>
+    <item key="anambra_anambra" msgid="">Anambra / Anambra</item>
+    <item key="anambra_anambra-west" msgid="">Anambra / Anambra-West</item>
+    <item key="anambra_anaocha" msgid="">Anambra / Anaocha</item>
+    <item key="anambra_awka-north" msgid="">Anambra / Awka-North</item>
+    <item key="anambra_awka-south" msgid="">Anambra / Awka-South</item>
+    <item key="anambra_ayamelum" msgid="">Anambra / Ayamelum</item>
+    <item key="anambra_dunukofia" msgid="">Anambra / Dunukofia</item>
+    <item key="anambra_ekwusigo" msgid="">Anambra / Ekwusigo</item>
+    <item key="anambra_idemili" msgid="">Anambra / Idemili</item>
+    <item key="anambra_idemili-north" msgid="">Anambra / Idemili-North</item>
+    <item key="anambra_idemili-south" msgid="">Anambra / Idemili-South</item>
+    <item key="anambra_ihiala" msgid="">Anambra / Ihiala</item>
+    <item key="anambra_nibo" msgid="">Anambra / Nibo</item>
+    <item key="anambra_njikoka" msgid="">Anambra / Njikoka</item>
+    <item key="anambra_nnewi" msgid="">Anambra / Nnewi</item>
+    <item key="anambra_nnewi-north" msgid="">Anambra / Nnewi-North</item>
+    <item key="anambra_nnewi-south" msgid="">Anambra / Nnewi-South</item>
+    <item key="anambra_ogbaru" msgid="">Anambra / Ogbaru</item>
+    <item key="anambra_olumba" msgid="">Anambra / Olumba</item>
+    <item key="anambra_onitsha-north" msgid="">Anambra / Onitsha-North</item>
+    <item key="anambra_onitsha-south" msgid="">Anambra / Onitsha-South</item>
+    <item key="anambra_orumba-north" msgid="">Anambra / Orumba-North</item>
+    <item key="anambra_orumba-south" msgid="">Anambra / Orumba-South</item>
+    <item key="anambra_oti" msgid="">Anambra / Oti</item>
+    <item key="anambra_oyi" msgid="">Anambra / Oyi</item>
+    <item key="anambra_ubuluizor_ihiala" msgid="">Anambra / Ubuluizor Ihiala</item>
+    <item key="anambra_uyi" msgid="">Anambra / Uyi</item>
+    <item key="bauchi_alkaleri" msgid="">Bauchi / Alkaleri</item>
+    <item key="bauchi_bauchi" msgid="">Bauchi / Bauchi</item>
+    <item key="bauchi_bogoro" msgid="">Bauchi / Bogoro</item>
+    <item key="bauchi_damban" msgid="">Bauchi / Damban</item>
+    <item key="bauchi_darazo" msgid="">Bauchi / Darazo</item>
+    <item key="bauchi_dass" msgid="">Bauchi / Dass</item>
+    <item key="bauchi_gamawa" msgid="">Bauchi / Gamawa</item>
+    <item key="bauchi_ganjuwa" msgid="">Bauchi / Ganjuwa</item>
+    <item key="bauchi_giade" msgid="">Bauchi / Giade</item>
+    <item key="bauchi_itas/gadau" msgid="">Bauchi / Itas/Gadau</item>
+    <item key="bauchi_jama'are" msgid="">Bauchi / Jama'are</item>
+    <item key="bauchi_katagum" msgid="">Bauchi / Katagum</item>
+    <item key="bauchi_kirfi" msgid="">Bauchi / Kirfi</item>
+    <item key="bauchi_misau" msgid="">Bauchi / Misau</item>
+    <item key="bauchi_ningi" msgid="">Bauchi / Ningi</item>
+    <item key="bauchi_shira" msgid="">Bauchi / Shira</item>
+    <item key="bauchi_tafawa-balewa" msgid="">Bauchi / Tafawa-Balewa</item>
+    <item key="bauchi_toro" msgid="">Bauchi / Toro</item>
+    <item key="bauchi_warji" msgid="">Bauchi / Warji</item>
+    <item key="bauchi_zaki" msgid="">Bauchi / Zaki</item>
+    <item key="bayelsa_brass" msgid="">Bayelsa / Brass</item>
+    <item key="bayelsa_ekeremor" msgid="">Bayelsa / Ekeremor</item>
+    <item key="bayelsa_kembe" msgid="">Bayelsa / Kembe</item>
+    <item key="bayelsa_kolokuma" msgid="">Bayelsa / Kolokuma</item>
+    <item key="bayelsa_kolokuma/opkuma" msgid="">Bayelsa / Kolokuma/Opkuma</item>
+    <item key="bayelsa_nembe" msgid="">Bayelsa / Nembe</item>
+    <item key="bayelsa_ogbia" msgid="">Bayelsa / Ogbia</item>
+    <item key="bayelsa_sagbama" msgid="">Bayelsa / Sagbama</item>
+    <item key="bayelsa_southern-ijaw" msgid="">Bayelsa / Southern-Ijaw</item>
+    <item key="bayelsa_toru-abubo" msgid="">Bayelsa / Toru-Abubo</item>
+    <item key="bayelsa_yenegoa" msgid="">Bayelsa / Yenegoa</item>
+    <item key="benue_ado" msgid="">Benue / Ado</item>
+    <item key="benue_agatu" msgid="">Benue / Agatu</item>
+    <item key="benue_apa" msgid="">Benue / Apa</item>
+    <item key="benue_buruku" msgid="">Benue / Buruku</item>
+    <item key="benue_gboko" msgid="">Benue / Gboko</item>
+    <item key="benue_guma" msgid="">Benue / Guma</item>
+    <item key="benue_gwer-east" msgid="">Benue / Gwer-East</item>
+    <item key="benue_gwer-west" msgid="">Benue / Gwer-West</item>
+    <item key="benue_katsina-ala" msgid="">Benue / Katsina-Ala</item>
+    <item key="benue_konshisha" msgid="">Benue / Konshisha</item>
+    <item key="benue_kwande" msgid="">Benue / Kwande</item>
+    <item key="benue_logo" msgid="">Benue / Logo</item>
+    <item key="benue_makurdi" msgid="">Benue / Makurdi</item>
+    <item key="benue_ogbadibo" msgid="">Benue / Ogbadibo</item>
+    <item key="benue_ohimini" msgid="">Benue / Ohimini</item>
+    <item key="benue_oju" msgid="">Benue / Oju</item>
+    <item key="benue_okpokwu" msgid="">Benue / Okpokwu</item>
+    <item key="benue_otukpo" msgid="">Benue / Otukpo</item>
+    <item key="benue_oturkpa" msgid="">Benue / Oturkpa</item>
+    <item key="benue_tarka" msgid="">Benue / Tarka</item>
+    <item key="benue_ukum" msgid="">Benue / Ukum</item>
+    <item key="benue_ushongo" msgid="">Benue / Ushongo</item>
+    <item key="benue_vandeikya" msgid="">Benue / Vandeikya</item>
+    <item key="borno_abadan" msgid="">Borno / Abadan</item>
+    <item key="borno_askira-uba" msgid="">Borno / Askira-Uba</item>
+    <item key="borno_bama" msgid="">Borno / Bama</item>
+    <item key="borno_bayo" msgid="">Borno / Bayo</item>
+    <item key="borno_biu" msgid="">Borno / Biu</item>
+    <item key="borno_chibok" msgid="">Borno / Chibok</item>
+    <item key="borno_damboa" msgid="">Borno / Damboa</item>
+    <item key="borno_dikwa" msgid="">Borno / Dikwa</item>
+    <item key="borno_gubio" msgid="">Borno / Gubio</item>
+    <item key="borno_guzamala" msgid="">Borno / Guzamala</item>
+    <item key="borno_gwoza" msgid="">Borno / Gwoza</item>
+    <item key="borno_hawul" msgid="">Borno / Hawul</item>
+    <item key="borno_jere" msgid="">Borno / Jere</item>
+    <item key="borno_kaga" msgid="">Borno / Kaga</item>
+    <item key="borno_kala/balge" msgid="">Borno / Kala/Balge</item>
+    <item key="borno_konduga" msgid="">Borno / Konduga</item>
+    <item key="borno_kukawa" msgid="">Borno / Kukawa</item>
+    <item key="borno_kwaya-kusar" msgid="">Borno / Kwaya-Kusar</item>
+    <item key="borno_mafa" msgid="">Borno / Mafa</item>
+    <item key="borno_magumeri" msgid="">Borno / Magumeri</item>
+    <item key="borno_maiduguri" msgid="">Borno / Maiduguri</item>
+    <item key="borno_marte" msgid="">Borno / Marte</item>
+    <item key="borno_mobbar" msgid="">Borno / Mobbar</item>
+    <item key="borno_mongunu" msgid="">Borno / Mongunu</item>
+    <item key="borno_ngala" msgid="">Borno / Ngala</item>
+    <item key="borno_nganzai" msgid="">Borno / Nganzai</item>
+    <item key="borno_shani" msgid="">Borno / Shani</item>
+    <item key="cross_river_abi" msgid="">Cross River / Abi</item>
+    <item key="cross_river_abuochichie" msgid="">Cross River / Abuochichie</item>
+    <item key="cross_river_akamkpa" msgid="">Cross River / Akamkpa</item>
+    <item key="cross_river_akpabuyo" msgid="">Cross River / Akpabuyo</item>
+    <item key="cross_river_bakassi" msgid="">Cross River / Bakassi</item>
+    <item key="cross_river_bekwara" msgid="">Cross River / Bekwara</item>
+    <item key="cross_river_biasi" msgid="">Cross River / Biasi</item>
+    <item key="cross_river_boki" msgid="">Cross River / Boki</item>
+    <item key="cross_river_calabar-municipal" msgid="">Cross River / Calabar-Municipal</item>
+    <item key="cross_river_calabar-south" msgid="">Cross River / Calabar-South</item>
+    <item key="cross_river_etunk" msgid="">Cross River / Etunk</item>
+    <item key="cross_river_ikom" msgid="">Cross River / Ikom</item>
+    <item key="cross_river_obanliku" msgid="">Cross River / Obanliku</item>
+    <item key="cross_river_obubra" msgid="">Cross River / Obubra</item>
+    <item key="cross_river_obudu" msgid="">Cross River / Obudu</item>
+    <item key="cross_river_odukpani" msgid="">Cross River / Odukpani</item>
+    <item key="cross_river_ogoja" msgid="">Cross River / Ogoja</item>
+    <item key="cross_river_ugep-north" msgid="">Cross River / Ugep-North</item>
+    <item key="cross_river_yakurr" msgid="">Cross River / Yakurr</item>
+    <item key="cross_river_yala" msgid="">Cross River / Yala</item>
+    <item key="delta_aniocha_north" msgid="">Delta / Aniocha North</item>
+    <item key="delta_aniocha-north" msgid="">Delta / Aniocha-North</item>
+    <item key="delta_aniocha-south" msgid="">Delta / Aniocha-South</item>
+    <item key="delta_bomadi" msgid="">Delta / Bomadi</item>
+    <item key="delta_burutu" msgid="">Delta / Burutu</item>
+    <item key="delta_effurun" msgid="">Delta / Effurun</item>
+    <item key="delta_ethiope-east" msgid="">Delta / Ethiope-East</item>
+    <item key="delta_ethiope-west" msgid="">Delta / Ethiope-West</item>
+    <item key="delta_idu" msgid="">Delta / Idu</item>
+    <item key="delta_ika-ne" msgid="">Delta / Ika-Ne</item>
+    <item key="delta_ika-north-east" msgid="">Delta / Ika-North-East</item>
+    <item key="delta_ika-south" msgid="">Delta / Ika-South</item>
+    <item key="delta_ikpemili" msgid="">Delta / Ikpemili</item>
+    <item key="delta_isoko-north" msgid="">Delta / Isoko-North</item>
+    <item key="delta_isoko-south" msgid="">Delta / Isoko-South</item>
+    <item key="delta_ndokwa-east" msgid="">Delta / Ndokwa-East</item>
+    <item key="delta_ndokwa-north" msgid="">Delta / Ndokwa-North</item>
+    <item key="delta_ndokwa-south" msgid="">Delta / Ndokwa-South</item>
+    <item key="delta_ndokwa-west" msgid="">Delta / Ndokwa-West</item>
+    <item key="delta_okpe" msgid="">Delta / Okpe</item>
+    <item key="delta_oleh" msgid="">Delta / Oleh</item>
+    <item key="delta_oshielli-north" msgid="">Delta / Oshielli-North</item>
+    <item key="delta_oshimili" msgid="">Delta / Oshimili</item>
+    <item key="delta_oshimili-north" msgid="">Delta / Oshimili-North</item>
+    <item key="delta_oshimili-south" msgid="">Delta / Oshimili-South</item>
+    <item key="delta_osimili" msgid="">Delta / Osimili</item>
+    <item key="delta_osimili-north" msgid="">Delta / Osimili-North</item>
+    <item key="delta_osimili-south" msgid="">Delta / Osimili-South</item>
+    <item key="delta_patani" msgid="">Delta / Patani</item>
+    <item key="delta_sapele" msgid="">Delta / Sapele</item>
+    <item key="delta_udokwa" msgid="">Delta / Udokwa</item>
+    <item key="delta_udu" msgid="">Delta / Udu</item>
+    <item key="delta_ughelli-north" msgid="">Delta / Ughelli-North</item>
+    <item key="delta_ughelli-south" msgid="">Delta / Ughelli-South</item>
+    <item key="delta_ukwuani" msgid="">Delta / Ukwuani</item>
+    <item key="delta_urwie" msgid="">Delta / Urwie</item>
+    <item key="delta_uvie" msgid="">Delta / Uvie</item>
+    <item key="delta_uvwei" msgid="">Delta / Uvwei</item>
+    <item key="delta_uvwie" msgid="">Delta / Uvwie</item>
+    <item key="delta_warri-central" msgid="">Delta / Warri-Central</item>
+    <item key="delta_warri-north" msgid="">Delta / Warri-North</item>
+    <item key="delta_warri-south" msgid="">Delta / Warri-South</item>
+    <item key="ebonyi_abakaliki" msgid="">Ebonyi / Abakaliki</item>
+    <item key="ebonyi_afikpo-north" msgid="">Ebonyi / Afikpo-North</item>
+    <item key="ebonyi_afikpo-south" msgid="">Ebonyi / Afikpo-South</item>
+    <item key="ebonyi_bomadim" msgid="">Ebonyi / Bomadim</item>
+    <item key="ebonyi_ebonyi" msgid="">Ebonyi / Ebonyi</item>
+    <item key="ebonyi_ezza-north" msgid="">Ebonyi / Ezza-North</item>
+    <item key="ebonyi_ezza-south" msgid="">Ebonyi / Ezza-South</item>
+    <item key="ebonyi_ikwo" msgid="">Ebonyi / Ikwo</item>
+    <item key="ebonyi_ishielu" msgid="">Ebonyi / Ishielu</item>
+    <item key="ebonyi_ivo" msgid="">Ebonyi / Ivo</item>
+    <item key="ebonyi_izzi" msgid="">Ebonyi / Izzi</item>
+    <item key="ebonyi_obaukwu" msgid="">Ebonyi / Obaukwu</item>
+    <item key="ebonyi_ohakwu" msgid="">Ebonyi / Ohakwu</item>
+    <item key="ebonyi_ohaozara" msgid="">Ebonyi / Ohaozara</item>
+    <item key="ebonyi_onicha" msgid="">Ebonyi / Onicha</item>
+    <item key="ebonyi_ukaba" msgid="">Ebonyi / Ukaba</item>
+    <item key="edo_afokpella" msgid="">Edo / Afokpella</item>
+    <item key="edo_afuze" msgid="">Edo / Afuze</item>
+    <item key="edo_agbazilo" msgid="">Edo / Agbazilo</item>
+    <item key="edo_akoko_edo" msgid="">Edo / Akoko Edo</item>
+    <item key="edo_akoko-edo" msgid="">Edo / Akoko-Edo</item>
+    <item key="edo_egor" msgid="">Edo / Egor</item>
+    <item key="edo_esan-central" msgid="">Edo / Esan-Central</item>
+    <item key="edo_esan-north-east_" msgid="">Edo / Esan-North-East</item>
+    <item key="edo_esan-south-east" msgid="">Edo / Esan-South-East</item>
+    <item key="edo_esan-west" msgid="">Edo / Esan-West</item>
+    <item key="edo_etsako-central" msgid="">Edo / Etsako-Central</item>
+    <item key="edo_etsako-east" msgid="">Edo / Etsako-East</item>
+    <item key="edo_etsako-west" msgid="">Edo / Etsako-West</item>
+    <item key="edo_igueben" msgid="">Edo / Igueben</item>
+    <item key="edo_ikpoba-okha" msgid="">Edo / Ikpoba-Okha</item>
+    <item key="edo_ohunmwode" msgid="">Edo / Ohunmwode</item>
+    <item key="edo_ologbo" msgid="">Edo / Ologbo</item>
+    <item key="edo_opoji_irrua" msgid="">Edo / Opoji Irrua</item>
+    <item key="edo_oredo" msgid="">Edo / Oredo</item>
+    <item key="edo_orhionmwon" msgid="">Edo / Orhionmwon</item>
+    <item key="edo_ovia-north-east" msgid="">Edo / Ovia-North-East</item>
+    <item key="edo_ovia-south-west" msgid="">Edo / Ovia-South-West</item>
+    <item key="edo_owan_east" msgid="">Edo / Owan East</item>
+    <item key="edo_owan-east" msgid="">Edo / Owan-East</item>
+    <item key="edo_owan-west" msgid="">Edo / Owan-West</item>
+    <item key="edo_uhunmwonde" msgid="">Edo / Uhunmwonde</item>
+    <item key="ekiti_ado-ekiti" msgid="">Ekiti / Ado-Ekiti</item>
+    <item key="ekiti_aiyekire" msgid="">Ekiti / Aiyekire</item>
+    <item key="ekiti_efon" msgid="">Ekiti / Efon</item>
+    <item key="ekiti_ekiti-east" msgid="">Ekiti / Ekiti-East</item>
+    <item key="ekiti_ekiti-south-west" msgid="">Ekiti / Ekiti-South-West</item>
+    <item key="ekiti_ekiti-west" msgid="">Ekiti / Ekiti-West</item>
+    <item key="ekiti_emure/ise/orun" msgid="">Ekiti / Emure/Ise/Orun</item>
+    <item key="ekiti_gbonyin" msgid="">Ekiti / Gbonyin</item>
+    <item key="ekiti_ido-osi" msgid="">Ekiti / Ido-Osi</item>
+    <item key="ekiti_ijero" msgid="">Ekiti / Ijero</item>
+    <item key="ekiti_ikare" msgid="">Ekiti / Ikare</item>
+    <item key="ekiti_ikere" msgid="">Ekiti / Ikere</item>
+    <item key="ekiti_ikole" msgid="">Ekiti / Ikole</item>
+    <item key="ekiti_ilejemeje" msgid="">Ekiti / Ilejemeje</item>
+    <item key="ekiti_irepodun/ifelodun" msgid="">Ekiti / Irepodun/Ifelodun</item>
+    <item key="ekiti_ise-orun" msgid="">Ekiti / Ise-Orun</item>
+    <item key="ekiti_moba" msgid="">Ekiti / Moba</item>
+    <item key="ekiti_oye" msgid="">Ekiti / Oye</item>
+    <item key="enugu_aninri" msgid="">Enugu / Aninri</item>
+    <item key="enugu_awgu" msgid="">Enugu / Awgu</item>
+    <item key="enugu_enugu-east" msgid="">Enugu / Enugu-East</item>
+    <item key="enugu_enugu-north" msgid="">Enugu / Enugu-North</item>
+    <item key="enugu_enugu-south" msgid="">Enugu / Enugu-South</item>
+    <item key="enugu_ezeagu" msgid="">Enugu / Ezeagu</item>
+    <item key="enugu_igbo-etiti" msgid="">Enugu / Igbo-Etiti</item>
+    <item key="enugu_igbo-eze-north" msgid="">Enugu / Igbo-Eze-North</item>
+    <item key="enugu_igbo-eze-south" msgid="">Enugu / Igbo-Eze-South</item>
+    <item key="enugu_isi-uzo" msgid="">Enugu / Isi-Uzo</item>
+    <item key="enugu_nkanu-east" msgid="">Enugu / Nkanu-East</item>
+    <item key="enugu_nkanu-west" msgid="">Enugu / Nkanu-West</item>
+    <item key="enugu_nsukka" msgid="">Enugu / Nsukka</item>
+    <item key="enugu_nukanu_east" msgid="">Enugu / Nukanu East</item>
+    <item key="enugu_oji-river" msgid="">Enugu / Oji-River</item>
+    <item key="enugu_udenu" msgid="">Enugu / Udenu</item>
+    <item key="enugu_udi" msgid="">Enugu / Udi</item>
+    <item key="enugu_uzo-uwani" msgid="">Enugu / Uzo-Uwani</item>
+    <item key="gombe_akko" msgid="">Gombe / Akko</item>
+    <item key="gombe_balanga" msgid="">Gombe / Balanga</item>
+    <item key="gombe_billiri" msgid="">Gombe / Billiri</item>
+    <item key="gombe_dukku" msgid="">Gombe / Dukku</item>
+    <item key="gombe_funakaye" msgid="">Gombe / Funakaye</item>
+    <item key="gombe_gombe" msgid="">Gombe / Gombe</item>
+    <item key="gombe_kaltungo" msgid="">Gombe / Kaltungo</item>
+    <item key="gombe_kwami" msgid="">Gombe / Kwami</item>
+    <item key="gombe_nafada/bajoga" msgid="">Gombe / Nafada/Bajoga</item>
+    <item key="gombe_shomgom" msgid="">Gombe / Shomgom</item>
+    <item key="gombe_yamaltu/deba" msgid="">Gombe / Yamaltu/Deba</item>
+    <item key="imo_aboh-mbaise" msgid="">Imo / Aboh-Mbaise</item>
+    <item key="imo_ahiazu-mbaise" msgid="">Imo / Ahiazu-Mbaise</item>
+    <item key="imo_dral-esat" msgid="">Imo / Dral-Esat</item>
+    <item key="imo_ehime-mbano" msgid="">Imo / Ehime-Mbano</item>
+    <item key="imo_ezinihitte" msgid="">Imo / Ezinihitte</item>
+    <item key="imo_ideato" msgid="">Imo / Ideato</item>
+    <item key="imo_ideato-north" msgid="">Imo / Ideato-North</item>
+    <item key="imo_ideato-south" msgid="">Imo / Ideato-South</item>
+    <item key="imo_ihitte/uboma" msgid="">Imo / Ihitte/Uboma</item>
+    <item key="imo_ikeduru" msgid="">Imo / Ikeduru</item>
+    <item key="imo_isiala-mbano" msgid="">Imo / Isiala-Mbano</item>
+    <item key="imo_isu" msgid="">Imo / Isu</item>
+    <item key="imo_mbaitoli" msgid="">Imo / Mbaitoli</item>
+    <item key="imo_mbano" msgid="">Imo / Mbano</item>
+    <item key="imo_ngor-okpala" msgid="">Imo / Ngor-Okpala</item>
+    <item key="imo_njaba" msgid="">Imo / Njaba</item>
+    <item key="imo_nkwerre" msgid="">Imo / Nkwerre</item>
+    <item key="imo_nwangele" msgid="">Imo / Nwangele</item>
+    <item key="imo_obowo" msgid="">Imo / Obowo</item>
+    <item key="imo_oguta" msgid="">Imo / Oguta</item>
+    <item key="imo_ohaji-egbema" msgid="">Imo / Ohaji-Egbema</item>
+    <item key="imo_okigwe" msgid="">Imo / Okigwe</item>
+    <item key="imo_onuimo" msgid="">Imo / Onuimo</item>
+    <item key="imo_orlu" msgid="">Imo / Orlu</item>
+    <item key="imo_orsu" msgid="">Imo / Orsu</item>
+    <item key="imo_oru-east" msgid="">Imo / Oru-East</item>
+    <item key="imo_oru-west" msgid="">Imo / Oru-West</item>
+    <item key="imo_owerri-municipal" msgid="">Imo / Owerri-Municipal</item>
+    <item key="imo_owerri-north" msgid="">Imo / Owerri-North</item>
+    <item key="imo_owerri-west" msgid="">Imo / Owerri-West</item>
+    <item key="imo_ugiri-ike_ikeduru" msgid="">Imo / Ugiri-Ike Ikeduru</item>
+    <item key="imo_ugiri-ikedikeduru" msgid="">Imo / Ugiri-Ikedikeduru</item>
+    <item key="imo_unbano" msgid="">Imo / Unbano</item>
+    <item key="imo_zinihitte" msgid="">Imo / Zinihitte</item>
+    <item key="jigawa_auyo" msgid="">Jigawa / Auyo</item>
+    <item key="jigawa_babura" msgid="">Jigawa / Babura</item>
+    <item key="jigawa_biriniwa" msgid="">Jigawa / Biriniwa</item>
+    <item key="jigawa_birnin-kudu" msgid="">Jigawa / Birnin-Kudu</item>
+    <item key="jigawa_bosuwa" msgid="">Jigawa / Bosuwa</item>
+    <item key="jigawa_buji" msgid="">Jigawa / Buji</item>
+    <item key="jigawa_dutse" msgid="">Jigawa / Dutse</item>
+    <item key="jigawa_gagarawa" msgid="">Jigawa / Gagarawa</item>
+    <item key="jigawa_garki" msgid="">Jigawa / Garki</item>
+    <item key="jigawa_gumel" msgid="">Jigawa / Gumel</item>
+    <item key="jigawa_guri" msgid="">Jigawa / Guri</item>
+    <item key="jigawa_gwaram" msgid="">Jigawa / Gwaram</item>
+    <item key="jigawa_gwiwa" msgid="">Jigawa / Gwiwa</item>
+    <item key="jigawa_hadejia" msgid="">Jigawa / Hadejia</item>
+    <item key="jigawa_jahun" msgid="">Jigawa / Jahun</item>
+    <item key="jigawa_kafin-hausa" msgid="">Jigawa / Kafin-Hausa</item>
+    <item key="jigawa_kaugama" msgid="">Jigawa / Kaugama</item>
+    <item key="jigawa_kazaure" msgid="">Jigawa / Kazaure</item>
+    <item key="jigawa_kirkasamma" msgid="">Jigawa / Kirkasamma</item>
+    <item key="jigawa_maigatari" msgid="">Jigawa / Maigatari</item>
+    <item key="jigawa_malam-maduri" msgid="">Jigawa / Malam-Maduri</item>
+    <item key="jigawa_miga" msgid="">Jigawa / Miga</item>
+    <item key="jigawa_ringim" msgid="">Jigawa / Ringim</item>
+    <item key="jigawa_roni" msgid="">Jigawa / Roni</item>
+    <item key="jigawa_sule-tankarkar" msgid="">Jigawa / Sule-Tankarkar</item>
+    <item key="jigawa_taura" msgid="">Jigawa / Taura</item>
+    <item key="jigawa_yankwashi" msgid="">Jigawa / Yankwashi</item>
+    <item key="kaduna_birnin-gwari" msgid="">Kaduna / Birnin-Gwari</item>
+    <item key="kaduna_chikun" msgid="">Kaduna / Chikun</item>
+    <item key="kaduna_giwa" msgid="">Kaduna / Giwa</item>
+    <item key="kaduna_gwagwada" msgid="">Kaduna / Gwagwada</item>
+    <item key="kaduna_igabi" msgid="">Kaduna / Igabi</item>
+    <item key="kaduna_ikara" msgid="">Kaduna / Ikara</item>
+    <item key="kaduna_jaba" msgid="">Kaduna / Jaba</item>
+    <item key="kaduna_jema'a" msgid="">Kaduna / Jema'a</item>
+    <item key="kaduna_kachia" msgid="">Kaduna / Kachia</item>
+    <item key="kaduna_kaduna-north" msgid="">Kaduna / Kaduna-North</item>
+    <item key="kaduna_kagarko" msgid="">Kaduna / Kagarko</item>
+    <item key="kaduna_kajuru" msgid="">Kaduna / Kajuru</item>
+    <item key="kaduna_kaura" msgid="">Kaduna / Kaura</item>
+    <item key="kaduna_kauru" msgid="">Kaduna / Kauru</item>
+    <item key="kaduna_koka/kawo" msgid="">Kaduna / Koka/Kawo</item>
+    <item key="kaduna_kubah" msgid="">Kaduna / Kubah</item>
+    <item key="kaduna_kudan" msgid="">Kaduna / Kudan</item>
+    <item key="kaduna_lere" msgid="">Kaduna / Lere</item>
+    <item key="kaduna_makarfi" msgid="">Kaduna / Makarfi</item>
+    <item key="kaduna_sabon-gari" msgid="">Kaduna / Sabon-Gari</item>
+    <item key="kaduna_sanga" msgid="">Kaduna / Sanga</item>
+    <item key="kaduna_soba" msgid="">Kaduna / Soba</item>
+    <item key="kaduna_tudun-wada/makera" msgid="">Kaduna / Tudun-Wada/Makera</item>
+    <item key="kaduna_zango-kataf" msgid="">Kaduna / Zango-Kataf</item>
+    <item key="kaduna_zaria" msgid="">Kaduna / Zaria</item>
+    <item key="kano_ajingi" msgid="">Kano / Ajingi</item>
+    <item key="kano_albasu" msgid="">Kano / Albasu</item>
+    <item key="kano_bagwai" msgid="">Kano / Bagwai</item>
+    <item key="kano_bebeji" msgid="">Kano / Bebeji</item>
+    <item key="kano_bichi" msgid="">Kano / Bichi</item>
+    <item key="kano_bunkure" msgid="">Kano / Bunkure</item>
+    <item key="kano_dala" msgid="">Kano / Dala</item>
+    <item key="kano_dambatta" msgid="">Kano / Dambatta</item>
+    <item key="kano_dawakin-kudu" msgid="">Kano / Dawakin-Kudu</item>
+    <item key="kano_dawakin-tofa" msgid="">Kano / Dawakin-Tofa</item>
+    <item key="kano_doguwa" msgid="">Kano / Doguwa</item>
+    <item key="kano_fagge" msgid="">Kano / Fagge</item>
+    <item key="kano_gabasawa" msgid="">Kano / Gabasawa</item>
+    <item key="kano_garko" msgid="">Kano / Garko</item>
+    <item key="kano_garun-mallam" msgid="">Kano / Garun-Mallam</item>
+    <item key="kano_gaya" msgid="">Kano / Gaya</item>
+    <item key="kano_gezawa" msgid="">Kano / Gezawa</item>
+    <item key="kano_gwale" msgid="">Kano / Gwale</item>
+    <item key="kano_gwarzo" msgid="">Kano / Gwarzo</item>
+    <item key="kano_kano-municipal" msgid="">Kano / Kano-Municipal</item>
+    <item key="kano_karaye" msgid="">Kano / Karaye</item>
+    <item key="kano_kibiya" msgid="">Kano / Kibiya</item>
+    <item key="kano_kiru" msgid="">Kano / Kiru</item>
+    <item key="kano_kumbotso" msgid="">Kano / Kumbotso</item>
+    <item key="kano_kunchi" msgid="">Kano / Kunchi</item>
+    <item key="kano_kura" msgid="">Kano / Kura</item>
+    <item key="kano_madobi" msgid="">Kano / Madobi</item>
+    <item key="kano_makoda" msgid="">Kano / Makoda</item>
+    <item key="kano_minjibir" msgid="">Kano / Minjibir</item>
+    <item key="kano_nasarawa" msgid="">Kano / Nasarawa</item>
+    <item key="kano_rano" msgid="">Kano / Rano</item>
+    <item key="kano_rimin-gado" msgid="">Kano / Rimin-Gado</item>
+    <item key="kano_rogo" msgid="">Kano / Rogo</item>
+    <item key="kano_shanono" msgid="">Kano / Shanono</item>
+    <item key="kano_sumaila" msgid="">Kano / Sumaila</item>
+    <item key="kano_takai" msgid="">Kano / Takai</item>
+    <item key="kano_tarauni" msgid="">Kano / Tarauni</item>
+    <item key="kano_tofa" msgid="">Kano / Tofa</item>
+    <item key="kano_tsanyawa" msgid="">Kano / Tsanyawa</item>
+    <item key="kano_tudun-wada" msgid="">Kano / Tudun-Wada</item>
+    <item key="kano_ungogo" msgid="">Kano / Ungogo</item>
+    <item key="kano_warawa" msgid="">Kano / Warawa</item>
+    <item key="kano_wudil" msgid="">Kano / Wudil</item>
+    <item key="katsina_bakori" msgid="">Katsina / Bakori</item>
+    <item key="katsina_batagarawa" msgid="">Katsina / Batagarawa</item>
+    <item key="katsina_batsari" msgid="">Katsina / Batsari</item>
+    <item key="katsina_baure" msgid="">Katsina / Baure</item>
+    <item key="katsina_bindawa" msgid="">Katsina / Bindawa</item>
+    <item key="katsina_charanchi" msgid="">Katsina / Charanchi</item>
+    <item key="katsina_dan-musa" msgid="">Katsina / Dan-Musa</item>
+    <item key="katsina_dandume" msgid="">Katsina / Dandume</item>
+    <item key="katsina_danji" msgid="">Katsina / Danji</item>
+    <item key="katsina_daura" msgid="">Katsina / Daura</item>
+    <item key="katsina_dutsi" msgid="">Katsina / Dutsi</item>
+    <item key="katsina_dutsinma" msgid="">Katsina / Dutsinma</item>
+    <item key="katsina_faskari" msgid="">Katsina / Faskari</item>
+    <item key="katsina_funtua" msgid="">Katsina / Funtua</item>
+    <item key="katsina_ingawa" msgid="">Katsina / Ingawa</item>
+    <item key="katsina_jibia" msgid="">Katsina / Jibia</item>
+    <item key="katsina_kafur" msgid="">Katsina / Kafur</item>
+    <item key="katsina_kaita" msgid="">Katsina / Kaita</item>
+    <item key="katsina_kankara" msgid="">Katsina / Kankara</item>
+    <item key="katsina_kankia" msgid="">Katsina / Kankia</item>
+    <item key="katsina_katsina" msgid="">Katsina / Katsina</item>
+    <item key="katsina_kurfi" msgid="">Katsina / Kurfi</item>
+    <item key="katsina_kusada" msgid="">Katsina / Kusada</item>
+    <item key="katsina_mai-adua" msgid="">Katsina / Mai-Adua</item>
+    <item key="katsina_malumfashi" msgid="">Katsina / Malumfashi</item>
+    <item key="katsina_mani" msgid="">Katsina / Mani</item>
+    <item key="katsina_mashi" msgid="">Katsina / Mashi</item>
+    <item key="katsina_matazu" msgid="">Katsina / Matazu</item>
+    <item key="katsina_musawa" msgid="">Katsina / Musawa</item>
+    <item key="katsina_rimi" msgid="">Katsina / Rimi</item>
+    <item key="katsina_sabuwa" msgid="">Katsina / Sabuwa</item>
+    <item key="katsina_safana" msgid="">Katsina / Safana</item>
+    <item key="katsina_sandamu" msgid="">Katsina / Sandamu</item>
+    <item key="katsina_zango" msgid="">Katsina / Zango</item>
+    <item key="kebbi_aleiro" msgid="">Kebbi / Aleiro</item>
+    <item key="kebbi_arewa-dandi" msgid="">Kebbi / Arewa-Dandi</item>
+    <item key="kebbi_argungu" msgid="">Kebbi / Argungu</item>
+    <item key="kebbi_augie" msgid="">Kebbi / Augie</item>
+    <item key="kebbi_bagudo" msgid="">Kebbi / Bagudo</item>
+    <item key="kebbi_birnin-kebbi" msgid="">Kebbi / Birnin-Kebbi</item>
+    <item key="kebbi_bumza" msgid="">Kebbi / Bumza</item>
+    <item key="kebbi_dandi" msgid="">Kebbi / Dandi</item>
+    <item key="kebbi_danko" msgid="">Kebbi / Danko</item>
+    <item key="kebbi_fakai" msgid="">Kebbi / Fakai</item>
+    <item key="kebbi_gwandu" msgid="">Kebbi / Gwandu</item>
+    <item key="kebbi_jega" msgid="">Kebbi / Jega</item>
+    <item key="kebbi_kalgo" msgid="">Kebbi / Kalgo</item>
+    <item key="kebbi_koko-besse" msgid="">Kebbi / Koko-Besse</item>
+    <item key="kebbi_maiyama" msgid="">Kebbi / Maiyama</item>
+    <item key="kebbi_ngaski" msgid="">Kebbi / Ngaski</item>
+    <item key="kebbi_sakaba" msgid="">Kebbi / Sakaba</item>
+    <item key="kebbi_shanga" msgid="">Kebbi / Shanga</item>
+    <item key="kebbi_suru" msgid="">Kebbi / Suru</item>
+    <item key="kebbi_wasagu" msgid="">Kebbi / Wasagu</item>
+    <item key="kebbi_yauri" msgid="">Kebbi / Yauri</item>
+    <item key="kebbi_zuru" msgid="">Kebbi / Zuru</item>
+    <item key="kogi_adavi" msgid="">Kogi / Adavi</item>
+    <item key="kogi_ajaokuta" msgid="">Kogi / Ajaokuta</item>
+    <item key="kogi_ankpa" msgid="">Kogi / Ankpa</item>
+    <item key="kogi_dekina" msgid="">Kogi / Dekina</item>
+    <item key="kogi_ibaji" msgid="">Kogi / Ibaji</item>
+    <item key="kogi_idah" msgid="">Kogi / Idah</item>
+    <item key="kogi_igalamela" msgid="">Kogi / Igalamela</item>
+    <item key="kogi_ijumu" msgid="">Kogi / Ijumu</item>
+    <item key="kogi_ikoyi-ijumu" msgid="">Kogi / Ikoyi-Ijumu</item>
+    <item key="kogi_kabba/bunu" msgid="">Kogi / Kabba/Bunu</item>
+    <item key="kogi_kogi" msgid="">Kogi / Kogi</item>
+    <item key="kogi_lokoja" msgid="">Kogi / Lokoja</item>
+    <item key="kogi_mopa-muro-mopi" msgid="">Kogi / Mopa-Muro-Mopi</item>
+    <item key="kogi_obaji" msgid="">Kogi / Obaji</item>
+    <item key="kogi_ofu" msgid="">Kogi / Ofu</item>
+    <item key="kogi_ogori/magongo" msgid="">Kogi / Ogori/Magongo</item>
+    <item key="kogi_okehi" msgid="">Kogi / Okehi</item>
+    <item key="kogi_okene" msgid="">Kogi / Okene</item>
+    <item key="kogi_olamaboro" msgid="">Kogi / Olamaboro</item>
+    <item key="kogi_omala" msgid="">Kogi / Omala</item>
+    <item key="kogi_oru" msgid="">Kogi / Oru</item>
+    <item key="kogi_oyi" msgid="">Kogi / Oyi</item>
+    <item key="kogi_yagba-east" msgid="">Kogi / Yagba-East</item>
+    <item key="kogi_yagba-west" msgid="">Kogi / Yagba-West</item>
+    <item key="kwara_asa" msgid="">Kwara / Asa</item>
+    <item key="kwara_baruten" msgid="">Kwara / Baruten</item>
+    <item key="kwara_edu" msgid="">Kwara / Edu</item>
+    <item key="kwara_ekiti" msgid="">Kwara / Ekiti</item>
+    <item key="kwara_ilorin-east" msgid="">Kwara / Ilorin-East</item>
+    <item key="kwara_ilorin-south" msgid="">Kwara / Ilorin-South</item>
+    <item key="kwara_ilorin-west" msgid="">Kwara / Ilorin-West</item>
+    <item key="kwara_isin" msgid="">Kwara / Isin</item>
+    <item key="kwara_kaiama" msgid="">Kwara / Kaiama</item>
+    <item key="kwara_moro" msgid="">Kwara / Moro</item>
+    <item key="kwara_offa" msgid="">Kwara / Offa</item>
+    <item key="kwara_oke-ero" msgid="">Kwara / Oke-Ero</item>
+    <item key="kwara_oyun" msgid="">Kwara / Oyun</item>
+    <item key="kwara_pategi" msgid="">Kwara / Pategi</item>
+    <item key="lagos_agege" msgid="">Lagos / Agege</item>
+    <item key="lagos_ajeromi-ifelodun" msgid="">Lagos / Ajeromi-Ifelodun</item>
+    <item key="lagos_alimosho" msgid="">Lagos / Alimosho</item>
+    <item key="lagos_amuwo-odofin" msgid="">Lagos / Amuwo-Odofin</item>
+    <item key="lagos_apapa" msgid="">Lagos / Apapa</item>
+    <item key="lagos_badagry" msgid="">Lagos / Badagry</item>
+    <item key="lagos_epe" msgid="">Lagos / Epe</item>
+    <item key="lagos_eti-osa" msgid="">Lagos / Eti-Osa</item>
+    <item key="lagos_ibeju-lekki" msgid="">Lagos / Ibeju-Lekki</item>
+    <item key="lagos_ifako-ijaiye" msgid="">Lagos / Ifako-Ijaiye</item>
+    <item key="lagos_ikeja" msgid="">Lagos / Ikeja</item>
+    <item key="lagos_ikorodu" msgid="">Lagos / Ikorodu</item>
+    <item key="lagos_island" msgid="">Lagos / Island</item>
+    <item key="lagos_kosofe" msgid="">Lagos / Kosofe</item>
+    <item key="lagos_lagos-island" msgid="">Lagos / Lagos-Island</item>
+    <item key="lagos_lagos-mainland" msgid="">Lagos / Lagos-Mainland</item>
+    <item key="lagos_mushin" msgid="">Lagos / Mushin</item>
+    <item key="lagos_ojo" msgid="">Lagos / Ojo</item>
+    <item key="lagos_oshodi-isolo" msgid="">Lagos / Oshodi-Isolo</item>
+    <item key="lagos_shomolu" msgid="">Lagos / Shomolu</item>
+    <item key="lagos_somolu" msgid="">Lagos / Somolu</item>
+    <item key="lagos_suru-lere" msgid="">Lagos / Suru-Lere</item>
+    <item key="nassarawa_akwanga" msgid="">Nassarawa / Akwanga</item>
+    <item key="nassarawa_awe" msgid="">Nassarawa / Awe</item>
+    <item key="nassarawa_doma" msgid="">Nassarawa / Doma</item>
+    <item key="nassarawa_karu" msgid="">Nassarawa / Karu</item>
+    <item key="nassarawa_keana" msgid="">Nassarawa / Keana</item>
+    <item key="nassarawa_keffi" msgid="">Nassarawa / Keffi</item>
+    <item key="nassarawa_kokona" msgid="">Nassarawa / Kokona</item>
+    <item key="nassarawa_lafia" msgid="">Nassarawa / Lafia</item>
+    <item key="nassarawa_nassawara" msgid="">Nassarawa / Nassawara</item>
+    <item key="nassarawa_nassawara_eggon" msgid="">Nassarawa / Nassawara Eggon</item>
+    <item key="nassarawa_obi" msgid="">Nassarawa / Obi</item>
+    <item key="nassarawa_wambu" msgid="">Nassarawa / Wambu</item>
+    <item key="niger_agaie" msgid="">Niger / Agaie</item>
+    <item key="niger_agwara" msgid="">Niger / Agwara</item>
+    <item key="niger_bida" msgid="">Niger / Bida</item>
+    <item key="niger_borgu" msgid="">Niger / Borgu</item>
+    <item key="niger_bosso" msgid="">Niger / Bosso</item>
+    <item key="niger_chanchaga" msgid="">Niger / Chanchaga</item>
+    <item key="niger_edati" msgid="">Niger / Edati</item>
+    <item key="niger_gbako" msgid="">Niger / Gbako</item>
+    <item key="niger_gurara" msgid="">Niger / Gurara</item>
+    <item key="niger_katcha" msgid="">Niger / Katcha</item>
+    <item key="niger_kontagora" msgid="">Niger / Kontagora</item>
+    <item key="niger_lapai" msgid="">Niger / Lapai</item>
+    <item key="niger_lavun" msgid="">Niger / Lavun</item>
+    <item key="niger_magama" msgid="">Niger / Magama</item>
+    <item key="niger_mariga" msgid="">Niger / Mariga</item>
+    <item key="niger_mashegu" msgid="">Niger / Mashegu</item>
+    <item key="niger_mokwa" msgid="">Niger / Mokwa</item>
+    <item key="niger_muya" msgid="">Niger / Muya</item>
+    <item key="niger_paikoro" msgid="">Niger / Paikoro</item>
+    <item key="niger_rafi" msgid="">Niger / Rafi</item>
+    <item key="niger_rijau" msgid="">Niger / Rijau</item>
+    <item key="niger_shiroro" msgid="">Niger / Shiroro</item>
+    <item key="niger_suleja" msgid="">Niger / Suleja</item>
+    <item key="niger_tafa" msgid="">Niger / Tafa</item>
+    <item key="niger_wushishi" msgid="">Niger / Wushishi</item>
+    <item key="ogun_abeokuta-north" msgid="">Ogun / Abeokuta-North</item>
+    <item key="ogun_abeokuta-south" msgid="">Ogun / Abeokuta-South</item>
+    <item key="ogun_ado-odo/ota" msgid="">Ogun / Ado-Odo/Ota</item>
+    <item key="ogun_adoodo-ota" msgid="">Ogun / Adoodo-Ota</item>
+    <item key="ogun_ewekoro" msgid="">Ogun / Ewekoro</item>
+    <item key="ogun_idarapo" msgid="">Ogun / Idarapo</item>
+    <item key="ogun_iffo-otta" msgid="">Ogun / Iffo-Otta</item>
+    <item key="ogun_ifo" msgid="">Ogun / Ifo</item>
+    <item key="ogun_igbado-north" msgid="">Ogun / Igbado-North</item>
+    <item key="ogun_igbado-south" msgid="">Ogun / Igbado-South</item>
+    <item key="ogun_ijebu-east" msgid="">Ogun / Ijebu-East</item>
+    <item key="ogun_ijebu-north" msgid="">Ogun / Ijebu-North</item>
+    <item key="ogun_ijebu-north-east" msgid="">Ogun / Ijebu-North-East</item>
+    <item key="ogun_ijebu-ode" msgid="">Ogun / Ijebu-Ode</item>
+    <item key="ogun_ikenne" msgid="">Ogun / Ikenne</item>
+    <item key="ogun_ilishan_remo" msgid="">Ogun / Ilishan Remo</item>
+    <item key="ogun_ilugun-alaro" msgid="">Ogun / Ilugun-Alaro</item>
+    <item key="ogun_imeko-afon" msgid="">Ogun / Imeko-Afon</item>
+    <item key="ogun_ipokia" msgid="">Ogun / Ipokia</item>
+    <item key="ogun_lgayekpe_" msgid="">Ogun / Lgayekpe</item>
+    <item key="ogun_obafemi-owode" msgid="">Ogun / Obafemi-Owode</item>
+    <item key="ogun_odedah" msgid="">Ogun / Odedah</item>
+    <item key="ogun_odogbolu" msgid="">Ogun / Odogbolu</item>
+    <item key="ogun_ogun-waterside" msgid="">Ogun / Ogun-Waterside</item>
+    <item key="ogun_remo-north" msgid="">Ogun / Remo-North</item>
+    <item key="ogun_sagamu" msgid="">Ogun / Sagamu</item>
+    <item key="ogun_shagamu" msgid="">Ogun / Shagamu</item>
+    <item key="ogun_yewa" msgid="">Ogun / Yewa</item>
+    <item key="ondo_akoko" msgid="">Ondo / Akoko</item>
+    <item key="ondo_akoko-north" msgid="">Ondo / Akoko-North</item>
+    <item key="ondo_akoko-north-west" msgid="">Ondo / Akoko-North-West</item>
+    <item key="ondo_akoko-south" msgid="">Ondo / Akoko-South</item>
+    <item key="ondo_akoko-south-east" msgid="">Ondo / Akoko-South-East</item>
+    <item key="ondo_akure" msgid="">Ondo / Akure</item>
+    <item key="ondo_akure-north" msgid="">Ondo / Akure-North</item>
+    <item key="ondo_akure-south" msgid="">Ondo / Akure-South</item>
+    <item key="ondo_ese-odo" msgid="">Ondo / Ese-Odo</item>
+    <item key="ondo_idanre" msgid="">Ondo / Idanre</item>
+    <item key="ondo_ifedore" msgid="">Ondo / Ifedore</item>
+    <item key="ondo_ikale" msgid="">Ondo / Ikale</item>
+    <item key="ondo_ilaje" msgid="">Ondo / Ilaje</item>
+    <item key="ondo_ilaje-west" msgid="">Ondo / Ilaje-West</item>
+    <item key="ondo_ile-oluji-okeigbo" msgid="">Ondo / Ile-Oluji-Okeigbo</item>
+    <item key="ondo_irele" msgid="">Ondo / Irele</item>
+    <item key="ondo_odigbo" msgid="">Ondo / Odigbo</item>
+    <item key="ondo_okiti-pupa" msgid="">Ondo / Okiti-Pupa</item>
+    <item key="ondo_ondo" msgid="">Ondo / Ondo</item>
+    <item key="ondo_ondo-east" msgid="">Ondo / Ondo-East</item>
+    <item key="ondo_ose" msgid="">Ondo / Ose</item>
+    <item key="ondo_owo" msgid="">Ondo / Owo</item>
+    <item key="osun_atakumosa" msgid="">Osun / Atakumosa</item>
+    <item key="osun_atakumosa_east" msgid="">Osun / Atakumosa East</item>
+    <item key="osun_ayeda-ade" msgid="">Osun / Ayeda-Ade</item>
+    <item key="osun_ayedire" msgid="">Osun / Ayedire</item>
+    <item key="osun_boluwaduro" msgid="">Osun / Boluwaduro</item>
+    <item key="osun_boripe" msgid="">Osun / Boripe</item>
+    <item key="osun_ede" msgid="">Osun / Ede</item>
+    <item key="osun_ede_north" msgid="">Osun / Ede North</item>
+    <item key="osun_egbedore" msgid="">Osun / Egbedore</item>
+    <item key="osun_ejigbo" msgid="">Osun / Ejigbo</item>
+    <item key="osun_ife" msgid="">Osun / Ife</item>
+    <item key="osun_ife_north" msgid="">Osun / Ife North</item>
+    <item key="osun_ife_south" msgid="">Osun / Ife South</item>
+    <item key="osun_ife-central" msgid="">Osun / Ife-Central</item>
+    <item key="osun_ife-east" msgid="">Osun / Ife-East</item>
+    <item key="osun_ifelodun" msgid="">Osun / Ifelodun</item>
+    <item key="osun_ila" msgid="">Osun / Ila</item>
+    <item key="osun_ilesa-east" msgid="">Osun / Ilesa-East</item>
+    <item key="osun_ilesa-west" msgid="">Osun / Ilesa-West</item>
+    <item key="osun_ilesha" msgid="">Osun / Ilesha</item>
+    <item key="osun_ilesha_west" msgid="">Osun / Ilesha West</item>
+    <item key="osun_irepodun" msgid="">Osun / Irepodun</item>
+    <item key="osun_irewole" msgid="">Osun / Irewole</item>
+    <item key="osun_isokan" msgid="">Osun / Isokan</item>
+    <item key="osun_iwo" msgid="">Osun / Iwo</item>
+    <item key="osun_obokun" msgid="">Osun / Obokun</item>
+    <item key="osun_odo-otin" msgid="">Osun / Odo-Otin</item>
+    <item key="osun_ola_oluwa" msgid="">Osun / Ola Oluwa</item>
+    <item key="osun_olorunda" msgid="">Osun / Olorunda</item>
+    <item key="osun_ori-ade" msgid="">Osun / Ori-Ade</item>
+    <item key="osun_orolu" msgid="">Osun / Orolu</item>
+    <item key="osun_osogbo" msgid="">Osun / Osogbo</item>
+    <item key="oyo_afijio" msgid="">Oyo / Afijio</item>
+    <item key="oyo_akinyele" msgid="">Oyo / Akinyele</item>
+    <item key="oyo_atiba" msgid="">Oyo / Atiba</item>
+    <item key="oyo_atigbo" msgid="">Oyo / Atigbo</item>
+    <item key="oyo_egbeda" msgid="">Oyo / Egbeda</item>
+    <item key="oyo_ibadan-central" msgid="">Oyo / Ibadan-Central</item>
+    <item key="oyo_ibadan-north-east" msgid="">Oyo / Ibadan-North-East</item>
+    <item key="oyo_ibadan-north-west" msgid="">Oyo / Ibadan-North-West</item>
+    <item key="oyo_ibadan-south-east" msgid="">Oyo / Ibadan-South-East</item>
+    <item key="oyo_ibadan-south-west" msgid="">Oyo / Ibadan-South-West</item>
+    <item key="oyo_ibarapa-central" msgid="">Oyo / Ibarapa-Central</item>
+    <item key="oyo_ibarapa-east" msgid="">Oyo / Ibarapa-East</item>
+    <item key="oyo_ibarapa-north" msgid="">Oyo / Ibarapa-North</item>
+    <item key="oyo_ido" msgid="">Oyo / Ido</item>
+    <item key="oyo_ifedayo" msgid="">Oyo / Ifedayo</item>
+    <item key="oyo_ifeloju" msgid="">Oyo / Ifeloju</item>
+    <item key="oyo_irepo" msgid="">Oyo / Irepo</item>
+    <item key="oyo_iseyin" msgid="">Oyo / Iseyin</item>
+    <item key="oyo_itseiwaju" msgid="">Oyo / Itseiwaju</item>
+    <item key="oyo_iwajowa" msgid="">Oyo / Iwajowa</item>
+    <item key="oyo_kajola" msgid="">Oyo / Kajola</item>
+    <item key="oyo_lagelu" msgid="">Oyo / Lagelu</item>
+    <item key="oyo_odo-oluwa" msgid="">Oyo / Odo-Oluwa</item>
+    <item key="oyo_ogbomosho-north" msgid="">Oyo / Ogbomosho-North</item>
+    <item key="oyo_ogbomosho-south" msgid="">Oyo / Ogbomosho-South</item>
+    <item key="oyo_olorunsogo" msgid="">Oyo / Olorunsogo</item>
+    <item key="oyo_oluyole" msgid="">Oyo / Oluyole</item>
+    <item key="oyo_ona-ara" msgid="">Oyo / Ona-Ara</item>
+    <item key="oyo_orelope" msgid="">Oyo / Orelope</item>
+    <item key="oyo_ori-ire" msgid="">Oyo / Ori-Ire</item>
+    <item key="oyo_oyo-west" msgid="">Oyo / Oyo-West</item>
+    <item key="oyo_saki-east" msgid="">Oyo / Saki-East</item>
+    <item key="oyo_saki-west" msgid="">Oyo / Saki-West</item>
+    <item key="oyo_surulere" msgid="">Oyo / Surulere</item>
+    <item key="plateau_barkin-ladi" msgid="">Plateau / Barkin-Ladi</item>
+    <item key="plateau_bassa" msgid="">Plateau / Bassa</item>
+    <item key="plateau_bokkos" msgid="">Plateau / Bokkos</item>
+    <item key="plateau_jos-east" msgid="">Plateau / Jos-East</item>
+    <item key="plateau_jos-north" msgid="">Plateau / Jos-North</item>
+    <item key="plateau_jos-south" msgid="">Plateau / Jos-South</item>
+    <item key="plateau_kanam" msgid="">Plateau / Kanam</item>
+    <item key="plateau_kanke" msgid="">Plateau / Kanke</item>
+    <item key="plateau_langtang-north" msgid="">Plateau / Langtang-North</item>
+    <item key="plateau_langtang-south" msgid="">Plateau / Langtang-South</item>
+    <item key="plateau_mangu" msgid="">Plateau / Mangu</item>
+    <item key="plateau_mikang" msgid="">Plateau / Mikang</item>
+    <item key="plateau_pankshin" msgid="">Plateau / Pankshin</item>
+    <item key="plateau_quan'anpan" msgid="">Plateau / Quan'anpan</item>
+    <item key="plateau_riyom" msgid="">Plateau / Riyom</item>
+    <item key="plateau_shendam" msgid="">Plateau / Shendam</item>
+    <item key="plateau_wase" msgid="">Plateau / Wase</item>
+    <item key="rivers_aboa/odual" msgid="">Rivers / Aboa/Odual</item>
+    <item key="rivers_ahoada-east" msgid="">Rivers / Ahoada-East</item>
+    <item key="rivers_ahoada-west" msgid="">Rivers / Ahoada-West</item>
+    <item key="rivers_akukutoru" msgid="">Rivers / Akukutoru</item>
+    <item key="rivers_andoni" msgid="">Rivers / Andoni</item>
+    <item key="rivers_asari-toru" msgid="">Rivers / Asari-Toru</item>
+    <item key="rivers_bonny" msgid="">Rivers / Bonny</item>
+    <item key="rivers_buguma" msgid="">Rivers / Buguma</item>
+    <item key="rivers_degema" msgid="">Rivers / Degema</item>
+    <item key="rivers_eleme" msgid="">Rivers / Eleme</item>
+    <item key="rivers_elfane" msgid="">Rivers / Elfane</item>
+    <item key="rivers_emuoha" msgid="">Rivers / Emuoha</item>
+    <item key="rivers_etche" msgid="">Rivers / Etche</item>
+    <item key="rivers_gokana" msgid="">Rivers / Gokana</item>
+    <item key="rivers_ikwerre" msgid="">Rivers / Ikwerre</item>
+    <item key="rivers_khana" msgid="">Rivers / Khana</item>
+    <item key="rivers_obia/akpor" msgid="">Rivers / Obia/Akpor</item>
+    <item key="rivers_ogba-egbema-ndoni" msgid="">Rivers / Ogba-Egbema-Ndoni</item>
+    <item key="rivers_ogba/egbema/ndoni" msgid="">Rivers / Ogba/Egbema/Ndoni</item>
+    <item key="rivers_ogu/bolo" msgid="">Rivers / Ogu/Bolo</item>
+    <item key="rivers_okirika" msgid="">Rivers / Okirika</item>
+    <item key="rivers_omuma" msgid="">Rivers / Omuma</item>
+    <item key="rivers_opobo/nkoro" msgid="">Rivers / Opobo/Nkoro</item>
+    <item key="rivers_oyigbo" msgid="">Rivers / Oyigbo</item>
+    <item key="rivers_port-harcourt" msgid="">Rivers / Port-Harcourt</item>
+    <item key="rivers_tai" msgid="">Rivers / Tai</item>
+    <item key="sokoto_binji" msgid="">Sokoto / Binji</item>
+    <item key="sokoto_bodinga" msgid="">Sokoto / Bodinga</item>
+    <item key="sokoto_dange-shuni" msgid="">Sokoto / Dange-Shuni</item>
+    <item key="sokoto_gada" msgid="">Sokoto / Gada</item>
+    <item key="sokoto_goronyo" msgid="">Sokoto / Goronyo</item>
+    <item key="sokoto_gudu" msgid="">Sokoto / Gudu</item>
+    <item key="sokoto_gwadabawa" msgid="">Sokoto / Gwadabawa</item>
+    <item key="sokoto_illela" msgid="">Sokoto / Illela</item>
+    <item key="sokoto_kebbe" msgid="">Sokoto / Kebbe</item>
+    <item key="sokoto_kware" msgid="">Sokoto / Kware</item>
+    <item key="sokoto_raba" msgid="">Sokoto / Raba</item>
+    <item key="sokoto_sabo-birni" msgid="">Sokoto / Sabo-Birni</item>
+    <item key="sokoto_shagari" msgid="">Sokoto / Shagari</item>
+    <item key="sokoto_silame" msgid="">Sokoto / Silame</item>
+    <item key="sokoto_sokoto-north" msgid="">Sokoto / Sokoto-North</item>
+    <item key="sokoto_sokoto-south" msgid="">Sokoto / Sokoto-South</item>
+    <item key="sokoto_tambuwal" msgid="">Sokoto / Tambuwal</item>
+    <item key="sokoto_tangaza" msgid="">Sokoto / Tangaza</item>
+    <item key="sokoto_tureta" msgid="">Sokoto / Tureta</item>
+    <item key="sokoto_wamakko" msgid="">Sokoto / Wamakko</item>
+    <item key="sokoto_wurno" msgid="">Sokoto / Wurno</item>
+    <item key="sokoto_yabo" msgid="">Sokoto / Yabo</item>
+    <item key="taraba_ardo-kola" msgid="">Taraba / Ardo-Kola</item>
+    <item key="taraba_bali" msgid="">Taraba / Bali</item>
+    <item key="taraba_donga" msgid="">Taraba / Donga</item>
+    <item key="taraba_gashaka" msgid="">Taraba / Gashaka</item>
+    <item key="taraba_gassol" msgid="">Taraba / Gassol</item>
+    <item key="taraba_ibi" msgid="">Taraba / Ibi</item>
+    <item key="taraba_jalingo" msgid="">Taraba / Jalingo</item>
+    <item key="taraba_karim-lamido" msgid="">Taraba / Karim-Lamido</item>
+    <item key="taraba_kurmi" msgid="">Taraba / Kurmi</item>
+    <item key="taraba_lau" msgid="">Taraba / Lau</item>
+    <item key="taraba_oilingo" msgid="">Taraba / Oilingo</item>
+    <item key="taraba_sardauna" msgid="">Taraba / Sardauna</item>
+    <item key="taraba_takum" msgid="">Taraba / Takum</item>
+    <item key="taraba_ussa" msgid="">Taraba / Ussa</item>
+    <item key="taraba_wukari" msgid="">Taraba / Wukari</item>
+    <item key="taraba_yorro" msgid="">Taraba / Yorro</item>
+    <item key="taraba_zing" msgid="">Taraba / Zing</item>
+    <item key="yobe_bade" msgid="">Yobe / Bade</item>
+    <item key="yobe_borsali" msgid="">Yobe / Borsali</item>
+    <item key="yobe_damaturu" msgid="">Yobe / Damaturu</item>
+    <item key="yobe_fika" msgid="">Yobe / Fika</item>
+    <item key="yobe_fune" msgid="">Yobe / Fune</item>
+    <item key="yobe_geidam" msgid="">Yobe / Geidam</item>
+    <item key="yobe_gogaram" msgid="">Yobe / Gogaram</item>
+    <item key="yobe_gujba" msgid="">Yobe / Gujba</item>
+    <item key="yobe_gulani" msgid="">Yobe / Gulani</item>
+    <item key="yobe_jakusko" msgid="">Yobe / Jakusko</item>
+    <item key="yobe_karasuwa" msgid="">Yobe / Karasuwa</item>
+    <item key="yobe_machina" msgid="">Yobe / Machina</item>
+    <item key="yobe_nangere" msgid="">Yobe / Nangere</item>
+    <item key="yobe_nguru" msgid="">Yobe / Nguru</item>
+    <item key="yobe_potiskum" msgid="">Yobe / Potiskum</item>
+    <item key="yobe_tarmua" msgid="">Yobe / Tarmua</item>
+    <item key="yobe_yunusari" msgid="">Yobe / Yunusari</item>
+    <item key="yobe_yusufari" msgid="">Yobe / Yusufari</item>
+    <item key="zamfara_anka" msgid="">Zamfara / Anka</item>
+    <item key="zamfara_bakura" msgid="">Zamfara / Bakura</item>
+    <item key="zamfara_bukkuyum" msgid="">Zamfara / Bukkuyum</item>
+    <item key="zamfara_bungudu" msgid="">Zamfara / Bungudu</item>
+    <item key="zamfara_gumi" msgid="">Zamfara / Gumi</item>
+    <item key="zamfara_gusau" msgid="">Zamfara / Gusau</item>
+    <item key="zamfara_isa" msgid="">Zamfara / Isa</item>
+    <item key="zamfara_kaura-namoda" msgid="">Zamfara / Kaura-Namoda</item>
+    <item key="zamfara_kiyawa" msgid="">Zamfara / Kiyawa</item>
+    <item key="zamfara_maradun" msgid="">Zamfara / Maradun</item>
+    <item key="zamfara_maru" msgid="">Zamfara / Maru</item>
+    <item key="zamfara_shinkafi" msgid="">Zamfara / Shinkafi</item>
+    <item key="zamfara_talata-mafara" msgid="">Zamfara / Talata-Mafara</item>
+    <item key="zamfara_tsafe" msgid="">Zamfara / Tsafe</item>
+    <item key="zamfara_zurmi" msgid="">Zamfara / Zurmi</item>
+
+
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/nigerian_states.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/nigerian_states.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/nigerian_states.xml	(revision 2226)
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="nigerian_states" meta_type="CPS Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="acl_write_roles">Manager</property>
+ <item key="abia" msgid="">Abia</item>
+ <item key="adam" msgid="">Adamawa</item>
+ <item key="akwa" msgid="">Akwa Ibom</item>
+ <item key="anam" msgid="">Anambra</item>
+ <item key="bauchi" msgid="">Bauchi</item>
+ <item key="baye" msgid="">Bayelsa</item>
+ <item key="benu" msgid="">Benue</item>
+ <item key="born" msgid="">Borno</item>
+ <item key="cro" msgid="">Cross River</item>
+ <item key="delt" msgid="">Delta</item>
+ <item key="ebon" msgid="">Ebonyi</item>
+ <item key="edo" msgid="">edo</item>
+ <item key="ekit" msgid="">Ekiti</item>
+ <item key="enug" msgid="">Enugu</item>
+ <item key="gomb" msgid="">Gombe</item>
+ <item key="imo" msgid="">Imo</item>
+ <item key="jiga" msgid="">Jigawa</item>
+ <item key="kad" msgid="">Kaduna</item>
+ <item key="kano" msgid="">Kano</item>
+ <item key="kats" msgid="">Katsina</item>
+ <item key="keb" msgid="">Kebbi</item>
+ <item key="kogi" msgid="">Kogi</item>
+ <item key="kwar" msgid="">Kwara</item>
+ <item key="lag" msgid="">Lagos</item>
+ <item key="nasa" msgid="">Nasawara</item>
+ <item key="nige" msgid="">Niger</item>
+ <item key="ogun" msgid="">Ogun</item>
+ <item key="ondo" msgid="">Ondo</item>
+ <item key="osun" msgid="">Osun</item>
+ <item key="oyo" msgid="">oyo</item>
+ <item key="plat" msgid="">Plateau</item>
+ <item key="riv" msgid="">Rivers</item>
+ <item key="sok" msgid="">Sokoto</item>
+ <item key="tar" msgid="">Taraba</item>
+ <item key="yobe" msgid="">Yobe</item>
+ <item key="zam" msgid="">Zamfara</item>
+ <item key="fct" msgid="">FCT</item>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/pin_prefixes.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/pin_prefixes.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/pin_prefixes.xml	(revision 2226)
@@ -0,0 +1,76 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="pin_prefixes" meta_type="CPS Vocabulary">
+    <property name="title"></property>
+    <property name="title_msgid"></property>
+    <property name="description"></property>
+    <property name="acl_write_roles">Manager</property>
+
+    <item key="APP" msgid="">Application</item>
+    <item key="CLR" msgid="">Clearance</item>
+    <item key="HOS" msgid="">Hostel Application</item>
+    <item key="HMU" msgid="">Old Hostel (Halls 1, 2, 3, 4) - Maintenance</item>
+    <item key="HMF" msgid="">New Hostel (Hall 5) - Maintenance</item>
+    <item key="HMP" msgid="">Postgraduate Hostel - Maintenance</item>
+    <item key="CLH" msgid="">Clinical Hostel for Medical and Dentistry Students - Maintenance</item>
+    <item key="PGI" msgid="">Intercontinental Hostel - Maintenance</item>
+    <item key="PGS" msgid="">Postgraduate Ekenhuan Single - Maintenance</item>
+    <item key="PGD" msgid="">Postgraduate Ekenhuan Double (shared) - Maintenance</item>
+
+    <item key="GWN" msgid="">Gown Hiring</item>
+
+    <item key="AGR" msgid="">Agriculture</item>
+    <item key="ART" msgid="">Arts</item>
+    <item key="BMS" msgid="">Basic Medical Sc.</item>
+    <item key="DEN" msgid="">Dentistry</item>
+    <item key="EDU" msgid="">Education</item>
+    <item key="ENG" msgid="">Engineering</item>
+    <item key="LAW" msgid="">Law</item>
+    <item key="LSC" msgid="">Life Science</item>
+    <item key="PSC" msgid="">Physical</item>
+    <item key="PHA" msgid="">Pharmacy</item>
+    <item key="MED" msgid="">Medicine</item>
+    <item key="SSC" msgid="">Social Sciences</item>
+    <item key="MGS" msgid="">Management Sciences</item>
+
+    <item key="MBA" msgid="">Masters in Bus. Admin.</item>
+    <item key="MPA" msgid="">Masters in Public Admin</item>
+    <item key="MBF" msgid="">Masters Banking and Fin.</item>
+    <item key="LLM" msgid="">Masters in Law</item>
+    <item key="MPH" msgid="">Masters in Public Health</item>
+    <item key="BPA" msgid="">Bachelors in Public Adm</item>
+    <item key="BIA" msgid="">Bachelors in Accounting</item>
+    <item key="BSW" msgid="">Bachelors in Social Wks</item>
+    <item key="DPA" msgid="">Diploma in Public Adm</item>
+    <item key="DIL" msgid="">Diploma in Law</item>
+    <item key="DDP" msgid="">Diploma in Data Proc.</item>
+    <item key="DCE" msgid="">Diploma in Comp. Eng</item>
+
+    <item key="AGRNEW" msgid="">Agriculture (New Students)</item>
+    <item key="ARTNEW" msgid="">Arts (New Students)</item>
+    <item key="BMSNEW" msgid="">Basic Medical Sc. (New Students)</item>
+    <item key="DENNEW" msgid="">Dentistry (New Students)</item>
+    <item key="EDUNEW" msgid="">Education (New Students)</item>
+    <item key="ENGNEW" msgid="">Engineering (New Students)</item>
+    <item key="LAWNEW" msgid="">Law (New Students)</item>
+    <item key="LSCNEW" msgid="">Life Science (New Students)</item>
+    <item key="PSCNEW" msgid="">Physical (New Students)</item>
+    <item key="PHANEW" msgid="">Pharmacy (New Students)</item>
+    <item key="MEDNEW" msgid="">Medicine (New Students)</item>
+    <item key="SSCNEW" msgid="">Social Sciences (New Students)</item>
+    <item key="MGSNEW" msgid="">Management Sciences (New Students)</item>
+
+    <item key="MBANEW" msgid="">Masters in Bus. Admin. (New Students)</item>
+    <item key="MPANEW" msgid="">Masters in Public Admin (New Students)</item>
+    <item key="MBFNEW" msgid="">Masters Banking and Fin. (New Students)</item>
+    <item key="LLMNEW" msgid="">Masters in Law (New Students)</item>
+    <item key="MPHNEW" msgid="">Masters in Public Health (New Students)</item>
+    <item key="BPANEW" msgid="">Bachelors in Public Adm (New Students)</item>
+    <item key="BIANEW" msgid="">Bachelors in Accounting (New Students)</item>
+    <item key="BSWNEW" msgid="">Bachelors in Social Wks (New Students)</item>
+    <item key="DPANEW" msgid="">Diploma in Public Adm (New Students)</item>
+    <item key="DILNEW" msgid="">Diploma in Law (New Students)</item>
+    <item key="DDPNEW" msgid="">Diploma in Data Proc. (New Students)</item>
+    <item key="DCENEW" msgid="">Diploma in Comp. Eng (New Students)</item>
+
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/religion.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/religion.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/religion.xml	(revision 2226)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="religion" meta_type="CPS Vocabulary">
+    <property name="title"></property>
+    <property name="title_msgid"></property>
+    <property name="description"></property>
+    <property name="acl_write_roles">Manager</property>
+
+    <item key="muslim" msgid="">Muslim</item>
+    <item key="christian" msgid="">Christian</item>
+    <item key="others" msgid="">Others</item>
+
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/scratch_card_search_mode.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/scratch_card_search_mode.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/scratch_card_search_mode.xml	(revision 2226)
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="search_mode_voc" meta_type="CPS Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="acl_write_roles">Manager</property>
+ <item key="student" msgid="">used by Student with ID (Registration Number for APP SCs)</item>
+ <item key="pin" msgid="">with PIN</item>
+ <item key="serial" msgid="">with Serial No</item>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/searchable_academics_states.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/searchable_academics_states.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/searchable_academics_states.xml	(revision 2226)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="searchable_review_states_voc" meta_type="CPS Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="acl_write_roles">Manager</property>
+ <item key="all" msgid="">All States</item>
+  <item key="created" msgid="">Data Imported</item>
+  <item key="unchecked" msgid="">unchecked</item>
+  <item key="checked" msgid="">checked</item>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/searchable_student_states.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/searchable_student_states.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/searchable_student_states.xml	(revision 2226)
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="searchable_student_states_voc" meta_type="CPS Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="acl_write_roles">Manager</property>
+ <item key="all" msgid="">all states</item>
+ <item key="returning" msgid="">returning</item>
+ <item key="school_fee_paid" msgid="">school fee paid</item>
+ <item key="student_created" msgid="">data imported</item>
+ <item key="objection_raised" msgid="">objection raised</item>
+ <item key="admitted" msgid="">admitted</item>
+ <item key="clearance_pin_entered" msgid="">clearance pin entered</item>
+ <item key="clearance_requested" msgid="">clearance requested</item>
+ <item key="cleared_and_validated" msgid="">cleared and validated</item>
+ <item key="courses_registered" msgid="">courses registered</item>
+ <item key="courses_validated" msgid="">courses validated</item>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/semester_voc.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/semester_voc.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/semester_voc.xml	(revision 2226)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="semester_voc" meta_type="CPS Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="acl_write_roles">Manager</property>
+ <item key="first" msgid="">First Semester</item>
+ <item key="second" msgid="">Second Semester</item>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/sessions.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/sessions.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/sessions.xml	(revision 2226)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="sessions" meta_type="CPS Method Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="get_vocabulary_method">sessions_voc</property>
+ <property name="add_empty_key">False</property>
+ <property name="empty_key_pos">first</property>
+ <property name="empty_key_value"></property>
+ <property name="empty_key_value_i18n"></property>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/states.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/states.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/states.xml	(revision 2226)
@@ -0,0 +1,262 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="states" meta_type="CPS Vocabulary">
+    <property name="title"></property>
+    <property name="title_msgid"></property>
+    <property name="description"></property>
+    <property name="acl_write_roles">Manager</property>
+
+    <item key="nigeria" msgid="">Nigeria</item>
+    <item key="afghanistan" msgid="">Afghanistan</item>
+    <item key="albania" msgid="">Albania</item>
+    <item key="algeria" msgid="">Algeria</item>
+    <item key="american_samoa" msgid="">American Samoa</item>
+    <item key="andorra" msgid="">Andorra</item>
+    <item key="angola" msgid="">Angola</item>
+    <item key="anguilla" msgid="">Anguilla</item>
+    <item key="antarctica" msgid="">Antarctica</item>
+    <item key="antigua_and_barbuda" msgid="">Antigua And Barbuda</item>
+    <item key="argentina" msgid="">Argentina</item>
+    <item key="armenia" msgid="">Armenia</item>
+    <item key="aruba" msgid="">Aruba</item>
+    <item key="ascension_island" msgid="">Ascension Island</item>
+    <item key="australia" msgid="">Australia</item>
+    <item key="austria" msgid="">Austria</item>
+    <item key="azerbaijan" msgid="">Azerbaijan</item>
+    <item key="bahamas" msgid="">Bahamas</item>
+    <item key="bahrain" msgid="">Bahrain</item>
+    <item key="bangladesh" msgid="">Bangladesh</item>
+    <item key="barbados" msgid="">Barbados</item>
+    <item key="belarus" msgid="">Belarus</item>
+    <item key="belgium" msgid="">Belgium</item>
+    <item key="belize" msgid="">Belize</item>
+    <item key="benin" msgid="">Benin</item>
+    <item key="bermuda" msgid="">Bermuda</item>
+    <item key="bhutan" msgid="">Bhutan</item>
+    <item key="bolivia" msgid="">Bolivia</item>
+    <item key="bosnia_and_herzegovina" msgid="">Bosnia And Herzegovina</item>
+    <item key="botswana" msgid="">Botswana</item>
+    <item key="bouvet_island" msgid="">Bouvet Island</item>
+    <item key="brazil" msgid="">Brazil</item>
+    <item key="british_indian_ocean_territory" msgid="">British Indian Ocean Territory</item>
+    <item key="british_virgin_islands" msgid="">British Virgin Islands</item>
+    <item key="brunei_darussalam" msgid="">Brunei Darussalam</item>
+    <item key="bulgaria" msgid="">Bulgaria</item>
+    <item key="burkina_faso" msgid="">Burkina Faso</item>
+    <item key="burma" msgid="">Burma</item>
+    <item key="burundi" msgid="">Burundi</item>
+    <item key="cambodia" msgid="">Cambodia</item>
+    <item key="cameroon" msgid="">Cameroon</item>
+    <item key="canada" msgid="">Canada</item>
+    <item key="cape_verde" msgid="">Cape Verde</item>
+    <item key="cayman_islands" msgid="">Cayman Islands</item>
+    <item key="central_african_republic" msgid="">Central African Republic</item>
+    <item key="chad" msgid="">Chad</item>
+    <item key="chile" msgid="">Chile</item>
+    <item key="china" msgid="">China</item>
+    <item key="christmas_island" msgid="">Christmas Island</item>
+    <item key="cocos_keeling_islands" msgid="">Cocos (Keeling) Islands</item>
+    <item key="colombia" msgid="">Colombia</item>
+    <item key="comoros" msgid="">Comoros</item>
+    <item key="congo_brazzaville_" msgid="">Congo (Brazzaville) </item>
+    <item key="congo_dem_rep" msgid="">Congo, Democratic Republic Of</item>
+    <item key="cook_islands" msgid="">Cook Islands</item>
+    <item key="costa_rica" msgid="">Costa Rica</item>
+    <item key="cote_d_ivoire" msgid="">Cote D' Ivoire</item>
+    <item key="croatia" msgid="">Croatia</item>
+    <item key="cuba" msgid="">Cuba</item>
+    <item key="cyprus" msgid="">Cyprus</item>
+    <item key="czech_republic" msgid="">Czech Republic</item>
+    <item key="denmark" msgid="">Denmark</item>
+    <item key="djibouti" msgid="">Djibouti</item>
+    <item key="dominica" msgid="">Dominica</item>
+    <item key="dominican_republic" msgid="">Dominican Republic</item>
+    <item key="east_timor" msgid="">East Timor</item>
+    <item key="ecuador" msgid="">Ecuador</item>
+    <item key="egypt" msgid="">Egypt</item>
+    <item key="el_salvador" msgid="">El Salvador</item>
+    <item key="england" msgid="">England</item>
+    <item key="equatorial_guinea" msgid="">Equatorial Guinea</item>
+    <item key="eritrea" msgid="">Eritrea</item>
+    <item key="estonia" msgid="">Estonia</item>
+    <item key="ethiopia" msgid="">Ethiopia</item>
+    <item key="falkland_islands" msgid="">Falkland Islands (Islas Malvinas) </item>
+    <item key="faroe_islands" msgid="">Faroe Islands</item>
+    <item key="fiji" msgid="">Fiji</item>
+    <item key="finland" msgid="">Finland</item>
+    <item key="france" msgid="">France</item>
+    <item key="french_guiana" msgid="">French Guiana</item>
+    <item key="french_polynesia" msgid="">French Polynesia</item>
+    <item key="french_southern_territories" msgid="">French Southern Territories</item>
+    <item key="gabon" msgid="">Gabon</item>
+    <item key="gambia" msgid="">Gambia, The</item>
+    <item key="georgia" msgid="">Georgia</item>
+    <item key="germany" msgid="">Germany</item>
+    <item key="ghana" msgid="">Ghana</item>
+    <item key="gibraltar" msgid="">Gibraltar</item>
+    <item key="greece" msgid="">Greece</item>
+    <item key="greenland_denmark_" msgid="">Greenland (Denmark) </item>
+    <item key="grenada" msgid="">Grenada</item>
+    <item key="guadeloupe" msgid="">Guadeloupe</item>
+    <item key="guam" msgid="">Guam</item>
+    <item key="guatemala" msgid="">Guatemala</item>
+    <item key="guinea" msgid="">Guinea</item>
+    <item key="guinea-bissau" msgid="">Guinea-Bissau</item>
+    <item key="guyana" msgid="">Guyana</item>
+    <item key="haiti" msgid="">Haiti</item>
+    <item key="heard_and_mcdonald_islands" msgid="">Heard And McDonald Islands</item>
+    <item key="honduras" msgid="">Honduras</item>
+    <item key="hong_kong" msgid="">Hong Kong (Special Admin Region Of China) </item>
+    <item key="hungary" msgid="">Hungary</item>
+    <item key="iceland" msgid="">Iceland</item>
+    <item key="india" msgid="">India</item>
+    <item key="indonesia" msgid="">Indonesia</item>
+    <item key="iran" msgid="">Iran</item>
+    <item key="iraq" msgid="">Iraq</item>
+    <item key="ireland" msgid="">Ireland</item>
+    <item key="isle_of_man" msgid="">Isle Of Man</item>
+    <item key="israel" msgid="">Israel</item>
+    <item key="italy" msgid="">Italy</item>
+    <item key="jamaica" msgid="">Jamaica</item>
+    <item key="japan" msgid="">Japan</item>
+    <item key="johnston_atoll" msgid="">Johnston Atoll</item>
+    <item key="jordan" msgid="">Jordan</item>
+    <item key="kazakhstan" msgid="">Kazakhstan</item>
+    <item key="kenya" msgid="">Kenya</item>
+    <item key="kiribati" msgid="">Kiribati</item>
+    <item key="korea_north_" msgid="">Korea, Democratic People S Republic Of (North) </item>
+    <item key="korea_south_" msgid="">Korea, Republic Of (South) </item>
+    <item key="kuwait" msgid="">Kuwait</item>
+    <item key="kyrgyzstan" msgid="">Kyrgyzstan</item>
+    <item key="laos_" msgid="">Lao People S Democratic Republic (Laos) </item>
+    <item key="latvia" msgid="">Latvia</item>
+    <item key="lebanon" msgid="">Lebanon</item>
+    <item key="lesotho" msgid="">Lesotho</item>
+    <item key="liberia" msgid="">Liberia</item>
+    <item key="libya" msgid="">Libyan Arab Jamahiriya</item>
+    <item key="liechtenstein" msgid="">Liechtenstein</item>
+    <item key="lithuania" msgid="">Lithuania</item>
+    <item key="luxembourg" msgid="">Luxembourg</item>
+    <item key="macau" msgid="">Macau (Special Admin Region Of China) </item>
+    <item key="macedonia" msgid="">Macedonia, Former Yugoslav Republic Of</item>
+    <item key="madagascar" msgid="">Madagascar</item>
+    <item key="malawi" msgid="">Malawi</item>
+    <item key="malaysia" msgid="">Malaysia</item>
+    <item key="maldives" msgid="">Maldives</item>
+    <item key="mali" msgid="">Mali</item>
+    <item key="malta" msgid="">Malta</item>
+    <item key="marshall_islands" msgid="">Marshall Islands</item>
+    <item key="martinique" msgid="">Martinique</item>
+    <item key="mauritania" msgid="">Mauritania</item>
+    <item key="mauritius" msgid="">Mauritius</item>
+    <item key="mayotte" msgid="">Mayotte</item>
+    <item key="mexico" msgid="">Mexico</item>
+    <item key="micronesia" msgid="">Micronesia, Federated States Of</item>
+    <item key="midway_islands" msgid="">Midway Islands</item>
+    <item key="moldova" msgid="">Moldova, Republic Of</item>
+    <item key="monaco" msgid="">Monaco</item>
+    <item key="mongolia" msgid="">Mongolia</item>
+    <item key="montserrat" msgid="">Montserrat</item>
+    <item key="morocco" msgid="">Morocco</item>
+    <item key="mozambique" msgid="">Mozambique</item>
+    <item key="myanmar" msgid="">Myanmar</item>
+    <item key="namibia" msgid="">Namibia</item>
+    <item key="nauru" msgid="">Nauru</item>
+    <item key="nepal" msgid="">Nepal</item>
+    <item key="netherlands" msgid="">Netherlands</item>
+    <item key="netherlands_antilles" msgid="">Netherlands Antilles</item>
+    <item key="new_caledonia" msgid="">New Caledonia</item>
+    <item key="new_zealand" msgid="">New Zealand</item>
+    <item key="nicaragua" msgid="">Nicaragua</item>
+    <item key="niger" msgid="">Niger</item>
+    <item key="niue" msgid="">Niue</item>
+    <item key="norfolk_island" msgid="">Norfolk Island</item>
+    <item key="northern_mariana_islands" msgid="">Northern Mariana Islands</item>
+    <item key="norway" msgid="">Norway</item>
+    <item key="oman" msgid="">Oman</item>
+    <item key="pakistan" msgid="">Pakistan</item>
+    <item key="palau" msgid="">Palau</item>
+    <item key="palestinian_territory" msgid="">Palestinian Territory, Occupied</item>
+    <item key="panama" msgid="">Panama</item>
+    <item key="papua_new_guinea" msgid="">Papua New Guinea</item>
+    <item key="paraguay" msgid="">Paraguay</item>
+    <item key="peru" msgid="">Peru</item>
+    <item key="philippines" msgid="">Philippines</item>
+    <item key="pitcairn_islands" msgid="">Pitcairn Islands</item>
+    <item key="poland" msgid="">Poland</item>
+    <item key="portugal" msgid="">Portugal</item>
+    <item key="puerto_rico" msgid="">Puerto Rico</item>
+    <item key="qatar" msgid="">Qatar</item>
+    <item key="reunion" msgid="">Reunion</item>
+    <item key="romania" msgid="">Romania</item>
+    <item key="russian_federation" msgid="">Russian Federation</item>
+    <item key="rwanda" msgid="">Rwanda</item>
+    <item key="saint_helena_island" msgid="">Saint Helena Island</item>
+    <item key="saint_kitts_and_nevis" msgid="">Saint Kitts And Nevis</item>
+    <item key="saint_lucia" msgid="">Saint Lucia</item>
+    <item key="saint_pierre_and_miquelon" msgid="">Saint Pierre And Miquelon</item>
+    <item key="saint_vincent_and_the_grenadines" msgid="">Saint Vincent And The Grenadines</item>
+    <item key="samoa" msgid="">Samoa</item>
+    <item key="san_marino" msgid="">San Marino</item>
+    <item key="sao_tome_and_principe" msgid="">Sao Tome And Principe</item>
+    <item key="saudi_arabia" msgid="">Saudi Arabia</item>
+    <item key="scotland" msgid="">Scotland</item>
+    <item key="senegal" msgid="">Senegal</item>
+    <item key="seychelles" msgid="">Seychelles</item>
+    <item key="sierra_leone" msgid="">Sierra Leone</item>
+    <item key="singapore" msgid="">Singapore</item>
+    <item key="slovakia" msgid="">Slovakia</item>
+    <item key="slovenia" msgid="">Slovenia</item>
+    <item key="solomon_islands" msgid="">Solomon Islands</item>
+    <item key="somalia" msgid="">Somalia</item>
+    <item key="south_africa" msgid="">South Africa</item>
+    <item key="south_georgia_south_sandwich_islands" msgid="">South Georgia And South Sandwich Islands</item>
+    <item key="spain" msgid="">Spain</item>
+    <item key="sri_lanka" msgid="">Sri Lanka</item>
+    <item key="sudan" msgid="">Sudan</item>
+    <item key="suriname" msgid="">Suriname</item>
+    <item key="svalbard_and_jan_mayen" msgid="">Svalbard And Jan Mayen</item>
+    <item key="swaziland" msgid="">Swaziland</item>
+    <item key="sweden" msgid="">Sweden</item>
+    <item key="switzerland" msgid="">Switzerland</item>
+    <item key="syrian_arab_republic" msgid="">Syrian Arab Republic</item>
+    <item key="taiwan" msgid="">Taiwan</item>
+    <item key="tajikistan" msgid="">Tajikistan</item>
+    <item key="tanzania" msgid="">Tanzania, United Republic Of</item>
+    <item key="thailand" msgid="">Thailand</item>
+    <item key="tibet" msgid="">Tibet</item>
+    <item key="togo" msgid="">Togo</item>
+    <item key="tokelau" msgid="">Tokelau</item>
+    <item key="tonga" msgid="">Tonga</item>
+    <item key="trinidad_and_tobago" msgid="">Trinidad And Tobago</item>
+    <item key="tunisia" msgid="">Tunisia</item>
+    <item key="turkey" msgid="">Turkey</item>
+    <item key="turkmenistan" msgid="">Turkmenistan</item>
+    <item key="turks_and_caicos" msgid="">Turks And Caicos</item>
+    <item key="tuvalu" msgid="">Tuvalu</item>
+    <item key="uganda" msgid="">Uganda</item>
+    <item key="ukraine" msgid="">Ukraine</item>
+    <item key="united_arab_emirates" msgid="">United Arab Emirates</item>
+    <item key="united_kingdom" msgid="">United Kingdom</item>
+    <item key="united_states" msgid="">United States</item>
+    <item key="united_states_minor_outlying_islands" msgid="">United States Minor Outlying Islands</item>
+    <item key="united_states_virgin_islands" msgid="">United States Virgin Islands</item>
+    <item key="uruguay" msgid="">Uruguay</item>
+    <item key="uzbekistan" msgid="">Uzbekistan</item>
+    <item key="vanuatu" msgid="">Vanuatu</item>
+    <item key="vatican_city" msgid="">Vatican City</item>
+    <item key="venezuela" msgid="">Venezuela</item>
+    <item key="vietnam" msgid="">Vietnam</item>
+    <item key="wake_island" msgid="">Wake Island</item>
+    <item key="wales" msgid="">Wales</item>
+    <item key="wallis_and_futuna" msgid="">Wallis And Futuna</item>
+    <item key="western_sahara" msgid="">Western Sahara</item>
+    <item key="western_samoa" msgid="">Western Samoa</item>
+    <item key="yemen" msgid="">Yemen</item>
+    <item key="serbia" msgid="">Serbia</item>
+    <item key="montenegro" msgid="">Montenegro</item>
+    <item key="zambia" msgid="">Zambia</item>
+    <item key="zimbabwe" msgid="">Zimbabwe</item>
+
+
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/student_search_mode.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/student_search_mode.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/student_search_mode.xml	(revision 2226)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="student_search_mode" meta_type="CPS Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="acl_write_roles">Manager</property>
+ <item key="student_id" msgid="">Student Id</item>
+ <item key="name" msgid="">Name (First, Middle and/or Last Name)</item>
+ <item key="matric_no" msgid="">Matriculation No</item>
+ <item key="jamb_reg_no" msgid="">Registration No</item>
+ <item key="department" msgid="">Department Code</item>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/verdicts.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/verdicts.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/verdicts.xml	(revision 2226)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="verdicts" meta_type="CPS Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="acl_write_roles">Manager</property>
+ <item key="N/A" msgid="">N/A</item>
+ <item key="A" msgid="">successful student</item>
+ <item key="B" msgid="">student with carryover courses</item>
+ <item key="C" msgid="">student on probation/transfer</item>
+ <item key="D" msgid="">student who is to withdraw from the faculty</item>
+ <item key="E" msgid="">student who were previously on probation</item>
+ <item key="F" msgid="">medical case</item>
+ <item key="G" msgid="">absent from examination</item>
+ <item key="H" msgid="">withheld results</item>
+ <item key="I" msgid="">expelled/rusticated/suspended student</item>
+ <item key="J" msgid="">temporary withdrawn from the university</item>
+ <item key="K" msgid="">unregistered student</item>
+ <item key="L" msgid="">referred student</item>
+ <item key="M" msgid="">reinstatement</item>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/vocabulary.xsl
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/vocabulary.xsl	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/vocabulary.xsl	(revision 2226)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:output method="html"/>
+  <xsl:template match="/">
+    <html>
+      <head>
+        <title>
+          <xsl:value-of select="object/name"/>
+        </title>
+        <link rel="stylesheet" type="text/css" media="all"
+              href="../xsl.css" />      
+      </head>
+      <body>
+        <xsl:for-each select="object">
+          <h2>
+            Vocabulary: <xsl:value-of select="@name"/>
+          </h2> 
+        </xsl:for-each>
+        <h1>Properties</h1>
+        <table>
+          <xsl:for-each select="object/property">
+            <xsl:sort select="@name"
+                      order="ascending" />
+            <xsl:variable name="color">
+              <xsl:choose>
+                <xsl:when test="position() mod 2 = 0">
+                  <xsl:text>#ffffff</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>#eeeeee</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+            <tr style="background-color:{$color}">
+              <td colspan="">
+                <xsl:value-of select="@name"/>
+              </td>
+            </tr>
+          </xsl:for-each>
+        </table>
+        <h1>Items</h1>
+        <table>
+          <tr>
+            <th>Key</th>
+            <th>MsgId</th>
+            <th>Text</th>
+          </tr>
+          <xsl:for-each select="object/item">
+            <xsl:sort select="@name"
+                      order="ascending" />
+            <xsl:variable name="color">
+              <xsl:choose>
+                <xsl:when test="position() mod 2 = 0">
+                  <xsl:text>#ffffff</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>#eeeeee</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+            <tr style="background-color:{$color}">
+              <td colspan="">
+                <xsl:value-of select="@key"/>
+              </td>
+              <td colspan="">
+                <xsl:value-of select="@msgid"/>
+              </td>
+              <td colspan="">
+                <xsl:value-of select="text()"/>
+              </td>
+            </tr>
+          </xsl:for-each>
+        </table>
+      </body>
+    </html>
+  </xsl:template>
+</xsl:stylesheet>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/waeup_bed_letters.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/waeup_bed_letters.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/waeup_bed_letters.xml	(revision 2226)
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="waeup_bed_letters" meta_type="CPS Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="acl_write_roles">Manager</property>
+ <item key="A" msgid="">Bed A</item>
+ <item key="B" msgid="">Bed B</item>
+ <item key="C" msgid="">Bed C</item>
+ <item key="D" msgid="">Bed D</item>
+ <item key="E" msgid="">Bed E</item>
+ <item key="F" msgid="">Bed F</item>
+ <item key="G" msgid="">Bed G</item>
+ <item key="H" msgid="">Bed H</item>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/waeup_block_letters.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/waeup_block_letters.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/vocabularies/waeup_block_letters.xml	(revision 2226)
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="waeup_bed_letters" meta_type="CPS Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="acl_write_roles">Manager</property>
+ <item key="A" msgid="">Block A</item>
+ <item key="B" msgid="">Block B</item>
+ <item key="C" msgid="">Block C</item>
+ <item key="D" msgid="">Block D</item>
+ <item key="E" msgid="">Block E</item>
+ <item key="F" msgid="">Block F</item>
+ <item key="G" msgid="">Block G</item>
+ <item key="H" msgid="">Block H</item>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows.xml	(revision 2226)
@@ -0,0 +1,133 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="content.xsl"?>
+<object name="portal_workflow" meta_type="CPS Workflow Tool">
+ <property name="title"></property>
+ <object name="section_content_wf" meta_type="CPS Workflow"/>
+ <object name="section_folder_wf" meta_type="CPS Workflow"/>
+ <object name="waeup_base_wf" meta_type="CPS Workflow"/>
+ <object name="waeup_section_wf" meta_type="CPS Workflow"/>
+ <object name="waeup_scbf_wf" meta_type="CPS Workflow"/>
+ <object name="waeup_students_folder_wf" meta_type="CPS Workflow"/>
+ <object name="waeup_acco_folder_wf" meta_type="CPS Workflow"/>
+ <object name="waeup_student_accommodation_wf" meta_type="CPS Workflow"/>
+ <object name="waeup_student_subobject_wf" meta_type="CPS Workflow"/>
+ <object name="waeup_student_wf" meta_type="CPS Workflow"/>
+ <object name="waeup_course_registration_wf" meta_type="CPS Workflow"/>
+ <object name="waeup_workspace_wf" meta_type="CPS Workflow"/>
+ <object name="workspace_calendar_wf" meta_type="CPS Workflow"/>
+ <object name="workspace_content_wf" meta_type="CPS Workflow"/>
+ <object name="workspace_folder_wf" meta_type="CPS Workflow"/>
+ <object name="workspace_folderish_content_wf" meta_type="CPS Workflow"/>
+ <object name="waeup_document_wf" meta_type="CPS Workflow"/>
+ <bindings>
+  <default/>
+  <type type_id="AcademicsFolder">
+   <bound-workflow workflow_id="waeup_section_wf"/>
+  </type>
+  <type type_id="AccoFolder">
+   <bound-workflow workflow_id="waeup_acco_folder_wf"/>
+  </type>
+  <type type_id="AccoHall">
+   <bound-workflow workflow_id="waeup_section_wf"/>
+  </type>
+  <type type_id="CPS Calendar">
+   <bound-workflow workflow_id="workspace_calendar_wf"/>
+  </type>
+  <type type_id="Certificate">
+   <bound-workflow workflow_id="waeup_base_wf"/>
+  </type>
+  <type type_id="CertificateCourse">
+   <bound-workflow workflow_id="waeup_base_wf"/>
+  </type>
+  <type type_id="CertificatesFolder">
+   <bound-workflow workflow_id="waeup_section_wf"/>
+  </type>
+  <type type_id="Course">
+   <bound-workflow workflow_id="waeup_base_wf"/>
+  </type>
+  <type type_id="CourseTicket">
+   <bound-workflow workflow_id="waeup_base_wf"/>
+  </type>
+  <type type_id="CoursesFolder">
+   <bound-workflow workflow_id="waeup_section_wf"/>
+  </type>
+  <type type_id="Department">
+   <bound-workflow workflow_id="waeup_section_wf"/>
+  </type>
+  <type type_id="Faculty">
+   <bound-workflow workflow_id="waeup_section_wf"/>
+  </type>
+  <type type_id="Members Workspace">
+   <bound-workflow workflow_id="workspace_folder_wf"/>
+  </type>
+  <type type_id="PaymentsFolder">
+   <bound-workflow workflow_id="waeup_student_subobject_wf"/>
+  </type>
+  <type type_id="Payment">
+   <bound-workflow workflow_id="waeup_student_subobject_wf"/>
+  </type>
+  <type type_id="ScratchCardBatch">
+   <bound-workflow workflow_id="waeup_section_wf"/>
+  </type>
+  <type type_id="ScratchCardBatchesFolder">
+   <bound-workflow workflow_id="waeup_scbf_wf"/>
+  </type>
+  <type type_id="Section">
+   <bound-workflow workflow_id="waeup_section_wf"/>
+  </type>
+  <type type_id="Semester">
+   <bound-workflow workflow_id="waeup_section_wf"/>
+  </type>
+  <type type_id="Student">
+   <bound-workflow workflow_id="waeup_student_wf"/>
+  </type>
+  <type type_id="StudentAccommodation">
+   <bound-workflow workflow_id="waeup_student_accommodation_wf"/>
+  </type>
+  <type type_id="StudentAdmission">
+   <bound-workflow workflow_id="waeup_student_wf"/>
+  </type>
+  <type type_id="StudentApplication">
+   <bound-workflow workflow_id="waeup_student_subobject_wf"/>
+  </type>
+  <type type_id="StudentClearance">
+   <bound-workflow workflow_id="waeup_student_subobject_wf"/>
+  </type>
+  <type type_id="StudentCourseResult">
+   <bound-workflow workflow_id="waeup_student_subobject_wf"/>
+  </type>
+  <type type_id="StudentPersonal">
+   <bound-workflow workflow_id="waeup_student_subobject_wf"/>
+  </type>
+  <type type_id="StudentPume">
+   <bound-workflow workflow_id="waeup_student_subobject_wf"/>
+  </type>
+  <type type_id="StudentSemester">
+   <bound-workflow workflow_id="waeup_section_wf"/>
+  </type>
+  <type type_id="StudentStudyCourse">
+   <bound-workflow workflow_id="waeup_student_subobject_wf"/>
+  </type>
+  <type type_id="StudentStudyLevel">
+   <bound-workflow workflow_id="waeup_student_subobject_wf"/>
+  </type>
+  <type type_id="StudentsFolder">
+   <bound-workflow workflow_id="waeup_students_folder_wf"/>
+  </type>
+  <type type_id="StudyLevel">
+   <bound-workflow workflow_id="waeup_section_wf"/>
+  </type>
+  <type type_id="University">
+   <bound-workflow workflow_id="waeup_section_wf"/>
+  </type>
+  <type type_id="Workspace">
+   <bound-workflow workflow_id="workspace_folder_wf"/>
+  </type>
+  <type type_id="DocumentsFolder">
+   <bound-workflow workflow_id="waeup_section_wf"/>
+  </type>
+  <type type_id="WAeUPDocument">
+   <bound-workflow workflow_id="waeup_document_wf"/>
+  </type>
+ </bindings>
+</object>
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/definition.xsl
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/definition.xsl	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/definition.xsl	(revision 2226)
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:output method="html"/>
+  <xsl:template match="/">
+    <html>
+      <head>
+        <title>
+          <xsl:for-each select="object">
+            <xsl:value-of select="@name"/>
+          </xsl:for-each>
+        </title>
+        <link rel="stylesheet" type="text/css" media="all"
+              href="../../xsl.css" />      
+      </head>
+      <body>
+        <table>
+          <xsl:for-each select="cps-workflow">
+            <tr>
+              <th>Title</th>
+              <td>
+                <xsl:value-of select="@title"/>
+              </td>
+            </tr>
+            <tr>
+              <th>Workflow Id</th>
+              <td>
+                <xsl:value-of select="@workflow_id"/>
+              </td>
+            </tr>
+            <tr>
+              <th>State Variable</th>
+              <td>
+                <xsl:value-of select="@state_variable"/>
+              </td>
+            </tr>
+            <tr>
+              <th>Meta Type</th>
+              <td>
+                <xsl:value-of select="@meta_type"/>
+              </td>
+            </tr>
+          </xsl:for-each>
+        </table>            
+        <h2>Managed Permissions</h2>
+        <table>
+          <xsl:for-each select="cps-workflow/permission">
+            <xsl:variable name="color">
+              <xsl:choose>
+                <xsl:when test="position() mod 2 = 0">
+                  <xsl:text>#ffffff</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>#eeeeee</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+            <tr style="background-color:{$color}">
+              <td colspan="">
+                <xsl:value-of select="text()"/>
+              </td>
+            </tr>
+          </xsl:for-each>
+        </table>
+        <h2>States</h2>
+          <xsl:for-each select="cps-workflow/state">
+            <xsl:variable name="color">
+              <xsl:choose>
+                <xsl:when test="position() mod 2 = 0">
+                  <xsl:text>#ffffff</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>#eeeeee</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+          <h3><xsl:value-of select="@state_id"/>  <xsl:value-of select="@title"/></h3>
+          <table>
+            <tr style="background-color:{$color}">
+              <th>
+                Exit Transitions
+              </th>
+              <td colspan="2">
+                <xsl:for-each select="exit-transition">
+                  <xsl:value-of select="@transition_id"/><br />
+                </xsl:for-each>
+              </td>
+            </tr>
+            <tr style="background-color:{$color}">
+              <th>
+                Permission Map
+              </th>
+              <th>
+                Acquired
+              </th>
+              <th>
+                Permission Roles
+              </th>
+            </tr>
+            <xsl:for-each select="permission-map">
+              <tr style="background-color:{$color}">
+                <td>
+                  <xsl:value-of select="@name"/>
+                </td>
+                <td>
+                  <xsl:value-of select="@acquired"/>
+                </td>
+                <td>
+                  <xsl:for-each select="permission-role">
+                    <xsl:value-of select="text()"/><br />
+                  </xsl:for-each>
+                </td>
+              </tr>
+            </xsl:for-each>
+          </table>
+        </xsl:for-each>
+        <h2>Transitions</h2>
+          <xsl:for-each select="cps-workflow/transition">
+            <xsl:variable name="color">
+              <xsl:choose>
+                <xsl:when test="position() mod 2 = 0">
+                  <xsl:text>#ffffff</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>#eeeeee</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+          <h3>Id: <xsl:value-of select="@transition_id"/> Title: <xsl:value-of select="@title"/></h3> 
+          <h3>New State: <xsl:value-of select="@new_state"/> Trigger: <xsl:value-of select="@trigger"/> </h3>
+          <table>
+            <xsl:for-each select="action">
+              <tr style="background-color:{$color}">
+                <td colspan="2">
+                  <strong>Action URL:</strong> <xsl:value-of select="@url"/>
+                </td>
+                <td colspan="1">
+                  <strong>Category:</strong> <xsl:value-of select="@category"/>
+                </td>
+                <td colspan="1">
+                  <strong>Box:</strong> <xsl:value-of select="text()"/>
+                </td>
+              </tr>
+            </xsl:for-each>
+            <tr style="background-color:{$color}">
+              <td colspan="2">
+                <strong>B Script:</strong> <xsl:value-of select="@before_script"/>
+              </td>
+              <td colspan="2">
+                <strong>A Script:</strong> <xsl:value-of select="@after_script"/>
+              </td>
+            </tr>
+            <tr style="background-color:{$color}">
+              <th colspan="2">
+                Transition Flags
+              </th>
+              <td colspan="2">
+                <xsl:for-each select="transition-behavior">
+                  <xsl:value-of select="@behavior_id"/><br />
+                </xsl:for-each>
+              </td>
+            </tr>
+            <tr style="background-color:{$color}">
+              <th>
+               Guard: Roles
+              </th>
+              <th>
+                Groups
+              </th>
+              <th>
+                Permissions
+              </th>
+              <th>
+                Expression
+              </th>
+            </tr>
+            <tr style="background-color:{$color}">
+              <td>
+                <xsl:for-each select="guard/guard-role">
+                  <xsl:value-of select="text()"/><br />
+                </xsl:for-each>
+              </td>
+              <td>
+                <xsl:for-each select="guard/guard-group">
+                  <xsl:value-of select="text()"/><br />
+                </xsl:for-each>
+              </td>
+              <td>
+                <xsl:for-each select="guard/guard-permission">
+                  <xsl:value-of select="text()"/><br />
+                </xsl:for-each>
+              </td>
+              <td>
+                <xsl:for-each select="guard/guard-expression">
+                  <xsl:value-of select="text()"/><br />
+                </xsl:for-each>
+              </td>
+            </tr>
+          </table>
+        </xsl:for-each>
+      </body>
+    </html>
+  </xsl:template>
+</xsl:stylesheet>
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/section_content_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/section_content_wf/definition.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/section_content_wf/definition.xml	(revision 2226)
@@ -0,0 +1,228 @@
+<?xml version="1.0"?>
+<cps-workflow workflow_id="section_content_wf"
+              title="CPS Workflow Definition"
+              state_variable="review_state"
+              meta_type="CPS Workflow">
+ <permission>Modify portal content</permission>
+ <permission>View</permission>
+ <permission>WebDAV Lock items</permission>
+ <permission>WebDAV Unlock items</permission>
+ <state state_id="pending" title="Waiting for reviewer">
+  <exit-transition transition_id="accept"/>
+  <exit-transition transition_id="reject"/>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>SectionReviewer</permission-role>
+   <permission-role>SectionManager</permission-role>
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>SectionReviewer</permission-role>
+   <permission-role>SectionManager</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="WebDAV Lock items" acquired="False">
+   <permission-role>SectionReviewer</permission-role>
+   <permission-role>SectionManager</permission-role>
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="WebDAV Unlock items"
+                  acquired="False">
+   <permission-role>SectionReviewer</permission-role>
+   <permission-role>SectionManager</permission-role>
+   <permission-role>Manager</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="published" title="Public">
+  <exit-transition transition_id="unpublish"/>
+  <exit-transition transition_id="cut_copy_paste"/>
+  <exit-transition transition_id="sub_publishing"/>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>SectionReader</permission-role>
+   <permission-role>SectionReviewer</permission-role>
+   <permission-role>SectionManager</permission-role>
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="WebDAV Lock items" acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="WebDAV Unlock items"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+ </state>
+ <transition transition_id="accept"
+             title="Reviewer accepts publishing"
+             new_state="published" trigger="USER"
+             before_script=""
+             after_script="fixup_after_publish">
+  <action url="%(content_url)s/content_accept_form"
+          category="workflow">action_accept</action>
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionReviewer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="merge"/>
+ </transition>
+ <transition transition_id="cut_copy_paste"
+             title="Cut/Copy/Paste" new_state=""
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionReviewer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-move"/>
+  <transition-behavior behavior_id="allow-sub-delete"/>
+  <transition-behavior behavior_id="allow-sub-copy"/>
+ </transition>
+ <transition transition_id="publish"
+             title="Member publishes directly"
+             new_state="published" trigger="USER"
+             before_script=""
+             after_script="fixup_after_publish">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionReviewer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="initial-clone"/>
+  <transition-behavior behavior_id="freeze"/>
+  <transition-behavior behavior_id="merge"/>
+ </transition>
+ <transition transition_id="reject"
+             title="Reviewer rejects publishing"
+             new_state="" trigger="USER" before_script=""
+             after_script="">
+  <action url="%(content_url)s/content_reject_form"
+          category="workflow">action_reject</action>
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionReviewer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="delete"/>
+ </transition>
+ <transition transition_id="sub_publishing"
+             title="Allow publishing of subdocuments"
+             new_state="" trigger="USER" before_script=""
+             after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionReviewer</guard-role>
+   <guard-role>SectionReader</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-publishing"/>
+ </transition>
+ <transition transition_id="submit"
+             title="Member requests publishing"
+             new_state="pending" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>Member</guard-role>
+  </guard>
+  <transition-behavior behavior_id="initial-clone"/>
+  <transition-behavior behavior_id="freeze"/>
+ </transition>
+ <transition transition_id="unpublish"
+             title="Reviewer removes content from publication"
+             new_state="" trigger="USER" before_script=""
+             after_script="">
+  <action url="%(content_url)s/content_unpublish_form"
+          category="workflow">action_un_publish</action>
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionReviewer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="delete"/>
+ </transition>
+ <variable variable_id="action" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The last transition</description>
+  <default>
+   
+   <expression>transition/getId|nothing</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="actor" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The ID of the user who performed</description>
+  <default>
+   
+   <expression>user/getId</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="comments" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>Comments about the last transition</description>
+  <default>
+   
+   <expression>python:state_change.kwargs.get('comment', '')</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="dest_container" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>Destination container for the last paste/publish</description>
+  <default>
+   
+   <expression>python:state_change.kwargs.get('dest_container', '')</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="language_revs" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The language revisions of the proxy</description>
+  <default>
+   
+   <expression>state_change/getLanguageRevisions</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="review_history" for_catalog="False"
+           for_status="False" update_always="False">
+  <description>Provides access to workflow history</description>
+  <default>
+   
+   <expression>state_change/getHistory</expression>
+  </default>
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionReviewer</guard-role>
+  </guard>
+ </variable>
+ <variable variable_id="time" for_catalog="True"
+           for_status="True" update_always="True">
+  <description>Time of the last transition</description>
+  <default>
+   
+   <expression>state_change/getDateTime</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <script script_id="fixup_after_publish"
+         type="Script (Python)"
+         filename="workflows/section_content_wf/scripts/fixup_after_publish.py"/>
+</cps-workflow>
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/section_content_wf/scripts/fixup_after_publish.py
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/section_content_wf/scripts/fixup_after_publish.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/section_content_wf/scripts/fixup_after_publish.py	(revision 2226)
@@ -0,0 +1,11 @@
+## Script (Python) "fixup_after_publish"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=state_change
+##title=
+##
+from Products.CPSWorkflow.util import updateEffectiveDate
+return updateEffectiveDate(state_change.object)
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/section_folder_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/section_folder_wf/definition.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/section_folder_wf/definition.xml	(revision 2226)
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<cps-workflow workflow_id="section_folder_wf"
+              title="CPS Workflow Definition"
+              state_variable="review_state"
+              meta_type="CPS Workflow">
+ <permission>View</permission>
+ <state state_id="work" title="Work">
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="cut_copy_paste"/>
+  <exit-transition transition_id="translate"/>
+  <exit-transition transition_id="delete_translation"/>
+  <permission-map name="View" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>SectionManager</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+   <permission-role>SectionReader</permission-role>
+   <permission-role>SectionReviewer</permission-role>
+  </permission-map>
+ </state>
+ <transition transition_id="create" title="Initial creation"
+             new_state="work" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+  <transition-behavior behavior_id="initial-create"/>
+ </transition>
+ <transition transition_id="create_content"
+             title="Create content" new_state="work"
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionReviewer</guard-role>
+   <guard-role>SectionReader</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-create"/>
+  <transition-behavior behavior_id="allow-sub-publishing"/>
+ </transition>
+ <transition transition_id="cut_copy_paste"
+             title="Cut/Copy/Paste" new_state=""
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionReviewer</guard-role>
+   <guard-role>SectionReader</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-move"/>
+  <transition-behavior behavior_id="allow-sub-delete"/>
+  <transition-behavior behavior_id="allow-sub-copy"/>
+ </transition>
+ <transition transition_id="delete_translation"
+             title="Delete a translation" new_state=""
+             trigger="USER"
+             before_script="delete_language_from_proxy"
+             after_script="">
+  
+  <guard>
+   <guard-permission>Modify portal content</guard-permission>
+   <guard-expression>python:not state_change.object.isDefaultLanguage()</guard-expression>
+  </guard>
+ </transition>
+ <transition transition_id="translate"
+             title="Add translation" new_state=""
+             trigger="USER"
+             before_script="add_language_to_proxy"
+             after_script="">
+  
+  <guard>
+   <guard-permission>Modify portal content</guard-permission>
+  </guard>
+ </transition>
+ <script script_id="add_language_to_proxy"
+         type="Script (Python)"
+         filename="workflows/section_folder_wf/scripts/add_language_to_proxy.py"/>
+ <script script_id="delete_language_from_proxy"
+         type="Script (Python)"
+         filename="workflows/section_folder_wf/scripts/delete_language_from_proxy.py"/>
+</cps-workflow>
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/section_folder_wf/scripts/add_language_to_proxy.py
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/section_folder_wf/scripts/add_language_to_proxy.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/section_folder_wf/scripts/add_language_to_proxy.py	(revision 2226)
@@ -0,0 +1,12 @@
+## Script (Python) "add_language_to_proxy"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=state_change
+##title=
+##
+lang=state_change.kwargs.get('lang')
+from_lang=state_change.kwargs.get('from_lang')
+state_change.object.addLanguageToProxy(lang, from_lang)
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/section_folder_wf/scripts/delete_language_from_proxy.py
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/section_folder_wf/scripts/delete_language_from_proxy.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/section_folder_wf/scripts/delete_language_from_proxy.py	(revision 2226)
@@ -0,0 +1,11 @@
+## Script (Python) "delete_language_from_proxy"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=state_change
+##title=
+##
+lang=state_change.kwargs.get('lang')
+state_change.object.delLanguageFromProxy(lang)
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_acco_folder_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_acco_folder_wf/definition.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_acco_folder_wf/definition.xml	(revision 2226)
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<cps-workflow workflow_id="waeup_acco_folder_wf"
+              title="CPS Workflow Definition"
+              state_variable="review_state"
+              meta_type="CPS Workflow">
+ <permission>Delete objects</permission>
+ <permission>View</permission>
+ <state state_id="static" title="">
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="cut_copy_paste"/>
+  <permission-map name="Delete objects" acquired="True">
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>SectionManager</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+   <permission-role>SectionReader</permission-role>
+   <permission-role>SectionReviewer</permission-role>
+  </permission-map>
+ </state>
+ <transition transition_id="create" title="Initial creation"
+             new_state="static" trigger="USER"
+             before_script="" after_script="">
+
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="initial-create"/>
+ </transition>
+ <transition transition_id="create_content"
+             title="Create content" new_state=""
+             trigger="USER" before_script="" after_script="">
+
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionReviewer</guard-role>
+   <guard-role>SectionReader</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-create"/>
+  <transition-behavior behavior_id="allow-sub-publishing"/>
+ </transition>
+</cps-workflow>
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_base_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_base_wf/definition.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_base_wf/definition.xml	(revision 2226)
@@ -0,0 +1,79 @@
+<?xml version="1.0"?>
+<cps-workflow workflow_id="waeup_base_wf"
+              title="CPS Workflow Definition"
+              state_variable="review_state"
+              meta_type="CPS Workflow">
+ <permission>View</permission>
+ <state state_id="checked" title="Checked">
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="cut_copy_paste"/>
+  <exit-transition transition_id="retract"/>
+  <permission-map name="View" acquired="True">
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="unchecked" title="Unchecked">
+  <exit-transition transition_id="approve"/>
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="cut_copy_paste"/>
+  <permission-map name="View" acquired="True">
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <transition transition_id="approve" title="Approve"
+             new_state="checked" trigger="USER"
+             before_script="" after_script="">
+  <action url="%(content_url)s/content_status_modify?workflow_action=approve"
+          category="workflow">Approve</action>
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="create" title="Initial creation"
+             new_state="unchecked" trigger="USER"
+             before_script="" after_script="">
+
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="initial-create"/>
+ </transition>
+ <transition transition_id="create_content"
+             title="Create content" new_state=""
+             trigger="USER" before_script="" after_script="">
+
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-create"/>
+  <transition-behavior behavior_id="allow-sub-publishing"/>
+ </transition>
+ <transition transition_id="cut_copy_paste"
+             title="Cut/Copy/Paste" new_state=""
+             trigger="USER" before_script="" after_script="">
+
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-move"/>
+  <transition-behavior behavior_id="allow-sub-delete"/>
+  <transition-behavior behavior_id="allow-sub-copy"/>
+ </transition>
+ <transition transition_id="retract" title="Retract"
+             new_state="unchecked" trigger="USER"
+             before_script="" after_script="">
+  <action url="%(content_url)s/content_status_modify?workflow_action=retract"
+          category="workflow">Retract</action>
+  <guard>
+   <guard-role>Manager</guard-role>
+  </guard>
+ </transition>
+</cps-workflow>
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_document_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_document_wf/definition.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_document_wf/definition.xml	(revision 2226)
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<cps-workflow workflow_id="waeup_document_wf"
+              title="CPS Workflow Definition"
+              state_variable="review_state"
+              meta_type="CPS Workflow">
+ <permission>View</permission>
+ <state state_id="static" title="">
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="cut_copy_paste"/>
+  <permission-map name="View" acquired="True">
+   <permission-role>Anonymous</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>SectionManager</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+   <permission-role>SectionReader</permission-role>
+   <permission-role>SectionReviewer</permission-role>
+  </permission-map>
+ </state>
+ <transition transition_id="create" title="Initial creation"
+             new_state="static" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="initial-create"/>
+ </transition>
+ <transition transition_id="create_content"
+             title="Create content" new_state=""
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionReviewer</guard-role>
+   <guard-role>SectionReader</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-create"/>
+  <transition-behavior behavior_id="allow-sub-publishing"/>
+ </transition>
+ <transition transition_id="cut_copy_paste"
+             title="Cut/Copy/Paste" new_state=""
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionReviewer</guard-role>
+   <guard-role>SectionReader</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-delete"/>
+  <transition-behavior behavior_id="allow-sub-move"/>
+  <transition-behavior behavior_id="allow-sub-copy"/>
+ </transition>
+</cps-workflow>
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_scbf_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_scbf_wf/definition.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_scbf_wf/definition.xml	(revision 2226)
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<cps-workflow workflow_id="waeup_scbf_wf"
+              title="CPS Workflow Definition"
+              state_variable="review_state"
+              meta_type="CPS Workflow">
+ <permission>Delete objects</permission>
+ <permission>View</permission>
+ <state state_id="static" title="">
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="cut_copy_paste"/>
+  <permission-map name="Delete objects" acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>SectionManager</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+   <permission-role>SectionReader</permission-role>
+   <permission-role>SectionReviewer</permission-role>
+  </permission-map>
+ </state>
+ <transition transition_id="create" title="Initial creation"
+             new_state="static" trigger="USER"
+             before_script="" after_script="">
+
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="initial-create"/>
+ </transition>
+ <transition transition_id="create_content"
+             title="Create content" new_state=""
+             trigger="USER" before_script="" after_script="">
+
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionReviewer</guard-role>
+   <guard-role>SectionReader</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-create"/>
+  <transition-behavior behavior_id="allow-sub-publishing"/>
+ </transition>
+</cps-workflow>
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_section_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_section_wf/definition.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_section_wf/definition.xml	(revision 2226)
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<cps-workflow workflow_id="waeup_section_wf"
+              title="CPS Workflow Definition"
+              state_variable="review_state"
+              meta_type="CPS Workflow">
+ <permission>View</permission>
+ <state state_id="static" title="">
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="cut_copy_paste"/>
+  <permission-map name="View" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>SectionManager</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+   <permission-role>SectionReader</permission-role>
+   <permission-role>SectionReviewer</permission-role>
+  </permission-map>
+ </state>
+ <transition transition_id="create" title="Initial creation"
+             new_state="static" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="initial-create"/>
+ </transition>
+ <transition transition_id="create_content"
+             title="Create content" new_state=""
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionReviewer</guard-role>
+   <guard-role>SectionReader</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-create"/>
+  <transition-behavior behavior_id="allow-sub-publishing"/>
+ </transition>
+ <transition transition_id="cut_copy_paste"
+             title="Cut/Copy/Paste" new_state=""
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionReviewer</guard-role>
+   <guard-role>SectionReader</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-delete"/>
+  <transition-behavior behavior_id="allow-sub-move"/>
+  <transition-behavior behavior_id="allow-sub-copy"/>
+ </transition>
+</cps-workflow>
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_student_accommodation_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_student_accommodation_wf/definition.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_student_accommodation_wf/definition.xml	(revision 2226)
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="../definition.xsl"?>
+<cps-workflow workflow_id="waeup_student_accommodation_wf"
+              title="CPS Workflow Definition"
+              state_variable="review_state"
+              meta_type="CPS Workflow">
+ <permission>Add portal content</permission>
+ <permission>Modify portal content</permission>
+ <permission>View</permission>
+ <state state_id="bed_reserved" title="">
+  <exit-transition transition_id="pay_maintenance_fee"/>
+  <exit-transition transition_id="remove"/>
+  <permission-map name="Add portal content" acquired="True">
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="True">
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="maintenance_fee_paid" title="">
+  <exit-transition transition_id="remove"/>
+ </state>
+ <state state_id="removed" title="">
+ </state>
+ <transition transition_id="pay_maintenance_fee" title=""
+             new_state="maintenance_fee_paid" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+  </guard>
+ </transition>
+ <transition transition_id="remove" title=""
+             new_state="removed" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+  </guard>
+ </transition>
+ <transition transition_id="reserve_bed" title=""
+             new_state="bed_reserved" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+  </guard>
+  <transition-behavior behavior_id="initial-create"/>
+ </transition>
+</cps-workflow>
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_student_subobject_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_student_subobject_wf/definition.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_student_subobject_wf/definition.xml	(revision 2226)
@@ -0,0 +1,163 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="../definition.xsl"?>
+<cps-workflow workflow_id="waeup_student_subobject_wf"
+              title="CPS Workflow Definition"
+              state_variable="review_state"
+              meta_type="CPS Workflow">
+ <permission>Add portal content</permission>
+ <permission>Delete objects</permission>
+ <permission>Modify portal content</permission>
+ <permission>View</permission>
+ <state state_id="closed" title="">
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="open"/>
+  <permission-map name="Add portal content" acquired="True">
+   <permission-role>CourseAdviser</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="Delete objects" acquired="False">
+   <permission-role>CourseAdviser</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>SectionManager</permission-role>
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>ClearanceOfficer</permission-role>
+   <permission-role>CourseAdviser</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>SectionManager</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>CourseAdviser</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="content_addable" title="">
+  <exit-transition transition_id="close"/>
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="open"/>
+  <permission-map name="Add portal content" acquired="True">
+   <permission-role>CourseAdviser</permission-role>
+   <permission-role>Owner</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="Delete objects" acquired="False">
+   <permission-role>CourseAdviser</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+   <permission-role>SectionManager</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="True">
+   <permission-role>CourseAdviser</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>CourseAdviser</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="created" title="">
+  <exit-transition transition_id="close"/>
+  <exit-transition transition_id="close_for_edit"/>
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="open"/>
+  <permission-map name="Add portal content" acquired="True">
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="Delete objects" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>SectionManager</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="True">
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="opened" title="">
+  <exit-transition transition_id="close"/>
+  <exit-transition transition_id="close_for_edit"/>
+  <exit-transition transition_id="create_content"/>
+  <permission-map name="Add portal content" acquired="True">
+   <permission-role>CourseAdviser</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="Delete objects" acquired="False">
+   <permission-role>CourseAdviser</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>SectionManager</permission-role>
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="True">
+   <permission-role>CourseAdviser</permission-role>
+   <permission-role>Owner</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>CourseAdviser</permission-role>
+   <permission-role>Owner</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <transition transition_id="close" title=""
+             new_state="closed" trigger="USER"
+             before_script="" after_script="">
+
+  <guard>
+   <guard-role>SectionOfficer</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>Owner</guard-role>
+   <guard-role>CourseAdviser</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="close_for_edit" title=""
+             new_state="content_addable" trigger="USER"
+             before_script="" after_script="">
+
+  <guard>
+   <guard-role>SectionOfficer</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>Owner</guard-role>
+   <guard-role>CourseAdviser</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="create" title=""
+             new_state="created" trigger="USER"
+             before_script="" after_script="">
+
+  <guard>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-create"/>
+  <transition-behavior behavior_id="initial-create"/>
+ </transition>
+ <transition transition_id="create_content" title=""
+             new_state="" trigger="USER" before_script=""
+             after_script="">
+
+  <guard>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-create"/>
+ </transition>
+ <transition transition_id="open" title=""
+             new_state="opened" trigger="USER"
+             before_script="" after_script="">
+
+  <guard>
+   <guard-role>SectionOfficer</guard-role>
+   <guard-role>ClearanceOfficer</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>Owner</guard-role>
+   <guard-role>CourseAdviser</guard-role>
+  </guard>
+ </transition>
+</cps-workflow>
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_student_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_student_wf/definition.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_student_wf/definition.xml	(revision 2226)
@@ -0,0 +1,464 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="../definition.xsl"?>
+<cps-workflow workflow_id="waeup_student_wf"
+              title="CPS Workflow Definition"
+              state_variable="review_state"
+              meta_type="CPS Workflow">
+ <permission>Delete objects</permission>
+ <permission>Modify portal content</permission>
+ <permission>View</permission>
+ <state state_id="admission_applied" title="">
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="pume_fail"/>
+  <exit-transition transition_id="pume_pass"/>
+  <permission-map name="Delete objects" acquired="False">
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="True">
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="admission_rejected" title="">
+  <exit-transition transition_id="finally_reject"/>
+  <permission-map name="Delete objects" acquired="False">
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="True">
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="admitted" title="">
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="enter_clearance_pin"/>
+  <exit-transition transition_id="raise_objection"/>
+  <permission-map name="Delete objects" acquired="False">
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="True">
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="application_pin_entered" title="">
+  <exit-transition transition_id="apply_for_admission"/>
+  <exit-transition transition_id="create_content"/>
+  <permission-map name="Delete objects" acquired="False">
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="True">
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="clearance_pin_entered" title="">
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="request_clearance"/>
+  <permission-map name="Delete objects" acquired="False">
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="True">
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="clearance_requested" title="">
+  <exit-transition transition_id="clear_and_validate"/>
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="reject_clearance"/>
+  <permission-map name="Delete objects" acquired="False">
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="True">
+   <permission-role>ClearanceOfficer</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="cleared_and_validated" title="">
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="defer"/>
+  <exit-transition transition_id="pay_school_fee"/>
+  <exit-transition transition_id="reject_clearance"/>
+  <permission-map name="Delete objects" acquired="False">
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="True">
+   <permission-role>ClearanceOfficer</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="courses_registered" title="">
+  <exit-transition transition_id="reject_courses"/>
+  <exit-transition transition_id="validate_courses"/>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="courses_validated" title="">
+  <exit-transition transition_id="reject_courses"/>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="deferred" title="">
+  <permission-map name="Delete objects" acquired="False">
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="True">
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="finally_rejected" title="">
+  <permission-map name="Delete objects" acquired="False">
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="True">
+   <permission-role>ClearanceOfficer</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="objection_raised" title="">
+  <exit-transition transition_id="enter_clearance_pin"/>
+  <exit-transition transition_id="create_content"/>
+  <permission-map name="Delete objects" acquired="False">
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="True">
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="pume_failed" title="">
+  <exit-transition transition_id="reject_admission"/>
+  <permission-map name="Delete objects" acquired="False">
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="True">
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="pume_passed" title="">
+  <exit-transition transition_id="admit"/>
+  <exit-transition transition_id="reject_admission"/>
+  <permission-map name="Delete objects" acquired="False">
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="True">
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="returning" title="">
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="pay_school_fee"/>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="school_fee_paid" title="">
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="register_courses"/>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="student_created" title="">
+  <exit-transition transition_id="admit"/>
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="enter_application_pin"/>
+  <exit-transition transition_id="pume_fail"/>
+  <exit-transition transition_id="pume_pass"/>
+  <exit-transition transition_id="reject_admission"/>
+  <exit-transition transition_id="return"/>
+  <permission-map name="Delete objects" acquired="False">
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="True">
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+  </permission-map>
+ </state>
+ <transition transition_id="admit" title=""
+             new_state="admitted" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>SectionOfficer</guard-role>
+   <guard-role>ClearanceOfficer</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="apply_for_admission" title=""
+             new_state="admission_applied" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>SectionOfficer</guard-role>
+   <guard-role>Owner</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="clear_and_validate" title=""
+             new_state="cleared_and_validated"
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+   <guard-role>SectionOfficer</guard-role>
+   <guard-role>ClearanceOfficer</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="create" title="Initial creation"
+             new_state="student_created" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-create"/>
+  <transition-behavior behavior_id="initial-create"/>
+ </transition>
+ <transition transition_id="create_content" title=""
+             new_state="" trigger="USER" before_script=""
+             after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>Owner</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-create"/>
+  <transition-behavior behavior_id="allow-sub-delete"/>
+ </transition>
+ <transition transition_id="defer" title=""
+             new_state="deferred" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>SectionOfficer</guard-role>
+   <guard-role>Owner</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="enter_application_pin" title=""
+             new_state="application_pin_entered"
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+   <guard-role>SectionOfficer</guard-role>
+   <guard-role>Owner</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="enter_clearance_pin" title=""
+             new_state="clearance_pin_entered"
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+   <guard-role>SectionOfficer</guard-role>
+   <guard-role>Owner</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="finally_reject" title=""
+             new_state="finally_rejected" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>SectionOfficer</guard-role>
+   <guard-role>ClearanceOfficer</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+
+ <transition transition_id="pay_school_fee" title=""
+             new_state="school_fee_paid" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>Owner</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="pume_fail" title=""
+             new_state="pume_failed" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>SectionOfficer</guard-role>
+   <guard-role>ClearanceOfficer</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="pume_pass" title=""
+             new_state="pume_passed" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>SectionOfficer</guard-role>
+   <guard-role>ClearanceOfficer</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="raise_objection" title=""
+             new_state="objection_raised" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>SectionOfficer</guard-role>
+   <guard-role>Owner</guard-role>
+   <guard-role>ClearanceOfficer</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="register_courses" title=""
+             new_state="courses_registered" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>CourseAdviser</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>Owner</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="reject_admission" title=""
+             new_state="admission_rejected" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>SectionOfficer</guard-role>
+   <guard-role>ClearanceOfficer</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="reject_clearance" title=""
+             new_state="clearance_pin_entered"
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+   <guard-role>SectionOfficer</guard-role>
+   <guard-role>ClearanceOfficer</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="reject_courses" title=""
+             new_state="school_fee_paid" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>CourseAdviser</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="request_clearance" title=""
+             new_state="clearance_requested" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>SectionOfficer</guard-role>
+   <guard-role>Owner</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="return" title=""
+             new_state="returning" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>SectionOfficer</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="validate_courses" title=""
+             new_state="courses_validated" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>CourseAdviser</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+ <variable variable_id="time" for_catalog="True"
+           for_status="True" update_always="True">
+  <description>Time of the last transition</description>
+  <default>
+   
+   <expression>state_change/getDateTime</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <script script_id="open_application_personal"
+         type="Script (Python)"
+         filename="workflows/waeup_student_wf/scripts/open_application_personal.py"/>
+</cps-workflow>
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_student_wf/scripts/open_application_personal.py
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_student_wf/scripts/open_application_personal.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_student_wf/scripts/open_application_personal.py	(revision 2226)
@@ -0,0 +1,11 @@
+## Script (Python) "open_application_personal"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=state_change
+##title=
+##
+#state_change.object.application.content_status_modify(workflow_action="open")
+#state_change.object.personal.content_status_modify(workflow_action="open")
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_students_folder_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_students_folder_wf/definition.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_students_folder_wf/definition.xml	(revision 2226)
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<cps-workflow workflow_id="waeup_students_folder_wf"
+              title="CPS Workflow Definition"
+              state_variable="review_state"
+              meta_type="CPS Workflow">
+ <permission>Delete objects</permission>
+ <permission>View</permission>
+ <state state_id="static" title="">
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="cut_copy_paste"/>
+  <permission-map name="Delete objects" acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>SectionManager</permission-role>
+   <permission-role>SectionOfficer</permission-role>
+   <permission-role>SectionReader</permission-role>
+   <permission-role>SectionReviewer</permission-role>
+  </permission-map>
+ </state>
+ <transition transition_id="create" title="Initial creation"
+             new_state="static" trigger="USER"
+             before_script="" after_script="">
+
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="initial-create"/>
+ </transition>
+ <transition transition_id="create_content"
+             title="Create content" new_state=""
+             trigger="USER" before_script="" after_script="">
+
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>SectionReviewer</guard-role>
+   <guard-role>SectionReader</guard-role>
+   <guard-role>SectionOfficer</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-create"/>
+  <transition-behavior behavior_id="allow-sub-publishing"/>
+ </transition>
+</cps-workflow>
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_workspace_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_workspace_wf/definition.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/waeup_workspace_wf/definition.xml	(revision 2226)
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<cps-workflow workflow_id="waeup_workspace_wf"
+              title="CPS Workflow Definition"
+              state_variable="review_state"
+              meta_type="CPS Workflow">
+</cps-workflow>
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_calendar_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_calendar_wf/definition.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_calendar_wf/definition.xml	(revision 2226)
@@ -0,0 +1,132 @@
+<?xml version="1.0"?>
+<cps-workflow workflow_id="workspace_calendar_wf"
+              title="CPS Workflow Definition"
+              state_variable="review_state"
+              meta_type="CPS Workflow">
+ <permission>Modify portal content</permission>
+ <permission>View</permission>
+ <permission>WebDAV Lock items</permission>
+ <permission>WebDAV Unlock items</permission>
+ <state state_id="work" title="Work">
+  <exit-transition transition_id="copy_submit"/>
+  <exit-transition transition_id="checkout_draft"/>
+  <exit-transition transition_id="cut_copy_paste"/>
+  <exit-transition transition_id="modify"/>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+   <permission-role>WorkspaceManager</permission-role>
+   <permission-role>WorkspaceMember</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>WorkspaceManager</permission-role>
+   <permission-role>WorkspaceMember</permission-role>
+   <permission-role>WorkspaceReader</permission-role>
+  </permission-map>
+  <permission-map name="WebDAV Lock items" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+   <permission-role>WorkspaceManager</permission-role>
+   <permission-role>WorkspaceMember</permission-role>
+  </permission-map>
+  <permission-map name="WebDAV Unlock items"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+   <permission-role>WorkspaceManager</permission-role>
+   <permission-role>WorkspaceMember</permission-role>
+  </permission-map>
+ </state>
+ <transition transition_id="create" title="Initial creation"
+             new_state="work" trigger="USER"
+             before_script=""
+             after_script="give_attendee_manager">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>WorkspaceMember</guard-role>
+  </guard>
+  <transition-behavior behavior_id="initial-create"/>
+ </transition>
+ <transition transition_id="cut_copy_paste"
+             title="Cut/Copy/Paste" new_state=""
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>WorkspaceMember</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-move"/>
+  <transition-behavior behavior_id="allow-sub-delete"/>
+  <transition-behavior behavior_id="allow-sub-copy"/>
+ </transition>
+ <transition transition_id="modify"
+             title="Modification of content,provides a specific entry in status history"
+             new_state="" trigger="USER" before_script=""
+             after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>Owner</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>WorkspaceMember</guard-role>
+  </guard>
+ </transition>
+ <variable variable_id="action" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The last transition</description>
+  <default>
+   
+   <expression>transition/getId|nothing</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="actor" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The ID of the user who performed</description>
+  <default>
+   
+   <expression>user/getId</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="comments" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>Comments about the last transition</description>
+  <default>
+   
+   <expression>python:state_change.kwargs.get('comment', '')</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="dest_container" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>Destination container for the last paste/publish</description>
+  <default>
+   
+   <expression>python:state_change.kwargs.get('dest_container', '')</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="time" for_catalog="True"
+           for_status="True" update_always="True">
+  <description>Time of the last transition</description>
+  <default>
+   
+   <expression>state_change/getDateTime</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <script script_id="give_attendee_manager"
+         type="Script (Python)"
+         filename="workflows/workspace_calendar_wf/scripts/give_attendee_manager.py"/>
+</cps-workflow>
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_calendar_wf/scripts/give_attendee_manager.py
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_calendar_wf/scripts/give_attendee_manager.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_calendar_wf/scripts/give_attendee_manager.py	(revision 2226)
@@ -0,0 +1,15 @@
+## Script (Python) "give_attendee_manager"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=state_change
+##title=
+##
+context = state_change.object 
+from Products.CMFCore.utils import getToolByName       
+mtool = getToolByName(context, 'portal_membership')
+user_id = mtool.getAuthenticatedMember().getUser().getId()
+mtool.setLocalRoles(context, [user_id],
+                        'AttendeeManager', reindex=1)
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_content_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_content_wf/definition.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_content_wf/definition.xml	(revision 2226)
@@ -0,0 +1,304 @@
+<?xml version="1.0"?>
+<cps-workflow workflow_id="workspace_content_wf"
+              title="CPS Workflow Definition"
+              state_variable="review_state"
+              meta_type="CPS Workflow">
+ <permission>Modify portal content</permission>
+ <permission>View</permission>
+ <permission>WebDAV Lock items</permission>
+ <permission>WebDAV Unlock items</permission>
+ <state state_id="draft" title="Draft">
+  <exit-transition transition_id="checkin_draft"/>
+  <exit-transition transition_id="abandon_draft"/>
+  <exit-transition transition_id="unlock"/>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>WorkspaceManager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>WorkspaceManager</permission-role>
+   <permission-role>WorkspaceMember</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="WebDAV Lock items" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>WorkspaceManager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="WebDAV Unlock items"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>WorkspaceManager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="locked" title="Locked">
+  <exit-transition transition_id="unlock"/>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>WorkspaceManager</permission-role>
+   <permission-role>WorkspaceMember</permission-role>
+   <permission-role>WorkspaceReader</permission-role>
+  </permission-map>
+  <permission-map name="WebDAV Lock items" acquired="False">
+  </permission-map>
+  <permission-map name="WebDAV Unlock items"
+                  acquired="False">
+  </permission-map>
+ </state>
+ <state state_id="work" title="Work">
+  <exit-transition transition_id="copy_submit"/>
+  <exit-transition transition_id="checkout_draft"/>
+  <exit-transition transition_id="cut_copy_paste"/>
+  <exit-transition transition_id="modify"/>
+  <exit-transition transition_id="translate"/>
+  <exit-transition transition_id="delete_translation"/>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+   <permission-role>WorkspaceManager</permission-role>
+   <permission-role>WorkspaceMember</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>WorkspaceManager</permission-role>
+   <permission-role>WorkspaceMember</permission-role>
+   <permission-role>WorkspaceReader</permission-role>
+  </permission-map>
+  <permission-map name="WebDAV Lock items" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+   <permission-role>WorkspaceManager</permission-role>
+   <permission-role>WorkspaceMember</permission-role>
+  </permission-map>
+  <permission-map name="WebDAV Unlock items"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+   <permission-role>WorkspaceManager</permission-role>
+   <permission-role>WorkspaceMember</permission-role>
+  </permission-map>
+ </state>
+ <transition transition_id="abandon_draft"
+             title="Abandon draft" new_state=""
+             trigger="USER"
+             before_script="unlock_locked_before_abandon"
+             after_script="">
+  <action url="%(content_url)s/content_abandon_draft_form"
+          category="workflow">action_abandon_draft</action>
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>Owner</guard-role>
+  </guard>
+  <transition-behavior behavior_id="delete"/>
+ </transition>
+ <transition transition_id="checkin_draft"
+             title="Checkin draft" new_state="locked"
+             trigger="USER" before_script="" after_script="">
+  <action url="%(content_url)s/content_checkin_draft_form"
+          category="workflow">action_checkin_draft</action>
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>Owner</guard-role>
+  </guard>
+  <transition-behavior behavior_id="checkin"/>
+  <checkin-allowed-transition transition_id="unlock"/>
+ </transition>
+ <transition transition_id="checkout_draft"
+             title="Checkout content into a draft"
+             new_state="locked" trigger="USER"
+             before_script="" after_script="">
+  <action url="%(content_url)s/content_checkout_draft_form"
+          category="workflow">action_checkout_draft</action>
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>WorkspaceMember</guard-role>
+  </guard>
+  <transition-behavior behavior_id="checkout"/>
+  <checkout-allowed-initial-transition
+    transition_id="checkout_draft_in"/>
+ </transition>
+ <transition transition_id="checkout_draft_in"
+             title="Draft is created" new_state="draft"
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+  </guard>
+  <transition-behavior behavior_id="initial-checkout"/>
+  <transition-behavior behavior_id="freeze"/>
+ </transition>
+ <transition transition_id="copy_submit"
+             title="Copy content into a section for Publishing"
+             new_state="" trigger="USER" before_script=""
+             after_script="">
+  <action url="%(content_url)s/content_submit_form"
+          category="workflow">action_submit</action>
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>WorkspaceMember</guard-role>
+  </guard>
+  <transition-behavior behavior_id="clone"/>
+  <clone-allowed-transition transition_id="submit"/>
+  <clone-allowed-transition transition_id="publish"/>
+ </transition>
+ <transition transition_id="create" title="Initial creation"
+             new_state="work" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>WorkspaceMember</guard-role>
+  </guard>
+  <transition-behavior behavior_id="initial-create"/>
+ </transition>
+ <transition transition_id="cut_copy_paste"
+             title="Cut/Copy/Paste" new_state=""
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>WorkspaceMember</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-move"/>
+  <transition-behavior behavior_id="allow-sub-delete"/>
+  <transition-behavior behavior_id="allow-sub-copy"/>
+ </transition>
+ <transition transition_id="delete_translation"
+             title="Delete a translation" new_state=""
+             trigger="USER"
+             before_script="delete_language_from_proxy"
+             after_script="">
+  
+  <guard>
+   <guard-permission>Modify portal content</guard-permission>
+   <guard-expression>python:not state_change.object.isDefaultLanguage()</guard-expression>
+  </guard>
+ </transition>
+ <transition transition_id="modify" title="Edit content"
+             new_state="" trigger="USER" before_script=""
+             after_script="">
+  <description>This transition provides a specific entry in status history</description>
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>Owner</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>WorkspaceMember</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="translate"
+             title="Add translation" new_state=""
+             trigger="USER"
+             before_script="add_language_to_proxy"
+             after_script="">
+  
+  <guard>
+   <guard-permission>Modify portal content</guard-permission>
+  </guard>
+ </transition>
+ <transition transition_id="unlock"
+             title="Unlock content after a draft is done"
+             new_state="work" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+  </guard>
+  <transition-behavior behavior_id="allow-checkin"/>
+ </transition>
+ <variable variable_id="action" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The last transition</description>
+  <default>
+   
+   <expression>transition/getId|nothing</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="actor" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The ID of the user who performed</description>
+  <default>
+   
+   <expression>user/getId</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="comments" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>Comments about the last transition</description>
+  <default>
+   
+   <expression>python:state_change.kwargs.get('comment', '')</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="dest_container" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>Destination container for the last paste/publish</description>
+  <default>
+   
+   <expression>python:state_change.kwargs.get('dest_container', '')</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="language_revs" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The language revisions of the proxy</description>
+  <default>
+   
+   <expression>state_change/getLanguageRevisions</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="review_history" for_catalog="False"
+           for_status="False" update_always="False">
+  <description>Provides access to workflow history</description>
+  <default>
+   
+   <expression>state_change/getHistory</expression>
+  </default>
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>WorkspaceMember</guard-role>
+   <guard-role>WorkspaceReader</guard-role>
+  </guard>
+ </variable>
+ <variable variable_id="time" for_catalog="True"
+           for_status="True" update_always="True">
+  <description>Time of the last transition</description>
+  <default>
+   
+   <expression>state_change/getDateTime</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <script script_id="add_language_to_proxy"
+         type="Script (Python)"
+         filename="workflows/workspace_content_wf/scripts/add_language_to_proxy.py"/>
+ <script script_id="delete_language_from_proxy"
+         type="Script (Python)"
+         filename="workflows/workspace_content_wf/scripts/delete_language_from_proxy.py"/>
+ <script script_id="unlock_locked_before_abandon"
+         type="Script (Python)"
+         filename="workflows/workspace_content_wf/scripts/unlock_locked_before_abandon.py"/>
+</cps-workflow>
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_content_wf/scripts/add_language_to_proxy.py
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_content_wf/scripts/add_language_to_proxy.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_content_wf/scripts/add_language_to_proxy.py	(revision 2226)
@@ -0,0 +1,12 @@
+## Script (Python) "add_language_to_proxy"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=state_change
+##title=
+##
+lang=state_change.kwargs.get('lang')
+from_lang=state_change.kwargs.get('from_lang')
+state_change.object.addLanguageToProxy(lang, from_lang)
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_content_wf/scripts/delete_language_from_proxy.py
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_content_wf/scripts/delete_language_from_proxy.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_content_wf/scripts/delete_language_from_proxy.py	(revision 2226)
@@ -0,0 +1,11 @@
+## Script (Python) "delete_language_from_proxy"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=state_change
+##title=
+##
+lang=state_change.kwargs.get('lang')
+state_change.object.delLanguageFromProxy(lang)
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_content_wf/scripts/unlock_locked_before_abandon.py
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_content_wf/scripts/unlock_locked_before_abandon.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_content_wf/scripts/unlock_locked_before_abandon.py	(revision 2226)
@@ -0,0 +1,10 @@
+## Script (Python) "unlock_locked_before_abandon"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=state_change
+##title=
+##
+return state_change.object.content_unlock_locked_before_abandon(state_change)
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_folder_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_folder_wf/definition.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_folder_wf/definition.xml	(revision 2226)
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+<cps-workflow workflow_id="workspace_folder_wf"
+              title="CPS Workflow Definition"
+              state_variable="review_state"
+              meta_type="CPS Workflow">
+ <permission>View</permission>
+ <state state_id="work" title="Work">
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="cut_copy_paste"/>
+  <exit-transition transition_id="modify"/>
+  <exit-transition transition_id="translate"/>
+  <exit-transition transition_id="delete_translation"/>
+  <permission-map name="View" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>WorkspaceManager</permission-role>
+   <permission-role>WorkspaceMember</permission-role>
+   <permission-role>WorkspaceReader</permission-role>
+  </permission-map>
+ </state>
+ <transition transition_id="create" title="Initial creation"
+             new_state="work" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>WorkspaceMember</guard-role>
+  </guard>
+  <transition-behavior behavior_id="initial-create"/>
+ </transition>
+ <transition transition_id="create_content"
+             title="Create content" new_state="work"
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>WorkspaceMember</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-create"/>
+  <transition-behavior behavior_id="allow-sub-checkout"/>
+ </transition>
+ <transition transition_id="cut_copy_paste"
+             title="Cut/Copy/Paste" new_state=""
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>WorkspaceMember</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-move"/>
+  <transition-behavior behavior_id="allow-sub-delete"/>
+  <transition-behavior behavior_id="allow-sub-copy"/>
+ </transition>
+ <transition transition_id="delete_translation"
+             title="Delete a translation" new_state=""
+             trigger="USER"
+             before_script="delete_language_from_proxy"
+             after_script="">
+  
+  <guard>
+   <guard-permission>Modify portal content</guard-permission>
+   <guard-expression>python:not state_change.object.isDefaultLanguage()</guard-expression>
+  </guard>
+ </transition>
+ <transition transition_id="modify" title="Edit content"
+             new_state="" trigger="USER" before_script=""
+             after_script="">
+  <description>This transition provides a specific entry in status history</description>
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>Owner</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>WorkspaceMember</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="translate"
+             title="Add translation" new_state=""
+             trigger="USER"
+             before_script="add_language_to_proxy"
+             after_script="">
+  
+  <guard>
+   <guard-permission>Modify portal content</guard-permission>
+  </guard>
+ </transition>
+ <script script_id="add_language_to_proxy"
+         type="Script (Python)"
+         filename="workflows/workspace_folder_wf/scripts/add_language_to_proxy.py"/>
+ <script script_id="delete_language_from_proxy"
+         type="Script (Python)"
+         filename="workflows/workspace_folder_wf/scripts/delete_language_from_proxy.py"/>
+</cps-workflow>
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_folder_wf/scripts/add_language_to_proxy.py
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_folder_wf/scripts/add_language_to_proxy.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_folder_wf/scripts/add_language_to_proxy.py	(revision 2226)
@@ -0,0 +1,12 @@
+## Script (Python) "add_language_to_proxy"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=state_change
+##title=
+##
+lang=state_change.kwargs.get('lang')
+from_lang=state_change.kwargs.get('from_lang')
+state_change.object.addLanguageToProxy(lang, from_lang)
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_folder_wf/scripts/delete_language_from_proxy.py
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_folder_wf/scripts/delete_language_from_proxy.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_folder_wf/scripts/delete_language_from_proxy.py	(revision 2226)
@@ -0,0 +1,11 @@
+## Script (Python) "delete_language_from_proxy"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=state_change
+##title=
+##
+lang=state_change.kwargs.get('lang')
+state_change.object.delLanguageFromProxy(lang)
Index: WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_folderish_content_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_folderish_content_wf/definition.xml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/workflows/workspace_folderish_content_wf/definition.xml	(revision 2226)
@@ -0,0 +1,176 @@
+<?xml version="1.0"?>
+<cps-workflow workflow_id="workspace_folderish_content_wf"
+              title="CPS Workflow Definition"
+              state_variable="review_state"
+              meta_type="CPS Workflow">
+ <permission>Modify portal content</permission>
+ <permission>View</permission>
+ <permission>WebDAV Lock items</permission>
+ <permission>WebDAV Unlock items</permission>
+ <state state_id="work" title="Work">
+  <exit-transition transition_id="copy_submit"/>
+  <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="cut_copy_paste"/>
+  <exit-transition transition_id="modify"/>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>WorkspaceManager</permission-role>
+   <permission-role>WorkspaceMember</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>WorkspaceManager</permission-role>
+   <permission-role>WorkspaceMember</permission-role>
+   <permission-role>WorkspaceReader</permission-role>
+  </permission-map>
+  <permission-map name="WebDAV Lock items" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>WorkspaceManager</permission-role>
+   <permission-role>WorkspaceMember</permission-role>
+  </permission-map>
+  <permission-map name="WebDAV Unlock items"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>WorkspaceManager</permission-role>
+   <permission-role>WorkspaceMember</permission-role>
+  </permission-map>
+ </state>
+ <transition transition_id="copy_submit"
+             title="Copy content into a section for Publishing"
+             new_state="" trigger="USER" before_script=""
+             after_script="">
+  <action url="%(content_url)s/content_submit_form"
+          category="workflow">action_submit</action>
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>WorkspaceMember</guard-role>
+  </guard>
+  <transition-behavior behavior_id="clone"/>
+  <clone-allowed-transition transition_id="submit"/>
+  <clone-allowed-transition transition_id="publish"/>
+ </transition>
+ <transition transition_id="create" title="Initial creation"
+             new_state="work" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>WorkspaceMember</guard-role>
+  </guard>
+  <transition-behavior behavior_id="initial-create"/>
+ </transition>
+ <transition transition_id="create_content"
+             title="Create content" new_state="work"
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>WorkspaceMember</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-create"/>
+  <transition-behavior behavior_id="allow-sub-checkout"/>
+ </transition>
+ <transition transition_id="cut_copy_paste"
+             title="Cut/Copy/Paste" new_state=""
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>WorkspaceMember</guard-role>
+  </guard>
+  <transition-behavior behavior_id="allow-sub-move"/>
+  <transition-behavior behavior_id="allow-sub-delete"/>
+  <transition-behavior behavior_id="allow-sub-copy"/>
+ </transition>
+ <transition transition_id="modify" title="Edit content"
+             new_state="" trigger="USER" before_script=""
+             after_script="">
+  <description>This transition provides a specific entry in status history</description>
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>Owner</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>WorkspaceMember</guard-role>
+  </guard>
+ </transition>
+ <variable variable_id="action" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The last transition</description>
+  <default>
+   
+   <expression>transition/getId|nothing</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="actor" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The ID of the user who performed</description>
+  <default>
+   
+   <expression>user/getId</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="comments" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>Comments about the last transition</description>
+  <default>
+   
+   <expression>python:state_change.kwargs.get('comment', '')</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="dest_container" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>Destination container for the last paste/publish</description>
+  <default>
+   
+   <expression>python:state_change.kwargs.get('dest_container', '')</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="language_revs" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The language revisions of the proxy</description>
+  <default>
+   
+   <expression>state_change/getLanguageRevisions</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="review_history" for_catalog="False"
+           for_status="False" update_always="False">
+  <description>Provides access to workflow history</description>
+  <default>
+   
+   <expression>state_change/getHistory</expression>
+  </default>
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>WorkspaceManager</guard-role>
+   <guard-role>WorkspaceMember</guard-role>
+   <guard-role>WorkspaceReader</guard-role>
+  </guard>
+ </variable>
+ <variable variable_id="time" for_catalog="True"
+           for_status="True" update_always="True">
+  <description>Time of the last transition</description>
+  <default>
+   
+   <expression>state_change/getDateTime</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+</cps-workflow>
Index: WAeUP_SRP/trunk_not_used/profiles/default/xsl.css
===================================================================
--- WAeUP_SRP/trunk_not_used/profiles/default/xsl.css	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/profiles/default/xsl.css	(revision 2226)
@@ -0,0 +1,25 @@
+table {
+	border-width: 1px 1px 1px 1px;
+	border-spacing: 2px;
+	border-style: outset outset outset outset;
+	border-color: gray gray gray gray;
+	border-collapse: collapse;
+	background-color: transparent;
+}
+table th {
+	border-width: thin thin thin thin;
+	padding: 2px 2px 2px 2px;
+	border-style: solid solid solid solid;
+	border-color: gray gray gray gray;
+	background-color: transparent;
+	-moz-border-radius: 0px 0px 0px 0px;
+        text-align: left;
+}
+table td {
+	border-width: thin thin thin thin;
+	padding: 2px 2px 2px 2px;
+	border-style: solid solid solid solid;
+	border-color: gray gray gray gray;
+	background-color: transparent;
+	-moz-border-radius: 0px 0px 0px 0px;
+}
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/academicsDisplayParams.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/academicsDisplayParams.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/academicsDisplayParams.py	(revision 2226)
@@ -0,0 +1,73 @@
+## Script (Python) "getDisplayParams"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=format=None, sort_by=None, direction=None, columns=None, items_per_page=None, nav_action=None, nb_items=None, filter=None, detail_tab_columns=None
+##title=
+##
+# $Id$
+"""Return params for display_content macro
+"""
+
+from Products.CPSUtil.session import sessionGet
+
+cps_pref = sessionGet(context.REQUEST, 'cps_display_params', {})
+def_params = context.getAcademicsDisplayParams()
+
+params = def_params
+
+if format:
+    params['format'] = format
+else:
+    params['format'] = cps_pref.get('format') or def_params['format']
+
+if sort_by:
+    params['sort_by'] = sort_by
+else:
+    params['sort_by'] = cps_pref.get('sort_by') or def_params['sort_by']
+
+if direction:
+    params['direction'] = direction
+else:
+    params['direction'] = cps_pref.get('direction') or def_params['direction']
+
+
+if nav_action:
+    params['nav_action'] = nav_action
+
+if columns:
+    params['columns'] = columns
+else:
+    fmt = params['format']
+    if fmt == 'icon':
+        col = 4
+        params['items_per_page'] = 12
+    elif fmt == 'compact':
+        col = 2
+    elif fmt == 'detail':
+        col = 1
+    elif fmt == 'detail_tab':
+        col = 1
+    elif fmt == 'one_column':
+        col = 1
+    else:
+        col = 1
+    params['columns'] = col
+
+if items_per_page:
+    params['items_per_page'] = items_per_page
+params['items_per_page'] = min(nb_items, params['items_per_page'])
+
+if filter is not None:
+    params['filter'] = filter
+else:
+    params['filter'] = def_params['filter']
+
+if detail_tab_columns:
+    params['detail_tab_columns'] = detail_tab_columns
+else:
+    params['detail_tab_columns'] = def_params['detail_tab_columns']
+
+return params
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/academicsParent.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/academicsParent.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/academicsParent.py	(revision 2226)
@@ -0,0 +1,17 @@
+## Script (Python) "navigationParent"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=obj=None,templateId=None
+##title=returns the appropriate url for the parent object
+##
+
+if obj is None:
+    obj=context
+
+parent=obj.aq_parent
+
+return parent.absolute_url()
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_content_lib_display_contents.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_content_lib_display_contents.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_content_lib_display_contents.pt	(revision 2226)
@@ -0,0 +1,120 @@
+<!-- a content_lib macro -->
+<!-- $Id$ -->
+
+<!-- List contents in 'items' in the specified number of columns
+  with the given format -->
+
+<metal:block define-macro="display_contents">
+<tal:block
+  define="tmp_format format|nothing;
+          tmp_sort_by sort_by|nothing;
+          tmp_direction direction|nothing;
+          tmp_columns columns|nothing;
+          tmp_items_per_page items_per_page|nothing;
+          tmp_nav_action nav_action|nothing;
+          tmp_filter filter|nothing;
+          tmp_detail_tab_columns detail_tab_columns|nothing;
+          params python:here.getDisplayParams(format=tmp_format,
+                          sort_by=tmp_sort_by,
+                          direction=tmp_direction,
+                          columns=tmp_columns,
+                          items_per_page=tmp_items_per_page,
+                          nav_action=tmp_nav_action,
+                          nb_items=len(items),
+                          filter=tmp_filter,
+                          detail_tab_columns=tmp_detail_tab_columns);
+          format params/format;
+          sort_by params/sort_by;
+          direction params/direction;
+          columns params/columns;
+          items_per_page params/items_per_page;
+          nav_action params/nav_action;
+          filter params/filter;
+          detail_tab_columns params/detail_tab_columns;
+          mq nocall:modules/ZTUtils/make_query;
+          form request/form;
+          zoom zoom|python:0;
+          batches_all python:here.getBatchList(items, columns, items_per_page,
+                                               zoom);
+          batches python:batches_all[0];
+          batch_info python:batches_all[1];
+          zoomed python:batches_all[2];
+     ">
+ <tal:block tal:condition="python: batch_info and batch_info['nb_pages'] > 1">
+    <div class="batchLayout">
+        <span i18n:translate="">
+          Objects: 
+          <strong>
+            <tal:block replace="batch_info/start"
+            i18n:name="batch_start" /> - <tal:block replace="batch_info/limit"
+            i18n:name="batch_limit" />
+          </strong>
+          of <tal:block replace="batch_info/length"
+            i18n:name="batch_length" />
+         </span>
+    </div>
+  <br />
+ </tal:block>
+  <table width="100%" cellspacing="0" cellpadding="0"
+    summary="zoomed layout"
+    tal:condition="zoomed">
+    <tr tal:repeat="item zoomed">
+      <td align="left" valign="top">
+       <tal:block define="no_form not:nothing;
+         info python:here.getContentInfo(item, level=1, cpsmcat=cpsmcat);">
+         <metal:block use-macro="here/content_lib_info_summary/macros/info_summary" />
+         <br /><br />
+       </tal:block>
+      </td>
+    </tr>
+  </table>
+  <table width="100%" cellspacing="0" cellpadding="0"
+    summary="content layout column"
+    tal:condition="batches">
+    <tr>
+      <td align="left" valign="top"
+          tal:repeat="batch_items batches">
+        <tal:block condition="batch_items">
+          <metal:block
+            use-macro="here/academics_content_lib_display_contents_column/macros/display_contents_column" />
+        </tal:block>
+      </td>
+    </tr>
+  </table>
+  <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
+      <div class="pageNavigationLayout">
+          <a tal:define="previous batch_info/previous"
+             tal:condition="python:previous is not None"
+             tal:attributes="href python:'%s?%s'%(request['URL'],
+                                            mq(request.form, b_start=0))">
+              (&lt;&lt;)</a>
+          <a tal:define="previous batch_info/previous"
+             tal:condition="python:previous is not None"
+             tal:attributes="href python:'%s?%s'%(request['URL'],
+                                            mq(request.form, b_start=previous))"
+             i18n:translate="batch_previous">Previous</a>
+          <tal:block repeat="page batch_info/pages">
+            <tal:block condition="python:page != batch_info['start'] - 1">
+              <a tal:attributes="href python:'%s?%s'%(request['URL'],
+                mq(request.form, b_start=page))"
+                tal:content="repeat/page/number">1</a>&nbsp;
+            </tal:block>
+            <tal:block condition="python:page == batch_info['start'] - 1">
+              <span tal:content="string:${repeat/page/number}" />&nbsp;
+            </tal:block>
+          </tal:block>
+          <a tal:define="next batch_info/next"
+             tal:condition="python:next is not None"
+             tal:attributes="href python:'%s?%s'%(request['URL'],
+                                                mq(request.form, b_start=next))"
+             i18n:translate="batch_next">Next</a>
+          <a tal:define="next batch_info/next;
+             last_page python:batch_info['pages'][-1]"
+             tal:condition="python:next is not None"
+             tal:attributes="href python:'%s?%s'%(request['URL'],
+                                            mq(request.form, b_start=last_page))">
+              (&gt;&gt;)</a>
+      </div>
+  </tal:block>
+</tal:block>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_content_lib_display_contents_column.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_content_lib_display_contents_column.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_content_lib_display_contents_column.pt	(revision 2226)
@@ -0,0 +1,79 @@
+<!-- a content_lib macro -->
+<!-- $Id$ -->
+
+<!-- Final display of items in a column using the given format -->
+
+<metal:block define-macro="display_contents_column">
+  <tal:block define="no_form no_form|nothing;
+                     site_wide site_wide|nothing;
+                     format python:format or 'detail';
+                     choosen_ids python:request.SESSION.get('choosen_ids', []);
+                     dummy python:request.SESSION.update({'choosen_ids': []});
+                     no_table python:format == 'detail_tab';
+                     use_radio use_radio|nothing;
+                     input_type python: test(use_radio, 'radio', 'checkbox');
+                     input_name python: test(use_radio, 'ids', 'ids:list');
+                     member here/portal_membership/getAuthenticatedMember;
+                     member_id member/id;
+                     is_local_manager python:member.has_role(
+                                     ('Manager', 'WorkspaceManager'), here);
+">
+  <div id="ajax_psm" style="display:none" tal:condition="python:not no_form">
+      ajax feedback
+  </div>
+  <tal:block condition="no_table">
+    <tal:block repeat="item batch_items">
+    <tal:block define="info python:here.getContentInfo(item, level=1, cpsmcat=cpsmcat);
+                        review_state python:info['review_state'];
+                        proxy_creator python:item.Creator();
+                        start repeat/item/start|nothing;
+                        end repeat/item/end|nothing">
+      <tal:block tal:condition="python:review_state!='draft' or (review_state=='draft' and proxy_creator == member_id) or is_local_manager">
+      <metal:block use-macro="here/academics_content_lib_info_detail_tab/macros/info_detail_tab" />
+      </tal:block>
+    </tal:block>
+    </tal:block>
+  <br />
+  </tal:block>
+  </tal:block>
+  <tal:block tal:replace="nothing">
+  XXX Deactivated for CPS 3.4.0, will be re-enabled for 3.4.1
+
+  <tal:block tal:condition="python:not no_form and sort_by is None"
+               tal:define="ajax_working_msg python:cpsmcat('ajax_working');
+                           ajax_working_msg python:ajax_working_msg.replace('\'', '\\\'');
+                           ajax_failing_msg python:cpsmcat('ajax_failing');
+                           ajax_failing_msg python:ajax_failing_msg.replace('\'', '\\\'')">
+
+        <script type="text/javascript" tal:content="structure string:
+                var editor = new CPSContainerEditor('draggable', 'droppable',
+                                                    'droppable-in', '${format}',
+                                                    '${ajax_working_msg}',
+                                                    'folder_content', 'ajax_psm',
+                                                    '${ajax_failing_msg}');
+               // hooking observers
+               if (treeview_editor) {
+                 loadScript('portletrefresher', '++resource++portletrefresher.js');
+
+                 function refresh(event_id, trigger_id) {
+
+                   portlet_refresher.refreshPortlet(trigger_id);
+                   editor.reload();
+                 }
+
+                if ($$('portlet_navigation_sections'))
+                    container_events.observeEvent('element_dropped', 'portlet_navigation_sections',
+                                                refresh);
+
+                if ($$('portlet_navigation_workspaces'))
+                    container_events.observeEvent('element_dropped', 'portlet_navigation_workspaces',
+                                                refresh);
+
+               }
+
+               ">
+        </script>
+
+  </tal:block>
+  </tal:block>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_content_lib_info_detail_tab.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_content_lib_info_detail_tab.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_content_lib_info_detail_tab.pt	(revision 2226)
@@ -0,0 +1,174 @@
+<!-- a content_lib macro -->
+<!-- $Id$ -->
+<!-- All doc information -->
+
+<metal:block define-macro="info_detail_tab"
+             tal:define="title_in_tabs python: 'title' in detail_tab_columns;
+                         long_title_in_tabs python:'long_title' in detail_tab_columns;
+                         id_in_tabs python:'id' in detail_tab_columns;
+                         typetext_in_tabs python:'typetext' in detail_tab_columns;
+                         type_in_tabs python:'type' in detail_tab_columns;
+                         size_in_tabs python:'size' in detail_tab_columns;
+                         date_in_tabs python:'date' in detail_tab_columns;
+                         author_in_tabs python:'author' in detail_tab_columns;
+                         status_in_tabs python:'status' in detail_tab_columns;
+                         version_in_tabs python:'version' in detail_tab_columns;
+                         context_url context_url|here/getContextUrl;
+                         display_buttons context/academics_contents_display_buttons;
+                        ">
+<tal:block condition="start">
+  <tal:block replace='structure string:&lt;table class="contentListing" width="100%" summary="content layout" id="folder_content">' />
+
+
+  <thead tal:condition="nothing">
+    <tr>
+      <td tal:condition="display_buttons"> </td>
+      <th tal:condition="type_in_tabs" align="center">
+        <strong tal:define="sort_type python:sort_by=='type'"
+           tal:omit-tag="not:sort_type"><a href=""
+           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_type and direction=='asc','type_desc','type_asc'))"
+           i18n:translate="label_info_tab_type"></a></strong></th>
+      <th tal:condition="title_in_tabs" align="left">
+        <strong tal:define="sort_title python:sort_by=='title'"
+           tal:omit-tag="not:sort_title"><a href=""
+           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_title and direction=='asc','title_desc','title_asc'))"
+           i18n:translate="label_info_tab_title"></a></strong></th>
+      <th tal:condition="long_title_in_tabs" align="left">
+        <strong tal:define="sort_title python:sort_by=='title'"
+           tal:omit-tag="not:sort_title"><a href=""
+           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_title and direction=='asc','title_desc','title_asc'))"
+           i18n:translate="label_info_tab_title"></a></strong></th>
+
+      <th tal:condition="python:id_in_tabs and display_buttons" align="center">
+        <strong tal:define="sort_id python:sort_by=='id'"
+           tal:omit-tag="not:sort_id"><a href=""
+           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_id and direction=='asc','id_desc','id_asc'))"
+           i18n:translate="label_info_tab_id"></a>ID</strong></th>
+
+      <th tal:condition="typetext_in_tabs" align="center">
+        <strong tal:define="sort_typetext python:sort_by=='typetext'"
+           tal:omit-tag="not:sort_typetext"><a href=""
+           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_typetext and direction=='asc','typetext_desc','typetext_asc'))"
+           i18n:translate="label_info_tab_typetext"></a></strong></th>
+
+
+      <th tal:condition="size_in_tabs" align="center">
+        <strong tal:define="sort_size python:sort_by=='size'"
+           tal:omit-tag="not:sort_size"><a href=""
+           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_size and direction=='asc','size_desc','size_asc'))"
+           i18n:translate="label_info_tab_size"></a></strong></th>
+      <th tal:condition="date_in_tabs" align="center">
+        <strong tal:define="sort_date python:sort_by=='date'"
+           tal:omit-tag="not:sort_date"><a href=""
+           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_date and direction=='asc','date_desc','date_asc'))"
+           i18n:translate="label_info_tab_date"></a></strong></th>
+      <th tal:condition="author_in_tabs" align="center">
+        <strong tal:define="sort_author python:sort_by=='author'"
+           tal:omit-tag="not:sort_author"><a href=""
+           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_author and direction=='asc','author_desc','author_asc'))"
+           i18n:translate="label_info_tab_author"></a></strong></th>
+        <th tal:condition="display_buttons"></th>
+        <th tal:condition="python: display_buttons and status_in_tabs" align="center">
+        <strong tal:define="sort_status python:sort_by=='status'"
+           tal:omit-tag="not:sort_status"><a href=""
+           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_status and direction=='asc','status_desc','status_asc'))"
+           i18n:translate="label_info_tab_status"></a></strong></th>
+      <th tal:condition="version_in_tabs" align="center">
+        <strong tal:define="sort_version python:sort_by=='version'"
+           tal:omit-tag="not:sort_version"><a href=""
+           tal:attributes="href python:'%s/changeDisplayParams?display_order=%s' % (context_url, test(sort_version and direction=='asc','version_desc','version_asc'))"
+           i18n:translate="label_info_tab_version"></a></strong></th>
+    </tr>
+  </thead>
+  <tal:block replace='structure string:&lt;tbody id="folder_content_tbody">' />
+</tal:block>
+
+<tr tal:define="action python:test(info['type'] in ('Section', 'Workspace'),
+                '/folder_contents', '')"
+    tal:attributes="class python:test(repeat['item'].even(), 'even ajaxtd', 'odd ajaxtd')">
+      <span tal:condition="display_buttons" tal:omit-tag="">
+        <td align="left" valign="middle" style="width: 5px;" tal:condition="display_buttons">
+          <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                 tal:condition="not:no_form"
+                 tal:define="id item/getId"
+                 tal:attributes="value python:site_wide and item.getContextUrl(utool=utool) or id;
+                 id python:'cb_' + id;
+                 checked python:id in choosen_ids;" 
+                 />
+        </td>
+      </span>
+      <td align="center" tal:condition="type_in_tabs">
+      <img tal:replace="structure python:here.getImgTag(info['icon'],
+                        base_url=base_url, title=info['type'])" />
+  </td>
+  <td tal:condition="title_in_tabs">
+    <a href="" tal:attributes="href string:${info/url}${action};
+                               title info/description;">
+    <strong tal:content="info/title_or_id">ID</strong></a></td>
+
+  <td tal:condition="long_title_in_tabs">
+    <a href="" tal:attributes="href string:${info/url}${action};
+                               title info/description;">
+    <strong tal:content="info/long_title|info/title">ID</strong></a></td>
+
+
+  <td tal:condition="python:id_in_tabs and display_buttons and context.portal_type not in ('Certificate',)">
+    <span tal:content="info/id">ID</span>
+  </td>
+  <td tal:condition="typetext_in_tabs">
+    <span tal:content="info/type">ID</span>
+  </td>
+    <span tal:condition="python: info['doc'].portal_type == 'Course'">
+      <td>
+        <span tal:content="info/semester">ID</span>
+      </td>
+      <td>
+        <span tal:content="info/credits">ID</span>
+      </td>
+      <td>
+        <span tal:content="info/passmark">ID</span>
+      </td>
+    </span>
+    <span tal:define="docu python: info['doc']"
+          tal:condition="python: docu.portal_type == 'StudentCourseResult'">
+      <td>
+        <span tal:content="docu/grade">ID</span>
+      </td>
+      <td>
+        <span tal:content="docu/score">ID</span>
+      </td>
+    </span>
+    <span tal:define="docu python: info['doc']"
+          tal:condition="python: False and docu.portal_type == 'Student'">
+      <td>
+        <span tal:content="info/clearance/matric_no">ID</span>
+      </td>
+    </span>
+    <span tal:condition="python: info['doc'].portal_type == 'CertificateCourse'">
+      <td>
+        <span tal:content="info/core_or_elective">ID</span>
+      </td>
+    </span>
+  <td align="left"   tal:define="isSectionManager python:checkPerm('Modify portal content', item)">
+    <a tal:condition="python: display_buttons and isSectionManager and context.portal_type not in ('Certificate',)"
+       href="dummy"  tal:attributes="href string:${item/absolute_url}/cpsdocument_edit_form">[edit]</a></td>
+  <td align="center" tal:condition="size_in_tabs">
+    <span tal:condition="info/size|nothing" tal:content="info/size"> </span></td>
+  <td align="center" tal:condition="date_in_tabs">
+    <span tal:content="info/time_str">May 6,...</span></td>
+  <td align="center" tal:condition="author_in_tabs">
+    <span tal:content="info/creator"> </span></td>
+  <td align="center" tal:condition="python:status_in_tabs and display_buttons and info['review_state'] in ('unchecked','checked',)"
+      tal:content="info/review_state" tal:attributes="class info/review_state"
+      i18n:translate="">published</td>
+  <td align="center" tal:condition="version_in_tabs">
+    v-<tal:block replace="info/rev" />
+    <tal:block i18n:translate=""
+      content="string:label_language_${info/lang}">en</tal:block>
+  </td>
+</tr>
+<tal:block condition="end" tal:replace="structure string:&lt;/tbody>">
+</tal:block>
+<tal:block condition="end" tal:replace="structure string:&lt;/table>">
+</tal:block>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_contents.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_contents.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_contents.pt	(revision 2226)
@@ -0,0 +1,293 @@
+<metal:html tal:define="display_change request/change_display|nothing;
+                        params here/academicsDisplayParams;
+                        sort_by params/sort_by;
+                        direction params/direction;
+                        format string:detail_tab;
+                        displayed python:request.get('displayed', None);
+                        display_buttons context/academics_contents_display_buttons;
+                       ">
+
+<metal:body use-macro="here/main_template/macros/master">
+
+<metal:header metal:fill-slot="header">
+
+  <a href="" tal:attributes="href string:${here/academicsParent}">
+      <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+      Up one level
+  </a>
+
+  <h3 tal:content="here/LongTitle|here/Title|here/title_or_id">
+    Page Title
+  </h3>
+</metal:header>
+
+<metal:main fill-slot="javascript_head_slot">
+  <tal:block tal:replace="nothing">
+    XXX Deactivated for CPS 3.4.0, will be re-enabled for 3.4.1
+    <script type="text/javascript" src="prototype.js"
+      tal:attributes="src string:${base_url}prototype.js"></script>
+    <script type="text/javascript" src="effects.js"
+      tal:attributes="src string:${base_url}effects.js"></script>
+    <script type="text/javascript" src="dragdrop.js"
+      tal:attributes="src string:${base_url}dragdrop.js"></script>
+    <script type="text/javascript" src="cpsdefault.js"
+      tal:attributes="src string:${base_url}cpsdefault.js"></script>
+  </tal:block>
+</metal:main>
+
+<metal:main fill-slot="main"
+  tal:define="list_here python:checkPerm('List folder contents', here);">
+  <div tal:condition="not: list_here"
+    tal:define="response request/RESPONSE;url here_url;">
+    <span tal:define="redirect python: response.redirect(url)"></span>
+  </div>
+    <span tal:omit-tag="" tal:condition="python:display_buttons or context.display_content()" 
+          tal:content="structure python: doc.render(proxy=here,layout_mode='view')" />
+
+  <form action="" method="post" class="group"
+        tal:attributes="action here_url"
+        tal:define="no_form python:not checkPerm('Modify portal content', here);
+
+                    nav_action string:folder_contents;
+                    items python:here.getFolderContents(displayed=displayed);">
+
+<!-- a content_lib macro -->
+<!-- from content_lib_display_contents_column.pt academics_contents.pt -->
+
+<!-- List contents in 'items' in the specified number of columns
+  with the given format -->
+
+<tal:block
+  define="no_ajax not:nothing; 
+          tmp_format format|nothing;
+          tmp_sort_by sort_by|nothing;
+          tmp_direction direction|nothing;
+          tmp_columns columns|nothing;
+          tmp_items_per_page items_per_page|nothing;
+          tmp_nav_action nav_action|nothing;
+          tmp_filter filter|nothing;
+          tmp_detail_tab_columns detail_tab_columns|nothing;
+          params python:here.getDisplayParams(format=tmp_format,
+                          sort_by=tmp_sort_by,
+                          direction=tmp_direction,
+                          columns=tmp_columns,
+                          items_per_page=tmp_items_per_page,
+                          nav_action=tmp_nav_action,
+                          nb_items=len(items),
+                          filter=tmp_filter,
+                          detail_tab_columns=tmp_detail_tab_columns);
+          format params/format;
+          sort_by params/sort_by;
+          direction params/direction;
+          columns params/columns;
+          items_per_page params/items_per_page;
+          nav_action params/nav_action;
+          filter params/filter;
+          detail_tab_columns params/detail_tab_columns;
+          mq nocall:modules/ZTUtils/make_query;
+          form request/form;
+          zoom zoom|python:0;
+          batches_all python:here.getBatchList(items, columns, items_per_page,
+                                               zoom);
+          batches python:batches_all[0];
+          batch_info python:batches_all[1];
+          zoomed python:batches_all[2];
+     ">
+     <span tal:condition="python:0">
+        <span tal:content="params" /><br />
+        <span tal:content="batches_all" /><br />
+      </span>        
+ <tal:block tal:condition="python: batch_info and batch_info['nb_pages'] > 1">
+    <div class="batchLayout">
+        <span i18n:translate="">
+          Objects: 
+          <strong>
+            <tal:block replace="batch_info/start"
+            i18n:name="batch_start" /> - <tal:block replace="batch_info/limit"
+            i18n:name="batch_limit" />
+          </strong>
+          of <tal:block replace="batch_info/length"
+            i18n:name="batch_length" />
+         </span>
+    </div>
+  <br />
+ </tal:block>
+  <table width="100%" cellspacing="0" cellpadding="0"
+    summary="zoomed layout"
+    tal:condition="zoomed">
+    <tr tal:repeat="item zoomed">
+      <td align="left" valign="top">
+       <tal:block define="no_form not:nothing;
+                          no_ajax no_ajax|nothing;
+         info python:here.getContentInfo(item, level=1, cpsmcat=cpsmcat);">
+         <metal:block use-macro="here/content_lib_info_summary/macros/info_summary" />
+         <br /><br />
+       </tal:block>
+      </td>
+    </tr>
+  </table>
+  <table width="100%" cellspacing="0" cellpadding="0"
+    summary="content layout column"
+    tal:condition="batches">
+    <tr>
+      <td align="left" valign="top"
+          tal:repeat="batch_items batches">
+        <tal:block condition="batch_items">
+<!-- a content_lib macro -->
+<!-- from content_lib_info_detail_tab.pt -->
+
+<!-- Final display of items in a column using the given format -->
+  <tal:block define="no_form no_form|nothing;
+                     site_wide site_wide|nothing;
+                     format python:format or 'detail';
+                     choosen_ids python:request.SESSION.get('choosen_ids', []);
+                     dummy python:request.SESSION.update({'choosen_ids': []});
+                     no_table python:format == 'detail_tab';
+                     use_radio use_radio|nothing;
+                     input_type python: test(use_radio, 'radio', 'checkbox');
+                     input_name python: test(use_radio, 'ids', 'ids:list');
+                     member here/portal_membership/getAuthenticatedMember;
+                     member_id member/id;
+                     is_local_manager python:member.has_role(
+                                     ('Manager', 'WorkspaceManager'), here);
+">
+  <div id="ajax_psm" style="display:none" tal:condition="python:not no_form and not no_ajax">
+      ajax feedback
+  </div>
+  <tal:block condition="no_table">
+    <tal:block repeat="item batch_items">
+    <tal:block define="info python:here.getContentInfo(item, level=1, cpsmcat=cpsmcat);
+                        review_state python:info['review_state'];
+                        start repeat/item/start|nothing;
+                        end repeat/item/end|nothing">
+      <tal:block tal:condition="python:review_state!='draft' or (review_state=='draft' and proxy_creator == member_id) or is_local_manager">
+      <metal:block use-macro="here/academics_content_lib_info_detail_tab/macros/info_detail_tab" />
+      </tal:block>
+    </tal:block>
+    </tal:block>
+  <br />
+  </tal:block>
+  </tal:block>
+  <tal:block tal:replace="nothing">
+  XXX Deactivated for CPS 3.4.0, will be re-enabled for 3.4.1
+
+  <tal:block tal:condition="python:not no_form and not no_ajax and sort_by is None"
+               tal:define="ajax_working_msg python:cpsmcat('ajax_working');
+                           ajax_working_msg python:ajax_working_msg.replace('\'', '\\\'');
+                           ajax_failing_msg python:cpsmcat('ajax_failing');
+                           ajax_failing_msg python:ajax_failing_msg.replace('\'', '\\\'')">
+
+        <script type="text/javascript" tal:content="structure string:
+                var editor = new CPSContainerEditor('draggable', 'droppable',
+                                                    'droppable-in', '${format}',
+                                                    '${ajax_working_msg}',
+                                                    'folder_content', 'ajax_psm',
+                                                    '${ajax_failing_msg}');
+               // hooking observers
+               if (treeview_editor) {
+                 loadScript('portletrefresher', '++resource++portletrefresher.js');
+
+                 function refresh(event_id, trigger_id) {
+
+                   portlet_refresher.refreshPortlet(trigger_id);
+                   editor.reload();
+                 }
+
+                if ($$('portlet_navigation_sections'))
+                    container_events.observeEvent('element_dropped', 'portlet_navigation_sections',
+                                                refresh);
+
+                if ($$('portlet_navigation_workspaces'))
+                    container_events.observeEvent('element_dropped', 'portlet_navigation_workspaces',
+                                                refresh);
+
+               }
+
+               ">
+        </script>
+
+  </tal:block>
+  </tal:block>
+  </tal:block>
+      
+    </td>
+    </tr>
+  </table>
+  <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
+      <div class="pageNavigationLayout">
+          <a tal:define="previous batch_info/previous"
+             tal:condition="python:previous is not None"
+             tal:attributes="href python:'%s?%s'%(request['URL'],
+                                            mq(request.form, b_start=0))">
+              (&lt;&lt;)</a>
+          <a tal:define="previous batch_info/previous"
+             tal:condition="python:previous is not None"
+             tal:attributes="href python:'%s?%s'%(request['URL'],
+                                            mq(request.form, b_start=previous))"
+             i18n:translate="batch_previous">Previous</a>
+          <tal:block repeat="page batch_info/pages">
+            <tal:block condition="python:page != batch_info['start'] - 1">
+              <a tal:attributes="href python:'%s?%s'%(request['URL'],
+                mq(request.form, b_start=page))"
+                tal:content="repeat/page/number">1</a>&nbsp;
+            </tal:block>
+            <tal:block condition="python:page == batch_info['start'] - 1">
+              <span tal:content="string:${repeat/page/number}" />&nbsp;
+            </tal:block>
+          </tal:block>
+          <a tal:define="next batch_info/next"
+             tal:condition="python:next is not None"
+             tal:attributes="href python:'%s?%s'%(request['URL'],
+                                                mq(request.form, b_start=next))"
+             i18n:translate="batch_next">Next</a>
+          <a tal:define="next batch_info/next;
+             last_page python:batch_info['pages'][-1]"
+             tal:condition="python:next is not None"
+             tal:attributes="href python:'%s?%s'%(request['URL'],
+                                            mq(request.form, b_start=last_page))">
+              (&gt;&gt;)</a>
+      </div>
+  </tal:block>
+</tal:block>
+
+    <table width="100%" cellspacing="0" cellpadding="2"
+      summary="contents of the folder"
+      class="folderButtons"
+      tal:define="can_add python:checkPerm('Add portal content', here);
+                  can_del python:checkPerm('Delete objects', here);
+                  ">
+      <tr>
+        <td align="left" valign="top" rowspan="3"></td>
+        <td align="left" valign="top">
+          <span tal:condition="display_buttons">
+          <span tal:condition="can_del">
+            <input type="button" value="button_select_all" class="context"
+                   onclick="someJavaScriptFunctionThatWillBeReplaced"
+                   i18n:attributes="value"
+                   tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                                   % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" />
+            <span tal:omit-tag="" tal:condition="python: context.portal_type != 'Certificate'">
+              <input type="submit" name="approve_checked:method"
+              class="context" value="Approve" />
+            <input type="submit" name="retract_checked:method"
+              class="context" value="Retract" />
+            </span>
+              <input type="submit" name="folder_delete:method" value="button_delete"
+              class="destructive" i18n:attributes="value"
+              tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+              (cpsmcat('description_confirm_delete'), )" />
+            <input tal:condition="python: context.portal_type not in ('Semester','Certificate')"
+                   type="submit" name="id_rename_form:method"
+              class="context" value="Change Object ID" i18n:attributes="value" />
+          </span>
+          </span>
+        </td>
+      </tr>
+    </table>
+  </form>
+</metal:main>
+
+<metal:sub fill-slot="sub"/>
+
+</metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_contents_display_buttons.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_contents_display_buttons.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_contents_display_buttons.py	(revision 2226)
@@ -0,0 +1,26 @@
+## Script (Python) ""
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=ids=[], REQUEST=None
+##title=
+##
+# $Id$
+"""
+buttons shouldn't be displayed if
+"""
+
+#if context.portal_type in ('Department','Certificate','StudyLevel'):
+if context.portal_type in ('Department',
+                           'StudyLevel',
+                           'Student',
+                           'StudentApplication',
+                           'StudentClearance',
+                           'StudentPersonal',
+                           'StudentStudyCourse',
+                           'StudentStudyLevel',
+                           ):
+    return None
+return 1
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_index.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_index.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_index.py	(revision 2226)
@@ -0,0 +1,39 @@
+## Script (Python) "academics_index"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=batch=None
+##title=
+##
+# $Id$
+"""
+return the appropriate page in the academics section
+"""
+
+request = context.REQUEST
+redirect = request.RESPONSE.redirect
+pm = context.portal_membership
+
+if pm.isAnonymousUser():
+    return redirect("%s/srp_anonymous_view" % context.portal_url())
+else:
+    if context.portal_type == 'AcademicsFolder':
+        return context.academics_view()
+    elif context.portal_type == 'Faculty':
+        return context.faculty_view()
+    elif context.portal_type == 'Department':
+        return context.department_view()
+    elif context.portal_type == 'CoursesFolder':
+        return context.courses_view()
+    elif context.portal_type == 'CertificatesFolder':
+        return context.certificates_view()
+    elif context.portal_type == 'Certificate':
+        return context.certificate_view()
+    elif context.portal_type == 'StudyLevel':
+        return context.level_view()
+    elif context.portal_type in ('CertificateCourse','Course'):
+        return context.waeup_document_view()
+    return redirect("%s/srp_view" % context.portal_url())
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_rename_items.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_rename_items.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_rename_items.py	(revision 2226)
@@ -0,0 +1,29 @@
+## Script (Python) "folder_rename_items"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+Get the list of renameable objects from REQUEST's 'ids' list.
+"""
+
+# This is bad but we want to keep CMF 1.4's API for now
+REQUEST = context.REQUEST
+
+ids = REQUEST.get('ids', [])
+
+objects = []
+for id in ids:
+    ob = getattr(context.academics, id, None)
+    if ob is None:
+        continue
+    if not ob.cb_isMoveable():
+        continue
+    objects.append(ob)
+
+return objects
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_search_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_search_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_search_view.pt	(revision 2226)
@@ -0,0 +1,145 @@
+<metal:html tal:define="rendered options/rendered;
+            portal_status_message options/psm;
+            objects options/objects;
+            is_so options/is_so;
+            "
+            >
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:block fill-slot="header"
+                 tal:define="creation creation|nothing;
+                 edition edition|nothing;
+                 metadata metadata|nothing"
+                 >
+    </metal:block>
+    
+    <metal:main fill-slot="main">
+      <span tal:condition="not: is_so">
+        <span tal:content="here/illegal_view" />
+      </span>
+      <span tal:condition="is_so"
+        tal:define="items objects;
+        columns python:3;
+        items_per_page python:40;
+        max_items python:300;
+        zoom python:0;
+        batches_all python:here.getBatchList(items,columns, items_per_page,zoom,max_items=400);
+        batches python:batches_all[0];
+        batch_info python:batches_all[1];
+        zoomed python:batches_all[2];
+        mq nocall:modules/ZTUtils/make_query;"
+        tal:omit-tag=""
+        >
+        <span tal:replace="structure rendered" />
+          <form action="search" method="post" class="group"
+                tal:attributes="action context/absolute_url"
+                >
+        <tal:block tal:condition="python: batch_info and batch_info['nb_pages'] > 1">
+          <div class="batchLayout">
+            <span i18n:translate="">
+              Objects: 
+              <strong>
+                <tal:block replace="batch_info/start"
+                           i18n:name="batch_start" /> - <tal:block replace="batch_info/limit"
+                                                                   i18n:name="batch_limit" />
+              </strong>
+              of <tal:block replace="batch_info/length"
+                            i18n:name="batch_length" />
+            </span>
+          </div>
+          <br />
+        </tal:block>
+        <table class="contentListing" width="100%">
+          <span tal:repeat="rows batches" tal:omit-tag="">
+            <tr tal:repeat="object rows"
+                tal:attributes="class python:test(repeat['object'].even(), 'even ajaxtd', 'odd ajaxtd')">
+                <td align="left" valign="middle" style="width: 5px;" 
+                    tal:condition="is_so">
+                  <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                         tal:condition="is_so"
+                         tal:define="id object/id"
+                         tal:attributes="value id;
+                         id python:'cb_' + id;
+                         checked python:id in options['choosen_ids'];" 
+                         />
+                </td>
+              <td><a href="id" tal:attributes="href string:${object/url}"
+                     tal:content="object/title"></a></td>    
+              <td>
+                <span tal:replace="object/review_state" />
+              </td>    
+              <td>
+                <a tal:condition="object/is_editable"
+                    href="edit" tal:attributes="href string:${object/url}/external_edit_form"
+                    target="edit"
+                    onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
+                    [edit]
+                    </a> 
+                </td>                
+            </tr>
+          </span>
+        </table>
+        <table width="100%" cellspacing="0" cellpadding="2"
+               summary="buttons"
+               class="folderButtons">
+          <tr>
+            <td align="left" valign="top" rowspan="3"></td>
+            <td align="left" valign="top">
+              <span tal:condition="is_so">
+                <input type="button" value="button_select_all" class="context"
+                       onclick="someJavaScriptFunctionThatWillBeReplaced"
+                       i18n:attributes="value"
+                       tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                       />
+                <input type="submit" name="folder_delete:method" value="button_delete"
+                       class="destructive" i18n:attributes="value"
+                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                       (cpsmcat('description_confirm_delete'), )" 
+                       />
+              </span>
+            </td>
+          </tr>
+        </table>
+        <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
+          <div class="pageNavigationLayout">
+            <a tal:define="previous batch_info/previous"
+               tal:condition="python:previous is not None"
+               tal:attributes="href python:'%s?%s'%(request['URL'],
+               mq(request.form, b_start=0))"
+               >
+            (&lt;&lt;)</a>
+            <a tal:define="previous batch_info/previous"
+               tal:condition="python:previous is not None"
+               tal:attributes="href python:'%s?%s'%(request['URL'],
+               mq(request.form, b_start=previous))"
+               i18n:translate="batch_previous">Previous</a>
+            <tal:block repeat="page batch_info/pages">
+              <tal:block condition="python:page != batch_info['start'] - 1">
+                <a tal:attributes="href python:'%s?%s'%(request['URL'],
+                mq(request.form, b_start=page))"
+                tal:content="repeat/page/number">1</a>&nbsp;
+              </tal:block>
+              <tal:block condition="python:page == batch_info['start'] - 1">
+                <span tal:content="string:${repeat/page/number}" />&nbsp;
+              </tal:block>
+            </tal:block>
+            <a tal:define="next batch_info/next"
+               tal:condition="python:next is not None"
+               tal:attributes="href python:'%s?%s'%(request['URL'],
+               mq(request.form, b_start=next))"
+               i18n:translate="batch_next">Next</a>
+            <a tal:define="next batch_info/next;
+            last_page python:batch_info['pages'][-1]"
+            tal:condition="python:next is not None"
+            tal:attributes="href python:'%s?%s'%(request['URL'],
+            mq(request.form, b_start=last_page))"
+            >
+            (&gt;&gt;)</a>
+          </div>
+        </tal:block>
+        </form>
+      </span>
+    </metal:main>
+  </metal:body>
+</metal:html>
+  
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/academics_view.pt	(revision 2226)
@@ -0,0 +1,81 @@
+<metal:html tal:define="info context/getFacultiesInfo;
+            is_so context/isSectionOfficer;"
+            >
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:block fill-slot="header">
+      <a href="" tal:condition="nothing"
+         tal:attributes="href string:${here/academicsParent}">
+        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+        Up one level
+      </a>
+      <h3 tal:content="here/title_or_id">
+        Page Title
+      </h3>
+      <br />
+    </metal:block>
+    <metal:main fill-slot="main">
+      <form action="" method="post" class="group"
+            tal:attributes="action info/action"
+            tal:define="rows python: info['items'];"
+            >
+        <span tal:condition="python: 0" tal:content="structure rows" />
+        <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">      
+          <tr tal:repeat="row rows"
+            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+            <td align="left" valign="middle" style="width: 5px;" 
+                tal:condition="is_so">
+              <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                     tal:condition="is_so"
+                     tal:define="id row/id"
+                     tal:attributes="value id;
+                     id python:'cb_' + id;
+                     checked python:id in info['choosen_ids'];" 
+                     />
+            </td>
+            <td><a href="view" tal:attributes="href string:${row/url}">
+              <strong tal:content="row/title" /></a> </td>
+            <td tal:content="row/id"> </td>
+            
+            <td> 
+            <a tal:condition="row/is_editable"
+                href="edit" tal:attributes="href string:${row/url}/external_edit_form"
+                target="edit"
+                onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
+                [edit]
+                </a> 
+            </td>
+            
+          </tr>
+        </table>
+        <table width="100%" cellspacing="0" cellpadding="2"
+               summary="contents of the folder"
+               class="folderButtons">
+          <tr>
+            <td align="left" valign="top" rowspan="3"></td>
+            <td align="left" valign="top">
+              <span tal:condition="is_so">
+                <input type="button" value="button_select_all" class="context"
+                       onclick="someJavaScriptFunctionThatWillBeReplaced"
+                       i18n:attributes="value"
+                       tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                       />
+                <input type="submit" name="folder_delete:method" value="button_delete"
+                       class="destructive" i18n:attributes="value"
+                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                       (cpsmcat('description_confirm_delete'), )" 
+                       />
+                <input tal:condition="python: context.portal_type not in ('Semester','Certificate')"
+                       type="submit" name="id_rename_form:method"
+                       class="context" value="Change Object ID" i18n:attributes="value" 
+                       />
+              </span>
+            </td>
+          </tr>
+        </table>
+      </form>
+    </metal:main>
+    
+    <metal:sub fill-slot="sub"/>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/approve_checked.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/approve_checked.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/approve_checked.py	(revision 2226)
@@ -0,0 +1,27 @@
+## 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.
+"""
+
+ret_url = context.absolute_url() + '/academics_index'
+
+if ids:
+    for id in ids:
+        ob = getattr(context, id)
+        if context.portal_workflow.getInfoFor(ob,'review_state',None) == "unchecked":
+            ob.content_status_modify(workflow_action="approve")
+    message = 'portal_status_message=workflow status changed'
+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_not_used/skins/waeup_academics/certificate_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/certificate_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/certificate_view.pt	(revision 2226)
@@ -0,0 +1,68 @@
+<metal:html tal:define="info context/getCertificateInfo;
+            is_so context/isSectionOfficer;"
+            >
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:block fill-slot="header">
+      <a href=""
+         tal:attributes="href string:${here/academicsParent}">
+        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+        Up one level
+      </a>
+      <h3 tal:content="here/title_or_id" />
+      <div tal:condition="python:0" tal:content="info/container_path"/>
+      <br />
+    </metal:block>
+    <metal:main fill-slot="main">
+      <span tal:omit-tag=""  
+            tal:content="structure python: info['doc'].render(layout_mode='view')" />
+      
+      <form action="" method="post" class="group"
+            tal:attributes="action info/action"
+            tal:define="rows python: info['items'];"
+            >
+        <span tal:condition="python: 0" tal:content="structure rows" />
+        <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">      
+          <tr tal:repeat="row rows"
+            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+            <td align="left" valign="middle" style="width: 5px;" 
+                tal:condition="is_so">
+              <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                     tal:condition="is_so"
+                     tal:define="id row/id"
+                     tal:attributes="value id;
+                     id python:'cb_' + id;
+                     checked python:id in info['choosen_ids'];" 
+                     />
+            </td>
+            <td><a href="view" tal:attributes="href string:${row/url}">
+              <strong tal:content="row/title" /></a> </td>
+          </tr>
+        </table>
+        <table width="100%" cellspacing="0" cellpadding="2"
+               summary="contents of the folder"
+               class="folderButtons">
+          <tr>
+            <td align="left" valign="top" rowspan="3"></td>
+            <td align="left" valign="top">
+              <span tal:condition="is_so">
+                <input type="button" value="button_select_all" class="context"
+                       onclick="someJavaScriptFunctionThatWillBeReplaced"
+                       i18n:attributes="value"
+                       tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                       />
+                <input type="submit" name="folder_delete:method" value="button_delete"
+                       class="destructive" i18n:attributes="value"
+                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                       (cpsmcat('description_confirm_delete'), )" 
+                       />
+              </span>
+            </td>
+          </tr>
+        </table>
+      </form>
+    </metal:main>
+    
+    <metal:sub fill-slot="sub"/>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/certificates_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/certificates_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/certificates_view.pt	(revision 2226)
@@ -0,0 +1,67 @@
+<metal:html tal:define="info context/getCertificatesInfo;
+            is_so context/isSectionOfficer;"
+            >
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:block fill-slot="header">
+      <a href=""
+         tal:attributes="href string:${here/academicsParent}">
+        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+        Up one level
+      </a>
+      <h3 tal:content="here/title_or_id" />
+      <div tal:condition="python:0" tal:content="info/container_path"/>
+    </metal:block>
+    <metal:main fill-slot="main">
+      <span tal:omit-tag=""  
+            tal:content="structure python: info['doc'].render(layout_mode='view')" />
+      
+      <form action="" method="post" class="group"
+            tal:attributes="action info/action"
+            tal:define="rows python: info['items'];"
+            >
+        <span tal:condition="python: 0" tal:content="structure rows" />
+        <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">      
+          <tr tal:repeat="row rows"
+            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+            <td align="left" valign="middle" style="width: 5px;" 
+                tal:condition="is_so">
+              <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                     tal:condition="is_so"
+                     tal:define="id row/id"
+                     tal:attributes="value id;
+                     id python:'cb_' + id;
+                     checked python:id in info['choosen_ids'];" 
+                     />
+            </td>
+            <td><a href="view" tal:attributes="href string:${row/url}">
+              <strong tal:content="row/title" /></a> </td>
+          </tr>
+        </table>
+        <table width="100%" cellspacing="0" cellpadding="2"
+               summary="contents of the folder"
+               class="folderButtons">
+          <tr>
+            <td align="left" valign="top" rowspan="3"></td>
+            <td align="left" valign="top">
+              <span tal:condition="is_so">
+                <input type="button" value="button_select_all" class="context"
+                       onclick="someJavaScriptFunctionThatWillBeReplaced"
+                       i18n:attributes="value"
+                       tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                       />
+                <input type="submit" name="folder_delete:method" value="button_delete"
+                       class="destructive" i18n:attributes="value"
+                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                       (cpsmcat('description_confirm_delete'), )" 
+                       />
+              </span>
+            </td>
+          </tr>
+        </table>
+      </form>
+    </metal:main>
+    
+    <metal:sub fill-slot="sub"/>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/courses_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/courses_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/courses_view.pt	(revision 2226)
@@ -0,0 +1,155 @@
+<metal:html>
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:block fill-slot="header"
+                 tal:define="global info context/getCoursesInfo;
+                 global is_so context/isSectionOfficer;"
+                 >
+      <a href=""
+         tal:attributes="href string:${here/academicsParent}">
+        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+        Up one level
+      </a>
+      <h3 tal:content="here/title_or_id">
+        Page Title
+      </h3>
+      <div tal:condition="python:0" tal:content="info/container_path"/>
+      <div tal:condition="python:0" tal:content="info/dep_id"/>
+    </metal:block>
+    <metal:main fill-slot="main" tal:condition="python: 1">
+      <span tal:content="structure python: info['doc'].render(layout_mode='view')" 
+            tal:omit-tag=""/>
+        <span tal:define="items python: info['courses'];
+        columns python:3;
+        items_per_page python:50;
+        zoom python:0;
+        batches_all python:here.getBatchList(items,columns, items_per_page,zoom,max_items=400);
+        batches python:batches_all[0];
+        batch_info python:batches_all[1];
+        zoomed python:batches_all[2];
+        mq nocall:modules/ZTUtils/make_query;"
+        tal:omit-tag=""
+        >
+          <form action="" method="post" class="group"
+                tal:attributes="action info/action"
+                >
+            <tal:block tal:condition="python: batch_info and batch_info['nb_pages'] > 1">
+              <div class="batchLayout">
+                <span i18n:translate="">
+                  Objects: 
+                  <strong>
+                    <tal:block replace="batch_info/start"
+                               i18n:name="batch_start" /> - <tal:block replace="batch_info/limit"
+                                                                       i18n:name="batch_limit" />
+                  </strong>
+                  of <tal:block replace="batch_info/length"
+                                i18n:name="batch_length" />
+                </span>
+              </div>
+              <br />
+            </tal:block>
+            <span tal:condition="python: 0" tal:content="structure rows" />
+            <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">      
+            <span tal:repeat="rows batches" tal:omit-tag="">
+              <tr tal:repeat="row rows"
+                  tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+                <td align="left" valign="middle" style="width: 5px;" 
+                    tal:condition="is_so">
+                  <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                         tal:condition="is_so"
+                         tal:define="id row/id"
+                         tal:attributes="value id;
+                         id python:'cb_' + id;
+                         checked python:id in info['choosen_ids'];" 
+                         />
+                </td>
+                <td><a href="view" tal:attributes="href string:${row/url}">
+                    <strong tal:content="row/title" /></a> </td>
+                <td tal:content="row/id"> </td>
+                <td tal:content="row/semester"> </td>
+                <td tal:condition="row/is_editable" tal:content="row/review_state"> </td>
+                <td> 
+                <a tal:condition="row/is_editable"
+                    href="edit" tal:attributes="href string:${row/url}/external_edit_form"
+                    target="edit"
+                    onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
+                    [edit]
+                    </a> 
+                </td>                
+              </tr>
+            </span>
+            </table>
+            <table width="100%" cellspacing="0" cellpadding="2"
+                   summary="contents of the folder"
+                   class="folderButtons">
+              <tr>
+                <td align="left" valign="top" rowspan="3"></td>
+                <td align="left" valign="top">
+                  <span tal:condition="is_so">
+                    <input type="button" value="button_select_all" class="context"
+                           onclick="someJavaScriptFunctionThatWillBeReplaced"
+                           i18n:attributes="value"
+                           tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                           % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                           />
+                    <input type="submit" name="approve_checked:method"
+                           class="context" value="Approve" />
+                    <input type="submit" name="retract_checked:method"
+                           class="context" value="Retract" />
+                    <input type="submit" name="folder_delete:method" value="button_delete"
+                           class="destructive" i18n:attributes="value"
+                           tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                           (cpsmcat('description_confirm_delete'), )" 
+                           />
+                    <input tal:condition="python: context.portal_type not in ('Semester','Certificate')"
+                           type="submit" name="id_rename_form:method"
+                           class="context" value="Change Object ID" i18n:attributes="value" 
+                           />
+                  </span>
+                </td>
+              </tr>
+            </table>
+          <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
+            <div class="pageNavigationLayout">
+              <a tal:define="previous batch_info/previous"
+                 tal:condition="python:previous is not None"
+                 tal:attributes="href python:'%s?%s'%(request['URL'],
+                 mq(request.form, b_start=0))"
+                 >
+              (&lt;&lt;)</a>
+              <a tal:define="previous batch_info/previous"
+                 tal:condition="python:previous is not None"
+                 tal:attributes="href python:'%s?%s'%(request['URL'],
+                 mq(request.form, b_start=previous))"
+                 i18n:translate="batch_previous">Previous</a>
+              <tal:block repeat="page batch_info/pages">
+                <tal:block condition="python:page != batch_info['start'] - 1">
+                  <a tal:attributes="href python:'%s?%s'%(request['URL'],
+                  mq(request.form, b_start=page))"
+                  tal:content="repeat/page/number">1</a>&nbsp;
+                </tal:block>
+                <tal:block condition="python:page == batch_info['start'] - 1">
+                  <span tal:content="string:${repeat/page/number}" />&nbsp;
+                </tal:block>
+              </tal:block>
+              <a tal:define="next batch_info/next"
+                 tal:condition="python:next is not None"
+                 tal:attributes="href python:'%s?%s'%(request['URL'],
+                 mq(request.form, b_start=next))"
+                 i18n:translate="batch_next">Next</a>
+              <a tal:define="next batch_info/next;
+                             last_page python:batch_info['pages'][-1]"
+                             tal:condition="python:next is not None"
+                             tal:attributes="href python:'%s?%s'%(request['URL'],
+                             mq(request.form, b_start=last_page))"
+                             >
+              (&gt;&gt;)</a>
+            </div>
+          </tal:block>
+          
+        </form>
+        </span>
+      </metal:main>
+      
+    <metal:sub fill-slot="sub"/>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/create_certificate.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/create_certificate.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/create_certificate.py	(revision 2226)
@@ -0,0 +1,50 @@
+##parameters=REQUEST=None
+# $Id$
+"""
+Create a Course
+
+"""
+type_name = 'Certificate'
+REQUEST.set('type_name',type_name)
+
+ti = context.portal_types[type_name]
+pr = context.portal_registration
+pm = context.portal_membership
+
+validate = REQUEST.has_key("cpsdocument_create_button")
+
+lt = context.portal_layouts
+
+res,psm,ds = lt.renderLayout(layout_id= 'certificate',
+                      schema_id = 'certificate',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      create_action = 'create_certificate',
+                      )
+if  psm == 'invalid':
+    return context.common_edit_form(rendered = res,
+                                 create = 1,
+                                 type_name = type_name,
+                                 psm = 'Please correct your errors!',
+                                 )
+elif psm == '':
+    return context.common_edit_form(rendered = res,
+                                 create = 1,
+                                 type_name = type_name,
+                                 psm = psm,
+                                 )
+
+elif psm == 'valid':
+    oid = "%s" % ds.get('code').replace(' ','')
+    context.invokeFactory(type_name,oid)
+    object = getattr(context,oid)
+    ds.set('Title',ds.get('heading'))
+    object.getContent().edit(mapping=ds,proxy=object)
+    context.notifyCPSDocumentCreation(ob=object)
+    psm = 'new %s created!' % oid
+    context_ti = context.portal_types[context.portal_type]
+    index = context_ti.getActionById('view','university_view')
+    return getattr(context,index)(psm=psm)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/create_course.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/create_course.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/create_course.py	(revision 2226)
@@ -0,0 +1,50 @@
+##parameters=REQUEST=None
+# $Id$
+"""
+Create a Course
+
+"""
+type_name = 'Course'
+REQUEST.set('type_name',type_name)
+
+ti = context.portal_types[type_name]
+pr = context.portal_registration
+pm = context.portal_membership
+
+validate = REQUEST.has_key("cpsdocument_create_button")
+
+lt = context.portal_layouts
+
+res,psm,ds = lt.renderLayout(layout_id= 'course',
+                      schema_id = 'course',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      create_action = 'create_course',
+                      )
+if  psm == 'invalid':
+    return context.common_edit_form(rendered = res,
+                                 create = 1,
+                                 type_name = type_name,
+                                 psm = 'Please correct your errors!',
+                                 )
+elif psm == '':
+    return context.common_edit_form(rendered = res,
+                                 create = 1,
+                                 type_name = type_name,
+                                 psm = psm,
+                                 )
+
+elif psm == 'valid':
+    oid = "%s" % ds.get('code').replace(' ','')
+    context.invokeFactory(type_name,oid)
+    object = getattr(context,oid)
+    ds.set('Title',ds.get('heading'))
+    object.getContent().edit(mapping=ds,proxy=object)
+    context.notifyCPSDocumentCreation(ob=object)
+    psm = 'new %s created!' % oid
+    context_ti = context.portal_types[context.portal_type]
+    index = context_ti.getActionById('view','university_view')
+    return getattr(context,index)(psm=psm)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/create_studycourse.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/create_studycourse.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/create_studycourse.py	(revision 2226)
@@ -0,0 +1,50 @@
+##parameters=REQUEST=None
+# $Id$
+"""
+Create a Course
+
+"""
+type_name = 'StudyCourse'
+REQUEST.set('type_name',type_name)
+
+ti = context.portal_types[type_name]
+pr = context.portal_registration
+pm = context.portal_membership
+
+validate = REQUEST.has_key("cpsdocument_create_button")
+
+lt = context.portal_layouts
+
+res,psm,ds = lt.renderLayout(layout_id= 'studycourse',
+                      schema_id = 'studycourse',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      create_action = 'create_studycourse',
+                      )
+if  psm == 'invalid':
+    return context.common_edit_form(rendered = res,
+                                 create = 1,
+                                 type_name = type_name,
+                                 psm = 'Please correct your errors!',
+                                 )
+elif psm == '':
+    return context.common_edit_form(rendered = res,
+                                 create = 1,
+                                 type_name = type_name,
+                                 psm = psm,
+                                 )
+
+elif psm == 'valid':
+    oid = "%s" % ds.get('code').replace(' ','')
+    context.invokeFactory(type_name,oid)
+    object = getattr(context,oid)
+    ds.set('Title',ds.get('heading'))
+    object.getContent().edit(mapping=ds,proxy=object)
+    context.notifyCPSDocumentCreation(ob=object)
+    psm = 'new %s created!' % oid
+    context_ti = context.portal_types[context.portal_type]
+    index = context_ti.getActionById('view','university_view')
+    return getattr(context,index)(psm=psm)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/department_created.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/department_created.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/department_created.py	(revision 2226)
@@ -0,0 +1,34 @@
+## Script (Python) "cpsdocument_created"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=object=None
+##title=
+##
+"""
+Do the necessary rendering or redirection after an object has been
+successfully created and filled with the initial values by the user.
+
+In CPS, context is a proxy.
+
+May return a rendered document, or do a redirect.
+"""
+# $Id$
+if object is not None:
+    dep = object
+else:
+    dep = context.getContent()
+dep.invokeFactory('CoursesFolder','courses')
+o = getattr(dep,'courses')
+dict = {'Title': 'Courses'}
+o.getContent().edit(mapping=dict)
+dep.invokeFactory('CertificatesFolder','certificates')
+o = getattr(dep,'certificates')
+dict = {'Title': 'Certificates'}
+o.getContent().edit(mapping=dict)
+psm = 'Department with Certificates and Courses created!'
+action_path = context.getTypeInfo().immediate_view
+context.REQUEST.RESPONSE.redirect('%s/%s?portal_status_message=%s' %
+                                  (context.absolute_url(), action_path, psm))
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/department_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/department_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/department_view.pt	(revision 2226)
@@ -0,0 +1,76 @@
+<metal:html tal:define="info context/getCoursesCertificatesInfo;
+            is_so context/isSectionOfficer;"
+            >
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:block fill-slot="header">
+      <a href=""
+         tal:attributes="href string:${here/academicsParent}">
+        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+        Up one level
+      </a>
+      <h3 tal:content="here/title_or_id" />
+      <div tal:condition="nothing" tal:content="info/container_path"/>
+      <br />
+    </metal:block>
+    <metal:main fill-slot="main">
+      <span tal:omit-tag=""  
+            tal:content="structure python: info['doc'].render(layout_mode='view')" />
+      
+      <form action="" method="post" class="group"
+            tal:attributes="action info/action"
+            tal:define="certs python: info['certificates'];"
+            >
+        <span tal:condition="python: 0" tal:content="structure rows" />
+        <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">      
+          <tr class="even ajaxtd">
+            <th colspan="4"><a href="view" tal:attributes="href string:${context/absolute_url}/courses">
+              Courses</a> </th>
+          </tr>
+          <tr class="even ajaxtd">
+            <th colspan="4"><a href="view" tal:attributes="href string:${context/absolute_url}/certificates">
+             Certificates </a> </th>
+          </tr>
+          <tr tal:repeat="row certs"
+            tal:attributes="class python:test(repeat['row'].odd(), 'even ajaxtd', 'odd ajaxtd')">
+            <td  align="left" valign="middle" style="width: 5px;">
+            </td>
+            <td><a href="view" tal:attributes="href string:${row/url}">
+              <span tal:content="row/title" /></a> </td>
+            <td tal:content="row/id"> </td>
+          </tr>
+        </table>
+        <table tal:condition="nothing" width="100%" cellspacing="0" cellpadding="2"
+               class="folderButtons">
+          <tr>
+            <td align="left" valign="top" rowspan="3"></td>
+            <td align="left" valign="top">
+              <span tal:condition="is_so">
+                <input type="button" value="button_select_all" class="context"
+                       onclick="someJavaScriptFunctionThatWillBeReplaced"
+                       i18n:attributes="value"
+                       tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                       />
+                <input type="submit" name="approve_checked:method"
+                       class="context" value="Approve" />
+                <input type="submit" name="retract_checked:method"
+                       class="context" value="Retract" />
+                <input type="submit" name="folder_delete:method" value="button_delete"
+                       class="destructive" i18n:attributes="value"
+                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                       (cpsmcat('description_confirm_delete'), )" 
+                       />
+                <input tal:condition="python: context.portal_type not in ('Semester','Certificate')"
+                       type="submit" name="id_rename_form:method"
+                       class="context" value="Change Object ID" i18n:attributes="value" 
+                       />
+              </span>
+            </td>
+          </tr>
+        </table>
+      </form>
+    </metal:main>
+    
+    <metal:sub fill-slot="sub"/>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/faculty_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/faculty_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/faculty_view.pt	(revision 2226)
@@ -0,0 +1,83 @@
+<metal:html tal:define="info context/getDepartmentsInfo;
+            is_so context/isSectionOfficer;"
+            >
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:block fill-slot="header">
+      <a href=""
+         tal:attributes="href string:${here/academicsParent}">
+        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+        Up one level
+      </a>
+      <h3 tal:content="here/title_or_id" />
+      <div tal:condition="python:0" tal:content="info/container_path"/>
+      <br />
+    </metal:block>
+    <metal:main fill-slot="main">
+      <span tal:omit-tag=""  
+            tal:content="structure python: info['doc'].render(layout_mode='view')" />
+      
+      <form action="" method="post" class="group"
+            tal:attributes="action info/action"
+            tal:define="rows python: info['items'];"
+            >
+        <span tal:condition="python: 0" tal:content="structure rows" />
+        <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">      
+          <tr tal:repeat="row rows"
+            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+            <td align="left" valign="middle" style="width: 5px;" 
+                tal:condition="is_so">
+              <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                     tal:condition="is_so"
+                     tal:define="id row/id"
+                     tal:attributes="value id;
+                     id python:'cb_' + id;
+                     checked python:id in info['choosen_ids'];" 
+                     />
+            </td>
+            <td><a href="view" tal:attributes="href string:${row/url}">
+              <strong tal:content="row/title" /></a> </td>
+            <td tal:content="row/id"> </td>
+
+            <td> 
+            <a tal:condition="row/is_editable"
+                href="edit" tal:attributes="href string:${row/url}/external_edit_form"
+                target="edit"
+                onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
+                [edit]
+                </a> 
+            </td>
+
+          </tr>
+        </table>
+        <table width="100%" cellspacing="0" cellpadding="2"
+               summary="contents of the folder"
+               class="folderButtons">
+          <tr>
+            <td align="left" valign="top" rowspan="3"></td>
+            <td align="left" valign="top">
+              <span tal:condition="is_so">
+                <input type="button" value="button_select_all" class="context"
+                       onclick="someJavaScriptFunctionThatWillBeReplaced"
+                       i18n:attributes="value"
+                       tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                       />
+                <input type="submit" name="folder_delete:method" value="button_delete"
+                       class="destructive" i18n:attributes="value"
+                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                       (cpsmcat('description_confirm_delete'), )" 
+                       />
+                <input tal:condition="python: context.portal_type not in ('Semester','Certificate')"
+                       type="submit" name="id_rename_form:method"
+                       class="context" value="Change Object ID" i18n:attributes="value" 
+                       />
+              </span>
+            </td>
+          </tr>
+        </table>
+      </form>
+    </metal:main>
+    
+    <metal:sub fill-slot="sub"/>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/findCourseById.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/findCourseById.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/findCourseById.py	(revision 2226)
@@ -0,0 +1,17 @@
+## Script (Python) "findCourseById"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=cid
+##title=
+##
+# $Id$
+''' find the course'''
+res = context.portal_catalog({'meta_type': 'Course',
+                              'id': cid})
+if len(res) < 1:
+    return None
+course = res[0].getObject().getContent()
+return course
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/getAcademicsDisplayParams.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/getAcademicsDisplayParams.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/getAcademicsDisplayParams.py	(revision 2226)
@@ -0,0 +1,32 @@
+## Script (Python) "getCustomDisplayParams"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+The Academics batch parameters
+"""
+custom_params =  {'format': None,
+                  'sort_by': None,
+                  'direction': 'asc',
+                  'items_per_page': 50,
+                  'nav_action': 'folder_view',
+                  'filter': 0,
+                  'detail_tab_columns': ['long_title',
+                                         'id',
+                                          #'typetext',
+                                          #'size',
+                                          #'date', 
+                                          #'author', 
+                                          'status', 
+                                          #'version'
+                                          ],
+                 }
+
+return custom_params
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/getAcademicsInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/getAcademicsInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/getAcademicsInfo.py	(revision 2226)
@@ -0,0 +1,40 @@
+## Script (Python) "getAcademicsInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id$
+"""
+return Info about the current Student
+"""
+request = context.REQUEST
+
+wf = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+path_info = request.get('PATH_INFO').split('/')
+
+info = {}
+member_id = str(member)
+##if member_id not in path_info:
+##    return None
+if student is None:
+    students = getattr(context,'students',None)
+    if students is None:
+        students = getattr(context.campus,'students',None)
+    student = getattr(students,member_id,None)
+    if student is None:
+        return None
+info['review_state'] = wf.getInfoFor(student,'review_state','keiner')
+#info['wf_state'] = 'keiner'
+info['student'] = student
+info['student_doc'] = student.getContent()
+info['app'] = student.application
+info['app_doc'] = student.application.getContent()
+info['per'] = student.personal
+info['per_doc'] = student.personal.getContent()
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/getCertificateInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/getCertificateInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/getCertificateInfo.py	(revision 2226)
@@ -0,0 +1,46 @@
+## Script (Python) "getCertificateInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id$
+"""
+return Info about a Certificate
+"""
+def cmp_id(a,b):
+    s1 = "%(id)s" % a
+    s2 = "%(id)s" % b
+    if s1 == s2:
+        return 0
+    if s1 > s2:
+        return 1
+    return -1
+
+request = context.REQUEST
+
+wf = context.portal_workflow
+path_info = request.get('PATH_INFO').split('/')
+
+info = {}
+info['action'] = "%s" % context.absolute_url()
+info['choosen_ids'] = request.get('ids',[])
+info['doc'] = context.getContent()
+items = []
+levels = context.objectValues()
+for l in levels:
+    row = {}
+    ld = l.getContent()
+    row['id'] = l.getId()
+    if hasattr(ld,'Title'):
+        row['title'] = ld.Title()
+    else:
+        row['title'] = getattr(ld,'title','no title')
+    row['url'] = l.absolute_url()
+    items.append(row)
+items.sort(cmp_id)
+info['items'] = items
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/getCertificatesInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/getCertificatesInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/getCertificatesInfo.py	(revision 2226)
@@ -0,0 +1,48 @@
+## Script (Python) "getCertificatesInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id$
+"""
+return Info about the Faculties
+"""
+request = context.REQUEST
+
+wf = context.portal_workflow
+path_info = request.get('PATH_INFO').split('/')
+mtool = context.portal_membership
+
+info = {}
+#dep_id = request.get('PATH_TRANSLATED').split('/')[-2]
+dep_id = context.aq_parent.getId()
+info['action'] = "%s" % context.absolute_url()
+info['choosen_ids'] = request.get('ids',[])
+info['doc'] = context.getContent()
+res = context.portal_catalog(meta_type="Department",id = dep_id)
+info['courses'] = []
+if not res:
+    return info
+brain = res[-1]
+cp = brain.getPath()
+info['container_path'] = cp
+info['dep_id'] = dep_id
+
+res = context.portal_catalog(container_path="%s/certificates" % cp)
+items = []
+for r in res:
+    row = {}
+    ro = r.getObject()
+    rd = ro.getContent()
+    row['id'] = r.getId
+    row['title'] = rd.Title()
+    row['url'] = ro.absolute_url()
+    row['review_state'] = wf.getInfoFor(ro,'review_state','None')
+    row['is_editable'] = mtool.checkPermission('Modify portal content', ro)
+    items.append(row)
+info['items'] = items
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/getCourseInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/getCourseInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/getCourseInfo.py	(revision 2226)
@@ -0,0 +1,26 @@
+## Script (Python) "getCourseInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=code
+##title=
+##
+# $Id$
+"""
+return course-data from courses_catalog
+"""
+cat = context.courses_catalog
+d = {}
+res = cat(code=code)
+if res:
+    course = res[0]
+    for field in cat.schema():
+        d[field] = getattr(course,field)
+else:
+    for field in cat.schema():
+        d[field] = "-"
+    d['title'] = "unknown"
+    d['code'] = code
+return d
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/getCoursesCertificatesInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/getCoursesCertificatesInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/getCoursesCertificatesInfo.py	(revision 2226)
@@ -0,0 +1,49 @@
+## Script (Python) "getCoursesCertificatesInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id$
+"""
+return Info about the Faculties
+"""
+request = context.REQUEST
+
+wf = context.portal_workflow
+path_info = request.get('PATH_INFO').split('/')
+
+info = {}
+info['action'] = "%s/faculty_view" % context.absolute_url()
+info['choosen_ids'] = request.get('ids',[])
+info['doc'] = context.getContent()
+brain = context.portal_catalog(meta_type="Department", id = context.getId())[-1]
+cp = brain.getPath()
+info['container_path'] = cp
+#res = context.portal_catalog(container_path="%s/courses" % cp)
+#items = []
+#for r in res:
+#    row = {}
+#    ro = r.getObject()
+#    rd = ro.getContent()
+#    row['id'] = r.getId
+#    row['title'] = rd.Title()
+#    row['url'] = ro.absolute_url()
+#    items.append(row)
+#info['courses'] = items
+res = context.portal_catalog(container_path="%s/certificates" % cp)
+items = []
+for r in res:
+    row = {}
+    ro = r.getObject()
+    rd = ro.getContent()
+    row['id'] = r.getId
+    row['title'] = rd.Title()
+    row['url'] = ro.absolute_url()
+    items.append(row)
+info['certificates'] = items
+return info
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/getCoursesInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/getCoursesInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/getCoursesInfo.py	(revision 2226)
@@ -0,0 +1,79 @@
+## Script (Python) "getCoursesInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id$
+"""
+return Info about the Faculties
+"""
+def cmpsemester(a,b):
+    if a.semester == b.semester:
+        return 0
+    if a.semester > b.semester:
+        return 1
+    return -1
+    
+
+
+request = context.REQUEST
+
+wf = context.portal_workflow
+path_info = request.get('PATH_INFO').split('/')
+mtool = context.portal_membership
+
+info = {}
+#dep_id = request.get('PATH_TRANSLATED').split('/')[-2]
+dep_id = context.aq_parent.getId()
+info['action'] = "%s" % context.absolute_url()
+info['choosen_ids'] = request.get('ids',[])
+info['doc'] = context.getContent()
+res = context.portal_catalog(meta_type="Department",id = dep_id)
+info['courses'] = []
+if not res:
+    return info
+brain = res[-1]
+cp = brain.getPath()
+info['container_path'] = cp
+info['dep_id'] = dep_id
+
+res = context.courses_catalog(department=dep_id)
+items = [ brain for brain in res]
+items.sort(cmpsemester)
+rows = []
+for r in items:
+    row = {}
+    code = getattr(r,'code',None)
+    if code is None:
+        continue
+    ro = getattr(context,code)
+    row['id'] = code
+    row['title'] = r['title']
+    row['semester'] = r['semester']
+    row['url'] = "%s/%s" % (context.absolute_url(),code)
+    row['review_state'] = wf.getInfoFor(ro,'review_state','None')
+    row['is_editable'] = mtool.checkPermission('Modify portal content', ro)
+    rows.append(row)
+#from Products.zdb import set_trace;set_trace()
+##res = context.portal_catalog(container_path="%s/courses" % cp)
+##items = []
+##for sem in ('1','2'):
+##    for r in res:
+##        row = {}
+##        ro = r.getObject()
+##        rd = ro.getContent()
+##        if rd.semester != sem:
+##            continue
+##        row['id'] = r.getId
+##        row['title'] = rd.Title()
+##        row['semester'] = rd.semester
+##        row['url'] = ro.absolute_url()
+##        row['review_state'] = wf.getInfoFor(ro,'review_state','None')
+##        row['is_editable'] = mtool.checkPermission('Modify portal content', ro)
+##        items.append(row)
+info['courses'] = rows
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/getDepartmentsInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/getDepartmentsInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/getDepartmentsInfo.py	(revision 2226)
@@ -0,0 +1,42 @@
+## Script (Python) "getDepartmentsInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id$
+"""
+return Info about the Faculties
+"""
+request = context.REQUEST
+
+wf = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+path_info = request.get('PATH_INFO').split('/')
+
+info = {}
+member_id = str(member)
+roles = member.getRolesInContext(context)
+info['action'] = "%s" % context.absolute_url()
+info['choosen_ids'] = request.get('ids',[])
+items = []
+info['doc'] = context.getContent()
+brain = context.portal_catalog(meta_type="Faculty", id = context.getId())[-1]
+cp = brain.getPath()
+info['container_path'] = cp
+res = context.portal_catalog(container_path=cp)
+for r in res:
+    row = {}
+    ro = r.getObject()
+    rd = ro.getContent()
+    row['id'] = r.getId
+    row['title'] = rd.LongTitle()
+    row['url'] = ro.absolute_url()
+    row['is_editable'] = mtool.checkPermission('Modify portal content', ro)
+    items.append(row)
+info['items'] = items
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/getDocumentInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/getDocumentInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/getDocumentInfo.py	(revision 2226)
@@ -0,0 +1,24 @@
+## Script (Python) "getDocumentInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id:getDocumentInfo.py 486 2006-09-06 10:09:39Z joachim $
+"""
+return Info about the Faculties
+"""
+request = context.REQUEST
+
+wf = context.portal_workflow
+path_info = request.get('PATH_INFO').split('/')
+
+info = {}
+try:
+    info['doc'] = context.getContent()
+except:
+    return None
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/getFacultiesInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/getFacultiesInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/getFacultiesInfo.py	(revision 2226)
@@ -0,0 +1,44 @@
+## Script (Python) "getFacultiesInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id:getFacultiesInfo.py 486 2006-09-06 10:09:39Z joachim $
+"""
+return Info about the Faculties
+"""
+request = context.REQUEST
+def cmp_id(a,b):
+    s1 = "%(id)s" % a
+    s2 = "%(id)s" % b
+    if s1 == s2:
+        return 0
+    if s1 > s2:
+        return 1
+    return -1
+
+wf = context.portal_workflow
+mtool = context.portal_membership
+path_info = request.get('PATH_INFO').split('/')
+
+info = {}
+info['action'] = "%s" % context.absolute_url()
+info['choosen_ids'] = request.get('ids',[])
+items = []
+facs = context.portal_catalog(portal_type='Faculty')
+for f in facs:
+    row = {}
+    fo = f.getObject()
+    fd = fo.getContent()
+    row['id'] = fo.getId()
+    row['title'] = fd.LongTitle()
+    row['url'] = fo.absolute_url()
+    row['is_editable'] = mtool.checkPermission('Modify portal content', fo)
+    items.append(row)
+items.sort(cmp_id)
+info['items'] = items
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/getLevelInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/getLevelInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/getLevelInfo.py	(revision 2226)
@@ -0,0 +1,67 @@
+## Script (Python) "getLevelInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id$
+"""
+return Info about the Faculties
+"""
+request = context.REQUEST
+
+wf = context.portal_workflow
+mtool = context.portal_membership
+academics_path = "%s/campus/academics" % context.portal_url()
+path_info = request.get('PATH_INFO').split('/')
+try:
+    i = int(path_info[-1])
+    p = 0
+except:
+    p = 1
+info = {}
+pt = request.get('PATH_INFO').split('/')
+
+dep_id = pt[-(3+p)]
+cert_id = pt[-(2+p)]
+level_id = pt[-(1+p)]
+info['action'] = "%s" % context.absolute_url()
+info['choosen_ids'] = request.get('ids',[])
+info['doc'] = context.getContent()
+brain = context.portal_catalog(meta_type="Certificate",id = cert_id)[-1]
+cp = brain.getPath()
+info['container_path'] = cp
+info['dep_id'] = dep_id
+info['cert_id'] = cert_id
+
+res = context.portal_catalog(meta_type="CertificateCourse", container_path="%s/%s" % (cp,level_id))
+first = []
+second = []
+for r in res:
+    row = {}
+    ro = r.getObject()
+    rd = ro.getContent()
+    course_id = row['id'] = r.getId
+    row['title'] = rd.Title()
+    row['core'] = rd.core_or_elective
+    row['semester'] = rd.semester
+    row['url'] = ro.absolute_url()
+    row['review_state'] = wf.getInfoFor(ro,'review_state','None')
+    editable = row['is_editable'] = mtool.checkPermission('Modify portal content', ro)
+    if editable:
+        course_res = context.courses_catalog(code=course_id)
+        if course_res:
+            rc = course_res[0]
+            row['real_course_path'] = "%s/%s/%s/courses/%s" % (academics_path,rc.faculty,rc.department,course_id)
+    if rd.semester == 'first':
+        first.append(row)
+    else:
+        second.append(row)
+first.sort()
+second.sort()
+info['first'] = first
+info['second'] = second
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/get_departments_voc.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/get_departments_voc.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/get_departments_voc.py	(revision 2226)
@@ -0,0 +1,14 @@
+##parameters=key=None
+# $Id$
+"""
+Return the faculties as an vocabulary
+
+"""
+if key is None:
+    res = context.portal_catalog.search({'meta_type': "Department"})    
+    return [(d.getId(),d.Title,) for d in res]
+res = context.portal_catalog.search({'meta_type': "Department", 'id': key})
+if res:
+    return res[-1].Title
+return "unknown Department %s" % key
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/get_faculties_voc.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/get_faculties_voc.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/get_faculties_voc.py	(revision 2226)
@@ -0,0 +1,13 @@
+##parameters=key=None 
+# $Id$
+"""
+Return the faculties as an vocabulary
+
+"""
+if key is None:
+    res = context.portal_catalog.search({'meta_type': "Faculty"})    
+    return [(d.getId,d.Title,) for d in res]
+res = context.portal_catalog.search({'meta_type': "Faculty", 'id': key})
+if res:
+    return [-1].Title
+return "unknown Faculty %s" % key
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/level_created.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/level_created.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/level_created.py	(revision 2226)
@@ -0,0 +1,36 @@
+## Script (Python) "cpsdocument_created"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=object=None
+##title=
+##
+"""
+Do the necessary rendering or redirection after an object has been
+successfully created and filled with the initial values by the user.
+
+In CPS, context is a proxy.
+
+May return a rendered document, or do a redirect.
+"""
+# $Id$
+if object is not None:
+    dep = object
+else:
+    dep = context.getContent()
+dep.getContent().edit(mapping={'Title': "Level %s" % dep.getId()})
+#dep.invokeFactory('Semester','first')
+#o = getattr(dep,'first')
+#dict = {'Title': 'First Semester'}
+#o.getContent().edit(mapping=dict)
+#dep.invokeFactory('Semester','second')
+#o = getattr(dep,'second')
+#dict = {'Title': 'Second Semester'}
+#o.getContent().edit(mapping=dict)
+#context.orderObjects('id')
+psm = 'Study Level created!'
+action_path = context.getTypeInfo().immediate_view
+context.REQUEST.RESPONSE.redirect('%s/%s?portal_status_message=%s' %
+                                  (context.absolute_url(), action_path, psm))
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/level_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/level_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/level_view.pt	(revision 2226)
@@ -0,0 +1,92 @@
+<metal:html tal:define="info context/getLevelInfo;
+            is_so context/isSectionOfficer;"
+            >
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:block fill-slot="header">
+      <a href=""
+         tal:attributes="href string:${here/academicsParent}">
+        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+        Up one level
+      </a>
+      <h3 tal:content="here/title_or_id" />
+      <div tal:condition="python:0" tal:content="info/container_path"/>
+      <div tal:condition="python:0" tal:content="info/dep_id"/>
+      <div tal:condition="python:0" tal:content="info/cert_id"/>
+    </metal:block>
+    <metal:main fill-slot="main" tal:condition="python:1">
+      <span tal:omit-tag=""  
+            tal:content="structure python: info['doc'].render(layout_mode='view')" />
+      
+      <form action="" method="post" class="group"
+            tal:attributes="action info/action"
+            >
+        <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">      
+          <span tal:repeat="sem python:('first','second')">
+            <tr><th colspan="3" tal:content="python: test(sem == 'first','First Semester', 'Second Semester')" />
+            <tr tal:repeat="row python: info[sem]"
+                tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+              <td align="left" valign="middle" style="width: 5px;" 
+                  tal:condition="is_so">
+                <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                       tal:condition="is_so"
+                       tal:define="id row/id"
+                       tal:attributes="value id;
+                       id python:'cb_' + id;
+                       checked python:id in info['choosen_ids'];" 
+                       />
+                </td>
+                <td><a href="view" tal:attributes="href string:${row/url}">
+                    <strong tal:content="row/title" /></a> </td>
+                <td tal:content="row/id"></td>
+                <td tal:content="python: test(row['core'],'core','elective')"></td>
+                <td tal:condition="row/is_editable" tal:content="row/review_state"> </td>
+                <td> 
+                <a tal:condition="row/is_editable"
+                    href="edit" tal:attributes="href string:${row/url}/external_edit_form"
+                    target="edit"
+                    onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
+                    [edit]
+                    </a> 
+                <a tal:condition="row/real_course_path|nothing" 
+                   href="edit" tal:attributes="href string:${row/real_course_path}">
+                    [goto course]
+                    </a> 
+                </td>
+              </tr>
+            </span>
+          </table>
+        <table width="100%" cellspacing="0" cellpadding="2"
+               class="folderButtons">
+          <tr>
+            <td align="left" valign="top" rowspan="3"></td>
+            <td align="left" valign="top">
+              <span tal:condition="is_so">
+                <input type="button" value="button_select_all" class="context"
+                       onclick="someJavaScriptFunctionThatWillBeReplaced"
+                       i18n:attributes="value"
+                       tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                       />
+                <input type="submit" name="approve_checked:method"
+                       class="context" value="Approve" />
+                <input type="submit" name="retract_checked:method"
+                       class="context" value="Retract" />
+                <input type="submit" name="folder_delete:method" value="button_delete"
+                       class="destructive" i18n:attributes="value"
+                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                       (cpsmcat('description_confirm_delete'), )" 
+                       />
+                <input tal:condition="python: context.portal_type not in ('Semester','Certificate')"
+                       type="submit" name="id_rename_form:method"
+                       class="context" value="Change Object ID" i18n:attributes="value" 
+                       />
+              </span>
+            </td>
+          </tr>
+        </table>
+      </form>
+    </metal:main>
+    
+    <metal:sub fill-slot="sub"/>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_academics/retract_checked.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/retract_checked.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/retract_checked.py	(revision 2226)
@@ -0,0 +1,27 @@
+## 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.
+"""
+
+ret_url = context.absolute_url() + '/academics_index'
+
+if ids:
+    for id in ids:
+        ob = getattr(context, id)
+        if context.portal_workflow.getInfoFor(ob,'review_state',None) == "checked":
+            ob.content_status_modify(workflow_action="retract")
+    message = 'portal_status_message=workflow status changed'
+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_not_used/skins/waeup_academics/searchAcademics.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_academics/searchAcademics.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_academics/searchAcademics.py	(revision 2226)
@@ -0,0 +1,100 @@
+## Script (Python) "searchAcademics"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+return Info about the current Student
+"""
+request = context.REQUEST
+form = request.form
+fget = form.get
+info = {}
+wf = context.portal_workflow
+catalog = context.portal_catalog
+lt = context.portal_layouts
+pr = context.portal_registration
+mtool = context.portal_membership
+path_info = request.get('PATH_INFO').split('/')
+is_sm = context.isSectionManager()
+validate = request.has_key("cpsdocument_edit_button")
+items = []
+default = {'search_mode': 'course',
+        'review_state': 'unchecked',
+        'search_string': ''
+        }
+choosen_ids = request.get('ids',[])
+
+rend,psm,ds = lt.renderLayout(layout_id= 'academics_search',
+                      schema_id= 'academics_search',
+                      context=context,
+                      mapping=validate and request,
+                      ob=default,
+                      layout_mode='edit',
+                      formaction="searchAcademics"
+                      )
+if psm == '':
+    return context.academics_search_view(rendered = rend,
+                             psm = psm,
+                             #psm = "%s, %s" % (psm,ds),
+                             objects = items,
+                             is_sm = is_sm,
+                             choosen_ids = choosen_ids,
+                             )
+what = ds.get('search_mode')
+state = ds.get('review_state')
+term = ds.get('search_string')
+err = False
+with_review = state != "all"
+if not term and not with_review:
+    psm = "You must specify a search string when searching 'all states'!"
+    err = True
+elif '*' in term:
+    psm = "Wildcards are not supported!"
+    err = True
+if err:
+    return context.academics_search_view(rendered = rend,
+                             psm = psm,
+                             #psm = "%s, %s" % (psm,ds),
+                             students = items,
+                             is_sm = is_sm,
+                             choosen_ids = choosen_ids,
+                             )
+with_review = state != "all"
+items = []
+res = []
+portal_type_query = {'query':['Course','CertificateCourse']}
+onlyreview = with_review and not term
+if onlyreview:
+    res = catalog(portal_type=portal_type_query,
+                  review_state=state)
+elif what == "course":
+    res = catalog(portal_type='Course',
+                  SearchableText="%s*" % term.strip().lower())
+elif what == "certificate_course":
+    res = catalog(portal_type='CertificateCourse',
+                  SearchableText="%s*" % term.strip().lower())
+objects = []
+if res:
+    for r in res:
+        row = {}
+        ro = r.getObject()
+        rd = ro.getContent()
+        row['id'] = r.getId
+        row['title'] = rd.Title()
+        row['url'] = ro.absolute_url()
+        row['review_state'] = wf.getInfoFor(ro,'review_state','None')
+        row['is_editable'] = mtool.checkPermission('Modify portal content', ro)
+        objects.append(row)
+return context.academics_search_view(rendered = rend,
+                             psm = "%d matching objects found" % len(objects),
+                             #psm = "%s, %s" % (psm,ds),
+                             objects = objects,
+                             is_sm = is_sm,
+                             choosen_ids = choosen_ids,
+                             )
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/acco_folder_index.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/acco_folder_index.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/acco_folder_index.py	(revision 2226)
@@ -0,0 +1,28 @@
+## Script (Python) "academics_index"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=batch=None
+##title=
+##
+# $Id$
+"""
+return the appropriate page in the accommodation section
+"""
+
+request = context.REQUEST
+redirect = request.RESPONSE.redirect
+pm = context.portal_membership
+
+#from Products.zdb import set_trace;set_trace()
+if context.isSectionOfficer():
+    if context.portal_type == 'AccoFolder':
+        return context.accommodation.acco_folder_view()
+    elif context.portal_type == 'AccoHall':
+        return context.acco_hall_view()
+    return redirect("%s/srp_view" % context.portal_url())
+else:
+    return redirect("%s/srp_anonymous_view" % context.portal_url())
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/acco_folder_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/acco_folder_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/acco_folder_view.pt	(revision 2226)
@@ -0,0 +1,96 @@
+<metal:html tal:define="info context/getAccoFolderInfo;
+            is_so context/isSectionOfficer;
+            beds_generated options/beds_generated|nothing;"
+            >
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:block fill-slot="header">
+      <a href="" tal:condition="nothing"
+         tal:attributes="href string:${here/academicsParent}">
+        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+        Up one level
+      </a>
+      
+      <a href="statistics_bed_view"><strong>Bed Statistics</strong></a>      
+      
+      <h3 tal:content="here/title_or_id">
+        Page Title
+      </h3>
+      <br />
+      <table tal:condition="beds_generated">
+        <tr>
+          <th width="200px">Hall Name</th>
+          <th>New Beds Generated</th>
+        </tr>
+        <tr tal:repeat="hall beds_generated">
+          <td tal:content="hall/name"></td>
+          <td tal:content="hall/count"></td>
+        </tr>
+      </table>
+
+    </metal:block>
+    <metal:main fill-slot="main">
+      <form action="" method="post" class="group"
+            tal:attributes="action info/action"
+            tal:define="rows python: info['items'];"
+            >
+        <span tal:condition="python: 0" tal:content="structure rows" />
+        <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">      
+          <tr tal:repeat="row rows"
+            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+            <td align="left" valign="middle" style="width: 5px;" 
+                tal:condition="is_so">
+              <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                     tal:condition="is_so"
+                     tal:define="id row/id"
+                     tal:attributes="value id;
+                     id python:'cb_' + id;
+                     checked python:id in info['choosen_ids'];" 
+                     />
+            </td>
+            <td><a href="view" tal:attributes="href row/url">
+              <strong tal:content="row/title" /></a> </td>
+            <td tal:content="row/id"> </td>
+            
+            <td> 
+            <a tal:condition="row/is_editable"
+                href="edit" tal:attributes="href string:/${row/url}/external_edit_form"
+                target="edit"
+                onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
+                [edit]
+                </a> 
+            </td>
+            
+          </tr>
+        </table>
+        <table width="100%" cellspacing="0" cellpadding="2"
+               summary="contents of the folder"
+               class="folderButtons">
+          <tr>
+            <td align="left" valign="top" rowspan="3"></td>
+            <td align="left" valign="top">
+              <span tal:condition="is_so">
+                <input type="button" value="button_select_all" class="context"
+                       onclick="someJavaScriptFunctionThatWillBeReplaced"
+                       i18n:attributes="value"
+                       tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                       />
+                <input type="submit" name="hall_delete:method" value="button_delete"
+                       class="destructive" i18n:attributes="value"
+                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                       (cpsmcat('description_confirm_delete'), )" 
+                       />
+                <input tal:condition="python: 0 and context.portal_type not in ('Semester','Certificate')"
+                       type="submit" name="id_rename_form:method"
+                       class="context" value="Change Object ID" i18n:attributes="value" 
+                       />
+              </span>
+            </td>
+          </tr>
+        </table>
+      </form>
+    </metal:main>
+    
+    <metal:sub fill-slot="sub"/>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/acco_hall_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/acco_hall_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/acco_hall_view.pt	(revision 2226)
@@ -0,0 +1,60 @@
+<metal:html tal:define="info context/getAccoHallInfo">
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:block fill-slot="header">
+      <a href=""
+         tal:attributes="href string:${here/academicsParent}">
+        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+        Up one level
+      </a>
+      <h3 tal:content="here/title_or_id" />
+      <div tal:condition="nothing" tal:content="info/container_path"/>
+      <br />
+
+    </metal:block>
+    <metal:main fill-slot="main">
+      <span tal:omit-tag=""  
+            tal:content="structure python: info['doc'].render(layout_mode='view')" />
+      <br />
+      <table tal:condition="info/bed_types"
+             tal:define="bed_types info/bed_types">
+        <tr>
+          <th width="200px">Bed Type</th>
+          <th width="80px">Total</th>
+          <th width="80px">Booked</th>
+        </tr>
+        <tr tal:repeat="bt bed_types">
+          <td tal:content="bt/name" />
+          <td tal:content="bt/total" />
+          <td tal:content="bt/reserved" />
+        </tr>
+        <tr><td>&nbsp;</td></tr>
+      </table>
+      <br />
+      <div>
+        <a href="download" 
+           tal:attributes="href string:hall_allocation_list">
+          <strong>Download bedlist as csv file</strong></a>
+      </div>
+      <br />
+      <table tal:condition="python:info['reserved']"
+             tal:define="reserved info/reserved">
+        <tr>
+          <th width="100px">Student Id</th>
+          <th width="300px">Name</th>
+          <th width="200px">Bed</th>
+        </tr>
+        <tr tal:repeat="bt reserved">
+          <td> 
+            <a href="" tal:attributes="href bt/student_url"
+               tal:content="bt/student"></a>
+          </td>
+          <td tal:content="bt/name" />
+          <td tal:content="bt/bed" />
+        </tr>
+      </table>
+
+    </metal:main>
+    
+    <metal:sub fill-slot="sub"/>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/accommodation_pin_edit_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/accommodation_pin_edit_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/accommodation_pin_edit_form.pt	(revision 2226)
@@ -0,0 +1,48 @@
+<tal:block define="rendered_main options/rendered;
+                   portal_status_message options/psm;
+                   data_storage options/ds;
+                   mode options/mode;
+                   edition python:1;"
+                   >
+<metal:block define-macro="edit_form">
+  <metal:block use-macro="here/main_template/macros/master">
+  <metal:block fill-slot="header"
+    tal:define="creation creation|nothing;
+                edition edition|nothing;
+                metadata metadata|nothing"
+                >
+    </metal:block>
+      <metal:block fill-slot="main">
+      
+        <div style="text-align: right" tal:condition="python: mode == 'edit'">
+        <a href="" target="slip" tal:attributes="href string:accommodation_slip"
+            onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+            Accommodation Slip
+        </a>
+        </div>      
+      
+        <h3 tal:condition="python: mode == 'create'">Book Your Accommodation! </h3>
+        <h3 tal:condition="python: mode == 'edit'">Pay Your Accommodation Maintenance Fee! </h3>
+        <br />
+        <div tal:replace="structure rendered_main" />
+          <p>Instructions :</p>
+          <ul tal:condition="python: mode == 'create'">
+            <li>Buy a Hostel Application Scratch Card.</li> 
+            <li>Enter the PIN above and press 'Book'.</li>
+            <li>Print your Hostel Allocation Slip.</li>
+          </ul>
+          <ul tal:condition="python: mode == 'edit'" 
+              tal:define="info python: context.getAccommodationInfo()">
+            <li>Buy a Hostel Maintainance Scratch Card 
+            (Code: <span tal:replace="python: info['acco_doc'].acco_maint_code" />) for 
+            <span tal:replace="python: info['acco_doc'].acco_maint_fee" /> Nairas</li> 
+            <li>Enter the PIN above and press 'Save'.</li>
+            <li>Print your Hostel Maintenance Receipt.</li>
+          </ul>
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/allocate_reserved_bed.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/allocate_reserved_bed.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/allocate_reserved_bed.py	(revision 2226)
@@ -0,0 +1,145 @@
+##parameters=REQUEST
+# $Id: allocate_reserved_bed.py 1451 2007-02-20 22:17:41Z joachim $
+"""
+process the the accommodation reservation
+"""
+import DateTime
+current = DateTime.DateTime()
+pr = context.portal_registration
+wftool = context.portal_workflow
+lt = context.portal_layouts
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+acco_cat = context.portal_accommodation
+import logging
+logger = logging.getLogger('Skins.allocate_reserved_bed')
+
+#change = REQUEST.has_key("allocate_and_change")
+change = False
+release = REQUEST.has_key("release")
+allocate = REQUEST.has_key("allocate")
+validate = release or change or (allocate and
+           REQUEST.get("allocate").startswith('Allocate'))
+mode = 'create'
+d = {}
+rendered,psm,ds = lt.renderLayout(layout_id= 'acco_bed_booking',
+                      schema_id= 'acco_bed_booking',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob=d,
+                      layout_mode='edit',
+                      commit = False
+                      )
+if psm == 'invalid':
+    psm = "Please correct your input."
+    return context.allocate_reserved_bed_form(rendered = rendered,
+                                 psm = psm,
+                                 #psm = "%s, %s" % (psm,ds),
+                                 mode = mode,
+                                 formaction = "allocate_reserved_bed",
+                                 button = "Allocate Bed",
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.allocate_reserved_bed_form(rendered = rendered,
+                                 psm = psm,
+                                 mode = mode,
+                                 formaction = "allocate_reserved_bed",
+                                 button = "Allocate Bed",
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    pass
+#from Products.zdb import set_trace;set_trace()
+hall_id = context.getId()
+doc = context.getContent()
+student = ds.get('student')
+sid = ds.get('student_id')
+br = ds.get('block_room')
+block = br[0]
+bl = ds.get('bed_letter')
+bid = "%s_%s_%s" % (hall_id,br,bl)
+res = acco_cat(bed = bid)
+psm = ''
+students = context.portal_url.getPortalObject().campus.students
+student_obj = getattr(students,sid)
+acco_id = "accommodation_%s" % context.getSessionId()
+while True:
+    if not res:
+        psm = "No bed with id %s" % bid
+        break
+    bed_brain = res[0]
+    already = acco_cat(student=sid)
+    if allocate or change:
+        if already and not change:
+            psm = "Student %s has already reserved bed %s" % (sid, already[0].bed)
+            break
+        if not bed_brain.bed_type.endswith("reserved"):
+            psm = "%s is not a reserved bed" % bid
+            break
+        if bed_brain.student and not change:
+            psm = "Bed %s already reserved for %s" % (bid,bed_brain.student)
+            break
+        if student.sex and not block in doc.blocks_for_female:
+            psm = "Sex does not match %s" % bid
+            break
+    if release:
+        if acco_id in student_obj.objectIds():
+            acco_doc = getattr(student_obj, acco_id).getContent()
+            if acco_doc.bed == bid:
+                psm = "Student %s has already booked (and paid) bed %s" % (sid, bid)
+                break
+        if not already:
+            psm = "Student %s has no reserved bed" % (sid)
+            break
+        if not bed_brain.bed_type.endswith("reserved"):
+            psm = "%s is not a reserved bed" % bid
+            break
+        if not bed_brain.student:
+            psm = "Bed %s not allocated" % (bid)
+            break
+    break
+
+if psm != '':
+    return context.allocate_reserved_bed_form(rendered = rendered,
+                                 psm = psm,
+                                 mode = mode,
+                                 ds = ds,
+                                 formaction = "allocate_reserved_bed",
+                                 button = "Allocate Bed",
+                                 )
+if change:
+    for bed in already:
+        acco_cat.modifyRecord(bed=bed.bed,student='')
+
+if allocate or change:
+    acco_cat.modifyRecord(bed = bid, student = sid)
+    if acco_id in student_obj.objectIds():
+        acco_doc = getattr(student_obj, acco_id).getContent()
+        acco_doc.edit(mapping={'bed': bid})
+    logger.info('%s booked reserved bed %s for %s' % (member,bid,sid))
+    psm = "Bed %s reserved for %s %s" % (bid,sid,student.name)
+elif release:
+    modify = False
+    if acco_id in student_obj.objectIds():
+        #acco_doc = getattr(student_obj, acco_id).getContent()
+        if acco_doc.bed != bid:
+            modify = True
+    else:
+        modify = True
+    if modify:
+        acco_cat.modifyRecord(bed=bid,student='')
+        logger.info('%s released bed %s booked by %s' % (member,bid,sid))
+        psm = "%s removed from %s" % (student.name,bid)
+    else:
+        psm = "Removing of %s from bed %s failed" % (student.name,bid)
+
+mode = 'view'
+return context.allocate_reserved_bed_form(rendered = "",
+                                 psm = psm,
+                                 mode = mode,
+                                 formaction = "allocate_reserved_bed",
+                                 button = "Next Reservation",
+                                 ds = ds,
+                                 )
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/allocate_reserved_bed_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/allocate_reserved_bed_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/allocate_reserved_bed_form.pt	(revision 2226)
@@ -0,0 +1,46 @@
+<tal:block define="rendered_main options/rendered;
+           portal_status_message options/psm;
+           data_storage options/ds;
+           mode options/mode;
+           formaction options/formaction;
+           matric_no options/matric_no|nothing;
+           name options/name|nothing;
+           creation creation|nothing;"
+           >
+  <metal:block define-macro="edit_form">
+    <metal:block use-macro="here/main_template/macros/master">
+      <metal:block fill-slot="header">
+      </metal:block>
+      <metal:block fill-slot="main">
+      
+      
+        <h3>Allocate or Release Reserved Bed! </h3>
+        <br />      
+      
+        <form action="" id="editForm" method="post" 
+              enctype="multipart/form-data" class="workflow"
+              tal:attributes="action options/formaction"
+              >
+          <div tal:replace="structure rendered_main" />
+          <br />
+          <input type="submit" class="standalone" 
+                 name="allocate"
+                 tal:attributes="value options/button"
+                 tal:condition="not:creation" />
+          <input type="submit" tal:condition="python:0 and mode !='view'"
+                 class="standalone" 
+                 name="allocate_and_change"
+                 value="Allocate and Change Bed"
+                 />
+          <input type="submit" tal:condition="python:mode !='view'"
+                 class="standalone" 
+                 name="release"
+                 value="Release Bed"
+                 />
+        </form>
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/change_bed.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/change_bed.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/change_bed.py	(revision 2226)
@@ -0,0 +1,102 @@
+## Script (Python) "change_bed"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+relocate to a new bed if allocated bed is wrong
+"""
+import logging
+logger = logging.getLogger('Skins.change_bed')
+
+request = context.REQUEST
+redirect = request.RESPONSE.redirect
+mtool = context.portal_membership
+wf = context.portal_workflow
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+path_info = request.get('PATH_INFO').split('/')
+
+if mtool.isAnonymousUser():
+    return None
+students = context.portal_url.getPortalObject().campus.students
+beds = context.portal_accommodation
+studs = context.students_catalog
+student_id = context.getStudentId()
+
+if student_id is not None:
+    logger.info('%s requests bed change for %s' % (member_id,student_id))
+    info = context.getAccommodationInfo(student_id)
+    res = beds(student=student_id)
+    if len(res) == 0:
+        logger.info('No bed found for %s' % (student_id))
+        return redirect("%s/%s" % (students.absolute_url(),student_id))
+    allocated_bed = res[0]
+    status = info['student_status']
+    student = student_id
+    if allocated_bed.bed_type == status:
+        logger.info('Status %s of %s has not changed' % (status,student_id))
+        return redirect("%s/%s/%s" % (students.absolute_url(),student,info['acco_id']))
+    logger.info('Bed status %s of %s has changed to %s' % (allocated_bed.bed_type,student_id,status))
+    beds.modifyRecord(bed=allocated_bed.bed,student='')
+    logger.info('Bed %s released' % (allocated_bed.bed))
+    code,bed = beds.searchAndReserveBed(student_id,status)
+    if code > 0:
+        #from Products.zdb import set_trace; set_trace()
+        d = {}
+        d['bed'] = bed
+        d['student_status'] = status
+        acco_info = context.waeup_tool.getHallInfo(bed)
+        d['acco_maint_code'] = acco_info.get('maintenance_code')
+        d['acco_maint_fee'] = acco_info.get('maintenance_fee')
+        acco_doc = info['acco_doc']
+        acco_doc.edit(mapping=d)
+        logger.info('Bed %s allocated to %s' % (bed,student_id))
+        return redirect("%s/%s/%s" % (students.absolute_url(),student,info['acco_id']))
+    student_obj = getattr(students,student_id)
+    acco_id = "accommodation_%s" % context.getSessionId()
+    if acco_id in student_obj.objectIds():
+        acco_doc = getattr(student_obj, acco_id).getContent()
+        if acco_doc.bed == bed:
+            acco_doc.edit(mapping={'bed':"-- cancelled by officer due to failed bed change request --"})
+    logger.info('New bed allocation for %s failed, code = %s' % (student_id,code))
+    logger.info('%s cancelled booking of bed %s by %s' % (member,bed,student_id))
+    redirect("%s/%s/%s" % (students.absolute_url(),student,info['acco_id']))
+
+info = {}
+records = [r for r in beds() if  r.student]
+list = []
+to_modify = []
+for r in records:
+    info = context.getAccommodationInfo(r.student)
+    sbt = info.get('student_status',None)
+    if sbt is None:
+        continue
+    elif r.bed_type == sbt:
+        list.append("Student %s bed_type %s ok" % (r.student,r.bed_type))
+        continue
+    list.append("Student %s bed_type %s != %s" % (r.student,
+                                                  r.bed_type,
+                                                  info['student_status']))
+    to_modify.append((r.bed,r.student,info['student_status'],info['acco_doc']))
+for former_bed, student, status,acco_doc in to_modify:
+    beds.modifyRecord(bed=former_bed,student='')
+    code,bed = beds.searchAndReserveBed(student,status)
+    if code > 0:
+        #from Products.zdb import set_trace; set_trace()
+        d = {}
+        d['bed'] = bed
+        d['student_status'] = status
+        acco_info = context.waeup_tool.getHallInfo(bed)
+        d['acco_maint_code'] = acco_info.get('maintenance_code')
+        d['acco_maint_fee'] = acco_info.get('maintenance_fee')
+        acco_doc.edit(mapping=d)
+        list.append("New bed %s allocated to %s, code = %s" % (bed,
+                                                              student,
+                                                              code))
+return "\r".join(list)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getAccoFolderInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getAccoFolderInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getAccoFolderInfo.py	(revision 2226)
@@ -0,0 +1,38 @@
+## Script (Python) "getAccoFolderInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id$
+"""
+return Info about the Accommodation-Folder
+"""
+request = context.REQUEST
+
+wf = context.portal_workflow
+mtool = context.portal_membership
+path_info = request.get('PATH_INFO').split('/')
+
+info = {}
+info['action'] = "%s" % context.absolute_url()
+info['choosen_ids'] = request.get('ids',[])
+items = []
+is_editable = mtool.checkPermission('Modify portal content', context)
+is_editable = False
+halls = context.portal_catalog(portal_type='AccoHall')
+for f in halls:
+    row = {}
+    row['id'] = f.id
+    row['title'] = f.Title
+    row['url'] = "%s/%s" % (context.absolute_url(),f.id)
+    #fo = f.getObject()
+    #row['is_editable'] = mtool.checkPermission('Modify portal content', fo)
+    row['is_editable'] = is_editable
+    items.append(row)
+info['items'] = items
+return info
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getAccoHallBeds.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getAccoHallBeds.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getAccoHallBeds.py	(revision 2226)
@@ -0,0 +1,11 @@
+##parameters=key=None,doc=None
+# $Id$
+"""
+Return the bedletters as an vocabulary
+
+"""
+if doc is None:
+    doc = context.getContent()
+if key is None:
+    return [(l,l) for l in 'ABCDEFGH'[:doc.beds_per_room]]
+return key
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getAccoHallInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getAccoHallInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getAccoHallInfo.py	(revision 2226)
@@ -0,0 +1,76 @@
+## Script (Python) "getAccoHallInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id$
+"""
+return Info about a Accommodation Hall
+"""
+
+def cmp_bed(a,b):
+    if a['bed'] > b['bed']:
+        return 1
+    return -1
+
+request = context.REQUEST
+
+wf = context.portal_workflow
+path_info = request.get('PATH_INFO').split('/')
+mtool = context.portal_membership
+pa = context.portal_accommodation
+info = {}
+#dep_id = request.get('PATH_TRANSLATED').split('/')[-2]
+dep_id = context.aq_parent.getId()
+info['action'] = "%s" % context.absolute_url()
+info['choosen_ids'] = request.get('ids',[])
+info['doc'] = context.getContent()
+bed_types = pa.uniqueValuesFor('bed_type')
+bt_list = []
+bt_names =  context.getBedTypeNames()
+res = pa.uniqueValuesFor('student')
+all_booked = [st for st in res if st]
+booked_list = []
+#from Products.zdb import set_trace;set_trace()
+for bt in bed_types:
+    total = len(pa(bed_type=bt,hall=context.getId()))
+    if total <= 1:
+        continue
+    booked = pa.searchResults({'bed_type': bt,
+                                 'student':all_booked,
+                                 'hall': context.getId()})
+    bt_list.append({'name': bt_names[bt],
+                    'total': total,
+                    'reserved': len(booked),
+                    })
+    booked_list.extend(booked)
+info['bed_types'] = bt_list
+res_list = []
+students_url = "%s/campus/students" % (context.portal_url())
+for sbrain in booked_list:
+    d = {}
+    st = sbrain.student
+    if not st:
+        continue
+    d['student'] = st
+    d['student_url'] ='%s/%s' % (students_url,st)
+    bed = context.getFormattedBed(sbrain.bed).split('/')
+    d['bed'] = " / ".join(bed[1:])
+    erg = context.students_catalog(id = st)
+    if erg:
+        sd = context.getFormattedStudentEntry(erg[0])
+        d.update(sd)
+    else:
+        #d['student'] = None
+        d['student_url'] = None
+        #d['bed'] = None
+        d['name'] = 'Student record removed'
+    res_list.append(d)
+res_list.sort(cmp_bed)
+info['reserved'] = res_list
+
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getAccommodationInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getAccommodationInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getAccommodationInfo.py	(revision 2226)
@@ -0,0 +1,136 @@
+## Script (Python) "getAccommodationInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student_id=None
+##title=
+##
+# $Id: getAccommodationInfo.py 1726 2007-05-02 06:21:50Z henrik $
+"""
+return Info about the current Student
+"""
+import logging
+logger = logging.getLogger('Skins.getAccommodationInfo')
+import DateTime
+
+request = context.REQUEST
+mtool = context.portal_membership
+wf = context.portal_workflow
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+path_info = request.get('PATH_INFO').split('/')
+
+if mtool.isAnonymousUser():
+    return None
+info = {}
+if student_id is None:
+    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))
+        return None
+    elif context.isStaff():
+        student_id = requested_id
+    else:
+        student_id = member_id
+res = context.students_catalog(id=student_id)
+if len(res) != 1:
+    logger.info('%s not found in students_catalog' % student_id)
+    return None
+
+ekehuan_certificates = ('BARTAPG',
+                        'BARTAPM',
+                        'BARTCER',
+                        'BARTFAA',
+                        'BARTFAP',
+                        'BARTSCP',
+                        'BARTTXT',
+                        'BARTMAS',
+                        'BARTTHR',
+                        )
+pti_certificates = ('BENGIEP',
+                    'BENGGCPP',
+                    'BENGEEP',
+                    'BENGGEP',
+                    'BENGPEP',
+                    'BENGMEP',
+                    )
+s_brain = res[0]
+info['error'] = None
+info['matric_no']=s_brain.matric_no
+info['jamb_reg_no']=s_brain.jamb_reg_no
+info['name']=s_brain.name
+info['email']=s_brain.email
+info['level']=s_brain.level
+info['verdict']=getattr(s_brain,"verdict","N/A")
+
+
+students_object = context.portal_url.getPortalObject().campus.students
+student = getattr(students_object, student_id)
+info['id'] = student_id
+info['student'] = student
+review_state = info['review_state'] = context.getStudentReviewState()
+booking_allowed = False
+if review_state in ('cleared_and_validated','returning','school_fee_paid','courses_registered', 'courses_validated',):
+    booking_allowed = True
+    if s_brain.matric_no:
+        res = context.results_import(matric_no = s_brain.matric_no)
+        if res:
+            booking_allowed = info['verdict'] in ("A",
+                                                 "B",)
+info['booking_allowed'] = booking_allowed
+if not booking_allowed:
+    info['acco'] = None
+    return info
+acco_id = 'accommodation_2006'
+acco = getattr(student,acco_id,None)
+info['acco'] = acco
+info['acco_id'] = acco_id
+bt = 're'
+if acco is not None:
+    info['acco_doc'] = acco.getContent()
+    info['acco_review_state'] = wf.getInfoFor(acco,'review_state',None)
+d = {}
+if review_state == "cleared_and_validated":
+    bt = 'fr'
+elif int(s_brain.level) < 300:
+    bt = 're'
+else:
+    res = context.portal_catalog(portal_type = "Certificate", id = s_brain.course)
+    if res:
+        c_brain = res[0]
+        #from Products.zdb import set_trace; set_trace()
+        certificate = c_brain.getObject().getContent()
+        try:
+            certlevel = int(certificate.end_level)
+        except:
+            info["error"] = '"no end_level for","%s"' % c_brain.getId
+            return info
+        try:
+            studentlevel = int(s_brain.level)
+        except:
+            info["error"] = '"no level for","%s"' % s_brain.getId
+            return info
+        if studentlevel >= certlevel:
+            bt = "fi"
+d['sex'] = 'male'
+if s_brain.sex:
+    d['sex'] = 'female'
+if s_brain.course in ekehuan_certificates:
+    bt += "_ekenhuan"
+elif s_brain.course in pti_certificates:
+    bt += "_pti"
+elif s_brain.faculty in ('MED') and int(s_brain.level) >= 400:
+    bt += "_med"
+
+info['sex']=d['sex']
+
+
+d['bt'] = bt
+#from Products.zdb import set_trace
+#set_trace()
+student_status = "%(sex)s_%(bt)s" % d
+info['student_status'] = student_status
+return info
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getBedStatistics.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getBedStatistics.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getBedStatistics.py	(revision 2226)
@@ -0,0 +1,45 @@
+## Script (Python) "getBedStatistics"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id: getAccoFolderInfo.py 1301 2007-01-15 12:00:30Z joachim $
+
+pa = context.portal_accommodation
+bed_types = pa.uniqueValuesFor('bed_type')
+bt_list = []
+bt_names =  context.getBedTypeNames()
+res = pa.uniqueValuesFor('student')
+reserved = [st for st in res if st]
+sum_total = 0
+sum_occupied = 0
+info = {}
+#from Products.zdb import set_trace;set_trace()
+for bt in bed_types:
+    total = len(pa(bed_type=bt))
+    sum_total += total
+    occupied = len(pa.searchResults({'bed_type': bt,'student':reserved}))
+    sum_occupied += occupied
+    bt_list.append({'name': bt_names[bt],
+                    'total': total,
+                    'reserved': occupied,
+                    'full': occupied == total,
+                    })
+bt_list.append({'name': "All Categories",
+                'total': sum_total,
+                'reserved': sum_occupied,
+                })
+info['bed_types'] = bt_list
+reserved = pa.uniqueValuesFor('student')
+res_list = []
+if reserved > 1:
+    for st in reserved:
+        if st:
+            res = pa(student=st)
+            res_list.append({'student': st, 'bed': res[0].bed })
+info['reserved'] = res_list
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getBedStatusFromHall.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getBedStatusFromHall.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getBedStatusFromHall.py	(revision 2226)
@@ -0,0 +1,50 @@
+## Script (Python) "getBedStatusFromHall"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=code=None
+##title=
+##
+# $Id: change_bed.py 1206 2007-01-05 18:24:56Z joachim $
+"""
+"""
+import logging
+logger = logging.getLogger('Student.Accommodation.change_bed')
+import re
+request = context.REQUEST
+redirect = request.RESPONSE.redirect
+mtool = context.portal_membership
+wf = context.portal_workflow
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+path_info = request.get('PATH_INFO').split('/')
+
+hall,block,room,bed = code.split('_')
+hres = context.portal_catalog(id = hall)
+if not hres:
+    return None
+h = hres[0].getObject().getContent()
+sex = 'male'
+if block in h.blocks_for_female:
+    sex = 'female'
+room_nr = int(room)
+bt = 're'
+reserved = [(r.split('/')[0],int(r.split('/')[1])) for r in re.split(',|\.| ',h.reserved_rooms)
+                                     if r]
+if (block,room_nr) in reserved:
+    bt = "reserved"
+elif not h.special_handling.startswith("no"):
+    bt = h.special_handling
+elif bed in h.beds_for_fresh:
+    bt = 'fr'
+#elif bed in h.beds_for_returning:
+#    bt = 're'
+elif bed in h.beds_for_final:
+    bt = 'fi'
+if h.special_handling.startswith("no_"):
+    bt += "_" + h.special_handling[3:]
+bt = "%s_%s" % (sex,bt)
+uid = '%s_%s_%d_%s' % (hall,block,room_nr,bed)
+return bt
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getBedTypeNames.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getBedTypeNames.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getBedTypeNames.py	(revision 2226)
@@ -0,0 +1,38 @@
+## Script (Python) "getBedTypeNames"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+
+type_suffixes = [('fr','New Student'),
+                 ('fi','Final Student'),
+                 ('re','Returning Student'),
+                 ('reserved','Reserved'),
+                 ]
+special = [item for item in context.portal_vocabularies.acco_special_handling.items()
+                            if not item[0].startswith('no')]
+for s,t in type_suffixes:
+    special.append(('%s_ekenhuan' % s,'Ekenhuan Campus %s' % t))
+    special.append(('%s_pti' % s,'PTI %s' % t))
+type_suffixes.extend(special)
+dict = {}
+for gender in ('female','male'):
+    for suffix,desc in type_suffixes:
+        dict['%s_%s' % (gender,suffix)] = '%s %s' % (gender.capitalize(),desc) 
+return dict
+##return {'female_fr': 'Female New Student',
+##             'female_fi': 'Female Final Student',
+##             'female_re': 'Female Returning Student',
+##             'female_reserved': 'Female Reserved',
+##             'female_xx': 'Female Other',
+##             'male_fr': 'Male New Student',
+##             'male_fi': 'Male Final Student',
+##             'male_re': 'Male Returning Student',
+##             'male_reserved': 'Male Reserved',
+##             'male_xx': 'Male Other'
+##             }
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getFormattedBed.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getFormattedBed.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/getFormattedBed.py	(revision 2226)
@@ -0,0 +1,27 @@
+## Script (Python) "getFormattedBed"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=bed=None,mode=None,datastructure=None
+##title=
+# $Id: getFormattedBed.py 1453 2007-02-20 22:24:30Z henrik $
+"""
+format the bed for readability
+"""
+
+if datastructure is not None:
+    bed = datastructure.get('bed')
+if not bed:
+    return ''
+if len(bed.split('_')) != 4:
+    return bed
+hall,block,room,letter = bed.split('_')
+info = context.waeup_tool.getHallInfo(bed)
+if info:
+    hall_title = info['hall_title']
+else:
+    hall_title = ""
+return " %s / Block %s / Room %s / Bed %s" % (hall_title,block,room,letter)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/hall_allocation_list.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/hall_allocation_list.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/hall_allocation_list.py	(revision 2226)
@@ -0,0 +1,62 @@
+## Script (Python) "hall_allocation_list"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id$
+"""
+export hall_allocation_list
+"""
+request = context.REQUEST
+setheader = request.RESPONSE.setHeader
+pa = context.portal_accommodation
+scat = context.students_catalog
+st_schema = context.students_catalog.schema()
+#fields = list(st_schema) + ["bed",]
+fields = ("id",
+          "name",
+          "hall",
+          "block",
+          "room",
+          "bed",
+          "matric_no",
+          "jamb_reg_no",
+          "sex",
+          "email",
+          "phone",
+          "faculty",
+          "department",
+          "course",
+          "level",
+          )
+res_list = []
+lines = []
+lines.append(','.join(fields))
+format = '"%(' + ')s","%('.join(fields) + ')s"'
+reserved = pa(hall=context.getId())
+for bed in reserved:
+    if bed.student == '':
+        continue
+    erg = scat(id=bed.student)
+    if not erg:
+        continue
+    d = context.getFormattedStudentEntry(erg[0])
+    hall,block,room,bed = bed.bed.split('_')
+    d['hall'] = hall
+    d['block'] = block
+    d['room'] = room
+    d['bed'] = bed
+    lines.append(format % d)
+#setheader('Content-type', 'text/x-cvs')
+#setheader('Content-type','application/vnd.ms-excel')
+setheader('Content-type','text/semicolon-seperated-values')
+setheader('Content-Disposition:', 'attachment; filename="%s.csv"' % hall)
+setheader('Expires',  'Mon, 26 Jul 1997 05:00:00GMT') # Date in the past
+setheader('Cache-Control', 'no-store, no-cache,must-revalidate') # HTTP/1.1
+setheader('Cache-Control', 'post-check=0,pre-check=0')
+setheader('Pragma', 'no-cache') # HTTP/1.0
+return '\n'.join(lines)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/hall_delete.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/hall_delete.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/hall_delete.py	(revision 2226)
@@ -0,0 +1,50 @@
+## Script (Python) "hall_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.
+"""
+
+import logging
+logger = logging.getLogger('Skins.hall_delete')
+member_id = str(context.portal_membership.getAuthenticatedMember())
+
+from Products.CMFCore.utils import getToolByName
+here = context
+
+ti = getToolByName(here, 'portal_types').getTypeInfo(here.portal_type)
+meth_id = ti.queryMethodID('view', 'folder_contents')
+ret_url = here.absolute_url() + '/' + meth_id
+pa = context.portal_accommodation
+
+if ids:
+    halls = []
+    for id in ids:
+        # XXX has to be called from here since the workflow doesn't handle the
+        # deletion yet
+        halls.append(id)
+        ob = getattr(here, id)
+        from Products.CPSCore.EventServiceTool import getPublicEventService
+        evtool = getPublicEventService(here)
+        evtool.notifyEvent('workflow_delete', ob, {})
+        beds = pa(hall=id)
+        urls = []
+        for bed in beds:
+            urls.append(bed.bed)
+        for url in urls:
+            pa.deleteRecord(url)
+    here.manage_delObjects(ids)
+    message = 'portal_status_message=hall(s) %s with %s beds deleted' % (" ".join(halls),len(urls))
+    logger.info('%s deletes hall(s) %s with %s beds' % (member_id," ".join(halls),len(urls)))
+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_not_used/skins/waeup_accommodation/reallocate_bed.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/reallocate_bed.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/reallocate_bed.py	(revision 2226)
@@ -0,0 +1,107 @@
+## Script (Python) "reallocate_bed"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: reallocateBed.py 1206 2007-01-05 18:24:56Z joachim $
+"""
+reallocate beds
+"""
+import logging
+logger = logging.getLogger('Skins.reallocate_bed')
+
+request = context.REQUEST
+redirect = request.RESPONSE.redirect
+mtool = context.portal_membership
+wf = context.portal_workflow
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+path_info = request.get('PATH_INFO').split('/')
+
+if mtool.isAnonymousUser():
+    return None
+students = context.portal_url.getPortalObject().campus.students
+beds = context.portal_accommodation
+studs = context.students_catalog
+student_id = context.getStudentId()
+
+if student_id is not None:
+    logger.info('%s requests bed_change for %s' % (member_id,student_id))
+    info = context.getAccommodationInfo(student_id)
+    res = beds(student=student_id)
+    if len(res) == 0:
+        logger.info('No bed found for %s' % (student_id))
+        redirect("%s/%s" % (students.absolute_url(),student_id))
+    allocated_bed = res[0]
+    status = info['student_status']
+    student = student_id
+    bedtype = context.getBedStatusFromHall(allocated_bed.bed)
+    if not bedtype.endswith("reserved"):
+        logger.info('%s is NOT a reserved bed' % (bedtype))
+        return redirect("%s/%s/%s" % (students.absolute_url(),student,info['acco_id']))
+    logger.info('%s reallocate reserved bed %s/%s' % (student_id,bedtype,status))
+    beds.modifyRecord(bed=allocated_bed.bed,
+                      student='',
+                      bed_type=bedtype)
+    code,bed = beds.searchAndReserveBed(student_id,status)
+    if code > 0:
+        #from Products.zdb import set_trace; set_trace()
+        d = {}
+        d['bed'] = bed
+        d['student_status'] = status
+        acco_info = context.waeup_tool.getHallInfo(bed)
+        d['acco_maint_code'] = acco_info.get('maintenance_code')
+        d['acco_maint_fee'] = acco_info.get('maintenance_fee')
+        acco_doc = info['acco_doc']
+        acco_doc.edit(mapping=d)
+        return redirect("%s/%s/%s" % (students.absolute_url(),student,info['acco_id']))
+    logger.info('%s new bed allocation failed, code = %s' % (student_id,code))
+    return redirect("%s/%s/%s" % (students.absolute_url(),student,info['acco_id']))
+
+info = {}
+#records = [r for r in beds() if  r.student]
+records = beds.uniqueValuesFor('bed')
+list = []
+to_modify = []
+for b in records:
+    r = beds(bed=b)[0]
+    bedtype = context.getBedStatusFromHall(r.bed)
+    if not bedtype.endswith("reserved"):
+        #logger.info('"%s", "allocated bed is NOT reserved","%s"' % (student_id,bedtype))
+        #list.append("Student %s bed_type %s ok" % (r.student,bedtype))
+        continue
+    if not r.student:
+        beds.modifyRecord(bed=b,
+                      bed_type=bedtype)
+        list.append("Empty bed %s set to %s" % (r.bed,bedtype))
+        continue
+    info = context.getAccommodationInfo(r.student)
+    sbt = info.get('student_status',None)
+    if sbt is None:
+        continue
+    list.append("Student %s bed_type %s != %s" % (r.student,
+                                                  r.bed_type,
+                                                  bedtype))
+    to_modify.append((r.bed,r.student,info['student_status'],info['acco_doc'],bedtype))
+for former_bed, student, status,acco_doc,bedtype in to_modify:
+    beds.modifyRecord(bed=former_bed,
+                      student='',
+                      bed_type=bedtype)
+    code,bed = beds.searchAndReserveBed(student,status)
+    if code > 0:
+        #from Products.zdb import set_trace; set_trace()
+        d = {}
+        d['bed'] = bed
+        d['student_status'] = status
+        acco_info = context.waeup_tool.getHallInfo(bed)
+        d['acco_maint_code'] = acco_info.get('maintenance_code')
+        d['acco_maint_fee'] = acco_info.get('maintenance_fee')
+        acco_doc.edit(mapping=d)
+        list.append("Student %s got bed %s, code = %s" % (student,
+                                                              bed,
+                                                              code))
+return "\r".join(list)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/release_bed.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/release_bed.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/release_bed.py	(revision 2226)
@@ -0,0 +1,49 @@
+## Script (Python) "release_bed"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+release an allocated bed
+"""
+import logging
+logger = logging.getLogger('Skins.release_bed')
+
+request = context.REQUEST
+redirect = request.RESPONSE.redirect
+mtool = context.portal_membership
+wf = context.portal_workflow
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+path_info = request.get('PATH_INFO').split('/')
+
+if mtool.isAnonymousUser():
+    return None
+students = context.portal_url.getPortalObject().campus.students
+acco_cat = context.portal_accommodation
+#stud_cat = context.students_catalog
+student_id = context.getStudentId()
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        return
+#set_trace()
+if student_id is not None:
+    logger.info('%s requests bed_release for %s' % (member_id,student_id))
+    res = acco_cat(student=student_id)
+    if len(res) == 0:
+        logger.info('no bed of %s found' % (student_id))
+        redirect("%s/%s" % (students.absolute_url(),student_id))
+    allocated_bed = res[0]
+    acco_cat.modifyRecord(bed=allocated_bed.bed,student='')
+    acco_doc = context.getContent()
+    acco_doc.edit(mapping={'bed':"-- cancelled by section officer --"})
+    logger.info('%s released bed of %s' % (member_id,student_id))
+    redirect("%s" % (context.absolute_url()))
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/reserve_accommodation.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/reserve_accommodation.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/reserve_accommodation.py	(revision 2226)
@@ -0,0 +1,116 @@
+##parameters=REQUEST
+# $Id$
+"""
+process the the accommodation reservation
+"""
+import DateTime
+current = DateTime.DateTime()
+pr = context.portal_registration
+wftool = context.portal_workflow
+lt = context.portal_layouts
+info = context.getAccommodationInfo()
+
+import logging
+logger = logging.getLogger('Skins.reserve_accommodation')
+
+#if info is None:
+#    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+if info is None:
+    member_id = str(context.portal_membership.getAuthenticatedMember())
+    logger.info('%s tried to reserve accommodation' % (member_id))
+    return context.REQUEST.RESPONSE.redirect("%s/srp_invalid_access" % context.portal_url())
+
+mode = 'create'
+if not info['booking_allowed']:
+    return context.REQUEST.RESPONSE.redirect("%s/no_booking_allowed" % info['student'].absolute_url())
+student = info['student']
+acco_id = info['acco_id']
+session = acco_id[-4:]
+validate = REQUEST.has_key("cpsdocument_create_button")
+if info.has_key('acco') and info['acco']:
+    validate = REQUEST.has_key("cpsdocument_edit_button")
+    if info['acco_review_state'] == "maintenance_fee_paid":
+        return context.REQUEST.RESPONSE.redirect("%s/accommodation_view" % info['acco'].absolute_url())
+    else:
+        mode = 'edit'
+d = {}
+button = "Book"
+if mode == 'edit':
+    d['acco_res_date'] = info['acco_doc'].acco_res_date
+    d['acco_res_sc_pin'] = info['acco_doc'].acco_res_sc_pin
+    d['student_status'] = info['acco_doc'].student_status
+    d['bed'] = info['acco_doc'].bed
+    d['session'] = info['acco_doc'].session
+    button = "Pay Maintainance Fee"
+res,psm,ds = lt.renderLayout(layout_id= 'student_accommodation_fe',
+                      schema_id= 'student_accommodation',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob=d,
+                      layout_mode=mode,
+                      formaction = "reserve_accommodation",
+                      button = button
+                      )
+if psm == 'invalid' or info['error'] is not None:
+    member_id = str(context.portal_membership.getAuthenticatedMember())
+    logger.info('%s, %s' % (member_id,info['error'] ))
+    if psm == 'invalid':
+        psm = "Please correct your input."
+    else:
+        psm = "Error in data, unable to reserve bed."
+    return context.accommodation_pin_edit_form(rendered = res,
+                                 psm = psm,
+                                 #psm = "%s, %s" % (psm,ds),
+                                 mode = mode,
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.accommodation_pin_edit_form(rendered = res,
+                                 psm = None,
+                                 mode = mode,
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    s_id = ds.get('s_id')
+    if mode == 'create':
+        pin = str(ds.get('acco_res_sc_pin'))
+        pa = context.portal_accommodation
+        already = pa(student=s_id)
+        if not already:
+            code,bed = pa.searchAndReserveBed(s_id,"%s" % (info['student_status']))
+            #code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status')))
+            if code == -1:
+                return context.accommodation_pin_edit_form(rendered = res,
+                                     psm = "%s" % bed,
+                                     mode = mode,
+                                     ds = ds,
+                                     )
+            elif code == -2:
+                return context.accommodation_pin_edit_form(rendered = res,
+                                     psm = "No bed available. Your category is already fully booked.",
+                                     mode = mode,
+                                     ds = ds,
+                                     )
+        else:
+            bed = already[0].bed
+        student.invokeFactory('StudentAccommodation',acco_id)
+        acco = getattr(student,acco_id)
+        acco_info = context.waeup_tool.getHallInfo(bed)
+        ds.set('acco_maint_code', acco_info.get('maintenance_code'))
+        ds.set('acco_maint_fee', acco_info.get('maintenance_fee'))
+        ds.set('acco_res_date', current)
+        ds.set('bed', bed)
+        ds.set('session', session)
+        ds.set('student_status',info['student_status'])
+        acco.getContent().edit(mapping=ds)
+        #wftool.doActionFor(acco,'pay_maintenance_fee',dest_container=acco)
+        return context.REQUEST.RESPONSE.redirect("%s/reserve_accommodation" % student.absolute_url())
+pin = str(ds.get('acco_main_sc_pin'))
+pp = context.portal_pins
+acco = getattr(student,acco_id)
+ds.set('acco_maint_date', current)
+acco.getContent().edit(mapping=ds)
+wftool.doActionFor(acco,'pay_maintenance_fee',dest_container=acco)
+return context.REQUEST.RESPONSE.redirect("%s/accommodation_view" % student.absolute_url())
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/reservedRoomsVoc.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/reservedRoomsVoc.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/reservedRoomsVoc.py	(revision 2226)
@@ -0,0 +1,16 @@
+##parameters=key=None,doc=None
+# $Id$
+"""
+Return the reservedrooms as an vocabulary
+
+"""
+if doc is None:
+    doc = context.getContent()
+voc = [("_".join((r.split('/')[0].strip(),r.split('/')[1].strip())),r)
+                      for r in doc.reserved_rooms.split(',') if r]
+#from Products.zdb import set_trace;set_trace()
+if not key:
+    return voc
+for k,v in voc:
+    if k == key:
+        return v
Index: WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/statistics_bed_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/statistics_bed_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_accommodation/statistics_bed_view.pt	(revision 2226)
@@ -0,0 +1,28 @@
+<metal:html tal:define="info context/getBedStatistics;"
+            >
+  <metal:body use-macro="here/main_template/macros/master">
+      <metal:main fill-slot="main">
+
+      <a href="acco_folder_view"><strong>Hostels</strong></a>
+      
+      <h3>Total Bed Statistics</h3>  
+      <br />
+        <table tal:condition="info/bed_types"
+             tal:define="bed_types info/bed_types">
+        <tr>
+          <th width="200px">Bed Category</th>
+          <th width="80px">Total</th>
+          <th width="80px">Booked</th>
+        </tr>
+        <tr tal:repeat="bt bed_types">
+          <td tal:content="bt/name" />
+          <td tal:content="bt/total" />
+          <td tal:content="bt/reserved" />
+          <td tal:condition="bt/full|nothing">
+          <strong>Fully booked</strong>
+        </td>
+        </tr>
+      </table>
+    </metal:main>
+  </metal:body>
+</metal:html>      
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/changeDisplayParams.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/changeDisplayParams.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/changeDisplayParams.py	(revision 2226)
@@ -0,0 +1,52 @@
+## Script (Python) "changeDisplayParams"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST
+##title=
+##
+# $Id$
+"""
+Change the order/style of the item display within a folder.
+"""
+from Products.CMFCore.utils import getToolByName
+
+context_url = REQUEST.get('context_url', context.getContextUrl())
+
+ti = getToolByName(context, 'portal_types').getTypeInfo(context.portal_type)
+
+# Retrieve display preference from session
+display_params = REQUEST.SESSION.get('cps_display_params', {})
+
+form = REQUEST.form
+
+if form is not None:
+    # Order and direction
+    display_order = form.get('display_order')
+    # "None" means use folder ordering
+    if display_order == 'None' or not display_order:
+        sort_by = None
+        direction = None
+    else:
+        sort_by, direction = display_order.split('_')
+
+    display_params['sort_by'] = sort_by
+    display_params['direction'] = direction
+
+    # Style
+    format = form.get('display_style')
+    if format:
+        # XXX:
+        # "None" means default here whereas None means "don't change"
+        if format == 'None':
+            format = None
+        display_params['format'] = format
+
+    # Update session
+    REQUEST.SESSION['cps_display_params'] = display_params
+
+meth_id = ti.queryMethodID('view', 'folder_contents')
+redirection_url = context_url + '/' + meth_id
+REQUEST.RESPONSE.redirect(redirection_url)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/content_status_modify.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/content_status_modify.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/content_status_modify.py	(revision 2226)
@@ -0,0 +1,86 @@
+## Script (Python) "content_status_modify"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=workflow_action, REQUEST=None, **kw
+##title=
+##
+# $Id$
+"""
+FIXME: add docstring.
+"""
+
+wftool = context.portal_workflow
+
+if REQUEST is not None:
+    kw.update(REQUEST.form)
+
+comments = kw.get('comments', '')
+
+folder = context.aq_parent
+id = context.getId()
+url = None
+
+psm = 'psm_status_changed'
+
+if workflow_action in ('retract','approve'):
+    # accept, reject, ...
+    if comments:
+        del kw['comments']
+    kw['comment'] = comments
+    res = wftool.doActionFor(context, workflow_action, dest_container=context, **kw)
+    if same_type(res, ()):
+        if res[0] == 'ObjectMoved':
+            rpath = res[1]
+            url = context.portal_url()
+            if not url.endswith('/'):
+                url += '/'
+            url += rpath
+elif workflow_action != 'copy_submit':
+    # accept, reject, ...
+    if comments:
+        del kw['comments']
+    kw['comment'] = comments
+    res = wftool.doActionFor(context, workflow_action, **kw)
+    if same_type(res, ()):
+        if res[0] == 'ObjectMoved':
+            rpath = res[1]
+            url = context.portal_url()
+            if not url.endswith('/'):
+                url += '/'
+            url += rpath
+else:
+    # No section has been specified
+    # XXX We should get a list in here
+    if REQUEST and len(REQUEST.form) < 3:
+        psm = 'psm_you_must_select_sections_for_publishing'
+
+    # publishing: copy and initalize proxy into one or more sections
+    allowed_transitions = wftool.getAllowedPublishingTransitions(context)
+    for transition in allowed_transitions:
+        rpaths = kw.get(transition)
+        if rpaths:
+            if same_type(rpaths, ''):
+                rpaths = (rpaths,)
+            for rpath in rpaths:
+                wftool.doActionFor(context, workflow_action,
+                                   dest_container=rpath,
+                                   initial_transition=transition,
+                                   comment=comments)
+
+if REQUEST is not None:
+    # If the object has been deleted, we can't redirect to it.
+    if url is None:
+        if id in folder.objectIds():
+            url = context.absolute_url()
+        else:
+            url = folder.absolute_url()
+
+    if psm == 'psm_you_must_select_sections_for_publishing':
+        redirect_url = '%s/content_submit_form?%s' % (
+            url, 'portal_status_message=%s'%psm)
+    else:
+        redirect_url = '%s/?%s' % (url, 'portal_status_message=%s'%psm)
+    REQUEST.RESPONSE.redirect(redirect_url)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/cpsdocument_create.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/cpsdocument_create.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/cpsdocument_create.py	(revision 2226)
@@ -0,0 +1,52 @@
+## Script (Python) "cpsdocument_create"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST, cluster=None, type_name=None
+##title=
+##
+# $Id$
+"""
+Called when a document form is posted.
+
+Validates data, then:
+
+ - if there's no error, updates the object and redirects to it,
+
+ - if there's an error, puts data in session and redirects to creation form.
+
+A form uid is propagated during the redirect to uniquely identify the
+form in the session.
+"""
+from urllib import urlencode
+from Products.CMFCore.utils import getToolByName
+from Products.CPSDocument.utils import getFormUidUrlArg
+
+ti = getToolByName(context, 'portal_types').getTypeInfo(type_name)
+
+is_valid, ds = ti.validateObject(None, layout_mode='create',
+                                 request=REQUEST, context=context,
+                                 cluster=cluster, use_session=True)
+
+if is_valid:
+    meth_id = ti.queryMethodID('create_do', 'cpsdocument_create_do')
+    ob = getattr(context, meth_id)(type_name, ds.getDataModel())
+    url = ob.absolute_url()
+    meth_id = ti.queryMethodID('created', None)
+    if meth_id is not None:
+        getattr(context, meth_id)(object=ob)
+    action = ob.getTypeInfo().immediate_view
+    psm = 'psm_content_created'
+    args = {}
+else:
+    url = context.absolute_url()
+    action = 'cpsdocument_create_form'
+    psm = 'psm_content_error'
+    args = {'type_name': type_name}
+    args.update(getFormUidUrlArg(REQUEST))
+
+args['portal_status_message'] = psm
+url = url + '/' + action + '?' + urlencode(args)
+REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/cpsdocument_edit.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/cpsdocument_edit.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/cpsdocument_edit.py	(revision 2226)
@@ -0,0 +1,59 @@
+## Script (Python) "cpsdocument_edit"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST, cluster=None, cpsdocument_edit_and_view_button=None, action=None
+##title=
+##
+# $Id$
+"""
+Called when a document form is posted.
+
+Validates data, then:
+
+ - if there's no error, updates the object and redirects to it,
+
+ - if there's an error, puts data in session and redirects to edit form.
+
+A form uid is propagated during the redirect to uniquely identify the
+form in the session.
+"""
+
+from urllib import urlencode
+from Products.CPSDocument.utils import getFormUidUrlArg
+
+# Until ajax posts directly to its own script...
+if 'ajax_edit' in REQUEST.form:
+    return context.cpsdocument_edit_ajax(REQUEST, cluster=cluster)
+
+# Check flexible controls
+context.editLayouts(REQUEST=REQUEST)
+
+# Validate the document and write it if it's valid
+# (We don't call getEditableContent here, validate does it when needed.)
+doc = context.getContent()
+is_valid, ds = doc.validate(request=REQUEST, proxy=context, cluster=cluster,
+                            use_session=True)
+args = {}
+
+if action is None:
+    ti = doc.getTypeInfo()
+    action = ti.queryMethodID('edit', 'cpsdocument_edit_form')
+    action = '/' + action
+
+if is_valid:
+    comments = REQUEST.get('comments')
+    context.cpsdocument_notify_modification(comments=comments)
+    if cpsdocument_edit_and_view_button is not None:
+        action = ''
+    psm = 'psm_content_changed'
+
+else:
+    psm = 'psm_content_error'
+    args = getFormUidUrlArg(REQUEST)
+if psm:
+    args['portal_status_message'] = psm
+url = context.absolute_url() + action + '?' + urlencode(args)
+REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/cpsdocument_edit_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/cpsdocument_edit_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/cpsdocument_edit_form.pt	(revision 2226)
@@ -0,0 +1,130 @@
+<tal:block define="
+    rendered_main python:here.cpsdocument_edit_render(request=request);
+    form_action string:cpsdocument_edit;
+    creation python:False;
+    edition python:True;
+    metadata metadata|nothing;
+    ">
+<metal:block define-macro="edit_form">
+<metal:block use-macro="here/main_template/macros/master">
+  <metal:block fill-slot="style_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+      tal:attributes="href string:${base_url}document.css" />
+
+    <metal:block define-macro="widgets_javascript">
+    <!-- XXX this has to move to CPSSchemas -->
+    <style type="text/css"
+      tal:content="string:@import url(${base_url}calendar-win2k-1.css);"></style>
+    <script type="text/javascript" src="calendar.js"
+      tal:attributes="src string:${base_url}calendar.js"></script>
+    <script type="text/javascript" src="lang/calendar-en.js"
+      tal:define="local cpsmcat/getSelectedLanguage"
+      tal:attributes="src string:${base_url}lang/calendar-${local}.js"></script>
+    <script type="text/javascript" src="calendar-setup.js"
+      tal:attributes="src string:${base_url}calendar-setup.js"></script>
+    <script type="text/javascript" src="prototype.js"
+      tal:attributes="src string:${base_url}prototype.js"></script>
+    <script type="text/javascript" src="effects.js"
+      tal:attributes="src string:${base_url}effects.js"></script>
+    <script type="text/javascript" src="controls.js"
+      tal:attributes="src string:${base_url}controls.js"></script>
+    <script type="text/javascript" src="cpsdocument.js"
+      tal:attributes="src string:${base_url}cpsdocument.js"></script>
+    <tal:block condition="python:modules['Products.CPSUtil.integration'].isProductPresent('Products.FCKeditor')">
+      <script type="text/javascript">
+        var popup_editor_form = 'popup_fckeditor_form';
+        var width = 640;
+        var height = 520;
+      </script>
+    </tal:block>
+    <tal:block condition="python:modules['Products.CPSUtil.integration'].isProductPresent('Products.Epoz')">
+      <script type="text/javascript">
+        var popup_editor_form = 'popup_rte_form';
+        var width = 640;
+        var height = 480;
+      </script>
+    </tal:block>
+    <script type="text/javascript">
+     function popup_rte(input_id, label_edit) {
+       var args, value;
+       value = document.getElementById(input_id).value;
+       args = '?input_id='+input_id+'&amp;label_edit='+escape(label_edit);
+       str_window_features = 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,dependent=1,width=' + width + ',height=' + height;
+       popup = window.open(popup_editor_form + args, input_id, str_window_features);
+       if (!popup.opener) {
+         popup.opener = window;
+       }
+       return false;
+     }
+   </script>
+   </metal:block>
+  </metal:block>
+
+  <metal:block fill-slot="header">
+    <h3 tal:condition="creation" i18n:translate="">
+      Create a document of type
+      <tal:block i18n:name="type_name" i18n:translate=""
+            tal:define="type_name request/type_name;
+                        type_info python:here.portal_types[type_name]"
+            tal:content="type_info/Title">Type Title</tal:block>
+    </h3>
+    <h1 tal:condition="not:creation">
+      <tal:block condition="python: edition and not metadata"
+        i18n:translate="">Edit <span id="page_title" i18n:name="title"
+        tal:content="here/title_or_id">Page Title</span></tal:block>
+      <tal:block tal:condition="metadata"
+        i18n:translate="">Metadata of <span i18n:name="title" tal:content="here/title_or_id">Page Title</span></tal:block>
+    </h1>
+  </metal:block>
+
+  <metal:block fill-slot="main">
+    <form action="ACTION" method="post" id="editForm"
+          enctype="multipart/form-data" class="workflow"
+          tal:attributes="action form_action">
+      <div class="group">
+        <div class="documentFields">
+          <tal:block define="getFormUidHtml nocall:modules/Products.CPSDocument.utils/getFormUidHtml"
+                     replace="structure python:getFormUidHtml(request)"/>
+          <input type="hidden" name="type_name" value="VALUE"
+                 tal:condition="creation"
+                 tal:attributes="value request/type_name" />
+          <input type="hidden" id="button_placeholder" name="button_placeholder" value="" />
+          <div id="rendered_main" tal:content="structure rendered_main">
+            CONTENT
+          </div>
+        </div>
+
+        <tal:block condition="not:creation">
+          <div class="tooltipArea" style="visibility: hidden;"
+               id="transition_comments_help"
+               onclick="showElement(false, 'transition_comments_help')"
+               i18n:translate="help_transition_comments_modification">
+            In this field you can give the reason for the modification
+            on this document. Your comments may be used to notify other users.
+          </div>
+          <dl>
+            <dt><label for="comments"
+                       i18n:translate="transition_comments_modification"
+                       >Reason of the modification</label>
+              <button type="button" class="tooltipControl"
+                      onclick="toggleElementVisibility('transition_comments_help')"> ? </button>
+            </dt>
+            <dd>
+              <textarea name="comments" id="comments" cols="60" rows="3"
+                        tal:content="nothing">
+              </textarea>
+            </dd>
+          </dl>
+        </tal:block>
+
+        <metal:block use-macro="here/cpsdocument_edit_buttons/macros/buttons"/>
+      </div>
+    </form>
+    <div id="ajax_psm" style="display:none">
+      ajax feedback
+    </div>
+  </metal:block>
+
+</metal:block>
+</metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/cpsskins_lib.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/cpsskins_lib.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/cpsskins_lib.pt	(revision 2226)
@@ -0,0 +1,25 @@
+<metal:block define-macro="portalboxgroup">
+  <tal:block condition="render_box"
+  define="padding content/padding|string:0">
+
+    <div tal:define="rendered python: content.render_cache(options=options,shield=shield, context_obj=here, enable_esi=enable_esi, boxedit=boxedit, template=template);
+                     margin here/margin|string:0"
+         tal:condition="python: rendered != ''"
+         tal:attributes="style string:text-align:${content/align};; padding:$margin"
+         tal:content="structure rendered" />
+  </tal:block>
+
+  <div class="boxGroupBoundingBox" tal:condition="not:render_box">
+    <div class="boxGroupBoxSlotTitle" i18n:domain="cpsskins">
+      <tal:block define="title string:_Slot name_" i18n:translate=""
+       content="python: mcat and mcat(title) or title" />:
+      <tal:block content="content/box_group" />
+    </div>
+    <div tal:attributes="style string:padding:${content/padding}">
+      <img tal:attributes="src python: base_url + content.getIcon(1)"
+       width="16" height="16" />
+      <tal:block content="content/title" />
+    </div>
+  </div>
+
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/custom.css.dtml
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/custom.css.dtml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/custom.css.dtml	(revision 2226)
@@ -0,0 +1,93 @@
+<dtml-with stylesheet_properties>
+
+table.registration td {
+  white-space: nowrap;
+  background-color: transparent;
+  color: gray;
+}
+
+table.registration td.active{
+  white-space: nowrap;
+  color: #00C600;
+  font-weight: bold;
+}
+
+table.registration td a {
+  white-space: nowrap;
+  color: gray;
+}
+
+table.registration td a:visited {
+  white-space: nowrap;
+  color: gray;
+}
+
+table.registration td a:hover {
+  text-decoration: none;
+  white-space: nowrap;
+}
+
+table.registration td.active a {
+  white-space: nowrap;  
+  color: #00C600;
+}
+
+table.registration td.active a:visited {
+  white-space: nowrap;  
+  color: #00C600;
+}
+
+table.registration td.active a:hover {
+  text-decoration: underline;
+  white-space: nowrap;  
+}
+
+table.registration td.stopped{
+  white-space: nowrap;
+  color: red;
+  font-weight: bold;
+}
+
+table.registration td.stopped a {
+  white-space: nowrap;  
+  color: red;
+}
+
+table.registration td.stopped a:visited {
+  white-space: nowrap;  
+  color: red;
+}
+
+table.registration td.stopped a:hover {
+  text-decoration: underline;
+  white-space: nowrap;  
+}
+
+table.registration td.unsuccessful{
+  white-space: nowrap;
+  color: gray;
+  text-decoration:line-through; 
+  font-weight: bold;
+}
+
+table.registration td.unsuccessful a {
+  white-space: nowrap;  
+  color: gray;
+  text-decoration:line-through; 
+}
+
+table.registration td.unsuccessful a:visited {
+  white-space: nowrap;  
+  color: gray;
+  text-decoration:line-through; 
+}
+
+table.registration td.unsuccessful a:hover {
+  color: gray;
+  text-decoration: underline; 
+  white-space: nowrap;  
+}
+
+
+</dtml-with>
+            
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/folder_delete.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/folder_delete.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/folder_delete.py	(revision 2226)
@@ -0,0 +1,47 @@
+## 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.
+"""
+
+import logging
+logger = logging.getLogger('Skins.folder_delete')
+member_id = str(context.portal_membership.getAuthenticatedMember())
+
+from Products.CMFCore.utils import getToolByName
+here = context
+
+#if context.portal_type == "University":
+#    here = context.academics
+
+ti = getToolByName(here, 'portal_types').getTypeInfo(here.portal_type)
+meth_id = ti.queryMethodID('view', 'folder_contents')
+ret_url = here.absolute_url() + '/' + meth_id
+
+
+
+if ids:
+    for id in ids:
+        # XXX has to be called from here since the workflow doesn't handle the
+        # deletion yet
+        if context.portal_type == "CoursesFolder":
+            context.courses_catalog.deleteRecord(id)
+        ob = getattr(here, id)
+        from Products.CPSCore.EventServiceTool import getPublicEventService
+        evtool = getPublicEventService(here)
+        evtool.notifyEvent('workflow_delete', ob, {})
+    here.manage_delObjects(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_not_used/skins/waeup_custom/functions.js.dtml
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/functions.js.dtml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/functions.js.dtml	(revision 2226)
@@ -0,0 +1,330 @@
+<dtml-comment>
+CPS JavaScript functions
+$Id: functions.js.dtml 32288 2006-01-26 17:36:06Z tziade $
+</dtml-comment>
+
+<dtml-let last_modified="_.DateTime()-14" expires="_.DateTime()+1" >
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Content-Type', 'text/javascript' )">
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Last-Modified', last_modified.toZone('GMT').rfc822() )">
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Cache-Control', 'max-age=36000, must-revalidate' )">
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Expires', expires.toZone('GMT').rfc822() )" >
+</dtml-let>
+
+var msie5 = (navigator.userAgent.indexOf('MSIE 5') != -1);
+
+//************************************************************
+// Folder content
+var isSelected = false;
+
+function toggleSelect(toggleSelectButton, selectAllText, deselectAllText) {
+  formElements = toggleSelectButton.form.elements;
+
+  if (isSelected) {
+    for (i = 0; i < formElements.length; i++) {
+      formElements[i].checked = false;
+    }
+    isSelected = false;
+    toggleSelectButton.value = selectAllText;
+  } else {
+    for (i = 0; i < formElements.length; i++) {
+      formElements[i].checked = true;
+    }
+    isSelected = true;
+    toggleSelectButton.value = deselectAllText;
+  }
+}
+
+//************************************************************
+/**
+ * Toggles an element's visibility.
+ * Function to show tooltips.
+ * If your element is a span, you must use inline display instead of block
+ * XXX recognize div and span then automaticly choose the best display rule
+ */
+function toggleElementVisibility(id) {
+  element = document.getElementById(id);
+  if (element) {
+    //window.alert(element.tagName)
+    if (element.style.visibility == 'hidden') {
+      element.style.visibility = 'visible';
+      if (element.tagName == 'DIV') {
+        element.style.display = 'block';
+      } else if (element.tagName == 'SPAN') {
+        element.style.display = 'inline';
+      } else {
+        element.style.display = 'block';
+      }
+    } else {
+      element.style.visibility = 'hidden';
+      element.style.display = 'none';
+    }
+  }
+}
+
+function showElement(show, id) {
+  element = document.getElementById(id);
+  if (element) {
+    //window.alert(element.tagName)
+    if (show) {
+      element.style.visibility = 'visible';
+      if (element.tagName in ['DIV', 'P']) {
+        element.style.display = 'block';
+      } else {
+        element.style.display = 'inline';
+      }
+    } else {
+      element.style.visibility = 'hidden';
+      element.style.display = 'none';
+    }
+  }
+}
+
+//************************************************************
+function trim(s) {
+  if (s) {
+    return s.replace(/^\s*|\s*$/g, "");
+  }
+  return "";
+}
+
+//************************************************************
+function checkEmptySearch(formElem) {
+  var query = trim(formElem.SearchableText.value);
+  if (query != '') {
+    formElem.SearchableText.value = query;
+    return true;
+  }
+  formElem.SearchableText.value = query;
+  formElem.SearchableText.focus();
+  return false;
+}
+
+//************************************************************
+/**
+ * Sets focus on <input> elements that have a class attribute
+ * containing the class 'focus'.
+ * Examples:
+ * <input type="text" id="username" name="__ac_name" class="focus"/>
+ * <input type="text" id="searchableText" class="standalone giant focus"/>
+ *
+ * This function does not work on crappy MSIE5.0 and MSIE5.5.
+ */
+function setFocus() {
+  if (msie5) {
+    return false;
+  }
+  var elements = document.getElementsByTagName('input');
+  for (var i = 0; i < elements.length; i++) {
+    var nodeClass = elements[i].getAttributeNode('class');
+    //alert("nodeClass = " + nodeClass);
+    if (nodeClass) {
+      var classes = nodeClass.value.split(' ');
+      for (var j = 0; j < classes.length; j++) {
+        if (classes[j] == 'focus') {
+          elements[i].focus();
+          return true;
+        }
+      }
+    }
+  }
+}
+
+/**
+ * Validates that the input fields designated by the given ids are not empty.
+ * It returns true if all the input fields are not empty, it returns false
+ * otherwise.
+ * Example:
+ * <form onsubmit="return validateRequiredFields(['field1', 'field2'],
+ * ['Title', 'Comments'], 'are empty while they are required fields.')">
+ */
+function validateRequiredFields(fieldIds, fieldLabels, informationText) {
+  for (i = 0; i < fieldIds.length; i++) {
+    element = document.getElementById(fieldIds[i]);
+    if (element && !element.value) {
+      window.alert("'" + fieldLabels[i] + "' " + informationText);
+      return false;
+    }
+  }
+  return true;
+}
+
+//************************************************************
+function getSelectedRadio(buttonGroup) {
+  if (buttonGroup[0]) {
+    for (var i=0; i<buttonGroup.length; i++) {
+      if (buttonGroup[i].checked) {
+        return i
+      }
+    }
+  } else {
+    if (buttonGroup.checked) { return 0; }
+  }
+  return -1;
+}
+
+function getSelectedRadioValue(buttonGroup) {
+  var i = getSelectedRadio(buttonGroup);
+  if (i == -1) {
+    return "";
+  } else {
+    if (buttonGroup[i]) {
+    return buttonGroup[i].value;
+    } else {
+    return buttonGroup.value;
+    }
+  }
+}
+
+function getSelectedRadioId(buttonGroup) {
+  var i = getSelectedRadio(buttonGroup);
+  if (i == -1) {
+    return "";
+  } else {
+    if (buttonGroup[i]) {
+      return buttonGroup[i].id;
+    } else {
+      return buttonGroup.id;
+    }
+  }
+}
+
+/**
+ * Return the label content corresponding to a radio selection
+ */
+function getSelectedRadioLabel(buttonGroup) {
+  var id = getSelectedRadioId(buttonGroup);
+  if (id == "") {
+    return "";
+  } else {
+    for (var i=0; i<document.getElementsByTagName("label").length; i++) {
+      var element_label = document.getElementsByTagName("label")[i];
+      if (element_label.htmlFor == id) {
+        return element_label.firstChild.nodeValue;
+      }
+    }
+  }
+}
+
+
+//************************************************************
+/*
+    Used to highlight search terms
+    from Geir Bækholt, adapted for CPS
+
+ */
+function highlightSearchTerm() {
+  var query_elem = document.getElementById('searchGadget')
+  if (! query_elem){
+    return false
+  }
+  var query = query_elem.value
+  // _robert_ ie 5 does not have decodeURI
+  if (typeof decodeURI != 'undefined'){
+    query = unescape(decodeURI(query)) // thanks, Casper
+  }
+  else {
+    return false
+  }
+  if (query){
+    queries = query.replace(/\+/g,' ').split(/\s+/)
+    // make sure we start the right place and not higlight menuitems or breadcrumb
+    searchresultnode = document.getElementById('searchResults')
+    if (searchresultnode) {
+      for (q=0;q<queries.length;q++) {
+        // don't highlight reserved catalog search terms
+        if (queries[q].toLowerCase() != 'not'
+          && queries[q].toLowerCase() != 'and'
+          && queries[q].toLowerCase() != 'or') {
+          climb(searchresultnode,queries[q]);
+        }
+      }
+    }
+  }
+}
+
+function climb(node, word){
+  // traverse childnodes
+  if (! node){
+    return false
+  }
+  if (node.hasChildNodes) {
+    var i;
+    for (i=0;i<node.childNodes.length;i++) {
+      climb(node.childNodes[i],word);
+    }
+    if (node.nodeType == 3) {
+      checkforhighlight(node, word);
+      // check all textnodes. Feels inefficient, but works
+    }
+  }
+}
+
+function checkforhighlight(node,word) {
+  ind = node.nodeValue.toLowerCase().indexOf(word.toLowerCase())
+  if (ind != -1) {
+    if (node.parentNode.className != "highlightedSearchTerm"){
+      par = node.parentNode;
+      contents = node.nodeValue;
+      // make 3 shiny new nodes
+      hiword = document.createElement("span");
+      hiword.className = "highlightedSearchTerm";
+      hiword.appendChild(document.createTextNode(contents.substr(ind,word.length)));
+      par.insertBefore(document.createTextNode(contents.substr(0,ind)),node);
+      par.insertBefore(hiword,node);
+      par.insertBefore(document.createTextNode( contents.substr(ind+word.length)),node);
+      par.removeChild(node);
+    }
+  }
+}
+
+/************************************************************
+/**
+ * searchLanguage widget functions
+ * used to auto select languages checkbox/radio
+ * cf CPSSchemas/skins/cps_schemas/widget_searchlanguage_render.pt
+ */
+function searchLanguageCheckSelected(languages, no_language, language) {
+  var count=0;
+  for (var i=0; i<languages.length; i++) {
+    if (languages[i].checked) {
+      count++;
+    }
+  }
+  no_language.checked = (count <= 0);
+  language.checked = (count > 0);
+}
+
+function searchLanguageClearSelected(languages) {
+  for (i=0; i<languages.length; i++) {
+    languages[i].checked = 0;
+  }
+}
+
+function toggleLayers(more_block, more_items) {
+  var objMoreBlock = document.getElementById(more_block).style;
+  var objMoreItems = document.getElementById(more_items).style;
+  if(objMoreBlock.display == "block")
+    objMoreBlock.display = "none";
+  if(objMoreItems.display == "none")
+    objMoreItems.display = "block";
+}
+
+/************************************************************
+/**
+ * waeup specific functions
+ */
+
+/**
+ * submit_once(): Avoid multiple sendings of forms...
+ */
+
+submitted = false;
+function submit_once() {
+    if (submitted) {
+        alert("Your request is being processed.\nPlease be patient.");
+        event.returnValue = 0;    // work-around for IE
+        return 0;
+    }
+    submitted = true;
+    return 1;
+}
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/getBatchList.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/getBatchList.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/getBatchList.py	(revision 2226)
@@ -0,0 +1,106 @@
+## Script (Python) "getBatchList"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=items=[], columns=1, items_per_page=10, zoom=0, max_items=400
+##title=
+##
+# $Id$
+"""
+Given the desired number of colums, constructs a list of batches to render
+as much columns as necessary within a single macro.
+As well, return the page results link to display straight for the navigation
+"""
+
+from math import ceil
+from ZTUtils import Batch
+
+#
+# First constructing the batch
+#
+
+len_items = len(items)
+
+# desperately empty, no need to go further
+if not len_items:
+    return [], {}, []
+
+if max_items and max_items < len_items:
+    items = items[:max_items]
+    len_batch = max_items
+else:
+    len_batch = len_items
+
+b_start = int(context.REQUEST.get('b_start', 0))
+
+# extract the n first items in a zoomed list
+zoomed = []
+if not b_start and zoom:
+    zoom = int(zoom)
+    zoomed = Batch(items[:zoom], zoom, 0)
+    # deal with items left
+    items = items[zoom:]
+
+items_per_page = float(items_per_page)
+size = int(ceil(items_per_page / columns))
+
+b1 = Batch(items, size, b_start, orphan=0)
+batches = [b1]
+
+b_next = b1
+for c in range(columns - 1):
+    if b_next.next:
+        b_next = b_next.next
+        batches.append(b_next)
+
+#
+# Now the page results parameters
+#
+
+# Calculate the number of pages
+nb_pages = int(ceil(len_batch / items_per_page))
+
+# no more advanced arithmetics
+items_per_page = int(items_per_page)
+
+# Test if we are on the last page
+limit = b_start + items_per_page
+if  limit > len_batch:
+    limit = len_batch
+
+batch_info = {'nb_pages': nb_pages,
+              'start': b_start + 1,
+              'limit': limit,
+              'length': len_items,
+              'previous': None,
+              'next': None,
+              }
+
+# for the nb of items
+j = 0
+# for the current position in the search
+current = [0, 1]
+# list of b_start values
+pages = []
+
+# Loop over the number of pages and construct the page link
+for i in range(nb_pages):
+    pages.append(j)
+    if b_start == j:
+        current = [i + 1, j]
+    j += items_per_page
+
+# list of b_start to other pages
+batch_info['pages'] = pages
+
+# if we are not at the beginning of the file
+if current[0] > 1:
+    batch_info['previous'] = current[1] - items_per_page
+
+# Adding the next link if we are not at the end of the list
+if current[0] != nb_pages:
+    batch_info['next'] = current[1] + items_per_page
+
+return batches, batch_info, zoomed
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/getCPSCandidateLocalRoles.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/getCPSCandidateLocalRoles.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/getCPSCandidateLocalRoles.py	(revision 2226)
@@ -0,0 +1,27 @@
+## Script (Python) "getCPSCandidateLocalRoles"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+XXX content moved into portal_membership
+
+Override this template if you have new portal types or new roles with a
+specific mapping to register.
+"""
+from Products.CMFCore.utils import getToolByName
+mtool = getToolByName(context, 'portal_membership')
+member = mtool.getAuthenticatedMember()
+
+
+allowed_roles = mtool.getCPSCandidateLocalRoles(context)
+
+
+if member.id in ("admin","perry"):
+    return ['SectionReader','SectionManager','ClearanceOfficer', 'SectionOfficer', 'CourseAdviser']
+return ['SectionReader', 'ClearanceOfficer', 'SectionOfficer', 'CourseAdviser']
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/getContentInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/getContentInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/getContentInfo.py	(revision 2226)
@@ -0,0 +1,337 @@
+## Script (Python) "getContentInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=proxy=None, doc=None, level=0, cpsmcat=None
+##title=
+##
+# $Id$
+"""
+Return information about a content item (ie a proxy)
+
+level: 0 (default cost 1)
+  id, title, title_or_id, review_state, icon, rev, lang, type
+  time_str, creator, rpath, url
+level: 1 (cost 1.3)
+  level 0 + descr, size + doc + additional information from obj
+level: 2 (cost 4.6)
+  level 1 + states
+level: 3 (cost 7)
+  level 2 + history
+level: 4 (cost ???)
+  level 3 + archived
+"""
+
+from zLOG import LOG, DEBUG
+from Products.CMFCore.utils import getToolByName
+from AccessControl import Unauthorized
+
+# how many characters for the description
+DESCRIPTION_MAX_LENGTH = 150
+
+if cpsmcat is None:
+    cpsmcat = context.translation_service
+
+if proxy is None:
+    proxy = context
+
+wtool = getToolByName(context, 'portal_workflow')
+utool = getToolByName(context, 'portal_url')
+ptool = getToolByName(context, 'portal_proxies')
+mtool = getToolByName(context, 'portal_membership')
+portal = utool.getPortalObject()
+
+rpath = None
+if hasattr(proxy.aq_explicit, 'getRID'):
+    # this is a brain
+    # rpath is build with catalog path that include languageView selection
+
+    # FIXME: something is broken here when using virtual host monsters
+    rpath = utool.getRpathFromPath(proxy.getPath())
+
+    # change view to switch to have a sticky behaviour
+    from Products.CPSCore.utils import KEYWORD_SWITCH_LANGUAGE, \
+         KEYWORD_VIEW_LANGUAGE
+    rpath = rpath.replace(KEYWORD_VIEW_LANGUAGE, KEYWORD_SWITCH_LANGUAGE)
+    proxy = proxy.getObject()
+
+bmt = getattr(portal, 'Benchmarktimer', None)
+if bmt is not None:
+    bmt = bmt('getContentInfo for ' + proxy.getId(), level=-3)
+    bmt.setMarker('start')
+
+def getRpathTitle(rpath):
+    """Get object's title, or None if Unauthorized or nonexisting."""
+    try:
+        ob = portal.restrictedTraverse(rpath, None)
+        if ob is None:
+            return None
+        return ob.Title()
+    except Unauthorized:
+        return None
+
+
+def compute_states(no_history=0):
+    wf_vars = ['review_state', 'time']
+    docid = proxy.getDocid()
+    if docid:
+        proxies_info = ptool.getProxyInfosFromDocid(docid,
+                                                    workflow_vars=wf_vars)
+    else:
+        # Not a proxy
+        ob_info = {
+            'rpath': utool.getRpath(proxy),
+            'language_revs': {'en': 0},
+            'visible': mtool.checkPermission('View', proxy),
+            }
+        for var in wf_vars:
+            ob_info[var] = wtool.getInfoFor(proxy, var, None)
+        proxies_info = [ob_info]
+    states = []
+    for proxy_info in proxies_info:
+        # take in account only accessible proxies
+        if not proxy_info['visible']:
+            continue
+
+        lrpath = proxy_info['rpath'].split('/')
+        folder_rpath = '/'.join(lrpath[:-1])
+        folder_title = getRpathTitle(folder_rpath)
+        if not folder_title:
+            # Unauthorized
+            if len(lrpath) > 1:
+                folder_title = lrpath[-2]
+            else:
+                folder_title = '?'
+
+        proxy_info_proxy = None
+        portal_type = None
+        if proxy_info.has_key('object'):
+            proxy_info_proxy = proxy_info['object']
+            if hasattr(proxy_info_proxy, 'portal_type'):
+                portal_type = proxy_info_proxy.portal_type
+
+        d = {'rpath': folder_rpath,
+             'title': folder_title,
+             'type': portal_type,
+             'review_state': proxy_info['review_state'],
+             'rev': str(proxy_info['language_revs'].values()[0]),
+             'language': proxy_info['language_revs'].keys()[0],
+             'time': proxy_info['time'],
+             'time_str': context.getDateStr(proxy_info['time']),
+             'proxy': proxy_info_proxy,
+             }
+        d['lang'] = d['language']       # for compatibility
+        states.append(d)
+
+    history = []
+    if not no_history:
+        review_history = wtool.getFullHistoryOf(proxy)
+        if not review_history:
+            review_history = wtool.getInfoFor(proxy, 'review_history', ())
+            remove_redundant = 0
+        else:
+            remove_redundant = 1
+        for d in review_history:
+            if not (d.has_key('actor')
+                    and d.has_key('time')
+                    and d.has_key('action')):
+                continue
+            action = d['action']
+            # Internal transitions hidden from the user.
+            if action in ('unlock', 'checkout_draft_in'):
+                continue
+            # Skip redundant history (two transition when publishing).
+            if action == 'copy_submit' and remove_redundant:
+                continue
+            # Transitions involving a destination container.
+            if action in ('submit', 'copy_submit'):
+                d['has_dest'] = 1
+                dest_container = d.get('dest_container') or '?'
+                d['dest_container'] = dest_container
+                dest_title = getRpathTitle(dest_container)
+                if not dest_title:
+                    # Unauthorized
+                    dest_title = dest_container.split('/')[-1]
+                d['dest_title'] = dest_title
+            d['time_str'] = context.getDateStr(d['time'])
+            history.append(d)
+
+    def cmp_rs(a, b):
+        return -cmp(a['review_state'], b['review_state'])
+    states.sort(cmp_rs)
+
+    def cmp_date(a, b):
+        return -cmp(a['time'], b['time'])
+    history.sort(cmp_date)
+
+    return states, history
+
+def compute_archived():
+    archived = proxy.getArchivedInfos()
+    # Keep only frozen revisions.
+    archived = [d for d in archived if d['is_frozen']]
+    archived.reverse()
+    for d in archived:
+        d['time_str'] = context.getDateStr(d['modified'])
+    return archived
+
+# basic information level 0
+info = {}
+if rpath is None:
+    info['rpath'] = utool.getRpath(proxy)
+else:
+    info['rpath'] = rpath
+
+info['url'] = utool.getUrlFromRpath(info['rpath'])
+
+info['title_or_id'] = proxy.id
+info['id'] = proxy.getId()
+try:
+    info['title'] = proxy.Title() #proxy.Title()
+except AttributeError:
+    raise AttributeError, 'invalid object: %s in %s' % (info['title_or_id'],
+                                                             info['rpath'])
+except TypeError:
+    info['title'] = proxy.getContent().id
+
+info['icon'] = proxy.getIcon(relative_to_portal=1)
+info['type'] = proxy.getPortalTypeName()
+
+if proxy.getTypeInfo() is not None:
+    info['type_l10n'] = cpsmcat(proxy.getTypeInfo().Title())
+else:
+##    LOG("getContentInfo() pb getting Type Information",
+##        DEBUG,
+##        'Proxy :',
+##        proxy)
+    info['type_l10n'] = ''
+info['review_state'] = wtool.getInfoFor(proxy, 'review_state', '')
+try:
+    info['rev'] = str(proxy.getRevision())
+    info['lang'] = proxy.getLanguage()
+except AttributeError:
+    # not a proxy
+    # FIXME: default lang should not be hardcoded
+    info['rev'] = '0'
+    info['lang'] = 'en'
+info['time'] = proxy.modified()
+
+# level 1
+if level > 0:
+    if doc is None:
+        doc = proxy.getContent()
+    if doc.portal_type == 'Course':
+        info['credits'] = doc.credits
+        info['semester'] = doc.semester
+        info['passmark'] = doc.passmark
+    elif doc.portal_type == 'CertificateCourse':
+        core = 'core'
+        if not doc.core_or_elective:
+            core = 'elective'
+        info['core_or_elective'] = core
+    elif doc.portal_type == 'Student':
+        try:
+            info['clearance'] = proxy.clearance.getContent()
+        except AttributeError:
+            info['clearance'] = None
+    info['time'] = doc.modified()
+    info['doc'] = doc
+    if hasattr(doc,"LongTitle"):
+        info['long_title'] = doc.LongTitle()
+    description = doc.Description() or ''
+    if len(description) > DESCRIPTION_MAX_LENGTH:
+        description = description[:DESCRIPTION_MAX_LENGTH] + '...'
+    info['description'] = description
+    if hasattr(doc.aq_explicit, 'get_size'):
+        try:
+            size = doc.get_size()
+        except:
+            size = 0
+        if size and size < 1024:
+            info['size'] = '1 K'
+        elif size > 1048576:
+            info['size'] = '%.02f M' % float(size/1048576.0)
+        elif size:
+            info['size'] = str(int(size)/1024)+' K'
+
+    if hasattr(doc.aq_explicit, 'start'):
+        if callable(doc.start):
+            start = doc.start()
+        else:
+            start = doc.start
+        if start:
+            info['start'] = start
+            info['start_str'] = context.getDateStr(start)
+
+    if hasattr(doc.aq_explicit, 'end'):
+        if callable(doc.end):
+            end = doc.end()
+        else:
+            end = doc.end
+        if end:
+            info['end'] = end
+            info['end_str'] = context.getDateStr(end)
+
+    for dc in ('Creator', 'Rights', 'Language',
+               'contributors', 'source', 'relation', 'coverage'):
+        key = dc.lower()
+        if key == 'contributors':
+            key = 'contributor'         # this is the real DC name
+        try:
+            meth = getattr(doc, dc)
+            if callable(meth):
+                value = meth()
+            else:
+                value = meth
+            if value and not same_type(value, ''):
+                value = ', '.join(value)
+            info[key] = value
+        except:
+            info[key] = ''
+
+    if hasattr(doc.aq_explicit, 'hidden_folder'):
+        info['hidden'] = doc.hidden_folder
+    else:
+        info['hidden'] = 0
+
+    if hasattr(doc.aq_explicit, 'getAdditionalContentInfo'):
+        add_info = doc.getAdditionalContentInfo(proxy)
+        info.update(add_info)
+
+    if info['review_state'] == 'published':
+        now = context.ZopeTime()
+        eff = doc.effective()
+        exp = doc.expires()
+        if now < eff:
+            info['review_state'] = 'deferred'
+            info['review_state_date'] = context.getDateStr(eff)
+        elif now > exp:
+            info['review_state'] = 'expired'
+            info['review_state_date'] = context.getDateStr(exp)
+
+# level 2
+if level == 2:
+    info['states'], ignore = compute_states(1)
+
+# level 3
+if level >= 3:
+    info['states'], info['history'] = compute_states()
+
+# level 4
+if level >= 4:
+    info['archived'] = compute_archived()
+
+info['level'] = level
+if info['time']:
+    info['time_str'] = context.getDateStr(info['time'])
+else:
+    info['time_str'] = ''
+
+
+if bmt is not None:
+    bmt.setMarker('stop')
+    bmt.saveProfile(context.REQUEST)
+
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/getCreatableItems.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/getCreatableItems.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/getCreatableItems.py	(revision 2226)
@@ -0,0 +1,29 @@
+## Script (Python) "getCreatableItems"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+items = []
+utool = context.portal_url
+base_url = utool.getBaseUrl()
+#return context.getPortalTypeName()
+
+if context.getPortalTypeName() == 'Portal':
+    return items
+
+content_types = context.getSortedContentTypes(allowed=1)
+renderIcon = context.portal_cpsportlets.renderIcon
+
+for ptype in content_types:
+    ptype_id = ptype.getId()
+    items.append({
+        'title': ptype.Title(),
+        'id': ptype_id,
+        'icon_tag': renderIcon(ptype_id, base_url, '')
+    })
+
+return items
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/getCustomDisplayParams.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/getCustomDisplayParams.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/getCustomDisplayParams.py	(revision 2226)
@@ -0,0 +1,44 @@
+## Script (Python) "getCustomDisplayParams"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+FIXME: docstring?
+"""
+if context.isInWorkspace():
+    custom_params = {'format': 'detail_tab',
+                     'sort_by': None,
+                     'direction': 'asc',
+                     'items_per_page': 50,
+                     'nav_action': 'folder_view',
+                     'filter': 0,
+                     'detail_tab_columns': ['title', 'type', 'size', 
+                                'date', 'author','status', 'version'],
+                    }
+
+else:
+    custom_params =  {'format': None,
+                      'sort_by': None,
+                      'direction': 'asc',
+                      'items_per_page': 100,
+                      'nav_action': 'folder_view',
+                      'filter': 0,
+                      'detail_tab_columns': ['long_title',
+                                             'id',
+                                              #'typetext',
+                                              #'size',
+                                              #'date', 
+                                              #'author', 
+                                              'status', 
+                                              #'version'
+                                              ],
+                     }
+
+return custom_params
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/getDateStr.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/getDateStr.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/getDateStr.py	(revision 2226)
@@ -0,0 +1,84 @@
+## Script (Python) "getDateStr"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=dt=None, fmt='medium'
+##title=
+##
+# $Id$
+"""
+Return a string date using the current locale.
+"""
+
+# TODO: don't call Localizer directly
+
+from DateTime.DateTime import DateTimeError
+
+if not dt:
+    return ''
+if fmt in ('iso8601_medium',):
+    dfmt = '%Y-%m-%dT%H:%MZ'
+elif fmt in ('medium','iso8601_medium_easy'):
+    dfmt = '%Y-%m-%d %H:%M'
+elif fmt in ('iso8601_short', 'iso8601'):
+    dfmt = '%Y-%m-%d'
+elif fmt == 'iso8601_long':
+    dfmt = '%Y-%m-%dT%H:%M:%SZ'
+elif fmt == 'iso8601_long_easy':
+    dfmt = '%Y-%m-%d %H:%M:%S'
+else:
+    dfmt = fmt
+try:
+    ret = dt.strftime(dfmt)
+    # XXX remove this as soon as strftime is fixed
+    # space hack to fix %p strftime bug when LC_ALL=fr_FR
+    if (dfmt.endswith('%p') and not ret.endswith('M')):
+        h = int(dt.strftime('%H'))
+        if h > 12:
+            ret += ' PM'
+        else:
+            ret += ' AM'
+except (DateTimeError,ValueError):
+    ret = 'Invalid'
+    
+return ret
+
+
+mcat = context.translation_service
+
+if fmt in ('short', 'medium', 'long'):
+    # This string will be used to retrieve format in the right .po file
+    fmt = 'date_' + fmt
+# For iso8601 dates read http://www.w3.org/TR/NOTE-datetime
+elif fmt not in ('iso8601', 'iso8601_short', 'iso8601_medium', 'iso8601_long',
+                 'iso8601_medium_easy', 'iso8601_long_easy'):
+    fmt = 'iso8601_medium_easy'
+
+try:
+    if fmt == 'iso8601_short' or fmt == 'iso8601':
+        dfmt = '%Y-%m-%d'
+    elif fmt == 'iso8601_medium':
+        dfmt = '%Y-%m-%dT%H:%MZ'
+    elif fmt == 'iso8601_medium_easy':
+        dfmt = '%Y-%m-%d %H:%M'
+    elif fmt == 'iso8601_long':
+        dfmt = '%Y-%m-%dT%H:%M:%SZ'
+    elif fmt == 'iso8601_long_easy':
+        dfmt = '%Y-%m-%d %H:%M:%S'
+    else:
+        dfmt = mcat(fmt)
+    ret = dt.strftime(dfmt)
+    # XXX remove this as soon as strftime is fixed
+    # space hack to fix %p strftime bug when LC_ALL=fr_FR
+    if (dfmt.endswith('%p') and not ret.endswith('M')):
+        h = int(dt.strftime('%H'))
+        if h > 12:
+            ret += ' PM'
+        else:
+            ret += ' AM'
+except DateTimeError:
+    ret = 'Invalid'
+
+return ret
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/logged_in.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/logged_in.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/logged_in.py	(revision 2226)
@@ -0,0 +1,188 @@
+## Script (Python) "logged_in"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+"""Prepare user login
+modified from cps_default/logged_in.py
+
+$Id$
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+import DateTime
+current = DateTime.DateTime()
+import logging
+logger = logging.getLogger('Skins.logged_in')
+
+
+from urllib import unquote
+
+request = context.REQUEST
+response = request.RESPONSE
+utool = context.portal_url
+mtool = context.portal_membership
+wftool = context.portal_workflow
+portal = utool.getPortalObject()
+
+redirect_to_portal = False
+is_anon = mtool.isAnonymousUser()
+member = mtool.getAuthenticatedMember()
+#load_passport = hasattr(context.waeup_tool,'loadStudentFoto')
+
+if not is_anon:
+    if "Student" in member.getRoles():
+        to_waeup_student_home = True
+        students = context.portal_url.getPortalObject().campus.students
+        student = getattr(students,str(member))
+        student_app = getattr(student,'application',None)
+        student_per = getattr(student,'personal',None)
+        if request.has_key('returning') and  student_app is None:
+            email=request.get("email")
+            phone=request.get("phone_nr")
+            context.waeup_tool.makeStudentData(str(member),
+                                                   email=email,
+                                                   phone_nr=phone,
+                                                   )
+            #d = {}
+            #d['id'] = str(member)
+            #d['email'] = email
+            #d['phone'] = phone
+            #context.students_catalog.modifyRecord(**d)
+        elif student_app is None:
+            context.waeup_tool.makeStudentData(str(member))
+        student_app = getattr(student,'application',None)
+        if 'payments' not in student.objectIds():
+            student.invokeFactory('PaymentsFolder','payments')
+            payments = getattr(student,'payments')
+            wftool.doActionFor(payments,'open')
+            d = {}
+            d['Title'] = 'Online Payments'
+            payments.getContent().edit(mapping=d)
+        student_pume = getattr(student,'pume',None)
+        s_review_state = context.getStudentReviewState(student.id)
+        a_review_state = wftool.getInfoFor(student_app,'review_state',None)
+        student_per = getattr(student,'personal',None)
+        p_review_state = wftool.getInfoFor(student_per,'review_state',None)
+        logger.info('%s logged in, review_state %s' % (member,s_review_state))
+        app_doc = student_app.getContent()
+
+        if request.has_key('returning'):
+            email=request.get("email")
+            phone=request.get("phone_nr")
+            # should be always closed, however ...
+            if a_review_state != 'opened':
+                wftool.doActionFor(student_app,'open')
+            # should be always opened after import, however ...
+            if p_review_state != 'opened':
+                wftool.doActionFor(student_per,'open')
+            per_doc = student_per.getContent()
+            app_doc.edit(mapping = {'app_email' : email})
+            per_doc.edit(mapping = {'email' : email, 'phone' : phone})
+            wftool.doActionFor(student_app,'close')
+
+        #from Products.zdb import set_trace;set_trace()
+        if s_review_state == 'returning' and 'passport' not in app_doc.objectIds():
+            folder = 'pictures_returning'
+            res = context.students_catalog(id = str(member))
+            filename = res[0].matric_no.upper()
+            msg = context.waeup_tool.loadStudentFoto(student,filename,folder)
+            logger.info('%s (%s), %s' % (member,s_review_state,msg))
+        if s_review_state in ('admitted', 'clearance_pin_entered', 'clearance_requested')  and 'passport' not in app_doc.objectIds():
+            folder = 'pictures_admitted_latest'
+            filename = app_doc.jamb_reg_no.replace('/','_')
+            msg = context.waeup_tool.loadStudentFoto(student,filename,folder)
+            logger.info('%s (%s), %s' % (member,s_review_state,msg))
+        if s_review_state in ("student_created","admitted") and\
+                             a_review_state == 'created' :
+            wftool.doActionFor(student_app,'open')
+            if student_pume is not None:
+              wftool.doActionFor(student_pume,'close')
+            da = {}
+            pin = request.get('pin')
+            if not pin:
+                jamb_reg_no = app_doc.jamb_reg_no
+                for reg_no in (jamb_reg_no,jamb_reg_no.lower(),jamb_reg_no.upper()):
+                    res = context.portal_pins(student=reg_no)
+                    if len(res) > 0:
+                        break
+                if len(res) > 0:
+                    p = res[0].pin
+                    if len(p) > 10:
+                        pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:])
+                    else:
+                        pin = p
+            da['app_ac_pin'] = pin
+            da['app_ac_date'] = current
+            app_doc.edit(mapping = da)
+        elif s_review_state in ("admitted") and a_review_state == 'opened' and\
+                                            not app_doc.app_ac_pin:
+            jamb_reg_no = app_doc.jamb_reg_no
+            for reg_no in (jamb_reg_no,jamb_reg_no.lower(),jamb_reg_no.upper()):
+                res = context.portal_pins(student=reg_no)
+                if len(res) > 0:
+                    break
+            if len(res) > 0:
+                p = res[0].pin
+                if len(p) > 10:
+                    pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:])
+                else:
+                    pin = p
+                da = {}
+                da['app_ac_pin'] = pin
+                app_doc.edit(mapping = da)
+        elif s_review_state in ("cleared_and_validated",) and\
+                             p_review_state == 'created' :
+            wftool.doActionFor(student_per,'open')
+        res = context.students_catalog(id = str(member))
+        matric_no = res[0].matric_no
+        verdict = res[0].verdict
+        if s_review_state in ('returning','school_fee_paid') and not verdict:
+            results = context.results_import(matric_no = matric_no)
+            if results:
+                study_course = getattr(student,'study_course')
+                sc_review_state = wftool.getInfoFor(study_course,'review_state',None)
+                dsc = {}
+                dsc['current_verdict'] = context.getVerdict(results[0].Verdict)[0]
+                if sc_review_state != 'opened':
+                    wftool.doActionFor(study_course,'open')
+                study_course_doc =study_course.getContent()
+                study_course_doc.edit(mapping = dsc)
+                wftool.doActionFor(study_course,'close_for_edit')
+        has_results = context.results_import(matric_no = matric_no)
+        if s_review_state == "application_pin_entered":
+            redirect_url = "%s/application_edit_form" % student.absolute_url()
+        elif s_review_state in ('admitted', 'objection_raised',):
+            redirect_url = "%s/admission_form" % student.absolute_url()
+        elif s_review_state == "clearance_pin_entered":
+            redirect_url = "%s/clearance_edit_form" % student.absolute_url()
+        elif s_review_state == "cleared_and_validated":
+            redirect_url = "%s/personal_edit_form" % student.absolute_url()
+        elif s_review_state == "returning" and has_results:
+            redirect_url = "%s/session_results_view" % student.absolute_url()
+        elif s_review_state in ('school_fee_paid','courses_registered'):
+            redirect_url = "%s/study_course/study_course_view" % student.absolute_url()
+        else:
+            redirect_url = "%s/student_index" % student.absolute_url()
+    else:
+        logger.info('%s logged in' % (member))
+        redirect_url = portal.absolute_url()
+#Anonymous
+else:
+    response.expireCookie('__ac', path='/')
+    return context.user_logged_in_failed()
+
+# Setup skins
+if (getattr(utool, 'updateSkinCookie', False) and
+    utool.updateSkinCookie()):
+    context.setupCurrentSkin()
+
+response.redirect(redirect_url)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/logout.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/logout.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/logout.py	(revision 2226)
@@ -0,0 +1,24 @@
+## Script (Python) "logout"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=Logout handler
+##
+# notify the event service that the user has logged out
+import logging
+logger = logging.getLogger('Skins.logout')
+user = context.portal_membership.getAuthenticatedMember()
+if user:
+    from Products.CPSCore.EventServiceTool import getPublicEventService
+    evtool = getPublicEventService(context)
+    evtool.notifyEvent('user_logout', user, {})
+    logger.info('%s logged out' % (user))
+
+REQUEST = context.REQUEST
+if REQUEST.has_key('portal_skin'):
+    context.portal_skins.clearSkinCookie()
+REQUEST.RESPONSE.expireCookie('__ac', path='/')
+return REQUEST.RESPONSE.redirect(REQUEST.URL1+'/logged_out')
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/msie.css.dtml
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/msie.css.dtml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/msie.css.dtml	(revision 2226)
@@ -0,0 +1,28 @@
+/*
+Internet Explorer CSS customization.
+This file is used and read *only* by MSIE through the use of a MSIE conditional
+comment. This is the place to put instructions to correct the rendering problems
+specific to MSIE.
+
+$Id$
+*/
+
+<dtml-let last_modified="_.DateTime()-14" expires="_.DateTime()+1" >
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Content-Type', 'text/css' )">
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Last-Modified', last_modified.toZone('GMT').rfc822() )">
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Cache-Control', 'max-age=36000, must-revalidate' )">
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Expires', expires.toZone('GMT').rfc822() )" >
+</dtml-let>
+
+/*
+The MSIE PNG behavior is disabled by default but kept here in case you need it.
+This MSIE behavior was supposed to work for MSIE >= 5.5, but *some* versions of
+MSIE 5.5 have problems with it. So feel free to use it back again if your
+visitors do not use MSIE 5.5 or when MSIE 5.5 becomes history.
+*/
+
+
+img {
+  behavior: url(pngbehavior.htc);
+}
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/standard_error_message.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/standard_error_message.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/standard_error_message.pt	(revision 2226)
@@ -0,0 +1,61 @@
+<metal:html tal:define="showthirdcol nothing;
+                        error_type options/error_type|nothing;
+                        error_value options/error_value|nothing;
+                        error_message options/error_message|nothing;
+                        error_tb options/error_tb|nothing;
+                        error_traceback options/error_traceback|nothing;
+                        error_log_url options/error_log_url|nothing;
+                        p_props here/portal_properties;
+                       ">
+<tal:Anauthorized condition="python:error_type == 'Unauthorized'">
+    <metal:block use-macro="here/error_not_found/macros/not_found" />
+</tal:Anauthorized>
+
+<tal:Anauthorized condition="python:error_type != 'Unauthorized'">
+<metal:body use-macro="here/main_template/macros/master">
+
+<metal:main fill-slot="main">
+
+    
+<tal:haserror condition="error_type">
+  <tal:NotFound condition="python:error_type == 'NotFound'">
+    <metal:block use-macro="here/error_not_found/macros/not_found" />
+  </tal:NotFound>
+
+  <tal:default condition="python:error_type != 'NotFound'">
+    <metal:block use-macro="here/error_other/macros/other" />
+  </tal:default>
+
+  <tal:debugging condition="python:checkPerm('Manage portal', here)">
+    <table width="100%" cellpadding="2" cellspacing="2">
+      <tr>
+        <th width="10%">Error Type:</th>
+        <td tal:content="error_type"></td>
+      </tr>
+      <tr>
+        <th>Error Value:</th>
+        <td><pre tal:content="structure error_value" /></td>
+      </tr>
+      <tr>
+        <th>Traceback:</th>
+        <td><pre tal:content="structure error_traceback" /></td>
+      </tr>
+    </table>
+    <hr />
+    <pre tal:content="structure request" />
+    <hr />
+    <a href="" tal:condition="python:error_log_url"
+               tal:attributes="href error_log_url">
+      Show Error Log Entry
+    </a>
+  </tal:debugging>
+</tal:haserror>
+
+<tal:hasnoerror tal:condition="not:error_type">
+Sorry, an error occurred. 
+</tal:hasnoerror>
+
+</metal:main>
+</metal:body>
+</tal:Anauthorized>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/stylesheet_properties.props
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/stylesheet_properties.props	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/stylesheet_properties.props	(revision 2226)
@@ -0,0 +1,159 @@
+# TODO: I want comments in this file!
+
+plone_skin:string=Nuxeo CPS Default
+
+mainFont:string=70% Arial, sans-serif, Verdana, Helvetica
+mainBackground:string=#ffffff
+mainFontColor:string=black
+mainLinkColor:string=#436976
+mainTabBorderColor:string=#838183
+mainTabBorderColorSelected:string=#838183
+mainTabBackground:string=#003a6b
+mainTabBackgroundNotSelected:string=#9cb2cd
+# FIXME: remove since it is not used ?
+#mainTabBackdrop:string=transparent
+mainTabFontWeight:string=normal
+mainTabFontColor:string=white
+mainTabFontColorSelected:string=white
+
+headingFont:string=100% Arial, sans-serif, Verdana, Helvetica
+headingFontColor:string=black
+headingSize1:string=140%
+headingSize2:string=130%
+headingSize3:string=120%
+headingSize4:string=110%
+headingSize5:string=105%
+headingSize6:string=100%
+
+descriptionFont:string=100% Arial, sans-serif, Verdana, Helvetica
+
+contentFont:string=120% Arial, sans-serif, Verdana, Helvetica
+contentBackground:string=White
+contentImageBorder:string=0
+contentLinkActiveColor:string=Red
+contentLinkVisitedColor:string=Purple
+# FIXME: remove since it is not used ?
+#contentTabBorder:string=1px solid #74ae0b
+contentTabBackground:string=#cde2a7
+contentTabBackgroundNotSelected:string=transparent
+contentTabBackdrop:string=transparent
+contentTabFontWeight:string=normal
+contentTabFontColor:string=#578308
+contentTabFontColorSelected:string=#578308
+
+preBorder:string=0px none
+preBackground:string=#eeeeee
+
+messageFont:string=normal 110% Arial, sans-serif, Verdana, Helvetica
+messageBackground:string=#ffca31
+messageBorder:string=2px solid #333333
+
+textTransform:string=none
+noBorder:string=none
+groupBorder:string=0px none transparent
+requiredField:string=url(required.png) right no-repeat
+
+inputFont:string=100% Arial, sans-serif, Verdana, Helvetica
+inputBorder:string=1px inset #757575
+# FIXME: not used
+#inputBackground:string=#f7f9fa
+
+buttonBackground:string=#ffffff 4px 4px no-repeat
+buttonBackgroundHover:string=#e7e7e7 url(buttonbg_bc.png) bottom left repeat-x
+buttonBorder:string=1px outset #757575
+
+contextButtonBackground:string=#ffffff url(buttonbg_e7.png) bottom left repeat-x
+contextButtonBackgroundHover:string=#e7e7e7 url(buttonbg_bc.png) bottom left repeat-x
+contextButtonPadding:string=2px 5px 2px 5px
+contextButtonFontColor:string=#454545
+contextButtonBorder:string=1px outset #999999
+
+standaloneButtonBackground:string=#ffffff url(buttonbg_e7.png) bottom left repeat-x
+standaloneButtonBackgroundHover:string=#e7e7e7 url(buttonbg_bc.png) bottom left repeat-x
+standaloneButtonPadding:string=2px 5px 2px 5px
+standaloneButtonFontColor:string=#454545
+standaloneButtonBorder:string=1px outset #999999
+
+destructiveButtonBackground:string=#ffffff url(buttonbg_e7.png) bottom left repeat-x
+destructiveButtonBackgroundHover:string=#e7e7e7 url(buttonbg_bc.png) bottom left repeat-x
+destructiveButtonPadding:string=2px 5px 2px 5px;
+destructiveButtonBorder:string=1px outset #757575;
+destructiveButtonBorderHover:string=1px solid #ff0000
+destructiveButtonFontColor:string=#454545
+
+moveUpButtonBackground:string=white url(buttonbg_e7.png) bottom left repeat-x
+moveDownButtonBackground:string=white url(buttonbg_e7.png) bottom left repeat-x
+moveTopButtonBackground:string=white url(buttonbg_e7.png) bottom left repeat-x
+moveBottomButtonBackground:string=white url(buttonbg_e7.png) bottom left repeat-x
+
+buttonWeight:string=normal
+
+boxBorder:string=0px solid #838183
+boxHeaderBackground:string=#003a6b
+boxHeaderFontColor:string=white
+# FIXME: Not used
+#boxLinkBackground:string=transparent
+#boxLinkColor:string=#436976
+boxEvenBackground:string=#eeeeee
+boxOddBackground:string=white
+boxHighlight:string=2px solid #ffa500
+
+# FIXME: Not used
+#listingBorder:string=1px solid #838183
+#listingHeaderBackground:string=#003a6b
+#listingHeaderFontColor:string=black
+#listingLinkHover:string=underline
+
+topBackground:string=#ffffff
+topMargin:string=0
+topPadding:string=0
+
+logoMargin:string=0.2em 0em 0.3em 1em
+logoPadding:string=0
+
+searchMargin:string=0
+searchPadding:string=0
+searchFontColor:string=black
+
+footerBackground:string=#eeeeee
+footerBorder:string=1px solid #003a6b
+
+columnsLeftBackground:string=#9cb2cd
+columnsRightBackground:string=#eeeeee url('rightcol_bg.png') repeat-y
+
+columnsLeftBackgroundNS4:string=#9cb2cd
+columnsRightBackgroundNS4:string=#eeeeee
+
+workspaceBackground:string=#cde2a7
+workspaceBackgroundSelected:string=#297b28
+urlFontColor:string=#666666
+
+legendFontSize:string=80%
+
+# Layout properties used to display listing type tables (this layout is used for
+# history and subscriptions tables).
+listingHeaderBackground:string=#003a6b
+listingHeaderColor:string=white
+listingCellBackground:string=#eeeeee
+listingCellColor:string=black
+listingCellOddBackground:string=#ffffff
+listingCellOddColor:string=black
+listingCellEvenBackground:string=#eeeeee
+listingCellEvenColor:string=black
+
+# Layout properties used to display RSS/Syndication logos (those logos
+# typically appear in each box).
+rssBorder:string=0.1em outset #ff6600
+rssBackground:string=#ff6600
+rssColor:string=#ffffff
+rssFont:string=bold 70% 'Lucida Grande', Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif
+
+# Layout properties used to display Atom/Syndication logos (those logos
+# typically appear in each box).
+atomBorder:string=0.1em outset #ff6600
+atomBackground:string=#ff6600
+atomColor:string=#ffffff
+atomFont:string=bold 70% 'Lucida Grande', Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif
+
+inheritedRole:string=#ffff99
+inheritedBlockedRole:string=#ff9999
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/user_logged_in_failed.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/user_logged_in_failed.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/user_logged_in_failed.pt	(revision 2226)
@@ -0,0 +1,22 @@
+<metal:block use-macro="here/main_template/macros/master">
+  <metal:block fill-slot="header">
+    <h3>Login Failure</h3>
+  </metal:block>
+  <metal:block fill-slot="main">
+   
+    <br />
+    <p>
+  	You have not been logged in. Either your user name and/or password are
+  	incorrect or your browser is not configured to accept HTTP
+  	cookies (see http://www.google.com/cookies.html).
+    </p>
+    <br />
+
+    <p>
+      <input type="button" class="context" onClick="history.back()"
+        value="button_back" i18n:attributes="value" />
+    </p>
+
+
+  </metal:block>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/widget_datetime_render.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/widget_datetime_render.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/widget_datetime_render.pt	(revision 2226)
@@ -0,0 +1,53 @@
+<tal:block define="mode options/mode;
+                   id here/getWidgetId;
+                   id_date string:${id}_date;
+                   id_hour string:${id}_hour;
+                   id_minute string:${id}_minute;
+                   value options/datastructure/?id;
+                   date options/datastructure/?id_date;
+                   hour options/datastructure/?id_hour;
+                   minute options/datastructure/?id_minute;
+                   fmt here/view_format;
+">
+<tal:block condition="python: mode == 'view'">
+<span tal:replace="python:here.getDateStr(value, fmt=fmt)" />
+</tal:block>
+<tal:block define="name here/getHtmlWidgetId;
+                   date_day_fmt python:fmt.startswith('iso8601')
+                       and 'iso8601_short' or fmt"
+  condition="python: mode == 'edit'">
+  <input type="text" size="11" maxlength="22"
+    tal:attributes="name string:${name}_date;
+                    id string:${name}_date;
+                    value python:here.getDateStr(value, fmt=date_day_fmt)" />
+
+  <tal:block condition="here/time_setting"
+    define="hours python:range(0,24);minutes python:(0,10,15,20,30,40,45,50);
+            elt_hour_id string:${name}_hour;
+            elt_minute_id string:${name}_minute">
+    <tal:block i18n:translate="cpsschema_at">at</tal:block>
+    <select tal:attributes="name elt_hour_id;
+                            id elt_hour_id">
+      <tal:block repeat="h hours">
+        <option tal:attributes="value h; selected python:int(hour)==h"
+          tal:content="python:'%2.2i'%h" />
+      </tal:block>
+    </select>
+    <label tal:attributes="for elt_hour_id"
+           i18n:translate="cpsschema_hour">h</label>
+    <select tal:attributes="name elt_minute_id;
+                            id elt_minute_id">
+      <tal:block repeat="m minutes">
+        <option tal:attributes="value m; selected python:int(minute)==m"
+          tal:content="python:'%2.2i'%m" />
+      </tal:block>
+      <tal:block condition="python:int(minute) not in minutes">
+        <option tal:attributes="value minute" tal:content="minute"
+          selected="selected" />
+      </tal:block>
+    </select>
+    <label tal:attributes="for elt_minute_id"
+           i18n:translate="cpsschema_minute">mn</label>
+  </tal:block>
+</tal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/widget_image_render.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/widget_image_render.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/widget_image_render.pt	(revision 2226)
@@ -0,0 +1,83 @@
+<tal:block define="mode options/mode;
+  id here/getWidgetId;
+  fields here/fields;
+  current_filename options/current_filename;
+  empty_file options/empty_file;
+  session_file options/session_file;
+  mimetype options/mimetype;
+  size options/size;
+  content_url options/content_url;
+  last_modified options/last_modified;
+  image_width options/width;
+  image_height options/height;
+  image_tag options/image_tag;
+  ">
+<span tal:condition="python:0">
+  <img tal:condition="python: mode == 'view' and not empty_file"
+    tal:replace="structure image_tag" />
+</span>
+<span tal:condition="python: mode == 'view' and not empty_file">
+  <a href="" target="_new" 
+     tal:attributes="href content_url"
+     tal:content="current_filename" >
+  </a>
+</span>
+
+  <tal:block condition="python: mode == 'edit'">
+
+    <metal:block use-macro="here/widget_file_render/macros/file_size_max_view" />
+
+    <metal:block define-macro="image_title_edit">
+    <span tal:condition="python:0">
+      <metal:block use-macro="here/widget_file_render/macros/file_title_edit">
+      </metal:block>
+    </span>
+    </metal:block>
+
+    <img tal:condition="python: 0 and not empty_file and not session_file"
+      tal:replace="structure image_tag" />
+
+    <metal:block define-macro="image_edit">
+      <tal:block define="allow_resize here/allow_resize|nothing">
+      <metal:block use-macro="here/widget_file_render/macros/file_edit">
+        <metal:block fill-slot="edit_file_action">
+          <metal:block define-slot="edit_file_action" />
+        </metal:block>
+        <metal:block fill-slot="change_file">
+          <input type="radio" class="noborder"  name="." value="change"
+                 tal:attributes="name radio_name;
+                                 id string:${radio_name}_change" />
+          <label i18n:translate="cpsschemas_label_file_change"
+                 tal:attributes="for string:${radio_name}_change">Change</label>
+          <input type="file" name="." size="24"
+                 tal:attributes="name name;
+            onclick string:document.getElementById('${radio_name}_change').checked='checked'" />
+          <tal:block condition="python:1">
+            <input type="hidden" value="img_auto_size" 
+                   tal:attributes="name string:${name}_resize" />
+          </tal:block>
+          <tal:block condition="python:0 and allow_resize">
+            <label i18n:translate="cpsschemas_image_resize"
+                   tal:attributes="for string:${radio_name}_change">resize</label>
+            <select tal:attributes="name string:${name}_resize;
+              onchange string:document.getElementById('${radio_name}_change').checked='checked';"
+              tal:define="wid_size python:(here.display_width, here.display_height);
+              sizes python:[s for s in here.getImgSizes() if not wid_size[0] or s['size'] < wid_size]">
+              <option tal:repeat="op sizes"
+                tal:attributes="value op/id;
+                selected python: op['size'] and (op['size'][0]==image_width
+                                               or op['size'][1]==image_height)"
+                i18n:translate=""
+                ><span tal:replace="op/id" /> <span tal:condition="op/size"
+                  i18n:name="dim"
+                  tal:replace="python:'(%sx%s)' % op['size']">
+                  640x480</span></option>
+            </select>
+          </tal:block>
+        </metal:block>
+      </metal:block>
+      </tal:block>
+    </metal:block>
+
+  </tal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/widget_portlet_breadcrumbs.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/widget_portlet_breadcrumbs.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/widget_portlet_breadcrumbs.pt	(revision 2226)
@@ -0,0 +1,30 @@
+<tal:block define="ds options/datastructure;
+                   display ds/display;
+                   display_hidden_folders ds/display_hidden_folders;
+                   display_site_root ds/display_site_root;
+                   highlight_last_item ds/highlight_last_item;
+                   highlight_last_item python:int(highlight_last_item);
+                   first_item ds/first_item;
+                   context nocall:options/context_obj|here;
+                   utool nocall:here/portal_url;
+                   context_url python: utool.getRelativeUrl(context);
+                   base_url python: request.get('cpsskins_base_url');
+                   breadcrumbsItems python: context.getBreadcrumbsItems(context=context, display_hidden_folders=display_hidden_folders, first_item=first_item, display_site_root=display_site_root)">
+  <tal:block condition="python: display == 'horizontal_trail'">
+    <!-- the icon should be made optional, e.g. with a "show icon" option -->
+    You are here: 
+    <img tal:attributes="src
+      string:${base_url}cpsskins_images/UpFolder_icon.png;
+      alt string:Up Folder" />
+    <tal:block repeat="item breadcrumbsItems">
+      <tal:block define="last_item repeat/item/end">
+        <strong tal:omit-tag="python: not (highlight_last_item and last_item)">
+        <a href="" tal:attributes="href item/url"
+         tal:content="python: item['title']" />
+        </strong>
+        <tal:block condition="not:last_item"
+         content="structure string:&gt;" />
+      </tal:block>
+    </tal:block>
+  </tal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_custom/widget_portlet_search.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_custom/widget_portlet_search.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_custom/widget_portlet_search.pt	(revision 2226)
@@ -0,0 +1,57 @@
+<span tal:condition="nothing">
+<form tal:define="ds options/datastructure;
+                  advanced_search_link ds/advanced_search_link;
+                  contextual_search_choice ds/contextual_search_choice;
+                  context_is_portlet ds/context_is_portlet;
+                  utool nocall:here/portal_url;
+                  params here/getSearchFormParams;
+                  search_script params/script;
+                  context nocall:options/context_obj;
+                  contextual_search params/contextual;
+                  advanced_search_form params/advanced;
+                  folder_prefix request/folder_prefix|nothing;
+                  cpsmcat nocall:here/translation_service;
+                  value_search
+                    request/SearchableText|python:cpsmcat('button_search');
+                  base_url python:request.get('cpsskins_base_url');"
+ method="get" action=""
+ tal:attributes="action search_script"
+ onsubmit="return checkEmptySearch(this)">
+  <div tal:condition="python:contextual_search_choice and contextual_search"
+   tal:define="id here/getId; id1 string:${id}1; id2 string:${id}2">
+    <tal:block condition="not:context_is_portlet">
+      <label tal:attributes="for id1"
+       i18n:translate="label_search_here">here</label>
+      <input type="radio" name="folder_prefix"
+       tal:attributes="id id1; checked folder_prefix;
+       value python:utool.getRelativeUrl(context)" />
+      <label tal:attributes="for id2"
+       i18n:translate="label_search_all_site">here</label>
+      <input type="radio" name="folder_prefix" value=""
+       tal:attributes="id id2; checked not:folder_prefix" />
+    </tal:block>
+    <tal:block condition="context_is_portlet">
+      <p tal:define="portlet_folder here/getLocalFolder">
+        <input type="hidden" name="folder_prefix"
+         tal:attributes="value python:utool.getRelativeUrl(portlet_folder)" />
+        <tal:block i18n:translate="">cpsportlets_search_in</tal:block>
+        <em tal:content="portlet_folder/title_or_id" />
+      </p>
+    </tal:block>
+  </div>
+  <div>
+  <input id="searchGadget" type="text" name="SearchableText" size="15"
+    value="" tal:attributes="value value_search"
+    onclick="this.value='';"/>
+  <input class="context searchButton" type="submit" value="button_ok"
+    i18n:attributes="value" />
+  </div>
+  <div>
+    <a href="" tal:condition="advanced_search_link"
+    tal:define="adv_url python:contextual_search and
+                               context.absolute_url() or utool()"
+    i18n:translate="cpsportlets_advanced_search"
+    tal:attributes="href string:${adv_url}/${advanced_search_form}">Advanced search</a>
+  </div>
+</form>
+</span>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/campus_index.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/campus_index.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/campus_index.py	(revision 2226)
@@ -0,0 +1,30 @@
+## Script (Python) "campus_index"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=batch=None
+##title=
+##
+# $Id$
+"""
+return the correct campus_index
+"""
+
+request = context.REQUEST
+redirect = request.RESPONSE.redirect
+pm = context.portal_membership
+
+if pm.isAnonymousUser():
+    #return redirect("%s/srp_anonymous_view" % request.get('URL1'))
+    return redirect("%s/srp_anonymous_view" %  context.portal_url())
+
+#campus = context.portal_url.getPortalObject().campus
+
+if context.isStudent():
+    return redirect("%s/students_index" % campus.students.absolute_url())
+else:
+    #return redirect("%s/campus/campus_view" % context.portal_url())
+    return redirect('%s/srp_view' % context.portal_url())
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/checked.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/checked.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/checked.pt	(revision 2226)
@@ -0,0 +1,68 @@
+<html metal:use-macro="here/main_template/macros/master">
+
+<body>
+
+<div metal:fill-slot="main">
+
+
+<div class=""
+     tal:define="physPath python:'/'.join(here.getPhysicalPath());
+                 results python: here.portal_catalog(review_state='checked', path=physPath);
+                 purl here/portal_url;
+                ">
+
+<div tal:condition="results">
+<h1 i18n:translate="">Items checked inside <span tal:content="here/LongTitle|here/title_or_id " /></h1>
+
+
+
+<table width="100%" cellspacing="0" cellpadding="2"
+      summary="contents of the folder"
+      class="folderButtons"
+      tal:define="can_add python:checkPerm('Add portal content', here);
+                  can_del python:checkPerm('Delete objects', here);">
+
+  <thead>
+  <tr><td><strong>Title</strong></td><td><strong>Id</strong></td><td><strong>Type</strong></td></tr>
+  </thead>
+
+
+  <tbody tal:repeat="item results">
+
+  <tr><td></td><td></td><td></td></tr>
+
+  <tr tal:define="objURL string:${item/getURL}/view;
+                  objPath item/getPath;
+                  title item/Title;
+                 ">
+  <td>
+  <a href="url"
+      tal:attributes="href objURL">
+   <span tal:content="python: title or '(No title)'" />
+  </a>
+  </td>
+
+  <td i18n:translate="">
+    <span tal:replace="item/id" />
+  </td>
+  
+  <td>
+    <span tal:replace="item/portal_type" />
+  </td>
+ </tr>
+
+ </tbody>
+</table>
+</div>
+
+
+<div tal:condition="python: not results">
+ <p i18n:translate="">There are no items matching your specified criteria.</p>
+</div>
+
+</div>
+
+</div>
+
+</body>
+</html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/common_edit_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/common_edit_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/common_edit_form.pt	(revision 2226)
@@ -0,0 +1,23 @@
+<tal:block define="rendered_main options/rendered;
+                   portal_status_message options/psm;"
+                   >
+<metal:block define-macro="edit_form">
+<metal:block use-macro="here/main_template/macros/master">
+  <metal:block fill-slot="header"
+    tal:define="creation creation|nothing;
+                edition python:1;
+                metadata metadata|nothing"
+                >
+    </metal:block>
+
+    <metal:block fill-slot="main">
+      <h1 tal:condition="options/create|nothing"> Create a <span tal:content="options/type_name" />  </h1>
+      <h1 tal:condition="options/edition|nothing"> Edit a <span tal:content="options/type_name" /> </h1>
+      <div tal:replace="structure rendered_main" />
+    </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+
+</metal:block>
+</metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/contact_admin_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/contact_admin_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/contact_admin_form.pt	(revision 2226)
@@ -0,0 +1,42 @@
+<metal:html tal:define="member python:context.portal_membership.getAuthenticatedMember()">
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main">
+      <h3>Contact</h3>
+      <br />
+      <form id="form1" name="form1" method="post" action="mail2admin">
+      <input type="hidden" name="regno" type="text" id="regno"
+             tal:attributes="value member"/>
+      <table width="100%" border="0" cellspacing="5" cellpadding="0">
+        <tr>
+          <td width="150px">
+             <strong>Full Name: </strong>
+          </td>
+          <td>
+             <input name="fullname" type="text" id="fullname" />
+          </td>
+        </tr>
+        <tr>
+          <td>
+             <strong>Email: </strong>
+          </td>
+          <td>
+             <input name="email" type="text" id="email" />
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+             <strong>Text: </strong>
+          </td>
+          <td>
+             <textarea name="descr" rows="10" cols="60" id="descr"></textarea>
+          </td>
+        </tr>
+        <tr>
+          <td>&nbsp;</td>
+          <td><input name="Submit" type="submit" class="standalone" value="Submit" /><br /><br /></td>
+        </tr>
+      </table>
+      </form>
+    </metal:main>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/cpsdocument.js.dtml
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/cpsdocument.js.dtml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/cpsdocument.js.dtml	(revision 2226)
@@ -0,0 +1,311 @@
+/*
+<dtml-let last_modified="_.DateTime()-14" expires="_.DateTime()+1" >
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Content-Type', 'text/javascript' )">
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Last-Modified', last_modified.toZone('GMT').rfc822() )">
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Cache-Control', 'max-age=36000, must-revalidate' )">
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Expires', expires.toZone('GMT').rfc822() )" >
+</dtml-let>
+*/
+/*
+# (C) Copyright 2003 Nuxeo SARL <http://nuxeo.com>
+# Author: Tarek Ziadé <tz@nuxeo.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# $Id:$
+
+CPSDocument javascript layer
+
+XXX need to find a way to upload file, it is very
+restrictive as it does'nt allow to send simple
+types like Document, flexible, etc...
+
+*/
+
+var CPSDocumentEditor = Class.create();
+
+CPSDocumentEditor.prototype = {
+  initialize: function(form_id, form_action, rendered_id, buttons,
+                       reloadbuttons, title_id, translations, last_error,
+                       blockers) {
+    // if any blocker is found, we don't ajaxify
+    if (blockers) {
+      for (var i = 0; i < blockers.length; i += 1) {
+        var blocker = blockers[i];
+        if ($(blocker)) {
+          this.enabled = false;
+          return;
+        }
+      }
+    }
+    this.form_id = form_id;
+    this.blockers = blockers;
+    this.effects = Effect;
+    this.rendered_id = rendered_id;
+    this.title_id = title_id;
+    this.last_error = last_error;
+    this.sender = null;
+    this.translations = translations;
+
+    var edit_form = $(form_id);
+    var rendered_node = $(rendered_id);
+    if (!edit_form || !rendered_node) {
+      this.enabled = false;
+    }
+    else {
+
+      // getting the action value
+      this.edit_form = edit_form;
+
+      if (!this.canSendForm()) {
+        this.enabled = false;
+      }
+      else
+      {
+        this.rendered_node = rendered_node;
+        this.buttons = buttons;
+        this.reloadbuttons = reloadbuttons;
+        this.form_action = form_action;
+        // linking action to buttons
+        var count = 0;
+        if (buttons)
+        {
+            for (var i = 0; i < buttons.length; i += 1) {
+            var button = buttons[i];
+            var button_node = $(button);
+            if (button_node) {
+                button_node.onclick = this.sendForm.bindAsEventListener(this);
+                count += 1;
+            }
+            }
+        }
+        if (reloadbuttons)
+        {
+            for (var i = 0; i < reloadbuttons.length; i += 1) {
+            var button = reloadbuttons[i];
+            var button_node = $(button);
+            if (button_node) {
+                button_node.onclick = this.sendFormReload.bindAsEventListener(this);
+                count += 1;
+            }
+            }
+        }
+        if (count>0) {
+            this.enabled = true;
+            edit_form.action = ''; // disabling direct sending
+        }
+        else {
+            this.enabled = false;
+        }
+      }
+    }
+  },
+
+  onCreate: function() {
+    if ($('ajax_psm')) {
+      var elt = $('ajax_psm');
+      elt.innerHTML = this.translations.working;
+      Effect.Appear('ajax_psm', {duration:1, queue:'end'});
+    }
+  },
+
+  onComplete: function() {
+    if ($('ajax_psm')) {
+      Effect.Fade('ajax_psm', {duration:1.5, queue:'end'});
+    }
+  },
+
+  sendForm: function(evt) {
+    if (this.enabled) {
+      this.onCreate();
+      // let's serialize the content of the form
+      // and send it to the server
+      params = Form.serialize(this.edit_form);
+      if (params!='') {
+        params += '&ajax_edit=1';
+      }
+      var sendFormCompletedFn = this.sendFormCompleted.bind(this);
+      var options = {parameters: params, onComplete: sendFormCompletedFn};
+      if (!this.sender) {
+        this.sender = new Ajax.Request(this.form_action, options);
+      }
+      else {
+        this.sender.setOptions(options);
+        this.sender.request(this.form_action);
+      }
+    }
+  },
+
+  sendFormReload: function(evt) {
+    if (this.enabled) {
+      this.onCreate();
+      // let's serialize the content of the form
+      // and send it to the server
+      params = Form.serialize(this.edit_form);
+      if (params!='') {
+        params += '&cpsdocument_edit_and_view_button=1';
+        params += '&ajax_edit=1';
+      }
+      var sendFormCompletedFn = this.sendFormCompleted.bind(this);
+      var options = {parameters: params, onComplete: sendFormCompletedFn};
+      if (!this.sender) {
+        this.sender = new Ajax.Request(this.form_action, options);
+      }
+      else {
+        this.sender.setOptions(options);
+        this.sender.request(this.form_action);
+      }
+    }
+  },
+
+  sendFormCompleted: function(originalRequest) {
+    var result = originalRequest.responseXML;
+
+    // result comes in three node, under ajax-response
+    result = result.childNodes[0];
+    var action = '';
+    var layout = '';
+    var form_result = false;
+
+    for (var i = 0; i < result.childNodes.length; i++) {
+      var node = result.childNodes[i];
+      if (node.nodeName=='result') {
+        if (node.childNodes[0].nodeValue=='True')
+          form_result = true;
+      }
+      if (node.nodeName=='layout') {
+        layout = node.childNodes[0].nodeValue;
+      }
+      if (node.nodeName=='action') {
+        if (node.childNodes.length>0) {
+          action = node.childNodes[0].nodeValue;
+        }
+      }
+    }
+
+    if (form_result) {
+      psm = this.translations.content_changed;
+      if (this.last_error)
+        this.rendered_node.innerHTML = layout;
+    }
+    else {
+      psm = this.translations.content_error;
+      // need to reload form here
+      this.rendered_node.innerHTML = layout;
+      // we also want to scroll to the first error
+      this.scrollTo('error');
+    }
+
+    // feedback, in any case
+    feedback = $('ajax_psm');
+    if (feedback) {
+     feedback.innerHTML = psm;
+    }
+
+    // reload elements
+    if (!action) {
+      this.initialize(this.form_id, this.form_action, this.rendered_id,
+                      this.buttons, this.reloadbuttons, this.title_id,
+                      this.translations, !form_result, this.blockers);
+      if (form_result)
+        this.reloadTitleFromForm();
+
+    }
+    else {
+      this.gotoUrl(action);
+    }
+    this.onComplete();
+  },
+
+  gotoUrl: function(dest) {
+    self.location.href = dest;
+  },
+
+  canSendForm: function() {
+    // trying to see if there are files in the form
+    var inputs = this.edit_form.getElementsByTagName('input');
+    for (var i = 0; i < inputs.length; i++) {
+      var input = inputs[i];
+      // if (input.type == 'file' && input.value != '') {
+      if (input.type == 'file') {
+        return false;
+      }
+    }
+    return true;
+  },
+
+  reloadTitleFromForm: function() {
+    if ($('widget__Title')) {
+        this.reloadTitle($('widget__Title').value);
+      }
+  },
+
+  reloadTitle: function(new_title) {
+    // reloading title
+    title_node = $(this.title_id);
+    if (title_node)
+      title_node.innerHTML = new_title;
+    document.title = new_title;
+  },
+
+  scrollTo: function(classname) {
+    elements = document.getElementsByClassName(classname, document);
+    if (elements.length>0) {
+      var element = elements[0];
+      var x = element.x ? element.x : element.offsetLeft,
+          y = element.y ? element.y : element.offsetTop;
+      window.scrollTo(x, y);
+    }
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+if (!window.CPSFlexibleEdit) {
+  var CPSFlexibleEdit = new Object();
+  }
+  
+Object.extend(CPSFlexibleEdit, {
+  buttonClick: function(button, message) {
+  /*
+  this function will simulate a click on a submit button, by setting a hidden
+  field with the name/value of the clicked button and then submitting the form
+  */
+    if (message) {
+      if (window.confirm(message))
+        flag = true;
+    }
+    else
+      flag = true;
+    if (flag) {
+      buttonName = button.name;
+      buttonValue = button.value;
+      myform = button.form;
+      placeholder = document.getElementById('button_placeholder');
+      if (document.all) { // what follows should work
+                          // with Opera/IE but doesn't in Firefox
+        placeholder.name = buttonName;
+        placeholder.value = buttonValue;
+      }
+      else if (document.getElementById) { // so here is the
+                                          // Firefox workaround
+        placeholder.setAttribute('name', buttonName);
+        placeholder.setAttribute('value', buttonValue);
+      }
+      myform.submit();
+    }
+  }
+});
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/display_content.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/display_content.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/display_content.py	(revision 2226)
@@ -0,0 +1,20 @@
+## Script (Python) ""
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=ids=[], REQUEST=None
+##title=
+##
+# $Id$
+"""
+content  should be displayed if
+"""
+return context.portal_type in ('Certificate',
+                                'Department',
+                                'StudentApplication',
+                                'StudentClearance',
+                                'StudentPersonal',
+                                'StudentStudyCourse',
+                                'StudentStudyLevel')
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/error_not_found.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/error_not_found.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/error_not_found.pt	(revision 2226)
@@ -0,0 +1,11 @@
+<!-- a error_lib macro -->
+<!-- $Id$ -->
+
+<!-- macro library for rendering specific error messages per error type -->
+<metal:block define-macro="not_found">
+  <h3>Not Found</h3>
+
+  <p>The resource you asked was not found.
+  </p>
+
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/error_other.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/error_other.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/error_other.pt	(revision 2226)
@@ -0,0 +1,28 @@
+<!-- a error_lib macro -->
+<!-- $Id$ -->
+
+<metal:block define-macro="other">
+  <h3>WAeUP encountered an error</h3>
+
+  <p>We apologize for the incovenience. Please send a detailed error report using the mail address below. </p>
+
+  <p>The email will be directly send to our software developers in Germany. 
+     You will be notified by email when the problem is solved.</p>
+
+  <dl>
+    <dt>
+      <img tal:replace="structure python:here.getImgTag('UpFolder_icon.png',width=16,height=16)" />
+      <a href="javascript:history.back()"
+         i18n:translate="link_go_back">Go back</a>.
+    </dt>
+    <dd></dd>
+    <dt>
+      <img tal:replace="structure python:here.getImgTag('email.png',width=16,height=16)" />
+       <a href="mailto:admin@here.com"
+         tal:attributes="href string:mailto:henrik@waeup.org?Subject=Portal Error;
+                         title string:Portal Administrator">
+         Contact the Portal Administrator</a>.
+    </dt>
+    <dd></dd>
+  </dl>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/external_edit_buttons.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/external_edit_buttons.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/external_edit_buttons.pt	(revision 2226)
@@ -0,0 +1,39 @@
+<metal:block define-macro="buttons">
+  <input type="submit" name="external_edit_button"
+         class="standalone" value="button_change"
+         id="external_edit_button"
+         i18n:attributes="value" />
+  <input type="submit" name="external_close_button"
+         class="standalone" value="Close"
+         onclick="window.opener.location.reload();window.close()"
+         id="external_close_button"
+         i18n:attributes="value" />
+  <span tal:condition="python:0">
+  <tal:block define="
+  use_ajax use_ajax|python:True;
+  content_changed python:cpsmcat('psm_content_changed');
+  content_error python:cpsmcat('psm_content_error');
+  working python:cpsmcat('psm_ajax_working')"
+  condition="python:use_ajax">
+    <script type="text/javascript"
+            tal:content="string:
+            // unobtrusive form controller, that leaves the form accessible
+            var editor = new CPSDocumentEditor(
+            'editForm',
+            $$('editForm').action,
+            'editForm',
+            new Array('external_edit_button'),
+            null,
+            'page_title',
+            {content_changed: '${content_changed}',
+            working: '${working}',
+            content_error: '${content_error}'},
+            null,
+            new Array('addwidget_button'));"
+            >
+    </script>
+  </tal:block>
+  </span>
+</metal:block>
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/external_edit_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/external_edit_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/external_edit_form.pt	(revision 2226)
@@ -0,0 +1,14 @@
+<metal:defineblock tal:define="rendered_main python:context.getContent().render(layout_mode='edit', 
+           cluster=None,
+           request=request, 
+           use_session=True, 
+           no_form=True);
+           form_action string:external_edit;
+           form_type string:external;
+           is_allowed context/isSectionOfficer;
+           creation python:False;
+           metadata metadata|nothing;
+           template here/slip_template/macros/master;"
+    >
+  <metal:block use-macro="context/waeup_edit_form/macros/edit_form" />
+</metal:defineblock>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/getDocumentInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/getDocumentInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/getDocumentInfo.py	(revision 2226)
@@ -0,0 +1,29 @@
+## Script (Python) "getDocumentInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id:getDocumentInfo.py 486 2006-09-06 10:09:39Z joachim $
+"""
+return Info about the Faculties
+"""
+request = context.REQUEST
+
+wf = context.portal_workflow
+path_info = request.get('PATH_INFO').split('/')
+
+mtool = context.portal_membership
+if mtool.isAnonymousUser():
+    return None
+
+info = {}
+try:
+    info['doc'] = context.getContent()
+except:
+    return None
+return info
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/getDynamicRoles.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/getDynamicRoles.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/getDynamicRoles.py	(revision 2226)
@@ -0,0 +1,15 @@
+## Script (Python) "getDynamicRoles"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: $
+"""
+return the dynamic roles
+"""
+return ('ClearanceOfficer','CourseAdviser', 'SectionManager')
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/getNextSessionId.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/getNextSessionId.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/getNextSessionId.py	(revision 2226)
@@ -0,0 +1,22 @@
+## Script (Python) "getSessionId"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=session
+##title=
+##
+# $Id$
+"""
+return the next Session Id
+"""
+
+if session != context.getSessionId()[-2:]:
+    ns = int(session) + 1
+else:
+    ns = int(session)
+ns = "%02d" % ns
+ns_str = context.portal_vocabularies.sessions.get(ns)
+
+return ns,ns_str
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/getRenderedWidgets.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/getRenderedWidgets.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/getRenderedWidgets.py	(revision 2226)
@@ -0,0 +1,12 @@
+##parameters=layout
+# $Id$
+"""
+Return the rendered widget as a dict
+
+"""
+dict = {}
+
+for r in layout['rows']:
+    for c in r:
+        dict[c['widget_id']] = c
+return dict
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/getReviewInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/getReviewInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/getReviewInfo.py	(revision 2226)
@@ -0,0 +1,36 @@
+## Script (Python) "getReviewInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None, with_items=None
+##title=
+##
+# $Id$
+"""
+return Info about the current Student
+"""
+ptool = context.portal_proxies
+wf_vars = ['review_state']
+try:
+    docid = context.getDocid()
+except:
+    return ''
+if docid:
+    proxies_info = ptool.getProxyInfosFromDocid(docid,
+                                                workflow_vars=wf_vars)
+    d_review = proxies_info[0]['review_state']
+else:
+    d_review = ''
+if context.portal_type != "Student":
+    s_review = context.getStudentReviewState()
+    if s_review:
+        return "%s / %s" % (s_review,d_review)
+    # student_id = context.getStudentId()
+    # if student_id:
+    #     res = context.portal_catalog(id = student_id,portal_type='Student')
+    #     if res:
+    #         return "%s / %s" % (s_review,d_review)
+return "%s" % (d_review)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/getSessionId.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/getSessionId.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/getSessionId.py	(revision 2226)
@@ -0,0 +1,23 @@
+## Script (Python) "getSessionId"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+return the Session Id
+"""
+
+# must be changed in 2007/2008; should return only the last two digits
+
+import DateTime
+now = DateTime.DateTime()
+if now.month() > 11:
+    s = "%s" % now.year()
+else:
+    s = "%s" % (now.year() - 1)
+return s
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/getSessionString.py_not_used
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/getSessionString.py_not_used	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/getSessionString.py_not_used	(revision 2226)
@@ -0,0 +1,18 @@
+## Script (Python) "getSessionString"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: getSessionString.py 1764 2007-05-10 04:41:04Z henrik $
+"""
+return the Session string
+"""
+import DateTime
+now = DateTime.DateTime()
+if now.month() > 8:
+    return "%s/%s" % (now.year(),now.year()+1)
+return "%s/%s" % (now.year()-1,now.year())
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/get_csv_names.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/get_csv_names.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/get_csv_names.py	(revision 2226)
@@ -0,0 +1,12 @@
+##parameters=key=None
+# $Id$
+"""
+Return the sessions as an vocabulary
+
+"""
+files = context.waeup_tool.get_csv_filenames()
+if key is None:
+    return [(f[:-4],f) for f in files]
+
+return files[files.index("%s.csv" % key)]
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/id_rename.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/id_rename.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/id_rename.py	(revision 2226)
@@ -0,0 +1,71 @@
+##parameters=
+# $Id$
+"""
+Rename objects which ids are passed in the request.
+
+Used within the folder_contents template.
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+import logging
+logger = logging.getLogger('Skins.id_rename')
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+
+REQUEST = context.REQUEST
+
+if context.portal_type in ('CoursesFolder',):
+    return REQUEST.RESPONSE.redirect(context.absolute_url() + \
+                                ('/academics_index?portal_status_message=%s' \
+                                % ('Courses cannot be renamed',)))
+
+old_ids = REQUEST['ids']
+new_ids = REQUEST['new_ids']
+#new_ids = [id.upper() for id in REQUEST['new_ids']]
+
+here = context
+if context.portal_type == "University":
+    here = context.academics
+pt = context.portal_type
+mt = context.meta_type
+logger.info('%s starting renaming %s to %s' % (member,old_ids,new_ids))
+
+here.manage_renameObjects(REQUEST['ids'], new_ids, REQUEST)
+if pt == 'University':
+    for faculty in old_ids:
+        students = context.students_catalog(faculty=faculty)
+        student_ids = [s.id for s in students]
+        data = {}
+        new_fid = new_ids[old_ids.index(faculty)]
+        data['faculty'] = new_fid
+        for sid in student_ids:
+            data['id'] = sid
+            context.students_catalog.modifyRecord(**data)
+        courses = context.courses_catalog(faculty=faculty)
+        courses_ids = [c.code for c in courses]
+        for cid in courses_ids:
+            data['code'] = cid
+            context.courses_catalogModify(**data)
+elif pt == 'Faculty':
+    for department in old_ids:
+        students = context.students_catalog(department=department)
+        student_ids = [s.id for s in students]
+        data = {}
+        new_did = new_ids[old_ids.index(department)]
+        data['department'] = new_did
+        for sid in student_ids:
+            data['id'] = sid
+            context.students_catalog.modifyRecord(**data)
+        courses = context.courses_catalog(department=department)
+        courses_ids = [c.code for c in courses]
+        for cid in courses_ids:
+            data['code'] = cid
+            context.courses_catalogModify(**data)
+logger.info('%s finished renaming %s to %s' % (member,old_ids,new_ids))
+
+return REQUEST.RESPONSE.redirect(here.absolute_url() + \
+                                ('?portal_status_message=%s' \
+                                % ('psm_item(s)_renamed',)))
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/id_rename_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/id_rename_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/id_rename_form.pt	(revision 2226)
@@ -0,0 +1,61 @@
+<metal:html use-macro="here/main_template/macros/master">
+
+<metal:header fill-slot="header">
+
+<h3 i18n:translate="heading_rename_items">Rename Items</h3>
+
+<p class="description" i18n:translate="help_rename_items">Changing the id of an object does not
+affect its title but changes the URL to access it. Links that point to the
+current id won't find it anymore.</p>
+
+</metal:header>
+
+<metal:main fill-slot="main">
+
+<div class="group" tal:condition="context/academics_rename_items" >
+<form action="folder_rename" method="post"
+      tal:attributes="action string:${here_url}/id_rename">
+
+  <table width="90%">
+    <tr tal:repeat="item context/academics_rename_items">
+      <td align="left" valign="top" width="20%" nowrap="nowrap">
+        <span tal:replace="structure item/iconHTML">Type Image</span>
+        <span tal:replace="item/getId">ID</span>
+        <input type="hidden" name="ids:list" value=""
+               tal:attributes="value item/getId" />
+      </td>
+
+      <td align="left" valign="top">
+        <strong i18n:translate="label_rename_to">to</strong>
+      </td>
+
+      <td align="left" valign="top">
+        <input type="text" name="new_ids:list" value=""
+               tal:attributes="value item/getId" size="20" />
+      </td>
+    </tr>
+
+    <tr>
+      <td colspan="3"><br />
+        <input class="standalone" type="submit" value="button_change"
+          i18n:attributes="value" />
+      </td>
+    </tr>
+  </table>
+
+</form>
+</div><!-- tal:condition="here/folder_rename_items" -->
+
+<div tal:condition="not: here/academics_rename_items">
+
+  <p i18n:translate="help_no_items_to_rename">
+    You must select one or more items to rename.
+  </p>
+  <input class="standalone" 
+         type="button" value="button_ok" onclick="history.back()"
+         i18n:attributes="value" />
+
+</div>
+
+</metal:main>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/illegal_view.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/illegal_view.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/illegal_view.py	(revision 2226)
@@ -0,0 +1,8 @@
+##parameters=
+# $Id: illegal_view.py 681 2006-10-13 06:43:39Z henrik $
+"""
+"""
+
+REQUEST = context.REQUEST
+
+return REQUEST.RESPONSE.redirect('%s' % context.portal_url())
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/import.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/import.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/import.py	(revision 2226)
@@ -0,0 +1,44 @@
+##parameters=REQUEST
+# $Id$
+"""
+process the Application Form
+return html renderer + psm
+"""
+import DateTime
+from urllib import urlencode
+current = DateTime.DateTime()
+pr = context.portal_registration
+
+validate = REQUEST.has_key("import")
+
+lt = context.portal_layouts
+#pr = context.portal_registration
+
+res,psm,ds = lt.renderLayout(layout_id= 'import',
+                      schema_id= 'import',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      commit=False,
+                      )
+if psm == 'invalid':
+    return context.import_form(rendered = res,
+                               psm = "Please correct your input!",
+                               ds = ds,
+                              )
+elif psm == '':
+    return context.import_form(rendered = res,
+                               psm = None,
+                               ds = ds,
+                              )
+elif psm == 'valid':
+    pass
+psm = context.waeup_tool.importData(ds.get('filename'),
+                                    ds.get('name'),
+                                    ds.get('import_or_edit')
+                                   )
+return context.import_form(rendered = res,
+                                 psm = psm,
+                                 ds = ds,
+                                 )
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/import_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/import_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/import_form.pt	(revision 2226)
@@ -0,0 +1,29 @@
+<tal:block define="rendered_main options/rendered;
+           portal_status_message options/psm;
+           data_storage options/ds;
+           formaction options/formaction|string:import;
+           button options/button|string:Import;
+           creation creation|nothing;"
+           >
+  <metal:block define-macro="edit_form">
+    <metal:block use-macro="here/main_template/macros/master">
+      <metal:block fill-slot="main">
+      <h3>Import Data!</h3>
+      <br />      
+        <form action="" id="editForm" method="post" 
+              enctype="multipart/form-data" class="workflow"
+              tal:attributes="action formaction"
+              >
+          <div tal:replace="structure rendered_main" />
+          <br />
+          <input type="submit" class="standalone" 
+                 name="import" value="import"
+                 tal:attributes="value button"
+                 tal:condition="not:creation" />
+        </form>
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/in_progress_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/in_progress_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/in_progress_view.pt	(revision 2226)
@@ -0,0 +1,12 @@
+<metal:body use-macro="here/main_plain/macros/master">
+  <metal:head fill-slot="header"
+              tal:define="refresh options/refresh|python:20;
+              page options/page|string:in_progress_view"
+              >
+    <meta http-equiv="refresh" content="5; URL=http://de.selfhtml.org/"
+          tal:attributes="content string:${refresh};; URL=${context/absolute_url}/${page}" />
+  </metal:head>
+  <metal:main fill-slot="main">
+    <h2>Processing, please wait !</h2>
+  </metal:main>
+</metal:body>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/isClearanceOfficer.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/isClearanceOfficer.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/isClearanceOfficer.py	(revision 2226)
@@ -0,0 +1,19 @@
+## Script (Python) "isClearanceOfficer"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+
+#from Products.zdb import set_trace
+#set_trace()
+if context.isStudent():
+    return False
+mtool = context.portal_membership
+roles = mtool.getAuthenticatedMember().getRolesInContext(context)
+return "ClearanceOfficer" in roles
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/isCourseAdviser.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/isCourseAdviser.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/isCourseAdviser.py	(revision 2226)
@@ -0,0 +1,20 @@
+## Script (Python) "isCourseAdviser"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: isClearanceOfficer.py 1087 2006-12-18 22:13:31Z joachim $
+member = context.portal_membership.getAuthenticatedMember()
+member_id = str(member)
+o = ord(member_id[1]) 
+if o >= 48 and o <= 57:
+    return False
+# if context.isStudent():
+#     return False
+roles = member.getRolesInContext(context)
+return "CourseAdviser" in roles
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/isSectionManager.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/isSectionManager.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/isSectionManager.py	(revision 2226)
@@ -0,0 +1,16 @@
+## Script (Python) "isSectionManager"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id: isManager.py 888 2006-11-17 21:28:48Z henrik $
+
+mtool = context.portal_membership
+roles = mtool.getAuthenticatedMember().getRolesInContext(context)
+context.REQUEST.set("roles",roles)
+return "SectionManager" in roles or\
+       "Manager" in roles
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/isSectionOfficer.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/isSectionOfficer.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/isSectionOfficer.py	(revision 2226)
@@ -0,0 +1,23 @@
+## Script (Python) "isSectionOfficer"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id: isManager.py 888 2006-11-17 21:28:48Z henrik $
+
+member = context.portal_membership.getAuthenticatedMember()
+member_id = str(member)
+o = ord(member_id[1])
+if o >= 48 and o <= 57:
+    return False
+# if context.isStudent():
+#     return False
+roles = member.getRolesInContext(context)
+return "SectionOfficer" in roles or\
+       "SectionManager" in roles or\
+       "Manager" in roles
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/isStaff.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/isStaff.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/isStaff.py	(revision 2226)
@@ -0,0 +1,19 @@
+## Script (Python) "isStaff"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: $
+
+mtool = context.portal_membership
+if mtool.isAnonymousUser():
+    return False
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+o = ord(member_id[1]) 
+return not (o >= 48 and o <= 57)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/isStudent.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/isStudent.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/isStudent.py	(revision 2226)
@@ -0,0 +1,22 @@
+## Script (Python) "isStudent"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+
+member_id = str(context.portal_membership.getAuthenticatedMember())
+#from Products.zdb import set_trace;set_trace()
+# if len(member_id) != 7:
+#     return False
+# try:
+#     int(member_id[1:])
+#     return True
+# except:
+#     return False
+o = ord(member_id[1]) 
+return o >= 48 and o <= 57
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_search_edit.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_search_edit.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_search_edit.pt	(revision 2226)
@@ -0,0 +1,81 @@
+<metal:block define-macro="default_edit"
+             tal:define="layout options/layout;
+             ds options/datastructure;
+             formaction options/formaction|string:.;
+             is_flexible options/is_flexible;
+             cpsmcat nocall:here/translation_service;
+             faculties options/faculties|nothing;
+             departments options/departments|nothing;
+             "
+             >
+  <form action='some' method='post'
+        enctype='multipart/form-data' 
+        class='workflow'
+        tal:attributes="action formaction">
+    <input type="hidden" name="faculties" tal:condition="faculties"
+           tal:attributes="value faculties">
+    <input type="hidden" name="departments" tal:condition="departments"
+           tal:attributes="value departments">
+    <div class=''>
+      <div class='documentFields'>
+        <table width="" cellpadding="2" cellspacing="2" summary="Form layout">
+          <tr tal:repeat="row layout/rows" valign="top">
+            <td tal:repeat="cell row"
+                tal:attributes="colspan cell/ncols">
+              <tal:block define="widget cell/widget;
+              wid widget/getWidgetId;
+              dm options/datastructure/getDataModel;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required widget/is_required|nothing;
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              widget_css_class python:test(is_flexible, 'group', widget_css_class);
+              css_class python:test(err, 'row error',
+              test(is_flexible, 'group', 'row'))"
+              >
+                <div tal:attributes="class widget_css_class;
+                id python:widget.getHtmlWidgetId()+'_widget';"
+                >
+                  <div class="label" tal:condition="widget/label_edit"
+                       tal:attributes="class python:test(is_required, 'label required','label')">
+                    <label i18n:translate="" tal:condition="widget/is_i18n"
+                           tal:content="widget/label_edit"
+                           tal:attributes="for cell/widget_input_area_id|nothing;">label</label>
+                    <label tal:condition="not:widget/is_i18n"
+                           tal:content="widget/label_edit"
+                           tal:attributes="for cell/widget_input_area_id|nothing;">label</label>
+                  </div>
+                  <button type="button" class="tooltipControl"
+                          tal:condition="widget/help"
+                          tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+                  <div class="field">
+                    <div tal:replace="structure cell/widget_rendered"/>
+                  </div>
+                  <div class="tooltipArea" style="visibility: hidden;"
+                       tal:condition="widget/help"
+                       tal:attributes="id tooltip_id;
+                       onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                       >
+                    <tal:block i18n:translate="" tal:condition="widget/is_i18n"
+                               tal:content="widget/help">i18_key-help_for_this_field</tal:block>
+                    <tal:block tal:condition="not:widget/is_i18n"
+                               tal:content="widget/help">This is the help for this field</tal:block>
+                  </div>
+                  <tal:block condition="err">
+                    <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                      <br /><em style="color: red"
+                                tal:content="msg">err</em>
+                    </tal:block>
+                  </tal:block>
+                </div>
+              </tal:block>
+            </td>
+          </tr>
+        </table>
+        <input type="submit" class="standalone" name="cpsdocument_edit_button" value="Search" />
+      </div>        
+    </div>
+  </form>
+</metal:block>
+  
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_waeup_create.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_waeup_create.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_waeup_create.pt	(revision 2226)
@@ -0,0 +1,2 @@
+<tal:block define="global creation python:1" />
+<metal:block use-macro="here/layout_waeup_edit/macros/default_edit" />
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_waeup_edit.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_waeup_edit.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_waeup_edit.pt	(revision 2226)
@@ -0,0 +1,179 @@
+<!-- a layout_lib macro -->
+<!-- $Id$ -->
+<metal:block define-macro="default_edit"
+  tal:define="layout options/layout;
+              ds options/datastructure;
+              dm ds/getDataModel;
+              creation creation|nothing;
+              metadata metadata|nothing;
+              type_name request/type_name|nothing;
+              ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None);
+              creation_form python:ti and ti.getActionById('create', 'cpsdocument_create_form') or 'cpsdocument_create_form' ;
+              edit_form     python:ti and ti.getActionById('edit',   'cpsdocument_edit_form') or  'cpsdocument_edit_form';
+              metadata_form python:ti and ti.getActionById('metadata', 'cpsdocument_metadata') or 'cpsdocument_metadata';
+              formaction formaction|python: test(creation, creation_form,
+                                 test(metadata, metadata_form,
+                                                edit_form));
+              first_layout options/first_layout|python:0;
+              last_layout options/last_layout|python:0;
+              is_flexible options/is_flexible;
+              cpsmcat nocall:here/translation_service;
+              ">
+<tal:block condition="python:first_layout">
+  <tal:block
+  content="structure string:<form id='editForm' action='${formaction}' method='post'
+  enctype='multipart/form-data' class='workflow'>
+  <div class='group'><div class='documentFields'>" />
+  <input type="hidden" name="type_name" value="."
+    tal:condition="creation" tal:attributes="value request/type_name" />
+</tal:block>
+
+<table width="100%" cellpadding="2" cellspacing="2" summary="Form layout"
+       tal:condition="layout/rows">
+  <tr tal:repeat="row layout/rows" valign="top">
+    <td tal:repeat="cell row"
+      tal:attributes="colspan cell/ncols">
+      <tal:block define="widget cell/widget;
+                         wid widget/getWidgetId;
+                         err python:ds.getError(wid);
+                         err_mapping python:ds.getErrorMapping(wid);
+                         is_required widget/is_required|nothing;
+                         tooltip_id python:wid + '_help';
+                         widget_css_class cell/widget_css_class|nothing;
+                         widget_css_class python:test(is_flexible, 'group', widget_css_class);
+                         css_class python:test(err, 'row error',
+                                               test(is_flexible, 'group', 'row'))">
+        <div tal:attributes="class widget_css_class;
+                             id python:widget.getHtmlWidgetId()+'_widget';
+                            ">
+          <div class="label" tal:condition="widget/label_edit"
+            tal:attributes="class python:test(is_required, 'label required',
+                                              'label')">
+            <label i18n:translate="" tal:condition="widget/is_i18n"
+              tal:content="widget/label_edit"
+              tal:attributes="for cell/widget_input_area_id|nothing;">label</label>
+            <label tal:condition="not:widget/is_i18n"
+              tal:content="widget/label_edit"
+              tal:attributes="for cell/widget_input_area_id|nothing;">label</label>
+          </div>
+          <button type="button" class="tooltipControl"
+                  tal:condition="widget/help"
+                  tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+          <div class="field">
+            <div tal:replace="structure cell/widget_rendered"/>
+          </div>
+          <div class="tooltipArea" style="visibility: hidden;"
+               tal:condition="widget/help"
+               tal:attributes="id tooltip_id;
+                               onclick python:'showElement(false, \'%s\')' % tooltip_id;">
+            <tal:block i18n:translate="" tal:condition="widget/is_i18n"
+              tal:content="widget/help">i18_key-help_for_this_field</tal:block>
+            <tal:block tal:condition="not:widget/is_i18n"
+              tal:content="widget/help">This is the help for this field</tal:block>
+          </div>
+          <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                  tal:content="msg">err</em>
+              </tal:block>
+          </tal:block>
+          <div style="float: right;" tal:condition="is_flexible">
+            <input type="button" value="button_move_up"
+              tal:condition="not:repeat/row/start"
+              tal:attributes="name string:uprow_${repeat/row/index};
+                              onclick python:'CPSFlexibleEdit.buttonClick(this, \'\')'"
+              class="context moveUp" i18n:attributes="value" />
+            <input type="button" value="button_move_down"
+              tal:condition="not:repeat/row/end"
+              tal:attributes="name string:downrow_${repeat/row/index};
+                              onclick python:'CPSFlexibleEdit.buttonClick(this, \'\')'"
+              class="context moveDown" i18n:attributes="value" />
+            <input type="button" value="button_delete"
+              class="destructive" i18n:attributes="value"
+              tal:attributes="name string:deleterow_${repeat/row/index};
+                              onclick python:'CPSFlexibleEdit.buttonClick(this, \'%s\')' %
+                                (cpsmcat('description_confirm_delete'), )" />
+          </div>
+        </div>
+      </tal:block>
+    </td>
+  </tr>
+</table>
+
+<tal:block condition="is_flexible">
+<div tal:define="flexible_widgets options/flexible_widgets">
+  <input type="hidden" name="layout_id" value="."
+    tal:attributes="value layout/layout_id" />
+  <tal:select condition="python:len(flexible_widgets)>1">
+    <select name="widget_type">
+      <tal:block repeat="widget options/flexible_widgets">
+      <option value="."
+        tal:condition="widget/is_i18n"
+        i18n:translate=""
+        tal:attributes="value widget/getWidgetId"
+        tal:content="widget/title_or_id">Type</option>
+      <option value="."
+        tal:condition="not:widget/is_i18n"
+        tal:attributes="value widget/getWidgetId"
+        tal:content="widget/title_or_id">Type</option>
+      </tal:block>
+    </select>
+    <input type="button" id="addwidget_button"
+           name="addwidget_button" value="button_add"
+           class="context"
+           i18n:attributes="value"
+           tal:attributes="onclick python:'CPSFlexibleEdit.buttonClick(this, \'\')'" />
+  </tal:select>
+  <tal:button condition="python:len(flexible_widgets) == 1">
+    <tal:block define="widget python:flexible_widgets[0]">
+      <input type="hidden" name="widget_type"
+        tal:attributes="value widget/getWidgetId">
+      <input type="submit" name="addwidget_button"
+        id="addwidget_button"
+        tal:define="button_add python:cpsmcat('button_add');
+          widget_title python:cpsmcat(widget.title_or_id())"
+        tal:attributes="value string:${button_add} ${widget_title}"
+        class="context" />
+    </tal:block>
+  </tal:button>
+</div>
+</tal:block>
+
+<tal:block condition="python: last_layout">
+  <tal:block content="structure string:</div>" />
+  <metal:block define-slot="additional_content" />
+
+  <tal:block condition="not:creation">
+    <div class="tooltipArea" style="visibility: hidden;"
+      id="transition_comments_help"
+      onclick="showElement(false, 'transition_comments_help')"
+      i18n:translate="help_transition_comments_modification">
+      In this filed you can give the reason of the modification that you are doing on this document.
+      Your comments may be used to notify other users.
+    </div>
+    <dl>
+      <dt><label for="comments"
+          i18n:translate="transition_comments_modification">Reason of the modification</label>
+        <button type="button" class="tooltipControl"
+          onclick="toggleElementVisibility('transition_comments_help')"> ? </button>
+      </dt>
+      <dd>
+        <textarea name="comments" id="comments" cols="60" rows="3"
+          tal:content="nothing">
+        </textarea>
+      </dd>
+    </dl>
+  </tal:block>
+  <input type="submit" class="standalone" name="cpsdocument_edit_button"
+    value="button_change" i18n:attributes="value" id="cpsdocument_edit_button"
+    tal:condition="not:creation" />
+  <input type="submit" class="standalone" name="cpsdocument_edit_and_view_button"
+    value="button_change_and_view" i18n:attributes="value"
+    id="cpsdocument_edit_and_view_button"
+    tal:condition="not:creation" />
+  <input type="submit" class="standalone" name="cpsdocument_create_button"
+    value="button_create" i18n:attributes="value" tal:condition="creation" />
+  <tal:block content="structure string:</div></form>" />
+</tal:block>
+
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_waeup_lib.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_waeup_lib.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_waeup_lib.pt	(revision 2226)
@@ -0,0 +1,45 @@
+<!-- WAeUP layout_lib  -->
+<!-- $Id$ -->
+
+
+<!-- table view -->
+
+<metal:block define-macro="table_view"
+             tal:define="layout options/layout">
+<table>
+    <tal:block repeat="row layout/rows">
+      <tr>
+        <tal:block repeat="cell row">
+          <tal:block define="widget cell/widget">
+            <div tal:omit-tag=""
+                 tal:define="dm options/datastructure/getDataModel;"
+                 tal:attributes="class cell/widget_css_class|nothing;
+                 id python:widget.getHtmlWidgetId()+'_widget';" 
+                 >
+              <tal:block condition="widget/label">
+              <td width="220px" valign="top" nowrap>
+                <span i18n:translate="" tal:condition="widget/is_i18n">
+                    <span tal:content="widget/label" />:</span>
+                <span tal:condition="not:widget/is_i18n">
+                    <span tal:content="widget/label" />:</span>
+              </td>
+              </tal:block>
+              <tal:block condition="not: widget/label">
+              <td>
+                <div width="220px" valign="top"> no label </div>
+              </td>
+              </tal:block>              
+              <td>
+               <div class="ddescription"  tal:condition="cell" tal:content="structure cell/widget_rendered"></div>
+               <div class="ddescription" tal:condition="not:cell/widget_rendered"> none </div>
+             </td>
+            </div>
+          </tal:block>
+        </tal:block>
+      </tr>
+    </tal:block>
+  </table>
+</metal:block>
+
+
+    
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_waeup_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_waeup_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_waeup_view.pt	(revision 2226)
@@ -0,0 +1,1 @@
+<metal:block use-macro="here/layout_waeup_lib/macros/table_view" />
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_wo_object_create.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_wo_object_create.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_wo_object_create.pt	(revision 2226)
@@ -0,0 +1,91 @@
+<tal:block define="global creation python:1;
+                   global formaction string:display_pume_result" />
+<!-- a layout_lib macro -->
+<!-- $Id$ -->
+
+<metal:block define-macro="default_edit"
+  tal:define="layout options/layout;
+  ds options/datastructure;
+  dm ds/getDataModel;
+  formaction options/formaction;
+  creation creation|nothing;
+  metadata metadata|nothing;
+  type_name request/type_name|nothing;
+  ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None);
+  cpsmcat nocall:here/translation_service;
+  apply request/apply_button|nothing;
+  ">
+  <form action="" id="editForm" method="post" 
+        enctype="multipart/form-data" class="workflow"
+        tal:attributes="action formaction"
+        >
+  <table class="layoutDefault" summary="Form layout"
+         tal:condition="layout/rows">
+    <span tal:repeat="row python: layout['rows']" valign="top" >
+      <span tal:repeat="cell row">
+        <tr tal:define="widget cell/widget;
+              wid widget/getWidgetId;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              css_class python:test(err, 'row error','row')"
+              tal:condition="python: wid != 'passport'"
+              >
+          <div tal:attributes="class widget_css_class;
+          id python:widget.getHtmlWidgetId()+'_widget';"
+          >
+            <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+            </td>
+            <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+            </td>
+          </div>
+        </tr>
+      </span>
+    </span>
+  </table>
+  <br />
+  <input type="submit" class="standalone" name="cpsdocument_edit_button"
+         value="Save" 
+         id="cpsdocument_edit_button"
+         tal:condition="not:creation" />
+  <input type="submit" class="standalone" name="apply_admission"
+         value="apply for admission"
+         id="cpsdocument_edit_and_view_button"
+         tal:condition="apply" 
+         tal:attributes="value apply"/>
+  <input type="submit" 
+         class="standalone" 
+         name="cpsdocument_create_button"
+         value="apply"
+         tal:attributes="value options/button"
+         tal:condition="creation" />
+
+</form>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_wo_object_edit.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_wo_object_edit.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/layout_wo_object_edit.pt	(revision 2226)
@@ -0,0 +1,63 @@
+<tal:block define="global creation python:0;
+                   global formaction string:set_access_data" />
+<!-- a layout_lib macro -->
+<!-- $Id$ -->
+
+<metal:block define-macro="default_edit"
+  tal:define="layout options/layout;
+  ds options/datastructure;
+  dm ds/getDataModel;
+  cpsmcat nocall:here/translation_service;
+  ">
+  <table class="layoutDefault" summary="Form layout"
+         tal:condition="layout/rows">
+    <span tal:repeat="row python: layout['rows']" valign="top" >
+      <span tal:repeat="cell row">
+        <tr tal:define="widget cell/widget;
+              wid widget/getWidgetId;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              css_class python:test(err, 'row error','row')"
+              tal:condition="python: wid != 'passport'"
+              >
+          <div tal:attributes="class widget_css_class;
+          id python:widget.getHtmlWidgetId()+'_widget';"
+          >
+            <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+            </td>
+            <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+            </td>
+          </div>
+        </tr>
+      </span>
+    </span>
+  </table>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/login_staff.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/login_staff.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/login_staff.pt	(revision 2226)
@@ -0,0 +1,65 @@
+<metal:html>
+
+<metal:body use-macro="here/main_template/macros/master">
+
+<metal:main fill-slot="main"
+      tal:define="username request/username | request/__ac_name | nothing">
+
+  <h3 i18n:translate="">Staff Login</h3>
+
+  <form id="" action="" method="post"
+        tal:attributes="action string:${base_url}logged_in">
+  
+  <p>You've chosen the portal's 'back entrance' to log in. This entrance is dedicated to university staff members to maintain the portal's database.</p>
+  
+ 
+  <br /> 
+
+  <table id="login" class="form"
+         summary="Table for entering login information">
+    <tbody>
+    <tr>
+    <th>
+        <label for="username"
+               i18n:translate="label_student_id">User Name</label></th>
+    <td>
+        <input type="text" id="username" name="__ac_name"
+               class="focus" size="20" value=""
+               tal:attributes="value username" /></td>
+    </tr>
+    <tr>
+    <th>
+        <label for="password"
+               i18n:translate="label_password">Password</label></th>
+    <td>
+        <input type="password" id="password" name="__ac_password" size="20"
+               value="" /></td>
+    </tr>
+    </tbody>
+  </table>
+  
+  <p class="buttonArea">
+    <!-- ****** Enable the automatic redirect ***** -->
+    <input type="hidden" name="came_from" value=""
+           tal:condition="exists: request/came_from"
+           tal:attributes="value request/came_from" />
+    <!-- ****** Enable the automatic redirect ***** -->
+    <input i18n:attributes="value" class="standalone"
+           type="submit" name="submit" value="button_login" />
+  </p>
+
+  </form>
+
+  <br />
+
+  <p i18n:translate="help_login_aware_logout">
+    Don't forget to logout or exit your browser when you're done.
+  </p>
+  <p i18n:translate="help_login_troubles_cookies">
+    Having trouble logging in? Make sure to enable cookies in
+    your web browser.
+  </p>
+
+</metal:main>
+</metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/mail2admin.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/mail2admin.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/mail2admin.py	(revision 2226)
@@ -0,0 +1,54 @@
+## Script (Python) "mail2admin"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=fullname=None,regno=None,email=None,probtype=None,descr=None,commt=None
+##title=
+##
+# $Id$
+
+mhost = context.MailHost
+prop = context.portal_properties
+
+# the message format, %s will be filled in from data
+
+message = """
+From: %s <%s>
+To: %s
+Cc: %s, %s
+Bcc: %s
+Reply-To: %s
+Subject: Uniben Contact
+
+Fullname: %s
+Member ID: %s
+Problem Type: %s
+Description: %s
+"""
+
+#prop.email_from_address should be used for To:
+
+msg = message % (
+     fullname,
+     email,
+     prop.email_from_address,
+     email,
+     'kehindesamuel@waeup.org',
+     'waeup@saoas.org',
+#    'js@aixtraware.de',
+     email,
+     fullname,
+     regno,
+     probtype,
+     descr,
+     )
+mhost.send(msg)
+
+REQUEST = context.REQUEST
+RESPONSE = REQUEST.RESPONSE
+
+redirect_url = REQUEST.HTTP_REFERER
+redirect_url = '%s/?%s' % (redirect_url,'portal_status_message=Your message has been sent!')
+RESPONSE.redirect(redirect_url)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/main_plain.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/main_plain.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/main_plain.pt	(revision 2226)
@@ -0,0 +1,27 @@
+<metal:block define-macro="master" tal:define="
+  utool nocall:here/portal_url;
+  atool here/portal_actions;
+  mtool here/portal_membership;
+  can_raise python:mtool.assertViewable(here);
+  ttool here/portal_trees;
+  wtool here/portal_workflow;
+  context_url python:here.getContextUrl(utool=utool);
+  base_url python:utool.getBaseUrl();
+  here_url python:here.absolute_url();
+  member mtool/getAuthenticatedMember;
+  isAnon mtool/isAnonymousUser;
+  isHomeless python:isAnon or member.getProperty('homeless', 0);
+  isHomeless python:(isHomeless == '0' and [0] or [isHomeless])[0];
+  actions python: request.get('cpsskins_cmfactions') or atool.listFilteredActionsFor(here);
+  wf_state python:wtool.getInfoFor(here,'review_state','');
+  uname python:isAnon and 'Guest' or member.getUserName();
+  checkPerm nocall:mtool/checkPermission;
+  cpsmcat nocall:here/translation_service;
+  locale here/translation_service/getSelectedLanguage;
+  in_ws here/isInWorkspacesTree;
+  ">
+  <metal:block use-macro="here/generic_lib_portal_message/macros/portal_message" />
+  <metal:block define-slot="header" />
+  <metal:block define-slot="main" />
+  <metal:block define-slot="sub" />
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/portlet_session_info.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/portlet_session_info.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/portlet_session_info.pt	(revision 2226)
@@ -0,0 +1,19 @@
+<tal:block define="mtool here/portal_membership;
+           member mtool/getAuthenticatedMember;
+           isAnon mtool/isAnonymousUser;
+           name context/getStudentName;"
+           >
+  <tal:block condition="name">
+       <strong> 
+         <span tal:content="name" /> 
+       </strong>
+  </tal:block>
+  <tal:block condition="not:name">
+       <strong> 
+         <span tal:content="python:member.getProperty('fullname',None)" /> 
+       </strong>
+  </tal:block>  
+  <tal:block condition="isAnon">
+    <strong>Anonymous User</strong>
+  </tal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/portlet_waeup_status_display.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/portlet_waeup_status_display.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/portlet_waeup_status_display.pt	(revision 2226)
@@ -0,0 +1,7 @@
+<metal:block define-macro="status_display">
+<tal:block define="item nocall:options/context_obj;
+                   review_info item/getReviewInfo;"
+                   >
+    <span tal:content="review_info" />
+  </tal:block>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/sessions_voc.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/sessions_voc.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/sessions_voc.py	(revision 2226)
@@ -0,0 +1,25 @@
+##parameters=key=None
+# $Id$
+"""
+Return the sessions as an vocabulary
+
+"""
+if key is None:
+    # not used for WAeUPSessionWidget, only for SelectWidget
+    l = [('-1','N/A')]
+    for y in range(1998,2008):
+        l.append( ('%s' % str(y)[-2:],'%4d/%4d' % (y,y+1)))
+    return l
+
+try:
+    y = int(key)
+except:
+    return 'N/A'
+if y == -1:
+    return 'N/A' 
+if y < 90:
+    cent = 2000
+else:
+    cent = 1900
+return "%4d/%4d" % (cent+y, cent+y+1)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/srp_anonymous_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/srp_anonymous_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/srp_anonymous_view.pt	(revision 2226)
@@ -0,0 +1,103 @@
+<metal:html>
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main">
+
+      <span tal:condition="python: getattr(context.campus.documents,'frontpage_doc',None)">
+          <div tal:define="doc python: context.campus.documents.frontpage_doc.getContent()"
+               tal:content="structure python:doc.wdrender()" />
+      </span> 
+
+      <span tal:condition="python: not getattr(context.campus.documents,'frontpage_doc',None)">
+
+      <h2>Welcome to the     
+      <br />New Student Registration Portal of the University of Benin, Nigeria</h2>
+             
+      <strong>This is the frontpage of Uniben's Student Registration Portal (SRP) which is part 
+                 of the West African e-University Project
+                 (<a href="" tal:attributes="href string:http://waeup.org">WAeUP</a>).</strong>
+      
+      <br /><br />
+      
+      <h2>Admission into Local/Part-Time Programmes 2006/2007</h2>
+      
+      <p><strong>INSTRUCTIONS FOR CHECKING SCREENING 
+                 TEST RESULTS AND ADMISSIONS</strong></p>
+      <br />
+      <ol>
+      <li>Click on 'View CEST Results' (CEST means Common Entrance Screening Test),</li> 
+      <li>enter your Application Number (No Scratch Card is required for this!),</li> 
+      <li>press the "Search" button, </li> 
+      <li>print your Result Slip.</li>
+      
+      <li>If you are admitted or if you are a <strong>Diploma or Non-Exam Programme</strong> applicant, purchase a N250-Admission-Checking and a 
+      N10500-Clearance Scratch Card from any of the following designated banks in Benin City:
+      
+      <br /><br />
+      UBA Plc, Uselu-Ugbowo Rd <br />
+      First Bank Plc, Ugbowo <br />
+      Unity Bank, Uniben <br />
+      Intercontinental Bank, Uniben <br />
+      Wema Bank, Akpakpava Road <br />
+      Zenith Bank Uselu <br /><br />
+      </li>
+      
+      <li>Click "Check Admission",</li> 
+      <li>enter your Registration Number and your Admission Checking PIN (prefix APP),</li> 
+      <li>press the "Check" button,</li> 
+      <li>print your Admission Slip,</li> 
+      <li>buy your Clearance Scratch Card,</li> 
+      <li>log in with your new Student Id (see Admission Slip)
+          and your Password (last 10 digits of your Admission Checking PIN),</li> 
+      <li>press the "Continue" button,</li> 
+      <li>check your email address and phone number,</li> 
+      <li>press the "Save & Continue" button,</li> 
+      <li>enter your Clearance PIN (prefix CLR) and</li> 
+      <li>press the "Start" button.</li> 
+      </ol>
+      <br />       
+      
+      
+      <p><strong>Notice:</strong> Clearance and Orientation for Part-Time and Diploma Students commences on 
+         resumption and ends exactly on <strong><font color="red">1st June 2007</font></strong>. 
+         Part-Time and Diploma Students must fill their 
+         Clearance/Elegibility forms online before 1st June.
+         Any breach of this directive, will result in forfeiture of the adminssion offer. 
+      </p>            
+      
+      <h2>Returning Students</h2>         
+      
+      
+      <ol>
+      <li> Simply click "Return 2006/2007", </li> 
+      <li> enter your Matriculation Number and either your firstname, middlename or lastname,</li> 
+      <li> press the "Search" button,</li> 
+      <li> press the "Continue to Login" button, </li> 
+      <li> check if you are the person indicated on the access data form,</li> 
+      <li> enter your email address and phone number,</li> 
+      <li> choose and verify your password (minimum size 5 characters including 1 digit),</li>
+      <li> tick the acknowledgement check box,</li>           
+      <li> press the "Save & First-time Login" button,</li> 
+      <li> print your Sessional Result Slip (it includes your new Student Id for further logins), </li> 
+      <li> edit your personal data record,</li> 
+      <li> book your accommodation,</li> 
+      <li> pay your school fee,</li>
+      <li> register your courses.</li>          
+      </ol>
+      
+      <br />
+      <p>If you have to register for <strong>previous sessions</strong> or are a 
+      <strong>temporary withdrawn</strong> student, click "Previous Sessions" 
+      instead of "Return 2006/2007".</p> 
+      
+      <p><strong>Notice:</strong> Full Time Students are expected to register their 
+      courses online on or before <strong><font color="red">6th June 2007</font></strong>.
+            
+            
+      </span>       
+      
+    </metal:main>
+  </metal:body>
+</metal:html>
+
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/srp_invalid_access.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/srp_invalid_access.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/srp_invalid_access.pt	(revision 2226)
@@ -0,0 +1,7 @@
+<metal:html>
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main">
+      <h2>You don't have access to the requested page</h2>
+    </metal:main>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/srp_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/srp_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/srp_view.pt	(revision 2226)
@@ -0,0 +1,21 @@
+<metal:html>
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main">
+    
+      <span tal:condition="python: getattr(context.campus.documents,'srp_home_doc',None)">
+          <div tal:define="doc python: context.campus.documents.srp_home_doc.getContent()"
+               tal:content="structure python:doc.wdrender()" />
+      </span>     
+    
+      <span tal:condition="python: not getattr(context.campus.documents,'srp_home_doc',None)">
+      
+        <h2>Welcome to the     
+          <br />Student Registration Portal of the University of Benin, Nigeria</h2>
+          <br />
+          You are logged in and viewing the portal's root folder. Please go to one of the sections above.     
+          
+       </span>
+       
+    </metal:main>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/unchecked.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/unchecked.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/unchecked.pt	(revision 2226)
@@ -0,0 +1,68 @@
+<html metal:use-macro="here/main_template/macros/master">
+
+<body>
+
+<div metal:fill-slot="main">
+
+
+<div class=""
+     tal:define="physPath python:'/'.join(here.getPhysicalPath());
+                 results python: here.portal_catalog(review_state='unchecked', path=physPath);
+                 purl here/portal_url;
+                ">
+
+<div tal:condition="results">
+<h1 i18n:translate="">Items unchecked inside <span tal:content="here/LongTitle|here/title_or_id " /></h1>
+
+
+
+<table width="100%" cellspacing="0" cellpadding="2"
+      summary="contents of the folder"
+      class="folderButtons"
+      tal:define="can_add python:checkPerm('Add portal content', here);
+                  can_del python:checkPerm('Delete objects', here);">
+
+  <thead>
+  <tr><td><strong>Title</strong></td><td><strong>Id</strong></td><td><strong>Type</strong></td></tr>
+  </thead>
+
+
+  <tbody tal:repeat="item results">
+
+  <tr><td></td><td></td><td></td></tr>
+
+  <tr tal:define="objURL string:${item/getURL}/view;
+                  objPath item/getPath;
+                  title item/Title;
+                 ">
+  <td>
+  <a href="url"
+      tal:attributes="href objURL">
+   <span tal:content="python: title or '(No title)'" />
+  </a>
+  </td>
+
+  <td i18n:translate="">
+    <span tal:replace="item/id" />
+  </td>
+  
+  <td>
+    <span tal:replace="item/portal_type" />
+  </td>
+ </tr>
+
+ </tbody>
+</table>
+</div>
+
+
+<div tal:condition="python: not results">
+ <p i18n:translate="">There are no items matching your specified criteria.</p>
+</div>
+
+</div>
+
+</div>
+
+</body>
+</html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_document_create_do.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_document_create_do.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_document_create_do.py	(revision 2226)
@@ -0,0 +1,52 @@
+##parameters=type_name, datamodel
+# $Id$
+"""
+Create an empty object in the context according to the datamodel.
+
+Datamodel may be examined to create a suitable id.
+
+Returns the created object (usually a proxy).
+"""
+from Products.CMFCore.utils import getToolByName
+request = context.REQUEST
+
+if type_name in ("StudyLevel","StudentStudyLevel","WAeUPDocument"):
+    id = datamodel.get('code')
+else:
+    id = datamodel.get('code').upper()
+    datamodel.set('code',id)
+##if not id:
+##    id = 'my ' + type_name
+##id = context.computeId(compute_from=id) # XXX shouldn't use a skin
+##
+language = datamodel.get('Language')
+if not language:
+    ts = getToolByName(context, 'translation_service')
+    language = ts.getSelectedLanguage()
+
+ttool = getToolByName(context, 'portal_types')
+ti = ttool[type_name]
+allow_discussion = ti.allowDiscussion()
+
+# Datamodel is passed so that flexti can initialize the object.
+new_id = context.invokeFactory(type_name, id, datamodel=datamodel,
+                               language=language,
+                               allow_discussion=allow_discussion)
+if new_id is not None:
+    id = new_id
+if type_name == "xxxCourse": # disabled handled by event
+    d = {}
+    ptl = request.get('PATH_TRANSLATED').split('/')
+    ai = ptl.index('academics')
+    d['faculty'] = ptl[ai+1]
+    d['department'] = ptl[ai+2]
+    from_dm = ('code','title','semester','credits',)
+    for f in from_dm:
+        d[f] = datamodel.get(f)
+    context.courses_catalog.addRecord(**d)
+ob = getattr(context, id)
+ob.getContent().edit(mapping=datamodel)
+
+context.notifyCPSDocumentCreation(ob=ob) # BBB obsolete in CPS 3.5.0
+
+return ob
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_document_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_document_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_document_view.pt	(revision 2226)
@@ -0,0 +1,33 @@
+<metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main"
+                tal:define="info context/getDocumentInfo;
+                s_name context/getStudentNameInContext;
+                is_so context/isSectionOfficer;">
+
+      <span tal:condition="not: info">
+        <span tal:content="here/illegal_view" />
+      </span>
+      <span tal:condition="info">
+   
+      <a href="" tal:attributes="href string:${here/academicsParent}">
+        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+        Up one level
+      </a>
+      
+      <h3 tal:condition="here/Title"> 
+         <span tal:condition="python:is_so and s_name">
+           <span tal:content="s_name" />:
+         </span>
+         <span tal:content="here/Title" />
+      </h3>
+      
+      <br />
+
+      <span tal:omit-tag=""  
+            tal:content="structure python: info['doc'].render(layout_mode='view')" />
+
+      </span>
+    </metal:main> 
+    <metal:sub fill-slot="sub"/>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_edit.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_edit.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_edit.py	(revision 2226)
@@ -0,0 +1,133 @@
+##parameters=REQUEST, cluster=None, cpsdocument_edit_and_view_button=None, came_from=None
+# $Id: external_edit.py 805 2006-11-09 09:38:29Z joachim $
+"""
+Called when a document form is posted.
+
+Validates data, then:
+
+ - if there's no error, updates the object and redirects to it,
+
+ - if there's an error, puts data in session and redirects to edit form.
+
+A form uid is propagated during the redirect to uniquely identify the
+form in the session.
+"""
+
+from urllib import urlencode
+from Products.CPSDocument.utils import getFormUidUrlArg
+if 'ajax_edit' in REQUEST.form:
+    return context.waeup_edit_ajax(REQUEST, cluster=cluster)
+
+import logging
+logger = logging.getLogger('Skins.waeup_edit')
+
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+
+# Check flexible controls
+#context.editLayouts(REQUEST=REQUEST)
+
+# Validate the document and write it if it's valid
+# (We don't call getEditableContent here, validate does it when needed.)
+doc = context.getContent()
+if context.portal_type == "StudentStudyCourse":
+    if len(context.objectIds()) > 0:
+        psm = 'Edit of StudentStudyCourse is only possible if there are no levels inside!'
+        args = getFormUidUrlArg(REQUEST)
+        args['portal_status_message'] = psm
+        url = context.absolute_url() + '?' + urlencode(args)
+        REQUEST.RESPONSE.redirect(url)
+
+is_valid, ds = doc.validate(request=REQUEST, proxy=context, cluster=cluster,
+                            use_session=True)
+
+student_id = context.getStudentId()
+
+##if action is None:
+##    ti = doc.getTypeInfo()
+##    action = ti.queryMethodID('edit', 'external_edit_form')
+##    action = '/' + action
+
+action = "/" + came_from
+if is_valid:
+    comments = REQUEST.get('comments')
+    context.cpsdocument_notify_modification(comments=comments)
+
+    ###################################################
+    if False:
+        if context.portal_type == "StudentStudyCourse":
+            course = ds.get('study_course')
+            #student_id = context.getStudentId()
+            res = context.portal_catalog(portal_type='Certificate',id = course)
+            if res:
+                c_brain = res[0]
+                c_path = c_brain.getPath().split('/')
+                #student_id = context.getStudentId()
+                context.students_catalog.modifyRecord(id = student_id,
+                                                      course = course,
+                                                      level = ds.get('current_level'),
+                                                      verdict = ds.get('current_verdict'),
+                                                      faculty = c_path[-4],
+                                                      department = c_path[-3],
+                                                      )
+                logger.info('%s edited %s (%s) of %s' % (member,context.id,course,student_id))
+
+        elif context.portal_type == "StudentApplication": # disabled
+            entry_mode = ds.get('entry_mode')
+            #student_id = context.getStudentId()
+            context.students_catalog.modifyRecord(id = student_id,
+                                                  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')
+            #student_id = context.getStudentId()
+            context.students_catalog.modifyRecord(id = student_id,
+                                                  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
+            name = name.strip()
+            name = name.replace('  ',' ')
+            email = ds.get('email')
+            phone = ds.get('phone')
+            #student_id = context.getStudentId()
+            #app_doc = context.application.getContent()
+            #jamb_sex = 'M'
+            #if ds.get('sex'):
+            #    jamb_sex = 'F'
+            # originally imported data must be kept; app_doc should not be changed here
+            #app_doc.edit(mapping={'jamb_lastname': name,
+            #                      'jamb_sex': jamb_sex
+            #                      })
+            context.students_catalog.modifyRecord(id = student_id,
+                                                  name = name,
+                                                  email = email,
+                                                  phone = phone,
+                                                  sex = ds.get('sex'),
+                                                 )
+            logger.info('%s edited %s of %s' % (member,context.id,student_id))
+        elif context.portal_type == "xxxxCourse": # disabled handled by events
+            dd = {}
+            dd.update(ds) # ds is not a real dictionary
+            try:
+                context.courses_catalog.modifyRecord(**dd)
+            except KeyError:
+                context.courses_catalog.addRecord(**dd)
+    ###################################################
+
+
+    if cpsdocument_edit_and_view_button is not None:
+        action = ''
+    psm = 'psm_content_changed'
+    args = {}
+else:
+    psm = 'psm_content_error'
+    args = getFormUidUrlArg(REQUEST)
+
+logger.info('%s edited %s %s of %s' % (member,context.portal_type,context.id,student_id))
+args['portal_status_message'] = psm
+url = context.absolute_url() + action + '?' + urlencode(args)
+REQUEST.RESPONSE.redirect(url)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_edit_ajax.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_edit_ajax.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_edit_ajax.py	(revision 2226)
@@ -0,0 +1,46 @@
+##parameters=REQUEST, cluster=None
+# $Id$
+"""
+Called when a document form is posted for AJAX validation.
+
+Returns the validation result and the rendered page in an XML-RPC response.
+"""
+from Products.CPSDocument.utils import cleanAjaxParams
+
+# cleaning incoming params
+cleanAjaxParams(REQUEST)
+# from Products.zdb import set_trace
+# set_trace()
+
+doc = context.getContent()
+res = doc.renderEditDetailed(request=REQUEST, proxy=context, cluster=cluster)
+layout, is_valid = str(res[0]), res[1]
+
+# AJAX tries to change the doc and just needs to know if there were errors
+# for feedback without a new form rendering.
+# XXX TODO: avoid here an extra HTML rendering
+# by calling renderEditDetailed() with the right parameters
+
+# At this time we do XML-RPC answers.
+# We'll see later how to automate it to avoid a manual serialization here.
+
+if is_valid:
+    comments = REQUEST.get('comments')
+    context.cpsdocument_notify_modification(comments=comments)
+
+if is_valid and 'cpsdocument_edit_and_view_button' in REQUEST:
+    action = 'view'
+else:
+    action = ''
+
+
+REQUEST.RESPONSE.setHeader('Content-Type', 'text/xml')
+REQUEST.RESPONSE.setHeader('Cache-Control', 'no-cache')
+response = '<?xml version="1.0" encoding="utf-8" ?>'
+response += '<ajax-response>'
+response += '<result>%s</result>' % str(bool(is_valid))
+response += '<layout><![CDATA[%s]]></layout>' % layout
+response += '<action>%s</action>' % action
+response += '</ajax-response>'
+
+return response
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_edit_buttons.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_edit_buttons.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_edit_buttons.pt	(revision 2226)
@@ -0,0 +1,43 @@
+<metal:block define-macro="buttons">
+  <input type="submit" name="cpsdocument_edit_button"
+         class="standalone" value="button_change"
+         id="cpsdocument_edit_button"
+         i18n:attributes="value"
+         tal:condition="not:creation" />
+  <input type="submit" name="cpsdocument_edit_and_view_button"
+         class="standalone" value="button_change_and_view"
+         id="cpsdocument_edit_and_view_button"
+         i18n:attributes="value"
+         tal:condition="python:creation and 0" />
+  <input type="submit" name="cpsdocument_create_button"
+         class="standalone" value="button_create"
+         i18n:attributes="value"
+         id="cpsdocument_create_button"
+         tal:condition="creation" />
+  <span tal:condition="python:0">       
+  <tal:block define="
+  use_ajax use_ajax|python:True;
+  content_changed python:cpsmcat('psm_content_changed');
+  content_error python:cpsmcat('psm_content_error');
+  working python:cpsmcat('psm_ajax_working')"
+  condition="python:use_ajax">
+    <script type="text/javascript"
+            tal:content="string:
+            // unobtrusive form controller, that leaves the form accessible
+            var editor = new CPSDocumentEditor(
+            'editForm',
+            $$('editForm').action,
+            'editForm',
+            new Array('cpsdocument_edit_button'),
+            new Array('cpsdocument_edit_and_view_button'),
+            'page_title',
+            {content_changed: '${content_changed}',
+            working: '${working}',
+            content_error: '${content_error}'},
+            null,
+            new Array('addwidget_button'));"
+            >
+    </script>
+  </tal:block>
+  </span>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_edit_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_edit_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_edit_form.pt	(revision 2226)
@@ -0,0 +1,143 @@
+<metal:defineblock tal:define="rendered_main python:context.getContent().render(layout_mode='edit', 
+           cluster=None,
+           request=request, 
+           use_session=True, 
+           no_form=True);
+           form_action string:waeup_edit;
+           form_type string:waeup;
+           creation python:False;
+           is_allowed context/isSectionOfficer;
+           metadata metadata|nothing;
+           template here/main_template/macros/master;"
+           >
+  <metal:block define-macro="edit_form">
+    <metal:block use-macro=template>
+      <metal:block fill-slot="style_slot">
+        <link rel="Stylesheet" type="text/css" href=""
+              tal:attributes="href string:${base_url}document.css" />
+        <metal:block define-macro="widgets_javascript">
+
+       
+          
+          <span tal:condition="python:0">
+            <script type="text/javascript" src="prototype.js"
+                    tal:attributes="src string:${base_url}prototype.js"></script>
+            <script type="text/javascript" src="effects.js"
+                    tal:attributes="src string:${base_url}effects.js"></script>
+            <script type="text/javascript" src="controls.js"
+                    tal:attributes="src string:${base_url}controls.js"></script>
+            <script type="text/javascript" src="cpsdocument.js"
+                    tal:attributes="src string:${base_url}cpsdocument.js"></script>
+            <script type="text/javascript" src="cpsschemas.js"
+                    tal:attributes="src string:${base_url}cpsschemas.js"></script>
+          </span>
+          
+          
+          
+          <tal:block condition="python:modules['Products.CPSUtil.integration'].isProductPresent('Products.FCKeditor')">
+            <script type="text/javascript">
+              var popup_editor_form = 'popup_fckeditor_form';
+              var width = 640;
+              var height = 520;
+            </script>
+          </tal:block>
+          <script type="text/javascript">
+            function popup_rte(input_id, label_edit) {
+            var args, value;
+            value = document.getElementById(input_id).value;
+            args = '?input_id='+input_id+'&amp;label_edit='+escape(label_edit);
+            str_window_features = 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,dependent=1,width=' + width + ',height=' + height;
+            popup = window.open(popup_editor_form + args, input_id, str_window_features);
+            if (!popup.opener) {
+            popup.opener = window;
+            }
+            return false;
+            }
+          </script>
+        </metal:block>
+      </metal:block>
+      <metal:block fill-slot="header">
+    <span tal:condition="not: is_allowed">
+        <span tal:content="here/illegal_view" />
+    </span>
+    <span tal:condition="is_allowed">
+    <h3 tal:condition="creation" i18n:translate="">
+      Create a document of type
+      <tal:block i18n:name="type_name" i18n:translate=""
+            tal:define="type_name request/type_name;
+                        type_info python:here.portal_types[type_name]"
+            tal:content="type_info/Title">Type Title</tal:block>
+    </h3>
+    <span tal:condition="python: not creation">
+     <a href="" tal:condition="python: form_type in ('waeup',)"
+       tal:attributes="href string:${here/academicsParent}">
+      <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+      Up one level
+    </a>
+    <h3>
+      <tal:block condition="not: metadata"
+        i18n:translate="">Edit <span id="page_title" i18n:name="title"
+        tal:content="here/title_or_id">Page Title</span>
+      </tal:block>
+      <tal:block tal:condition="metadata"
+        i18n:translate="">Metadata of <span i18n:name="title" tal:content="here/title_or_id">Page Title</span>
+      </tal:block>
+    </h3>
+    <br />        
+    </span>
+    </span>
+  </metal:block>
+  
+ 
+  <metal:block fill-slot="main" tal:condition="is_allowed">
+    <form id=editForm action="waeup_edit" method="post" id="editForm"
+          enctype="multipart/form-data" class="workflow"
+          tal:attributes="action string:${context/absolute_url}/waeup_edit"
+          >
+        <input type="hidden" id="came_from" name="came_from" value="" 
+               tal:attributes="value string:${form_action}_form"/>
+      <div class="group">
+        <div class="documentFields">
+          <tal:block define="getFormUidHtml nocall:modules/Products.CPSDocument.utils/getFormUidHtml"
+                     replace="structure python:getFormUidHtml(request)"/>
+          <input type="hidden" name="type_name" value="VALUE"
+                 tal:condition="creation"
+                 tal:attributes="value request/type_name" />
+          <div id="rendered_main" tal:content="structure rendered_main">
+            CONTENT
+          </div>
+        </div>
+
+        <tal:block condition="python: 0 and not creation">
+          <div class="tooltipArea" style="visibility: hidden;"
+               id="transition_comments_help"
+               onclick="showElement(false, 'transition_comments_help')"
+               i18n:translate="help_transition_comments_modification">
+            In this field you can give the reason for the modification
+            on this document. Your comments may be used to notify other users.
+          </div>
+          <dl>
+            <dt><label for="comments"
+                       i18n:translate="transition_comments_modification"
+                       >Reason of the modification</label>
+              <button type="button" class="tooltipControl"
+                      onclick="toggleElementVisibility('transition_comments_help')"> ? </button>
+            </dt>
+            <dd>
+              <textarea name="comments" id="comments" cols="60" rows="3"
+                        tal:content="nothing">
+              </textarea>
+            </dd>
+          </dl>          
+        </tal:block>
+        <metal:block use-macro="python:path('context/%s_edit_buttons/macros/buttons' % form_type)"/>
+        </div>
+      </form>
+      <div id="ajax_psm" style="display:none">
+        ajax feedback
+      </div>
+  </metal:block>
+
+</metal:block>
+</metal:block>
+</metal:defineblock>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_search_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_search_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/waeup_search_form.pt	(revision 2226)
@@ -0,0 +1,120 @@
+<html xmlns:tal="http://xml.zope.org/namespaces/tal"
+      xmlns:metal="http://xml.zope.org/namespaces/metal"
+      metal:use-macro="here/main_template/macros/master">
+  <body>
+  <metal:block metal:fill-slot="main">
+  <tal:block define="SearchableText python:request.get('SearchableText','');
+                     sort_by python:request.get('sort_by', '');
+                     direction python:request.get('direction', '');
+                     folder_prefix python:request.get('folder_prefix', '');
+                     items python:here.search(query=request.form,
+                                              sort_by=sort_by,
+                                              direction=direction,
+                                              folder_prefix=folder_prefix);
+                     no_form python:1;
+                     site_wide python:1;
+                     items_length python:len(items);
+                     format string:detail;
+                     filter python:0;
+                     title_search request/title_search|nothing;
+                     swr request/search_within_results|nothing;
+                    ">
+
+    <div style="text-align:right;" class="group">
+      <form id="searchFormBottom" method="get" action="waeup_search_form"
+        onsubmit="return checkEmptySearch(this)">
+        <div class="label">
+          <label for="resultSearchText"
+                 i18n:translate="label_text_to_search">
+            Text to search:
+          </label>
+        <input type="text" name="SearchableText" id="resultSearchText"
+               value="" class="focus" size="40"
+               tal:attributes="value SearchableText" />
+        <input class="standalone searchButton" type="submit" value="button_ok"
+               i18n:attributes="value" />
+        </div>
+        <tal:block condition="not:swr">
+          <metal:block
+            use-macro="here/generic_lib_search_folder_prefix_option/macros/search_folder_prefix_option" />
+        </tal:block>
+        <tal:block condition="swr"
+          define="criteria python:['search_within_results', 'title_search',
+                                   'folder_prefix', 'review_state'];
+                  criteria_list python:['portal_type'];">
+          <tal:block repeat="criterion criteria">
+            <input type="hidden" tal:condition="value"
+              tal:define="value request/?criterion|nothing"
+              tal:attributes="name criterion;
+                              value value" />
+          </tal:block>
+          <tal:block repeat="criterion criteria_list">
+            <tal:block tal:condition="values"
+               tal:define="values request/?criterion|nothing">
+              <tal:block repeat="value values">
+                <input type="hidden"
+                  tal:define="value value"
+                  tal:attributes="name python:criterion+':list'; value value" />
+              </tal:block>
+            </tal:block>
+          </tal:block>
+        </tal:block>
+     </form>
+    </div>
+                    
+    <h3 tal:condition="not:title_search"
+      i18n:translate="heading_search_results">Search Results</h3>
+    <h3 tal:condition="title_search"
+      tal:content="title_search">Title for search results</h3>
+
+
+      
+<table width="100%" cellspacing="0" cellpadding="2"
+      class="folderButtons"
+      tal:define="can_add python:checkPerm('Add portal content', here);
+                  can_del python:checkPerm('Delete objects', here);">
+
+
+
+  <thead>
+  <tr><td><strong>Title</strong></td><td><strong>Id</strong></td><td><strong>Type</strong></td>
+      <td><strong>Status</strong></td></tr>
+  </thead>
+
+  <tbody tal:repeat="item items">
+
+  <tr><td></td><td></td><td></td></tr>
+
+  <tr tal:define="objURL string:${item/getURL}/view;
+                  objPath item/getPath;
+                  title item/Title;
+                 ">
+  <td>
+  <a href="url"
+      tal:attributes="href objURL">
+   <span tal:content="python: title or '(No title)'" />
+  </a>
+  </td>
+
+  <td i18n:translate="">
+    <span tal:replace="item/id" />
+  </td>
+  
+  <td>
+    <span tal:replace="item/portal_type" />
+  </td>
+
+  <td>
+    <span tal:replace="item/review_state" />
+  </td>
+
+ </tr>
+ </tbody>
+</table>
+    <div style="text-align:right;" class="group">
+    </div>
+  </tal:block>
+
+  </metal:block>
+  </body>
+</html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/wdrender.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/wdrender.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/wdrender.py	(revision 2226)
@@ -0,0 +1,32 @@
+## Script (Python) "wdrender"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=value=None
+##title=
+##
+# $Id:wdrender.py 486 2006-09-06 10:09:39Z henrik $
+
+from Products.PythonScripts.standard import structured_text, newline_to_br, restructured_text
+from cgi import escape
+
+rformat = context.content_format
+rcontent = context.content
+
+if rformat == 'pre':
+    ret = '<pre>' + escape(rcontent) + '</pre>'
+elif rformat == 'rst':
+    ret = restructured_text(rcontent)
+elif rformat == 'stx':
+    ret = structured_text(value)    
+elif rformat == 'text':
+    ret = newline_to_br(escape(rcontent))
+elif rformat == 'html':
+    ret = rcontent
+else:
+    raise RuntimeError("unknown render_format '%s' for '%s'" %
+                       (rformat, context.getId()))
+
+return ret                       
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/widget_passport_render.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/widget_passport_render.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/widget_passport_render.pt	(revision 2226)
@@ -0,0 +1,48 @@
+<tal:block define="mode options/mode;
+  id here/getWidgetId;
+  fields here/fields;
+  current_filename options/current_filename;
+  empty_file options/empty_file;
+  session_file options/session_file;
+  mimetype options/mimetype;
+  size options/size;
+  content_url options/content_url;
+  last_modified options/last_modified;
+  image_width options/width;
+  image_height options/height;
+  image_tag options/image_tag;"
+  >
+  <span tal:condition="python:0" >
+    <img tal:condition="python: mode == 'view' and not empty_file"
+         tal:replace="structure image_tag" />
+  </span>
+  <span tal:condition="python: mode == 'view' and not empty_file">
+    <img tal:condition="python:not empty_file and not session_file"
+         tal:replace="structure image_tag" />
+  </span>
+  <tal:block condition="python: mode == 'edit'">
+    <metal:block use-macro="here/widget_file_render/macros/file_size_max_view" />
+    <metal:block define-macro="image_title_edit">
+      <span tal:condition="python:0">
+        <metal:block use-macro="here/widget_file_render/macros/file_title_edit">
+        </metal:block>
+      </span>
+    </metal:block>
+    <img tal:condition="python:not empty_file and not session_file"
+         tal:replace="structure image_tag" />
+    <metal:block define-macro="image_edit">
+      <metal:block use-macro="here/widget_file_render/macros/file_edit">
+        <metal:block fill-slot="keep_file" />
+        <metal:block fill-slot="delete_file" />
+        <metal:block fill-slot="change_file">
+          <input type="file" name="." size="24"
+                 tal:attributes="name name;"/>
+          <tal:block condition="python:1">
+            <input type="hidden" value="img_auto_size" 
+                   tal:attributes="name string:${name}_resize" />
+          </tal:block>
+        </metal:block>
+      </metal:block>
+    </metal:block>
+  </tal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_default/widget_waeup_image_render.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_default/widget_waeup_image_render.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_default/widget_waeup_image_render.pt	(revision 2226)
@@ -0,0 +1,131 @@
+<tal:block define="mode options/mode;
+  id here/getWidgetId;
+  current_filename options/current_filename;
+  empty_file options/empty_file;
+  session_file options/session_file;
+  mimetype options/mimetype;
+  size options/size;
+  content_url options/content_url;
+  last_modified options/last_modified;
+  image_tag options/image_tag;    
+  ">
+  <img tal:condition="python: mode == 'view' and not empty_file"
+    tal:replace="structure image_tag" />
+
+
+  <tal:block condition="python: 0 and mode == 'view' and not empty_file">
+    <metal:block define-macro="file_view">
+      <a target="_blank" tal:condition="mimetype"
+        tal:attributes="href string:${content_url}?nocache=${last_modified}">
+        <img tal:replace="structure python:here.getImgTag(mimetype.icon_path,
+          title=mimetype.name())" /></a>
+      <a class="strong"
+        tal:attributes="href string:${content_url}?nocache=${last_modified}">
+        <tal:block replace="current_filename" /></a>
+      <span tal:condition="size" class="note"
+        tal:define="str_size python:here.getHumanReadableSize(size);">
+        <tal:block content="str_size"/>
+      </span>
+    </metal:block>
+  </tal:block>
+
+  <tal:block condition="python: mode == 'edit'">
+
+    <metal:block define-macro="file_size_max_view">
+      <tal:block define="size_max python:here.size_max;
+                         str_sizeMax python:here.getHumanReadableSize(size_max)"
+        condition="python:size_max > 0">
+
+        <p i18n:translate="">
+          cpsschemas_size_max
+          <tal:block i18n:name="size_max" content="str_sizeMax"/>
+        </p>
+      </tal:block>
+    </metal:block>
+
+    <metal:block define-macro="file_title_edit">
+      <p tal:define="name here/getHtmlWidgetId;
+                     title_name string:${name}_filename;">
+        <span i18n:translate="cpsschemas_label_filename">
+          Filename
+        </span>
+        <input style="margin-left: 5px" type="text" size="30" maxlength="80"
+               tal:attributes="name title_name;
+                               value current_filename" />
+      </p>
+    </metal:block>
+
+    <metal:block define-macro="file_edit">
+
+      <ul class="fileChoice"
+          tal:define="name here/getHtmlWidgetId;
+                      radio_name string:${name}_choice;">
+        <li>
+          <metal:block define-slot="keep_file">
+            <input type="radio" class="noborder" name="." value="keep"
+                   checked="checked"
+                   tal:attributes="name radio_name;
+                                   id string:${radio_name}_keep;"/>
+            <label i18n:translate="cpsschemas_label_file_none"
+                   tal:condition="empty_file"
+                   tal:attributes="for string:${radio_name}_keep">None</label>
+            <label i18n:translate="cpsschemas_label_file_keep"
+                   tal:condition="not:empty_file"
+                   tal:attributes="for string:${radio_name}_keep">Keep</label>
+            <a href="http://url..." target="_blank"
+               tal:condition="not:empty_file"
+               tal:omit-tag="session_file"
+               tal:attributes="href string:${content_url}?nocache=${last_modified}">
+              <tal:block condition="mimetype"
+                replace="structure python:here.getImgTag(mimetype.icon_path,
+                  title=mimetype.name())" />
+              <tal:block replace="current_filename" />
+            </a>
+            <tal:block condition="python:not empty_file and not session_file and modules['Products.CPSUtil.integration'].isProductPresent('Products.ExternalEditor')">
+              <tal:block define="ds options/datastructure;
+                                 dm ds/getDataModel;
+                                 proxy dm/getProxy;
+                                 display_ee
+                                   here/display_external_editor|python:True;
+                                 portal here/portal_url/getPortalObject;
+                                 field_id python:here.fields[0]">
+              <tal:block condition="python: proxy and display_ee">
+                -
+                <a href="http://url..."
+                   i18n:translate="cpsschemas_label_file_edit_online"
+                   tal:attributes="href python:portal.getExternalEditorPath(proxy, id, field_id)">
+                  Edit file online
+                </a>
+              </tal:block>
+              </tal:block>
+            </tal:block>
+          </metal:block>
+        </li>
+        <metal:block define-slot="edit_file_action" />
+        <li>
+          <metal:block define-slot="change_file">
+            <input type="radio" class="noborder"  name="." value="change"
+                   tal:attributes="name radio_name;
+                                   id string:${radio_name}_change" />
+            <label i18n:translate="cpsschemas_label_file_change"
+                   tal:attributes="for string:${radio_name}_change">Change</label>
+            <input type="file" name="." size="24"
+                   tal:attributes="name name;
+              onclick string:document.getElementById('${radio_name}_change').checked='checked'" />
+          </metal:block>
+        </li>
+        <li tal:condition="python: not here.is_required and not empty_file">
+          <metal:block define-slot="delete_file">
+            <input type="radio" class="noborder" name="." value="delete"
+                   tal:attributes="name radio_name;
+                                   id string:${radio_name}_delete" />
+            <label i18n:translate="cpsschemas_label_file_delete"
+                   tal:attributes="for string:${radio_name}_delete">Delete</label>
+          </metal:block>
+        </li>
+      </ul>
+    </metal:block>
+
+  </tal:block>
+
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_design/WAeUP_Backoffice/render.css.dtml
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_design/WAeUP_Backoffice/render.css.dtml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_design/WAeUP_Backoffice/render.css.dtml	(revision 2226)
@@ -0,0 +1,3 @@
+.portalTabTabStyle ul.cpsskinsMenu li a{background:url(waeup_staff_tab_full_2.png) left top no-repeat}
+.colorBarColor{border-color:#B9B9B9;background-color:#B9B9B9;color:#FFFF}
+.colorBarAreaColor{border-color:#B9B9B9;background-color:#FFFFFF;color:#000000}
Index: WAeUP_SRP/trunk_not_used/skins/waeup_design/WAeUP_Student/render.css.dtml
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_design/WAeUP_Student/render.css.dtml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_design/WAeUP_Student/render.css.dtml	(revision 2226)
@@ -0,0 +1,4 @@
+.portalTabTabStyle ul.cpsskinsMenu li a{background:url(waeup_student_tab.png) left top no-repeat}
+.colorBarColor{border-color:#FFCE81;background-color:#FFCE81;color:#000000}
+.colorBarAreaColor{border-color:#FFCE81;background-color:#FFF;color:#000000}
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_design/common.css.dtml
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_design/common.css.dtml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_design/common.css.dtml	(revision 2226)
@@ -0,0 +1,652 @@
+<dtml-let base_url="getBaseUrl()">
+
+body, table {
+  font-size: 100%;
+  line-height: normal;
+}
+
+form {
+  margin: 0;
+}
+
+input, button {
+  vertical-align: middle;
+}
+
+div p {
+  margin: 0;
+  padding: 0;
+}
+
+img {
+  border-style: none;
+  vertical-align: middle;
+}
+
+h3, h4, h5, h6 {
+  margin: 0;
+}
+
+/* Misc table elements */
+
+td.centered {
+  text-align: center;
+}
+
+td.additionaltools {
+  color: black;
+  text-align: right;
+}
+
+td.even {
+  color: black;
+  background-color: #e3e0e3;
+  text-align: left;
+}
+
+td.odd {
+  color: black;
+  background-color: #f0f0f0;
+  text-align: left;
+}
+
+.chapo {
+  text-align: justify;
+  padding-bottom: 5px;
+}
+
+/* Forms */
+
+input, select, textarea, button {
+  font: 11px Verdana, Arial, sans-serif !important;
+  color:  Black;
+  background-color: white;
+}
+
+.formmeta {
+  font: 800 12px Arial, sans-serif !important;
+  color: White; 
+  background-color: #6699cc;
+  padding: 5px 10px 1px 5px;
+  text-align:right;
+  vertical-align: top;
+}
+
+.fileview {
+  border: 1px solid #999999;
+  background-color: #f0f0f0;
+  margin-top: 15px;
+  margin-bottom: 15px;
+}
+
+.statusmessage {
+  background-color: #e9e9ff;
+  border: 1px dotted #ccc;
+  padding: 10px;
+  font-weight: bold;
+  margin: 10px;
+}
+
+html, body {
+height:100%;
+}
+input, textarea, select, button {
+background-color:white;
+margin:0pt;
+}
+
+input, button {
+padding:3px;
+}
+
+.fileview {
+padding:3px;
+}
+.statusmessage {
+margin-bottom:9px;
+padding:3px;
+}
+input.SearchBox {
+background:white url(http://localhost:8080/cpsskins/cpsskins_images/search_icon.png) no-repeat scroll left center;
+border:1px inset #757575;
+padding:2px 2px 2px 20px;
+}
+div.searchField {
+background:transparent url(http://localhost:8080/cpsskins/cpsskins_images/portlet_search_icon.png) no-repeat scroll left center;
+padding:2px 2px 2px 20px;
+}
+.toggle_icon {
+clear:left;
+float:left;
+padding:2px 0pt 0pt 3px;
+}
+.missing_toggle {
+padding:0pt 0pt 0pt 13px;
+}
+.tree_node {
+padding:0pt 0pt 0pt 8px;
+}
+.tree_leaf {
+padding:0pt 0pt 0pt 22px;
+}
+.action_icon {
+clear:left;
+float:left;
+padding:0pt 6px 0pt 0pt;
+}
+.cpsskinsBox ul.cpsskinsMenu, .cpsskinsBox ul.cpsskinsMenu li {
+display:inline;
+line-height:normal;
+list-style-type:none;
+margin:0px;
+padding:0px;
+}
+.cpsskinsBox ul.cpsskinsMenu li a {
+background-position:left top;
+background-repeat:no-repeat;
+display:block;
+}
+.cpsskinsBox ul.cpsskinsMenu li a.noicon, .cpsskinsBox ul.cpsskinsMenu li.selected a.noicon {
+background-image:none !important;
+padding-left:2px !important;
+}
+.cpsskinsBox ul.cpsskinsMenu li a span.itemDescription {
+display:block;
+font-size:85%;
+}
+
+.cpsskinsTab ul.cpsskinsMenu, .cpsskinsTab ul.cpsskinsMenu li {
+display:inline;
+line-height:normal;
+list-style-type:none;
+margin:0px;
+padding:0px;
+}
+.cpsskinsTab ul.cpsskinsMenu li a {
+background-position:left center;
+background-repeat:no-repeat;
+display:inline;
+}
+.cpsskinsTab ul.cpsskinsMenu span.itemDescription {
+display:none;
+}
+.cpsskinsTab div.xmlExportButtons {
+display:none;
+}
+.cpsskinsBox .buttons {
+display:block;
+padding-bottom:1px;
+padding-right:1px;
+padding-top:1px;
+}
+.cpsskinsBox .buttons a {
+float:right;
+}
+.cpsskinsTabs {
+float:left;
+line-height:normal;
+text-align:left;
+width:100%;
+}
+.cpsskinsTabs ul {
+list-style-image:none;
+list-style-position:outside;
+list-style-type:none;
+margin:0pt;
+padding:0pt;
+}
+.cpsskinsTabs li {
+float:left;
+margin:0pt;
+padding:0pt;
+position:relative;
+}
+.cpsskinsTabs a {
+display:block;
+float:left;
+margin-left:0pt !important;
+text-decoration:none;
+}
+.cpsskinsTabs a {
+float:none;
+}
+.cpsskinsTabs ul.cpsskinsMenu span.itemDescription {
+display:none;
+}
+.cpsskinsTabs div.xmlExportButtons {
+display:none;
+}
+.cpsskinsTabs li ul {
+display:none;
+left:0pt;
+position:absolute;
+}
+.cpsskinsTabs li > ul {
+left:auto;
+top:auto;
+}
+.cpsskinsTabs li:hover ul, .cpsskinsTabs li.over ul {
+display:block;
+}
+.cpsskinsBoxCorners .rbtop div {
+left:-2px;
+position:relative;
+width:100%;
+}
+.cpsskinsBoxCorners .rbtop {
+position:relative;
+right:-1px;
+top:-1px;
+width:100%;
+}
+.cpsskinsBoxCorners .rbbot div {
+left:-2px;
+position:relative;
+width:100%;
+}
+.cpsskinsBoxCorners .rbbot {
+bottom:-1px;
+position:relative;
+right:-1px;
+width:100%;
+}
+.hidden {
+display:none;
+}
+.cpsskinsHBox {
+margin:3px;
+}
+.cpsskinsHBox ul.cpsskinsMenu, .cpsskinsHBox ul.cpsskinsMenu li {
+display:inline;
+line-height:normal;
+list-style-type:none;
+padding:3px 0pt 2px;
+}
+* html .cpsskinsHBox ul.cpsskinsMenu {
+padding:0px;
+}
+* html .cpsskinsHBox ul.cpsskinsMenu li {
+padding:0px;
+}
+.cpsskinsHBox ul.cpsskinsMenu li a {
+background-position:left top;
+background-repeat:no-repeat;
+display:inline;
+margin-left:0pt !important;
+}
+.cpsskinsHBox ul.cpsskinsMenu span.itemDescription {
+display:none;
+}
+.cpsskinsHBox div.xmlExportButtons {
+display:none;
+}
+
+.portalTabTabStyle ul.cpsskinsMenu li {
+margin:0pt 2px 0pt 0pt;
+}
+.portalTabTabStyle ul.cpsskinsMenu li a {
+padding:3px 2px;
+}
+
+.fontShapeaverage {
+font-family:Arial,sans-serif,Verdana,Helvetica !important;
+font-size:12px !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:normal !important;
+line-height:normal !important;
+}
+.fontShapeaverage p {
+font-family:Arial,sans-serif,Verdana,Helvetica !important;
+font-size:100% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:normal !important;
+line-height:normal !important;
+padding:5px 10px 0px 0px;
+}
+.fontShapeaverage small {
+}
+
+.fontShapeaverage h2, .fontShapeaverage .h2 {
+border-style:none;
+border-width:0px;
+font-family:Arial,sans-serif,Verdana,Helvetica !important;
+font-size:150% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+margin:10px 0px 5px;
+padding:0px;
+}
+
+.fontShapeaverage h3, .fontShapeaverage .h3 {
+border-style:none;
+border-width:0px;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:125% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+padding:0.6em 0em 0em;
+}
+
+.fontShapeaverage a, .fontShapeaverage a div, .fontShapeaverage a span {
+text-decoration:none;
+}
+.fontShapeaverage a:visited, .fontShapeaverage a:visited div, .fontShapeaverage a:visited span {
+text-decoration:none;
+}
+.fontShapeaverage a:active, .fontShapeaverage a:active div, .fontShapeaverage a:active span {
+text-decoration:underline overline;
+}
+.fontShapeaverage a:hover, .fontShapeaverage a:hover div, .fontShapeaverage a:hover span {
+text-decoration:underline;
+}
+
+
+.fontColordefaultfontcolors h3, .fontColordefaultfontcolors .h3 {
+border-color:#666666;
+color:#666666;
+}
+
+.fontColordefaultfontcolors a, .fontColordefaultfontcolors a div, .fontColordefaultfontcolors a span {
+color:#0066CC;
+}
+.fontColordefaultfontcolors a:visited, .fontColordefaultfontcolors a:visited div, .fontColordefaultfontcolors a:visited span {
+color:#003399;
+}
+.fontColordefaultfontcolors a:active, .fontColordefaultfontcolors a:active div, .fontColordefaultfontcolors a:active span {
+color:blue;
+}
+.fontColordefaultfontcolors a:hover, .fontColordefaultfontcolors a:hover div, .fontColordefaultfontcolors a:hover span {
+color:#0066CC;
+}
+
+.boxShapenavbox .title {
+border-style:none;
+border-width:0px;
+display:inline;
+font-family:arial,sans-serif,Verdana,Helvetica;
+font-size:12px;
+font-size-adjust:none;
+font-stretch:normal;
+font-style:normal;
+font-variant:normal;
+font-weight:bold;
+line-height:normal;
+padding:0px;
+}
+.boxShapenavbox .body {
+border-style:solid;
+border-width:0px;
+padding:10px 0pt 0pt;
+}
+.boxShapenavbox .body ul.cpsskinsMenu li a {
+border-style:none;
+border-width:0px;
+margin:1px 3px;
+padding:1px 0px 1px 21px;
+}
+.boxShapenavbox .body ul.cpsskinsMenu li.selected a {
+border-style:solid;
+border-width:0px;
+margin:0px 3px;
+padding:1px 0px 1px 21px;
+}
+.boxColornavbox .title {
+background-color:transparent;
+border-color:transparent;
+color:#666666;
+}
+.boxColornavbox .title a {
+color:#666666;
+}
+.boxColornavbox .body {
+background-color:transparent;
+border-color:transparent;
+}
+.boxColornavbox .body ul.cpsskinsMenu li a {
+border-color:transparent;
+}
+.boxColornavbox .body ul.cpsskinsMenu li.selected a {
+border-color:transparent;
+}
+.boxColornavbox .body ul.cpsskinsMenu li a {
+background-color:transparent;
+}
+.boxColornavbox .body ul.cpsskinsMenu li a:hover, .boxColornavbox .body ul.cpsskinsMenu li.selected a {
+background-color:#F1F2F3;
+}
+
+.colorfontcolorgray {
+background-color:transparent;
+border-color:transparent;
+color:#666666;
+}
+.fontColordefaultnovisitedlinks h1, .fontColordefaultnovisitedlinks .h1 {
+border-color:#666666;
+color:Black;
+}
+.fontColordefaultnovisitedlinks h2, .fontColordefaultnovisitedlinks .h2 {
+border-color:#666666;
+color:Black;
+}
+.fontColordefaultnovisitedlinks h3, .fontColordefaultnovisitedlinks .h3 {
+border-color:#666666;
+color:Black;
+}
+.fontColordefaultnovisitedlinks h4, .fontColordefaultnovisitedlinks .h4, .fontColordefaultnovisitedlinks h5, .fontColordefaultnovisitedlinks .h5, .fontColordefaultnovisitedlinks h6, .fontColordefaultnovisitedlinks .h6 {
+border-color:#666666;
+color:Black;
+}
+.fontColordefaultnovisitedlinks a, .fontColordefaultnovisitedlinks a div, .fontColordefaultnovisitedlinks a span {
+color:#0066CC;
+}
+.fontColordefaultnovisitedlinks a:visited, .fontColordefaultnovisitedlinks a:visited div, .fontColordefaultnovisitedlinks a:visited span {
+color:#0066CC;
+}
+.fontColordefaultnovisitedlinks a:active, .fontColordefaultnovisitedlinks a:active div, .fontColordefaultnovisitedlinks a:active span {
+color:blue;
+}
+.fontColordefaultnovisitedlinks a:hover, .fontColordefaultnovisitedlinks a:hover div, .fontColordefaultnovisitedlinks a:hover span {
+color:#0066CC;
+}
+
+.portalTabPortalTabStyleuseractions ul.cpsskinsMenu li {
+margin:0pt 5px 0pt 0pt;
+}
+.portalTabPortalTabStyleuseractions ul.cpsskinsMenu li a {
+padding:1px 0px;
+}
+
+.shapeAreaShape5 {
+border-style:solid;
+border-width:0px 1px 1px 0px;
+text-transform:none;
+}
+.shapeAreaShape {
+border-style:solid;
+border-width:1px;
+text-transform:none;
+}
+.shapeAreaShape9 {
+border-style:solid;
+border-width:1px 0px 0px 1px;
+text-transform:none;
+}
+
+.fontColornavigation h1, .fontColornavigation .h1 {
+border-color:#666666;
+color:Black;
+}
+.fontColornavigation h2, .fontColornavigation .h2 {
+border-color:#666666;
+color:Black;
+}
+.fontColornavigation h3, .fontColornavigation .h3 {
+border-color:#666666;
+color:Black;
+}
+.fontColornavigation h4, .fontColornavigation .h4, .fontColornavigation h5, .fontColornavigation .h5, .fontColornavigation h6, .fontColornavigation .h6 {
+border-color:#666666;
+color:Black;
+}
+.fontColornavigation a, .fontColornavigation a div, .fontColornavigation a span {
+color:black;
+}
+.fontColornavigation a:visited, .fontColornavigation a:visited div, .fontColornavigation a:visited span {
+color:black;
+}
+.fontColornavigation a:active, .fontColornavigation a:active div, .fontColornavigation a:active span {
+color:black;
+}
+.fontColornavigation a:hover, .fontColornavigation a:hover div, .fontColornavigation a:hover span {
+color:black;
+}
+.fontShapenavigation {
+font-family:Arial,sans-serif,Verdana,Helvetica !important;
+font-size:12px !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:normal !important;
+line-height:normal !important;
+}
+.fontShapenavigation p {
+font-family:Arial,Verdana,Helvetica,sans-serif !important;
+font-size:100% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:normal !important;
+line-height:normal !important;
+}
+
+.fontShapenavigation h3, .fontShapenavigation .h3 {
+border-style:none;
+border-width:1px;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:120% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+padding:0.6em 0em 0em;
+}
+
+.fontShapenavigation a, .fontShapenavigation a div, .fontShapenavigation a span {
+text-decoration:none;
+}
+.fontShapenavigation a:visited, .fontShapenavigation a:visited div, .fontShapenavigation a:visited span {
+text-decoration:none;
+}
+.fontShapenavigation a:active, .fontShapenavigation a:active div, .fontShapenavigation a:active span {
+text-decoration:none;
+}
+.fontShapenavigation a:hover, .fontShapenavigation a:hover div, .fontShapenavigation a:hover span {
+text-decoration:underline;
+}
+
+.fontShapeTitleindex {
+font-family:Arial,sans-serif,Verdana,Helvetica !important;
+font-size:13px !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:normal !important;
+line-height:normal !important;
+}
+.fontShapeTitleindex p {
+font-family:Arial,sans-serif,Verdana,Helvetica !important;
+font-size:100% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:normal !important;
+line-height:normal !important;
+padding:0em;
+}
+.fontShapeTitleindex h1, .fontShapeTitleindex .h1 {
+border-style:none;
+border-width:0px;
+font-family:Arial,sans-serif,Verdana,Helvetica !important;
+font-size:150% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+margin:0px;
+padding:0px;
+}
+.fontShapeTitleindex h2, .fontShapeTitleindex .h2 {
+border-style:none;
+border-width:0pt;
+font-family:Arial,sans-serif,Verdana,Helvetica !important;
+font-size:150% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+padding:0.6em 0em 0em;
+}
+.fontShapeTitleindex h3, .fontShapeTitleindex .h3 {
+border-style:none;
+border-width:0pt;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:125% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+padding:0.6em 0em 0em;
+}
+.fontShapeTitleindex h4, .fontShapeTitleindex .h4, .fontShapeTitleindex h5, .fontShapeTitleindex .h5, .fontShapeTitleindex h6, .fontShapeTitleindex .h6 {
+border-style:none;
+border-width:0pt;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:100% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+padding:0.4em 0em 0em;
+}
+.fontShapeTitleindex a, .fontShapeTitleindex a div, .fontShapeTitleindex a span {
+text-decoration:none;
+}
+.fontShapeTitleindex a:visited, .fontShapeTitleindex a:visited div, .fontShapeTitleindex a:visited span {
+text-decoration:none;
+}
+.fontShapeTitleindex a:active, .fontShapeTitleindex a:active div, .fontShapeTitleindex a:active span {
+text-decoration:underline overline;
+}
+.fontShapeTitleindex a:hover, .fontShapeTitleindex a:hover div, .fontShapeTitleindex a:hover span {
+text-decoration:underline;
+}
+
+</dtml-let>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_design/common2.css.dtml_backup
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_design/common2.css.dtml_backup	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_design/common2.css.dtml_backup	(revision 2226)
@@ -0,0 +1,1257 @@
+<dtml-let base_url="getBaseUrl()">
+html, body {
+height:100%;
+}
+input, textarea, select, button {
+background-color:white;
+margin:0pt;
+}
+input {
+border:1px inset #757575;
+}
+input, button {
+padding:3px;
+}
+input[type="radio"], input[type="checkbox"] {
+border:medium none;
+}
+.fileview {
+padding:3px;
+}
+.statusmessage {
+margin-bottom:9px;
+padding:3px;
+}
+input.SearchBox {
+background:white url(http://localhost:8080/cpsskins/cpsskins_images/search_icon.png) no-repeat scroll left center;
+border:1px inset #757575;
+padding:2px 2px 2px 20px;
+}
+div.searchField {
+background:transparent url(http://localhost:8080/cpsskins/cpsskins_images/portlet_search_icon.png) no-repeat scroll left center;
+padding:2px 2px 2px 20px;
+}
+.toggle_icon {
+clear:left;
+float:left;
+padding:2px 0pt 0pt 3px;
+}
+.missing_toggle {
+padding:0pt 0pt 0pt 13px;
+}
+.tree_node {
+padding:0pt 0pt 0pt 8px;
+}
+.tree_leaf {
+padding:0pt 0pt 0pt 22px;
+}
+.action_icon {
+clear:left;
+float:left;
+padding:0pt 6px 0pt 0pt;
+}
+.cpsskinsBox ul.cpsskinsMenu, .cpsskinsBox ul.cpsskinsMenu li {
+display:inline;
+line-height:normal;
+list-style-type:none;
+margin:0px;
+padding:0px;
+}
+.cpsskinsBox ul.cpsskinsMenu li a {
+background-position:left top;
+background-repeat:no-repeat;
+display:block;
+}
+.cpsskinsBox ul.cpsskinsMenu li a.noicon, .cpsskinsBox ul.cpsskinsMenu li.selected a.noicon {
+background-image:none !important;
+padding-left:2px !important;
+}
+.cpsskinsBox ul.cpsskinsMenu li a span.itemDescription {
+display:block;
+font-size:85%;
+}
+div.xmlExportButtons {
+padding-top:1em;
+text-align:right;
+}
+div.xmlExportButtons a {
+background:#FF6600 none repeat scroll 0%;
+border:0.1em outset #FF6600;
+color:#FFFFFF !important;
+font-family:'Lucida Grande',Arial,Helvetica,sans-serif !important;
+font-size:70% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+margin:0pt 0.1em;
+padding:0pt 0.3em;
+text-decoration:none;
+}
+.cpsskinsTab ul.cpsskinsMenu, .cpsskinsTab ul.cpsskinsMenu li {
+display:inline;
+line-height:normal;
+list-style-type:none;
+margin:0px;
+padding:0px;
+}
+.cpsskinsTab ul.cpsskinsMenu li a {
+background-position:left center;
+background-repeat:no-repeat;
+display:inline;
+}
+.cpsskinsTab ul.cpsskinsMenu span.itemDescription {
+display:none;
+}
+.cpsskinsTab div.xmlExportButtons {
+display:none;
+}
+.cpsskinsBox .buttons {
+display:block;
+padding-bottom:1px;
+padding-right:1px;
+padding-top:1px;
+}
+.cpsskinsBox .buttons a {
+float:right;
+}
+.cpsskinsTabs {
+float:left;
+line-height:normal;
+text-align:left;
+width:100%;
+}
+.cpsskinsTabs ul {
+list-style-image:none;
+list-style-position:outside;
+list-style-type:none;
+margin:0pt;
+padding:0pt;
+}
+.cpsskinsTabs li {
+float:left;
+margin:0pt;
+padding:0pt;
+position:relative;
+}
+.cpsskinsTabs a {
+display:block;
+float:left;
+margin-left:0pt !important;
+text-decoration:none;
+}
+.cpsskinsTabs a {
+float:none;
+}
+.cpsskinsTabs ul.cpsskinsMenu span.itemDescription {
+display:none;
+}
+.cpsskinsTabs div.xmlExportButtons {
+display:none;
+}
+.cpsskinsTabs li ul {
+display:none;
+left:0pt;
+position:absolute;
+}
+.cpsskinsTabs li > ul {
+left:auto;
+top:auto;
+}
+.cpsskinsTabs li:hover ul, .cpsskinsTabs li.over ul {
+display:block;
+}
+.cpsskinsBoxCorners .rbtop div {
+left:-2px;
+position:relative;
+width:100%;
+}
+.cpsskinsBoxCorners .rbtop {
+position:relative;
+right:-1px;
+top:-1px;
+width:100%;
+}
+.cpsskinsBoxCorners .rbbot div {
+left:-2px;
+position:relative;
+width:100%;
+}
+.cpsskinsBoxCorners .rbbot {
+bottom:-1px;
+position:relative;
+right:-1px;
+width:100%;
+}
+.hidden {
+display:none;
+}
+.cpsskinsHBox {
+margin:3px;
+}
+.cpsskinsHBox ul.cpsskinsMenu, .cpsskinsHBox ul.cpsskinsMenu li {
+display:inline;
+line-height:normal;
+list-style-type:none;
+padding:3px 0pt 2px;
+}
+* html .cpsskinsHBox ul.cpsskinsMenu {
+padding:0px;
+}
+* html .cpsskinsHBox ul.cpsskinsMenu li {
+padding:0px;
+}
+.cpsskinsHBox ul.cpsskinsMenu li a {
+background-position:left top;
+background-repeat:no-repeat;
+display:inline;
+margin-left:0pt !important;
+}
+.cpsskinsHBox ul.cpsskinsMenu span.itemDescription {
+display:none;
+}
+.cpsskinsHBox div.xmlExportButtons {
+display:none;
+}
+
+.colorHeadersideleft {
+background-color:#FFCA31;
+background-image:url(<dtml-var base_url>backgrounds/header_side_left.png);
+background-position:right top;
+background-repeat:repeat-y;
+border-color:transparent;
+color:#000000;
+}
+.colorHeadersideright {
+background-color:#FFCA31;
+background-image:url(<dtml-var base_url>backgrounds/header_side_right.png);
+background-position:left top;
+background-repeat:repeat-y;
+border-color:transparent;
+color:#000000;
+}
+.colorMainsideleft {
+background-color:gray;
+background-image:url(<dtml-var base_url>backgrounds/main_side_left.png);
+background-position:right top;
+background-repeat:repeat-y;
+border-color:transparent;
+color:#000000;
+}
+.colorMainsideright {
+background-color:gray;
+background-image:url(<dtml-var base_url>backgrounds/main_side_right.png);
+background-repeat:repeat-y;
+border-color:transparent;
+color:#000000;
+}
+.colorHeadercandybarbackground {
+background-color:#FF9900;
+background-image:url(<dtml-var base_url>backgrounds/header_background.png);
+background-repeat:repeat-x;
+color:#000000;
+}
+.portalTabTabStyle ul.cpsskinsMenu li {
+margin:0pt 2px 0pt 0pt;
+}
+.portalTabTabStyle ul.cpsskinsMenu li a {
+padding:3px 2px;
+}
+
+.colorFootergradient {
+background-color:#E7E7E7;
+background-image:url(<dtml-var base_url>backgrounds/footer_gradient.png);
+background-position:left bottom;
+background-repeat:repeat-x;
+border-color:transparent;
+color:#000000;
+}
+.colorgraye7 {
+background-color:#E7E7E7;
+background-repeat:repeat;
+border-color:transparent;
+color:#000000;
+}
+.fontShapeaverage {
+font-family:Arial,sans-serif,Verdana,Helvetica !important;
+font-size:12px !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:normal !important;
+line-height:normal !important;
+}
+.fontShapeaverage p {
+font-family:Arial,sans-serif,Verdana,Helvetica !important;
+font-size:100% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:normal !important;
+line-height:normal !important;
+padding:5px 10px 0px 0px;
+}
+.fontShapeaverage small {
+}
+.fontShapeaverage h1, .fontShapeaverage .h1 {
+border-style:none;
+border-width:0px;
+font-family:Arial,sans-serif,Verdana,Helvetica !important;
+font-size:185% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+margin:0px;
+padding:0px;
+}
+.fontShapeaverage h2, .fontShapeaverage .h2 {
+border-style:none;
+border-width:0px;
+font-family:Arial,sans-serif,Verdana,Helvetica !important;
+font-size:150% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+margin:10px 0px 5px;
+padding:0px;
+}
+.fontShapeaverage h3, .fontShapeaverage .h3 {
+border-style:none;
+border-width:0px;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:125% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+padding:0.6em 0em 0em;
+}
+.fontShapeaverage h4, .fontShapeaverage .h4, .fontShapeaverage h5, .fontShapeaverage .h5, .fontShapeaverage h6, .fontShapeaverage .h6 {
+border-style:none;
+border-width:0pt;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:100% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+margin:10px 0px 5px;
+padding:0px;
+}
+.fontShapeaverage a, .fontShapeaverage a div, .fontShapeaverage a span {
+text-decoration:none;
+}
+.fontShapeaverage a:visited, .fontShapeaverage a:visited div, .fontShapeaverage a:visited span {
+text-decoration:none;
+}
+.fontShapeaverage a:active, .fontShapeaverage a:active div, .fontShapeaverage a:active span {
+text-decoration:underline overline;
+}
+.fontShapeaverage a:hover, .fontShapeaverage a:hover div, .fontShapeaverage a:hover span {
+text-decoration:underline;
+}
+.fontShapemini {
+font-family:Arial,sans-serif,Verdana,Helvetica !important;
+font-size:10px !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:normal !important;
+line-height:normal !important;
+}
+.fontShapemini p {
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:100% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:normal !important;
+line-height:normal !important;
+padding:0em;
+}
+.fontShapemini h1, .fontShapemini .h1 {
+border-style:none;
+border-width:1px;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:150% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:normal !important;
+line-height:normal !important;
+padding:0.8em 0em 0em;
+}
+.fontShapemini h2, .fontShapemini .h2 {
+border-style:none;
+border-width:1px;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:125% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+padding:0.6em 0em 0em;
+}
+.fontShapemini h3, .fontShapemini .h3 {
+border-style:none;
+border-width:1px;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:120% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+padding:0.6em 0em 0em;
+}
+.fontShapemini h4, .fontShapemini .h4, .fontShapemini h5, .fontShapemini .h5, .fontShapemini h6, .fontShapemini .h6 {
+border-style:none;
+border-width:1px;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:115% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+padding:0.4em 0em 0em;
+}
+.fontShapemini a, .fontShapemini a div, .fontShapemini a span {
+text-decoration:none;
+}
+.fontShapemini a:visited, .fontShapemini a:visited div, .fontShapemini a:visited span {
+text-decoration:none;
+}
+.fontShapemini a:active, .fontShapemini a:active div, .fontShapemini a:active span {
+text-decoration:underline overline;
+}
+.fontShapemini a:hover, .fontShapemini a:hover div, .fontShapemini a:hover span {
+text-decoration:underline;
+}
+.colorNavboxstyle {
+background-color:#FFFFFF;
+background-image:url(<dtml-var base_url>backgrounds/whitemaintop.png);
+background-position:left bottom;
+background-repeat:no-repeat;
+border-color:transparent;
+color:#000000;
+}
+.boxShapeextraleftboxes .title {
+border-style:none;
+border-width:0pt;
+display:inline;
+font-family:arial,sans-serif,Verdana,Helvetica;
+font-size:12px;
+font-size-adjust:none;
+font-stretch:normal;
+font-style:normal;
+font-variant:normal;
+font-weight:bold;
+line-height:normal;
+padding:30px 10px 5px 5px;
+}
+.boxShapeextraleftboxes .body {
+border-style:none none solid;
+border-width:1px;
+padding:5px 5px 10px;
+}
+.boxShapeextraleftboxes .body ul.cpsskinsMenu li a {
+border-style:none;
+border-width:0pt;
+margin:0pt;
+padding:2px;
+}
+.boxShapeextraleftboxes .body ul.cpsskinsMenu li.selected a {
+border-style:none;
+border-width:0pt;
+margin:0pt;
+padding:0px;
+}
+.boxColorextraleftboxes .title {
+background-color:transparent;
+border-color:transparent;
+color:#666666;
+}
+.boxColorextraleftboxes .title a {
+color:#666666;
+}
+.boxColorextraleftboxes .body {
+background-color:transparent;
+border-color:#BCBCBC;
+}
+.boxColorextraleftboxes .body ul.cpsskinsMenu li a {
+border-color:transparent;
+}
+.boxColorextraleftboxes .body ul.cpsskinsMenu li.selected a {
+border-color:transparent;
+}
+.boxColorextraleftboxes .body ul.cpsskinsMenu li a {
+background-color:transparent;
+}
+.boxColorextraleftboxes .body ul.cpsskinsMenu li a:hover, .boxColorextraleftboxes .body ul.cpsskinsMenu li.selected a {
+background-color:transparent;
+}
+.boxColorextraleftboxes .body ul.cpsskinsMenu li a {
+background-image:url(<dtml-var base_url>images/blakbullet.png);
+padding-left:20px !important;
+}
+.boxColorextraleftboxes .body ul.cpsskinsMenu li.selected a {
+background-image:url(<dtml-var base_url>images/blakbullet.png);
+padding-left:20px !important;
+}
+.fontColordefaultfontcolors h1, .fontColordefaultfontcolors .h1 {
+border-color:#666666;
+color:#4E4E4E;
+}
+.fontColordefaultfontcolors h2, .fontColordefaultfontcolors .h2 {
+border-color:#666666;
+color:#525252;
+}
+.fontColordefaultfontcolors h3, .fontColordefaultfontcolors .h3 {
+border-color:#666666;
+color:#666666;
+}
+.fontColordefaultfontcolors h4, .fontColordefaultfontcolors .h4, .fontColordefaultfontcolors h5, .fontColordefaultfontcolors .h5, .fontColordefaultfontcolors h6, .fontColordefaultfontcolors .h6 {
+border-color:#666666;
+color:Black;
+}
+.fontColordefaultfontcolors a, .fontColordefaultfontcolors a div, .fontColordefaultfontcolors a span {
+color:#0066CC;
+}
+.fontColordefaultfontcolors a:visited, .fontColordefaultfontcolors a:visited div, .fontColordefaultfontcolors a:visited span {
+color:#003399;
+}
+.fontColordefaultfontcolors a:active, .fontColordefaultfontcolors a:active div, .fontColordefaultfontcolors a:active span {
+color:blue;
+}
+.fontColordefaultfontcolors a:hover, .fontColordefaultfontcolors a:hover div, .fontColordefaultfontcolors a:hover span {
+color:#0066CC;
+}
+.colorAreaColormain {
+background-color:#E7E7E7;
+background-image:url(<dtml-var base_url>backgrounds/whitemaintop.png);
+background-position:left top;
+background-repeat:repeat-x;
+border-color:#BCBCBC;
+color:#333333;
+}
+.colormainlittlecorner {
+background-color:#E7E7E7;
+background-image:url(<dtml-var base_url>backgrounds/little_main_corner_e7_20px.png);
+background-position:left top;
+background-repeat:no-repeat;
+border-color:transparent;
+color:#666666;
+}
+.colormainleftborder {
+background-color:white;
+background-image:url(<dtml-var base_url>backgrounds/bc_pixel.png);
+background-position:left top;
+background-repeat:repeat-y;
+border-color:#BCBCBC;
+color:#000000;
+}
+.colormaintopcorner {
+background-color:#FFFFFF;
+background-image:url(<dtml-var base_url>backgrounds/main_top_corner.png);
+background-position:left top;
+background-repeat:no-repeat;
+border-color:transparent;
+color:#333333;
+}
+.boxShapeobjectactions .title {
+border-style:none solid none none;
+border-width:1px;
+display:inline;
+font-family:arial,sans-serif;
+font-size:12px;
+font-size-adjust:none;
+font-stretch:normal;
+font-style:normal;
+font-variant:normal;
+font-weight:normal;
+line-height:normal;
+padding:0pt;
+}
+.boxShapeobjectactions .body {
+border-style:none;
+border-width:1px;
+padding:0px;
+}
+.boxShapeobjectactions .body ul.cpsskinsMenu li a {
+border-style:none;
+border-width:0px;
+padding:5px;
+}
+.boxShapeobjectactions .body ul.cpsskinsMenu li.selected a {
+border-style:none solid;
+border-width:1px;
+padding:5px;
+}
+.boxColorobjectactions .title {
+background-color:#D0D0D0;
+border-color:#999999;
+color:Black;
+}
+.boxColorobjectactions .title a {
+color:Black;
+}
+.boxColorobjectactions .body {
+background-color:transparent;
+border-color:#BCBCBC;
+}
+.boxColorobjectactions .body ul.cpsskinsMenu li a {
+border-color:transparent;
+}
+.boxColorobjectactions .body ul.cpsskinsMenu li.selected a {
+border-color:transparent;
+}
+.boxColorobjectactions .body ul.cpsskinsMenu li a {
+background-color:transparent;
+}
+.boxColorobjectactions .body ul.cpsskinsMenu li a:hover, .boxColorobjectactions .body ul.cpsskinsMenu li.selected a {
+background-color:#F1F2F3;
+}
+.boxShapenavbox .title {
+border-style:none;
+border-width:0px;
+display:inline;
+font-family:arial,sans-serif,Verdana,Helvetica;
+font-size:12px;
+font-size-adjust:none;
+font-stretch:normal;
+font-style:normal;
+font-variant:normal;
+font-weight:bold;
+line-height:normal;
+padding:0px;
+}
+.boxShapenavbox .body {
+border-style:solid;
+border-width:0px;
+padding:10px 0pt 0pt;
+}
+.boxShapenavbox .body ul.cpsskinsMenu li a {
+border-style:none;
+border-width:0px;
+margin:1px 3px;
+padding:1px 0px 1px 21px;
+}
+.boxShapenavbox .body ul.cpsskinsMenu li.selected a {
+border-style:solid;
+border-width:0px;
+margin:0px 3px;
+padding:1px 0px 1px 21px;
+}
+.boxColornavbox .title {
+background-color:transparent;
+border-color:transparent;
+color:#666666;
+}
+.boxColornavbox .title a {
+color:#666666;
+}
+.boxColornavbox .body {
+background-color:transparent;
+border-color:transparent;
+}
+.boxColornavbox .body ul.cpsskinsMenu li a {
+border-color:transparent;
+}
+.boxColornavbox .body ul.cpsskinsMenu li.selected a {
+border-color:transparent;
+}
+.boxColornavbox .body ul.cpsskinsMenu li a {
+background-color:transparent;
+}
+.boxColornavbox .body ul.cpsskinsMenu li a:hover, .boxColornavbox .body ul.cpsskinsMenu li.selected a {
+background-color:#F1F2F3;
+}
+.fontColormini h1, .fontColormini .h1 {
+border-color:#666666;
+color:Black;
+}
+.fontColormini h2, .fontColormini .h2 {
+border-color:#666666;
+color:Black;
+}
+.fontColormini h3, .fontColormini .h3 {
+border-color:#666666;
+color:Black;
+}
+.fontColormini h4, .fontColormini .h4, .fontColormini h5, .fontColormini .h5, .fontColormini h6, .fontColormini .h6 {
+border-color:#666666;
+color:Black;
+}
+.fontColormini a, .fontColormini a div, .fontColormini a span {
+color:#0066CC;
+}
+.fontColormini a:visited, .fontColormini a:visited div, .fontColormini a:visited span {
+color:#003399;
+}
+.fontColormini a:active, .fontColormini a:active div, .fontColormini a:active span {
+color:blue;
+}
+.fontColormini a:hover, .fontColormini a:hover div, .fontColormini a:hover span {
+color:#0066CC;
+}
+.colorfontcolorgray {
+background-color:transparent;
+border-color:transparent;
+color:#666666;
+}
+.fontColordefaultnovisitedlinks h1, .fontColordefaultnovisitedlinks .h1 {
+border-color:#666666;
+color:Black;
+}
+.fontColordefaultnovisitedlinks h2, .fontColordefaultnovisitedlinks .h2 {
+border-color:#666666;
+color:Black;
+}
+.fontColordefaultnovisitedlinks h3, .fontColordefaultnovisitedlinks .h3 {
+border-color:#666666;
+color:Black;
+}
+.fontColordefaultnovisitedlinks h4, .fontColordefaultnovisitedlinks .h4, .fontColordefaultnovisitedlinks h5, .fontColordefaultnovisitedlinks .h5, .fontColordefaultnovisitedlinks h6, .fontColordefaultnovisitedlinks .h6 {
+border-color:#666666;
+color:Black;
+}
+.fontColordefaultnovisitedlinks a, .fontColordefaultnovisitedlinks a div, .fontColordefaultnovisitedlinks a span {
+color:#0066CC;
+}
+.fontColordefaultnovisitedlinks a:visited, .fontColordefaultnovisitedlinks a:visited div, .fontColordefaultnovisitedlinks a:visited span {
+color:#0066CC;
+}
+.fontColordefaultnovisitedlinks a:active, .fontColordefaultnovisitedlinks a:active div, .fontColordefaultnovisitedlinks a:active span {
+color:blue;
+}
+.fontColordefaultnovisitedlinks a:hover, .fontColordefaultnovisitedlinks a:hover div, .fontColordefaultnovisitedlinks a:hover span {
+color:#0066CC;
+}
+.fontShapeactions {
+font-family:Arial,sans-serif,Verdana,Helvetica !important;
+font-size:9px !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:normal !important;
+line-height:normal !important;
+}
+.fontShapeactions p {
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:100% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:normal !important;
+line-height:normal !important;
+padding:0em;
+}
+.fontShapeactions h1, .fontShapeactions .h1 {
+border-style:none;
+border-width:1px;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:150% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:normal !important;
+line-height:normal !important;
+padding:0.8em 0em 0em;
+}
+.fontShapeactions h2, .fontShapeactions .h2 {
+border-style:none;
+border-width:1px;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:125% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+padding:0.6em 0em 0em;
+}
+.fontShapeactions h3, .fontShapeactions .h3 {
+border-style:none;
+border-width:1px;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:120% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+padding:0.6em 0em 0em;
+}
+.fontShapeactions h4, .fontShapeactions .h4, .fontShapeactions h5, .fontShapeactions .h5, .fontShapeactions h6, .fontShapeactions .h6 {
+border-style:none;
+border-width:1px;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:115% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+padding:0.4em 0em 0em;
+}
+.fontShapeactions a, .fontShapeactions a div, .fontShapeactions a span {
+text-decoration:none;
+}
+.fontShapeactions a:visited, .fontShapeactions a:visited div, .fontShapeactions a:visited span {
+text-decoration:none;
+}
+.fontShapeactions a:active, .fontShapeactions a:active div, .fontShapeactions a:active span {
+text-decoration:underline;
+}
+.fontShapeactions a:hover, .fontShapeactions a:hover div, .fontShapeactions a:hover span {
+text-decoration:none;
+}
+.boxCornerRoundedBoxCorners {
+background-color:white;
+border:1px solid #BCBCBC;
+}
+.boxCornerRoundedBoxCorners .rbtop div {
+background:transparent url(<dtml-var base_url>backgrounds/corner1.png) no-repeat scroll left top;
+height:9px;
+}
+.boxCornerRoundedBoxCorners .rbtop {
+background:transparent url(<dtml-var base_url>backgrounds/corner2.png) no-repeat scroll right top;
+height:9px;
+}
+.boxCornerRoundedBoxCorners .rbbot div {
+background:transparent url(<dtml-var base_url>backgrounds/corner4.png) no-repeat scroll left bottom;
+height:9px;
+}
+.boxCornerRoundedBoxCorners .rbbot {
+background:transparent url(<dtml-var base_url>backgrounds/corner3.png) no-repeat scroll right bottom;
+height:9px;
+}
+.portalTabPortalTabStyleuseractions ul.cpsskinsMenu li {
+margin:0pt 5px 0pt 0pt;
+}
+.portalTabPortalTabStyleuseractions ul.cpsskinsMenu li a {
+padding:1px 0px;
+}
+.colortitlebackground {
+background-color:#1F4485;
+background-image:url(<dtml-var base_url>backgrounds/cps_athens.png);
+background-position:left top;
+background-repeat:no-repeat;
+border-color:transparent;
+color:#000000;
+}
+.boxCornerhalfRoundedBox {
+background-color:#FFFFFF;
+border:1px solid #BCBCBC;
+}
+.boxCornerhalfRoundedBox .rbtop div {
+background:transparent url(<dtml-var base_url>backgrounds/scorner1.png) no-repeat scroll left top;
+height:9px;
+}
+.boxCornerhalfRoundedBox .rbtop {
+background:transparent url(<dtml-var base_url>backgrounds/scorner2.png) no-repeat scroll right top;
+height:9px;
+}
+.boxCornerhalfRoundedBox .rbbot div {
+background:transparent url(<dtml-var base_url>backgrounds/corner4.png) no-repeat scroll left bottom;
+height:9px;
+}
+.boxCornerhalfRoundedBox .rbbot {
+background:transparent url(<dtml-var base_url>backgrounds/corner3.png) no-repeat scroll right bottom;
+height:9px;
+}
+.fontShapeTitleindex {
+font-family:Arial,sans-serif,Verdana,Helvetica !important;
+font-size:13px !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:normal !important;
+line-height:normal !important;
+}
+.fontShapeTitleindex p {
+font-family:Arial,sans-serif,Verdana,Helvetica !important;
+font-size:100% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:normal !important;
+line-height:normal !important;
+padding:0em;
+}
+.fontShapeTitleindex h1, .fontShapeTitleindex .h1 {
+border-style:none;
+border-width:0px;
+font-family:Arial,sans-serif,Verdana,Helvetica !important;
+font-size:150% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+margin:0px;
+padding:0px;
+}
+.fontShapeTitleindex h2, .fontShapeTitleindex .h2 {
+border-style:none;
+border-width:0pt;
+font-family:Arial,sans-serif,Verdana,Helvetica !important;
+font-size:150% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+padding:0.6em 0em 0em;
+}
+.fontShapeTitleindex h3, .fontShapeTitleindex .h3 {
+border-style:none;
+border-width:0pt;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:125% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+padding:0.6em 0em 0em;
+}
+.fontShapeTitleindex h4, .fontShapeTitleindex .h4, .fontShapeTitleindex h5, .fontShapeTitleindex .h5, .fontShapeTitleindex h6, .fontShapeTitleindex .h6 {
+border-style:none;
+border-width:0pt;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:100% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+padding:0.4em 0em 0em;
+}
+.fontShapeTitleindex a, .fontShapeTitleindex a div, .fontShapeTitleindex a span {
+text-decoration:none;
+}
+.fontShapeTitleindex a:visited, .fontShapeTitleindex a:visited div, .fontShapeTitleindex a:visited span {
+text-decoration:none;
+}
+.fontShapeTitleindex a:active, .fontShapeTitleindex a:active div, .fontShapeTitleindex a:active span {
+text-decoration:underline overline;
+}
+.fontShapeTitleindex a:hover, .fontShapeTitleindex a:hover div, .fontShapeTitleindex a:hover span {
+text-decoration:underline;
+}
+.fontColortitleindex h1, .fontColortitleindex .h1 {
+border-color:#666666;
+color:#003399;
+}
+.fontColortitleindex h2, .fontColortitleindex .h2 {
+border-color:#666666;
+color:#454545;
+}
+.fontColortitleindex h3, .fontColortitleindex .h3 {
+border-color:#666666;
+color:#666666;
+}
+.fontColortitleindex h4, .fontColortitleindex .h4, .fontColortitleindex h5, .fontColortitleindex .h5, .fontColortitleindex h6, .fontColortitleindex .h6 {
+border-color:#666666;
+color:Black;
+}
+.fontColortitleindex a, .fontColortitleindex a div, .fontColortitleindex a span {
+color:#0066CC;
+}
+.fontColortitleindex a:visited, .fontColortitleindex a:visited div, .fontColortitleindex a:visited span {
+color:#003399;
+}
+.fontColortitleindex a:active, .fontColortitleindex a:active div, .fontColortitleindex a:active span {
+color:blue;
+}
+.fontColortitleindex a:hover, .fontColortitleindex a:hover div, .fontColortitleindex a:hover span {
+color:#0066CC;
+}
+.boxShapeLatestbox .title {
+border-style:none;
+border-width:0px;
+display:inline;
+font-family:arial,sans-serif;
+font-size:175%;
+font-size-adjust:none;
+font-stretch:normal;
+font-style:normal;
+font-variant:normal;
+font-weight:bold;
+line-height:normal;
+padding:0px 5px 0px 10px;
+}
+.boxShapeLatestbox .body {
+border-style:none;
+border-width:0px;
+padding:10px;
+}
+.boxShapeLatestbox .body ul.cpsskinsMenu li a {
+border-style:none;
+border-width:1px;
+margin:2px;
+padding:2px;
+}
+.boxShapeLatestbox .body ul.cpsskinsMenu li.selected a {
+border-style:none;
+border-width:0px;
+margin:2px;
+padding:2px;
+}
+.boxColortitleindex .title {
+background-color:#FFFFFF;
+border-color:transparent;
+color:#003399;
+}
+.boxColortitleindex .title a {
+color:#003399;
+}
+.boxColortitleindex .body {
+background-color:#FFFFFF;
+border-color:#999999;
+}
+.boxColortitleindex .body ul.cpsskinsMenu li a {
+border-color:#FFFFFF;
+}
+.boxColortitleindex .body ul.cpsskinsMenu li.selected a {
+border-color:transparent;
+}
+.boxColortitleindex .body ul.cpsskinsMenu li a {
+background-color:#FFFFFF;
+}
+.boxColortitleindex .body ul.cpsskinsMenu li a:hover, .boxColortitleindex .body ul.cpsskinsMenu li.selected a {
+background-color:#E7E7E7;
+}
+.boxColortitleindex .body ul.cpsskinsMenu li a {
+background-image:url(<dtml-var base_url>images/blakbullet.png);
+padding-left:20px !important;
+}
+.boxColortitleindex .body ul.cpsskinsMenu li.selected a {
+background-image:url(<dtml-var base_url>images/blakbullet.png);
+padding-left:20px !important;
+}
+.shapeAreaShape1 {
+border-style:solid;
+border-width:1px 0pt 0pt;
+text-transform:none;
+}
+.shapeAreaShape2 {
+border-style:solid;
+border-width:0pt 1px 0pt 0pt;
+text-transform:none;
+}
+.shapeAreaShape3 {
+border-style:solid;
+border-width:0pt 0pt 1px;
+text-transform:none;
+}
+.shapeAreaShape4 {
+border-style:solid;
+border-width:0pt 0pt 0pt 1px;
+text-transform:none;
+}
+.shapeAreaShape5 {
+border-style:solid;
+border-width:0px 1px 1px 0px;
+text-transform:none;
+}
+.colorAreaColor {
+background-color:#FFFFFF;
+background-repeat:repeat;
+border-color:#CBD3D7;
+color:#000000;
+}
+.colorUnibenColor {
+background-color:#D6ACE8;
+border-color:#8900CD;
+color:#000000;
+}
+.shapeAreaShape6 {
+border-style:solid;
+border-width:1px 1px 1px 0px;
+text-transform:none;
+}
+.colorWAeUPColor {
+background-color:#CBD3D7;
+border-color:#CBD3D7;
+color:#000000;
+}
+.shapeAreaShape7 {
+border-style:solid;
+border-width:0px 1px 1px;
+text-transform:none;
+}
+.shapeAreaShape8 {
+border-style:solid;
+border-width:1px 1px 0px;
+text-transform:none;
+}
+.shapeAreaShape {
+border-style:solid;
+border-width:1px;
+text-transform:none;
+}
+.shapeAreaShape9 {
+border-style:solid;
+border-width:1px 0px 0px 1px;
+text-transform:none;
+}
+.shapeAreaShape10 {
+border-style:solid;
+border-width:1px;
+text-transform:none;
+}
+.colorSciAfrColor {
+background-color:#840000;
+border-color:#CCCCCC;
+color:#000000;
+}
+
+.fontColornavigation h1, .fontColornavigation .h1 {
+border-color:#666666;
+color:Black;
+}
+.fontColornavigation h2, .fontColornavigation .h2 {
+border-color:#666666;
+color:Black;
+}
+.fontColornavigation h3, .fontColornavigation .h3 {
+border-color:#666666;
+color:Black;
+}
+.fontColornavigation h4, .fontColornavigation .h4, .fontColornavigation h5, .fontColornavigation .h5, .fontColornavigation h6, .fontColornavigation .h6 {
+border-color:#666666;
+color:Black;
+}
+.fontColornavigation a, .fontColornavigation a div, .fontColornavigation a span {
+color:black;
+}
+.fontColornavigation a:visited, .fontColornavigation a:visited div, .fontColornavigation a:visited span {
+color:black;
+}
+.fontColornavigation a:active, .fontColornavigation a:active div, .fontColornavigation a:active span {
+color:black;
+}
+.fontColornavigation a:hover, .fontColornavigation a:hover div, .fontColornavigation a:hover span {
+color:black;
+}
+.fontShapenavigation {
+font-family:Arial,sans-serif,Verdana,Helvetica !important;
+font-size:12px !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:normal !important;
+line-height:normal !important;
+}
+.fontShapenavigation p {
+font-family:Arial,Verdana,Helvetica,sans-serif !important;
+font-size:100% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:normal !important;
+line-height:normal !important;
+}
+.fontShapenavigation h1, .fontShapenavigation .h1 {
+border-style:none;
+border-width:1px;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:150% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:normal !important;
+line-height:normal !important;
+padding:0.8em 0em 0em;
+}
+.fontShapenavigation h2, .fontShapenavigation .h2 {
+border-style:none;
+border-width:1px;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:125% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+padding:0.6em 0em 0em;
+}
+.fontShapenavigation h3, .fontShapenavigation .h3 {
+border-style:none;
+border-width:1px;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:120% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+padding:0.6em 0em 0em;
+}
+.fontShapenavigation h4, .fontShapenavigation .h4, .fontShapenavigation h5, .fontShapenavigation .h5, .fontShapenavigation h6, .fontShapenavigation .h6 {
+border-style:none;
+border-width:1px;
+font-family:Verdana,Arial,Helvetica,sans-serif !important;
+font-size:115% !important;
+font-size-adjust:none !important;
+font-stretch:normal !important;
+font-style:normal !important;
+font-variant:normal !important;
+font-weight:bold !important;
+line-height:normal !important;
+padding:0.4em 0em 0em;
+}
+.fontShapenavigation a, .fontShapenavigation a div, .fontShapenavigation a span {
+text-decoration:none;
+}
+.fontShapenavigation a:visited, .fontShapenavigation a:visited div, .fontShapenavigation a:visited span {
+text-decoration:none;
+}
+.fontShapenavigation a:active, .fontShapenavigation a:active div, .fontShapenavigation a:active span {
+text-decoration:none;
+}
+.fontShapenavigation a:hover, .fontShapenavigation a:hover div, .fontShapenavigation a:hover span {
+text-decoration:underline;
+}
+</dtml-let>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_design/get_waeup_skin.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_design/get_waeup_skin.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_design/get_waeup_skin.py	(revision 2226)
@@ -0,0 +1,13 @@
+# Return the right theme in context:
+
+request = container.REQUEST
+RESPONSE =  request.RESPONSE
+
+# Return a string identifying this script.
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+roles = member.getRoles()
+if 'Student' in roles or mtool.isAnonymousUser():
+     return 'WAeUP_Student'
+return 'WAeUP_Backoffice'
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_design/header_lib_header.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_design/header_lib_header.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_design/header_lib_header.pt	(revision 2226)
@@ -0,0 +1,42 @@
+<!-- a header_lib macro -->
+<!-- $Id: header_lib_header.pt 31116 2005-12-30 10:56:31Z lregebro $ -->
+
+<!--
+Here is the CSS loading logic:
+- default.css follows the CSS2 spec.
+- msie.css is used and read *only* by MSIE. This is the place to put instructions
+  to correct the rendering problems specific to MSIE.
+- custom.css is loaded if it exists.
+-->
+
+<metal:block define-macro="header" tal:define="charset string:ISO-8859-15">
+  <tal:block define="dummy python:request.RESPONSE.setHeader('Content-Type',
+    'text/html;; charset=%s' % charset)"/>
+  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15"/>
+  <meta name="generator" content="West African eUniversity Project www.waeup.org"/>
+  <title tal:content="expanded_title|here/expanded_title">WAeUP Default</title>
+  <metal:block define-slot="base"></metal:block>
+  <link rel="stylesheet" type="text/css" media="all"
+    tal:attributes="href string:${base_url}default.css" />
+  <link tal:condition="btool|nothing" rel="stylesheet" type="text/css"
+    media="all" tal:attributes="href string:${base_url}boxes.css" />
+  <tal:block replace="structure string:&lt;!--[if IE]&gt;" /><link
+    rel="stylesheet" type="text/css"
+    tal:attributes="href string:${base_url}msie.css" /><tal:block
+    replace="structure string:&lt;![endif]--&gt;" />
+  <link rel="stylesheet" type="text/css" media="print"
+    tal:attributes="href string:${base_url}default_print.css"/>
+  <meta http-equiv="imagetoolbar" content="no" />
+  <metal:block define-slot="head_slot"></metal:block>
+  <metal:block define-slot="style_slot"></metal:block>
+  <link rel="stylesheet" type="text/css" media="all"
+    tal:condition="exists: here/custom.css"
+    tal:attributes="href string:${base_url}custom.css;"/>
+  <link rel="stylesheet" type="text/css" media="all"
+    tal:define="custom_css here/getCPSCustomCSS|nothing"
+    tal:condition="custom_css"
+    tal:attributes="href string:${base_url}${custom_css}"/>
+  <metal:block define-slot="javascript_head_slot"></metal:block>
+  <script type="text/javascript"
+    tal:attributes="src string:${base_url}functions.js"></script>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_design/idcard_template.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_design/idcard_template.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_design/idcard_template.pt	(revision 2226)
@@ -0,0 +1,82 @@
+<metal:block define-macro="master"
+  tal:define="showthirdcol showthirdcol|python:1;
+  emptybody emptybody|request/emptybody|nothing;
+  mtool here/portal_membership;
+
+  utool nocall:here/portal_url;
+  atool here/portal_actions;
+  ttool here/portal_trees;
+  wtool here/portal_workflow;
+  ptool here/portal_cpsportlets;
+  context_url python:here.getContextUrl(utool=utool);
+  here_url here/absolute_url;
+  base_url here/getBaseUrl;
+  member mtool/getAuthenticatedMember;
+  isAnon mtool/isAnonymousUser;
+  isHomeless python:isAnon or member.getProperty('homeless', 0);
+  isHomeless python:(isHomeless == '0' and [0] or [isHomeless])[0];
+  actions python:atool.listFilteredActionsFor(here);
+  wf_state python:wtool.getInfoFor(here,'review_state','');
+  uname python: isAnon and 'Guest' or member.getUserName();
+  checkPerm nocall: mtool/checkPermission;
+  cpsmcat nocall:here/translation_service;
+  locale here/translation_service/getSelectedLanguage;
+  in_ws here/isInWorkspace;
+  waeup_skin here/get_waeup_skin;
+  ">
+  <metal:block define-slot="doctype"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+  </metal:block>
+  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
+        lang="en">
+    <head>
+      <metal:block use-macro="here/header_lib_header/macros/header|here/header_lib/macros/header">
+        <metal:block fill-slot="base">
+          <metal:block define-slot="base">
+            <base href=""
+                  tal:attributes="href string:${here_url}/" />
+          </metal:block>
+        </metal:block>
+        <metal:block fill-slot="head_slot">
+          <metal:block define-slot="head_slot" />
+        </metal:block>
+        <metal:block fill-slot="style_slot">
+          <link rel="stylesheet" type="text/css" media="all"
+                tal:attributes="href string:${base_url}common.css" />
+          <metal:block define-slot="style_slot" />
+        </metal:block>
+        <metal:block fill-slot="javascript_head_slot">
+          <metal:block define-slot="javascript_head_slot" />
+        </metal:block>
+      </metal:block>
+      <link rel="icon"
+            href="ng.png"
+            tal:attributes="href string:${base_url}ng.png"
+            type="image/png" />
+      <link rel="shortcut icon"
+            href="icons/ng.png"
+            tal:attributes="href string:${base_url}ng.png"
+            type="image/png" />
+    </head>
+
+    <body tal:condition="not:emptybody"
+          style="margin: 0px;"
+          tal:attributes="onload here/getOnLoad|string:setFocus();">
+   
+      
+    <table summary="Main Block" cellpadding="0" cellspacing="0">
+      <tr>
+        <td valign="top" style="width:700px">
+          <div style="padding:2em; text-align: left;" 
+               class="fontColordefaultfontcolors fontShapeTitleindex">
+                  <metal:block use-macro="here/generic_lib_portal_message/macros/portal_message" />
+                  <metal:block define-slot="header" />
+                  <metal:block define-slot="main" />
+                  <metal:block define-slot="sub" />
+          </div>
+        </td>
+      </tr>
+    </table>
+  </body>
+</html>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_design/index_html.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_design/index_html.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_design/index_html.py	(revision 2226)
@@ -0,0 +1,25 @@
+## Script (Python) "index_html"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=batch=None
+##title=
+##
+# $Id: index_html.py 901 2006-11-20 07:33:16Z henrik $
+"""
+return the correct index_html
+"""
+
+request = context.REQUEST
+redirect = request.RESPONSE.redirect
+pm = context.portal_membership
+
+if pm.isAnonymousUser():
+    return redirect("%s/srp_anonymous_view" % request.get('URL1'))
+elif context.isStudent():
+    return redirect("%s/srp_anonymous_view" % context.absolute_url())
+else:
+	return redirect("%s/srp_view" % context.absolute_url())
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_design/main_template.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_design/main_template.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_design/main_template.pt	(revision 2226)
@@ -0,0 +1,217 @@
+<metal:block define-macro="master"
+  tal:define="showthirdcol showthirdcol|python:1;
+  emptybody emptybody|request/emptybody|nothing;
+  mtool here/portal_membership;
+  
+  utool nocall:here/portal_url;
+  atool here/portal_actions;
+  ttool here/portal_trees;
+  wtool here/portal_workflow;
+  ptool here/portal_cpsportlets;
+  context_url python:here.getContextUrl(utool=utool);
+  here_url here/absolute_url;
+  base_url here/getBaseUrl;
+  member mtool/getAuthenticatedMember;
+  isAnon mtool/isAnonymousUser;
+  isHomeless python:isAnon or member.getProperty('homeless', 0);
+  isHomeless python:(isHomeless == '0' and [0] or [isHomeless])[0];
+  actions python:atool.listFilteredActionsFor(here);
+  wf_state python:wtool.getInfoFor(here,'review_state','');
+  uname python: isAnon and 'Guest' or member.getUserName();
+  checkPerm nocall: mtool/checkPermission;
+  cpsmcat nocall:here/translation_service;
+  locale here/translation_service/getSelectedLanguage;
+  in_ws here/isInWorkspace;
+  waeup_skin here/get_waeup_skin;
+  student_theme python:test(waeup_skin == 'WAeUP_Student',1,0);
+  navigation_slot python:test(student_theme,'student_navigation_slot','navigation_slot');
+  object_tabs python:test(student_theme,'student_object_slot','staff_object_slot');
+  
+  ">
+  <metal:block define-slot="doctype"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+  </metal:block>
+  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
+        lang="en">
+    <head>
+      <metal:block use-macro="here/header_lib_header/macros/header|here/header_lib/macros/header">
+        <metal:block fill-slot="base">
+          <metal:block define-slot="base">
+            <base href=""
+                  tal:attributes="href string:${here_url}/" />
+          </metal:block>
+        </metal:block>
+        <metal:block fill-slot="head_slot">
+          <metal:block define-slot="head_slot" />
+        </metal:block>
+        <metal:block fill-slot="style_slot">
+          <link rel="stylesheet" type="text/css" media="all"
+                tal:attributes="href string:${base_url}common.css" />
+          <link rel="stylesheet" type="text/css" media="all"
+                tal:attributes="href string:${base_url}${waeup_skin}/render.css" />
+          <metal:block define-slot="style_slot" />
+        </metal:block>
+        <metal:block fill-slot="javascript_head_slot">
+          <metal:block define-slot="javascript_head_slot" />
+        </metal:block>
+      </metal:block>
+      <link rel="icon"
+            href="ng.png"
+            tal:attributes="href string:${base_url}ng.png"
+            type="image/png" />
+      <link rel="shortcut icon"
+            href="icons/ng.png"
+            tal:attributes="href string:${base_url}ng.png"
+            type="image/png" />
+    </head>
+    <body tal:condition="emptybody"
+          style="margin: 0px;"
+          tal:attributes="onload here/getOnLoad|string:setFocus();">
+      <metal:block define-slot="body" />
+      <metal:block define-slot="main" />
+    </body>
+    
+    <body tal:condition="not:emptybody"
+          style="margin: 0px;"
+          tal:attributes="onload here/getOnLoad|string:setFocus();">
+      
+     
+      <table summary="Logo Block"
+             style="margin-left: auto; margin-right: auto; width: 100%;"
+             class="shapeNoBorder colorTransparent" cellpadding="0" 
+             cellspacing="0">
+        <tbody>
+          <tr>
+            <td style="width: 20px;"></td>
+            <td valign="top" style="width: 120px; padding: 10px 10px 0 0; text-align: right;">
+              <img tal:attributes="src string:${base_url}uniben_mark.jpg"  alt="Logo" />
+            </td>
+            <td style="padding: 27px 0 0 0; text-align: left;" valign="top">
+              <img tal:attributes="src string:${base_url}uniben_logo.gif" alt="Logo" />
+            </td>
+            <td style="width: 20px;"></td>
+          </tr>
+        </tbody>
+      </table>
+
+      <table summary="Navigation Block"
+             style="margin-left: auto; margin-right: auto; width: 100%;"
+             class="shapeNoBorder colorTransparent" cellpadding="0"
+             cellspacing="0">
+        <tbody>
+          <tr>
+            <td style="width: 20px;" valign="top"></td>
+            <td style="" valign="top">
+              <div id="navigation_slot" 
+                       style="padding: 0em 0em 1px; text-align: right;"
+                       class="fontColornavigation fontShapenavigation portalTabTabStyle cpsskinsHBox body">
+                 <tal:block repeat="portlet python:ptool.getPortlets(context=context, slot=navigation_slot)"
+                  tal:content="structure python:portlet.render_cache(context_obj=context, portlet=portlet)" />
+              </div>
+            </td>
+            <td style="width: 20px;" valign="top"></td>
+          </tr>
+        </tbody>
+      </table>
+      
+      
+      <table summary="Main Table Block 1"
+           style="margin-left: auto; margin-right: auto; width: 100%;"
+           cellpadding="0" cellspacing="0">
+      <tbody>
+        <tr>
+          <td style="width: 20px;" valign="top"></td>
+          <td style="width: 170px;text-align: center;"
+              valign="top">
+            <div id="portal_session" style="padding: 0.4em 0.4em 0.4em 0.3em;"
+                 class="colorBarAreaColor fontColordefaultnovisitedlinks fontShapeaverage shapeAreaShape9">
+                    <tal:block repeat="portlet python:ptool.getPortlets(context=context, slot='portal_session')"
+                               tal:content="structure python:portlet.render_cache(context_obj=context, portlet=portlet, boxedit=None)" />
+            </div>
+          </td>
+          <td style="text-align: left; padding: 0.2em 0.2em 0em;" class="colorBarColor" valign="top">
+            <metal:block define-slot="action_slot" />
+            <div id="object_tabs" class="fontColornavigation fontShapeaverage cpsskinsHBox body"
+                 tal:define="portlets python:ptool.getPortlets(context=context, slot=object_tabs)">
+                <tal:block repeat="portlet portlets"
+                           tal:content="structure python:portlet.render_cache(context_obj=context, portlet=portlet)" />
+            </div>
+          </td>
+          <td tal:condition="not:student_theme"
+              class="colorBarColor" valign="top" style="text-align: right;padding: 0.2em 0.2em 0em; width: 280px;">
+            <div id="status_slot" class="fontColordefaultfontcolors fontShapeaverage cpsskinsHBox body"
+                 tal:define="portlets python:ptool.getPortlets(context=context, slot='status_slot')">
+                <tal:block repeat="portlet portlets"
+                           tal:content="structure python:portlet.render_cache(context_obj=context, portlet=portlet, boxedit=None)" />
+            </div>
+          </td>
+          <td style="width: 20px;"
+              valign="top"></td>
+        </tr>
+      </tbody>
+    </table>
+  
+  
+  
+    <table summary="Main Table Block 2"
+             style="margin-left: auto; margin-right: auto; width: 100%;"
+             class="" cellpadding="0" cellspacing="0">
+      <tbody>
+        <tr>
+          <td style="width: 20px;" valign="top"></td>
+          <td style="width: 170px;text-align: left;"
+              class="colorBarColor fontColornavigation fontShapeaverage boxShapenavbox cpsskinsBox" valign="top">
+            <div id="staff_actions_slot" class="body" style="padding: 1.5em 0.5em 1.5em 0.5em;">
+              <tal:block tal:condition="not:student_theme" repeat="portlet python:ptool.getPortlets(context=context, slot='staff_actions_slot')"
+                         tal:content="structure python:portlet.render_cache(context_obj=context, portlet=portlet, boxedit=None)" />
+              <tal:block tal:condition="not:student_theme" repeat="portlet python:ptool.getPortlets(context=context, slot='global_actions_slot')"
+                         tal:content="structure python:portlet.render_cache(context_obj=context, portlet=portlet, boxedit=None)" />
+              <tal:block tal:condition="student_theme" repeat="portlet python:ptool.getPortlets(context=context, slot='student_actions_slot')"
+                         tal:content="structure python:portlet.render_cache(context_obj=context, portlet=portlet, boxedit=None)" />
+
+              <span tal:condition="student_theme">
+              <div style="padding: 0em;">
+                <tal:block repeat="portlet python:ptool.getPortlets(context=context, slot='student_workflow')"
+                             tal:content="structure python:portlet.render_cache(context_obj=context, portlet=portlet, boxedit=None)" />
+              </div>
+                    
+              <div style="padding-top: 10px;">
+              <tal:block repeat="portlet python:ptool.getPortlets(context=context, slot='student_notice_slot')"
+                             tal:content="structure python:portlet.render_cache(context_obj=context, portlet=portlet, boxedit=None)" />
+              </div> 
+              </span> 
+
+
+            </div>
+          </td>
+          <td style="" class="shapeAreaShape5 colorBarAreaColor" valign="top">
+            <div style="padding: 0.5em; text-align: left;" class="fontColordefaultfontcolors fontShapeaverage">
+              <metal:block use-macro="here/generic_lib_portal_message/macros/portal_message" />
+              <metal:block define-slot="header" />
+              <metal:block define-slot="main" />
+              <metal:block define-slot="sub" />
+            </div>
+          </td>
+          <td style="width: 20px;" valign="top"></td>
+        </tr>
+      </tbody>
+    </table>
+    
+    
+    <table summary="Copyright Info Block"
+             style="margin-left: auto; margin-right: auto; width: 100%;"
+             cellspacing="0">
+        <tbody>
+          <tr>
+            <td style="width: 20px;" valign="top"></td>
+            <td style="padding: 0.2em; text-align: right;" valign="top">
+              <div class="fontColordefaultfontcolors fontShapeaverage">
+              Copyright WAeUP Group 2007</div>
+            </td>
+            <td style="width: 20px;" valign="top"></td>
+          </tr>
+        </tbody>
+    </table>
+    </body>
+  </html>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_design/slip_template.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_design/slip_template.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_design/slip_template.pt	(revision 2226)
@@ -0,0 +1,107 @@
+<metal:block define-macro="master"
+  tal:define="showthirdcol showthirdcol|python:1;
+  emptybody emptybody|request/emptybody|nothing;
+  mtool here/portal_membership;
+
+  utool nocall:here/portal_url;
+  atool here/portal_actions;
+  ttool here/portal_trees;
+  wtool here/portal_workflow;
+  ptool here/portal_cpsportlets;
+  context_url python:here.getContextUrl(utool=utool);
+  here_url here/absolute_url;
+  base_url here/getBaseUrl;
+  member mtool/getAuthenticatedMember;
+  isAnon mtool/isAnonymousUser;
+  isHomeless python:isAnon or member.getProperty('homeless', 0);
+  isHomeless python:(isHomeless == '0' and [0] or [isHomeless])[0];
+  actions python:atool.listFilteredActionsFor(here);
+  wf_state python:wtool.getInfoFor(here,'review_state','');
+  uname python: isAnon and 'Guest' or member.getUserName();
+  checkPerm nocall: mtool/checkPermission;
+  cpsmcat nocall:here/translation_service;
+  locale here/translation_service/getSelectedLanguage;
+  in_ws here/isInWorkspace;
+  waeup_skin here/get_waeup_skin;
+  ">
+  <metal:block define-slot="doctype"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+  </metal:block>
+  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
+        lang="en">
+    <head>
+      <metal:block use-macro="here/header_lib_header/macros/header|here/header_lib/macros/header">
+        <metal:block fill-slot="base">
+          <metal:block define-slot="base">
+            <base href=""
+                  tal:attributes="href string:${here_url}/" />
+          </metal:block>
+        </metal:block>
+        <metal:block fill-slot="head_slot">
+          <metal:block define-slot="head_slot" />
+        </metal:block>
+        <metal:block fill-slot="style_slot">
+          <link rel="stylesheet" type="text/css" media="all"
+                tal:attributes="href string:${base_url}common.css" />
+          <metal:block define-slot="style_slot" />
+        </metal:block>
+        <metal:block fill-slot="javascript_head_slot">
+          <metal:block define-slot="javascript_head_slot" />
+        </metal:block>
+      </metal:block>
+      <link rel="icon"
+            href="ng.png"
+            tal:attributes="href string:${base_url}ng.png"
+            type="image/png" />
+      <link rel="shortcut icon"
+            href="icons/ng.png"
+            tal:attributes="href string:${base_url}ng.png"
+            type="image/png" />
+    </head>
+    <body tal:condition="emptybody"
+          style="margin: 0px;"
+          tal:attributes="onload here/getOnLoad|string:setFocus();">
+      <metal:block define-slot="body" />
+      <metal:block define-slot="main" />
+    </body>
+    <body tal:condition="not:emptybody"
+          style="margin: 0px;"
+          tal:attributes="onload here/getOnLoad|string:setFocus();">
+   
+    <table summary="Logo Block"
+           style="margin-left: auto; margin-right: auto; width: 100%;"
+           class="shapeNoBorder colorTransparent" cellpadding="0"
+           cellspacing="0">
+      <tbody>
+        <tr>
+          <td style="width: 20px;" valign="top"></td>
+          <td valign="top" style="width: 80px; padding: 0.5em; text-align: right;">
+            <img tal:attributes="src string:${base_url}uniben_mark.jpg"  alt="Logo"
+                     height="84" width="82" />
+          </td>
+          <td style="padding: 2em 0em 0em 0em; text-align: left;" valign="top">
+            <img tal:attributes="src string:${base_url}uniben_logo.gif" 
+                     alt="Logo" height="51" width="234" />
+          </td>
+          <td style="width: 20px;" valign="top"></td>
+        </tr>
+      </tbody>
+    </table>
+      
+    <table summary="Main Block" cellpadding="0" cellspacing="0" 
+           style="margin-left:auto;margin-right:auto;width:100%;">
+      <tr>
+        <td valign="top" style="width:700px">
+          <div style="padding:2em; text-align: left;" 
+               class="fontColordefaultfontcolors fontShapeTitleindex shapeAreaShape">
+                  <metal:block use-macro="here/generic_lib_portal_message/macros/portal_message" />
+                  <metal:block define-slot="header" />
+                  <metal:block define-slot="main" />
+                  <metal:block define-slot="sub" />
+          </div>
+        </td>
+      </tr>
+    </table>
+  </body>
+</html>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_design/widget_portlet_actions.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_design/widget_portlet_actions.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_design/widget_portlet_actions.pt	(revision 2226)
@@ -0,0 +1,24 @@
+<tal:block define="ds options/datastructure;
+                   categories ds/categories;
+                   actions_order ds/actions_order|python:[];
+                   context nocall:options/context_obj|here;
+                   show_icons ds/show_icons|python:1;
+                   actionitems python: here.getActionsItems(context, categories, actions_order);
+                   base_url here/getBaseUrl"
+                   condition="actionitems">
+    <ul class="cpsskinsMenu" tal:condition="actionitems">
+      <li tal:repeat="action actionitems"><a
+       tal:define="icon_tag action/icon_tag"
+       tal:attributes="href action/url;
+                       class python:show_icons and icon_tag and 'noicon' or None">
+         <tal:block condition="python:show_icons and icon_tag"
+           content="structure icon_tag"/><tal:block condition="python:show_icons and not icon_tag">
+           <img tal:attributes="src
+             string:${base_url}noicon.png;
+             alt action/title" />
+         </tal:block>
+         <tal:block i18n:translate="" content="action/title" />
+       </a>
+       </li>
+    </ul>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_directory/getMembersDirectoryActions.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_directory/getMembersDirectoryActions.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_directory/getMembersDirectoryActions.py	(revision 2226)
@@ -0,0 +1,72 @@
+##parameters=mode
+#$Id$
+"""
+Get the actions to provide on members directory view
+
+Return the updated actions
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+from Products.CMFCore.utils import getToolByName
+request = context.REQUEST
+qstring = request.get('QUERY_STRING','')
+if qstring:
+    id = ''
+    for par in qstring.split('&'):
+        if par.startswith('id='):
+            id = par[3:]
+else:
+    id = request.form.get('id','')
+utool = getToolByName(context, 'portal_url')
+dtool = getToolByName(context, 'portal_directories')
+base_url = utool.getBaseUrl()
+renderActionIcon = context.portal_cpsportlets.renderActionIcon
+dirname  = 'members'
+dir = getattr(dtool,'members')
+actions_list = (('create_action',
+                 'new_entry',
+                 'Create New Member',
+                 base_url+'member_create_form?dirname=members',    
+                ),
+                ('search_action',
+                'search_entry',
+                'Search Member',
+                 base_url+'search_members_form?dirname=members',
+                ),
+                ('view_action',
+                'view_entry',
+                'View',
+                base_url+'member_view?dirname=members'+'&id='+id,
+                ),
+                ('edit_action',
+                'edit_entry',
+                'Edit',
+                base_url+'member_edit_form?dirname=members'+'&id='+id,
+                ),
+                )
+ad = {}
+for action_id,name,desc,url in actions_list:
+    ad[action_id] = {
+                     'id': name,
+                     'title': desc,
+                     'icon_tag': renderActionIcon(action_id= name,
+                                                  category='object',
+                                                  base_url=base_url,
+                                                  alt= name),
+                     'url': url,
+                     'name': desc,
+                     'category': 'object',
+                    }
+if mode in ['view', 'edit']:
+    return [ad['view_action'],
+            ad['edit_action'],
+            ad['create_action'],
+            ad['search_action']
+           ]
+elif mode in ['create']:
+    return [ad['search_action'],]
+return [ad['create_action'],]
Index: WAeUP_SRP/trunk_not_used/skins/waeup_directory/getWAeUPGroups.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_directory/getWAeUPGroups.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_directory/getWAeUPGroups.py	(revision 2226)
@@ -0,0 +1,12 @@
+##parameters=key=None 
+# $Id$
+"""
+Return the groups as an vocabulary
+
+"""
+groups = context.portal_directories.groups.searchEntries(group='*')
+if key is None:
+    return [(g,g) for g in groups]
+if key in groups:
+    return key
+return "unknown Group %s" % key
Index: WAeUP_SRP/trunk_not_used/skins/waeup_directory/layout_waeup_dir_create.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_directory/layout_waeup_dir_create.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_directory/layout_waeup_dir_create.pt	(revision 2226)
@@ -0,0 +1,2 @@
+<tal:block define="global creation python:1" />
+<metal:block use-macro="here/layout_waeup_dir_edit/macros/edit" />
Index: WAeUP_SRP/trunk_not_used/skins/waeup_directory/layout_waeup_dir_edit.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_directory/layout_waeup_dir_edit.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_directory/layout_waeup_dir_edit.pt	(revision 2226)
@@ -0,0 +1,83 @@
+<metal:block define-macro="edit">
+<tal:block define="
+  layout options/layout;
+  ds options/datastructure;
+  creation creation|nothing;
+  formaction python: test(creation, 'member_create_form',
+                                    'member_edit_form');
+  ">
+<div class="group">
+<form action="." method="post" name="form" enctype="multipart/form-data">
+<input type="hidden" name="dirname" value="."
+  tal:attributes="value request/dirname" />
+<input type="hidden" name="id" value="."
+  tal:attributes="value request/id|nothing" />
+<table cellpadding="0" cellspacing="2" summary="form layout"
+  tal:define="global has_edits nothing">
+  <tr tal:repeat="row layout/rows">
+    <tal:block repeat="cell row">
+    <tal:block define="widget cell/widget;
+                       wid widget/getWidgetId;
+                       err python: ds.getError(wid);
+                       is_edit python: cell['widget_mode'] == 'edit';
+                       is_required python: is_edit and widget.is_required;
+                       global has_edits python: has_edits or is_edit;
+                       tooltip_id python:wid + '_help';
+                       ">
+      <td align="right"  valign="top">
+        <div class="label" tal:condition="widget/label_edit"
+          tal:attributes="class python:is_required and 'label required'
+                                                    or 'label'">
+          <span i18n:translate="" tal:condition="widget/is_i18n"
+            tal:content="widget/label_edit">label</span>
+          <span tal:condition="not:widget/is_i18n"
+            tal:content="widget/label_edit">label</span>
+          <button type="button" class="tooltipControl"
+            tal:condition="widget/help"
+            tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+        </div>
+      </td>
+      <td valign="top" colspan="1"
+        tal:attributes="colspan python:cell['ncols']*2-1">
+        <div tal:attributes="class python:err and 'error' or nothing">
+          <div tal:attributes="class widget/css_class|nothing">
+            <tal:block replace="structure cell/widget_rendered" />
+          </div>
+          <div tal:condition="err">
+            <em style="color:red" tal:content="err"
+              i18n:translate="">Error</em>
+          </div>
+        </div>
+        <div class="tooltipArea" style="visibility: hidden;"
+          tal:condition="widget/help"
+          tal:attributes="id tooltip_id;
+            onclick python:'showElement(false, \'%s\')' % tooltip_id;">
+          <span i18n:translate="" tal:condition="widget/is_i18n"
+            tal:content="widget/help">i18_key-help_for_this_field</span>
+          <span tal:condition="not:widget/is_i18n"
+            tal:content="widget/help">This is the help for this field</span>
+        </div>
+      </td>
+    </tal:block>
+    </tal:block>
+  </tr>
+  <tr>
+    <td></td>
+    <td>
+    <tal:block condition="has_edits">
+    <input type="submit" class="standalone"
+      name="member_edit_form:method"
+      value="button_change" i18n:attributes="value"
+      tal:condition="not:creation" />
+    <input type="submit" class="standalone"
+      name="member_create_form:method"
+      value="button_create" i18n:attributes="value"
+      tal:condition="creation" />
+    </tal:block>
+    </td>
+  </tr>
+</table>
+</form>
+</div>
+</tal:block>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_directory/layout_waeup_dir_search.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_directory/layout_waeup_dir_search.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_directory/layout_waeup_dir_search.pt	(revision 2226)
@@ -0,0 +1,51 @@
+<tal:block define="
+  layout options/layout;
+  ds options/datastructure;
+  formaction request/formaction|python: 'search_members_form';
+  ">
+<div class="group">
+<form action="." method="post" name="form" enctype="multipart/form-data"
+  tal:attributes="action formaction">
+<input type="hidden" name="dirname" value="."
+  tal:attributes="value request/dirname|string:members" />
+<table cellpadding="0" cellspacing="2" summary="form layout">
+  <tr tal:repeat="row layout/rows">
+    <tal:block repeat="cell row">
+    <tal:block define="widget cell/widget;
+                       wid widget/getWidgetId;
+                       err python: ds.getError(wid);
+                       is_required python: cell['widget_mode'] == 'edit' and widget.is_required;
+                       ">
+      <td align="right"  valign="top">
+        <div class="label" tal:condition="widget/label_edit">
+          <span i18n:translate="" tal:condition="widget/is_i18n"
+            tal:content="widget/label_edit">label</span
+          ><span tal:condition="not:widget/is_i18n"
+            tal:content="widget/label_edit">label</span
+          >&nbsp;:
+        </div>
+      </td>
+      <td valign="top" colspan="1"
+        tal:attributes="colspan python:cell['ncols']*2-1">
+        <div tal:attributes="class python:err and 'error' or nothing">
+          <div tal:attributes="class widget/css_class|nothing">
+            <tal:block replace="structure cell/widget_rendered" />
+          </div>
+          <div tal:condition="err">
+            <em style="color:red" tal:content="err"
+              i18n:translate="">Error</em>
+          </div>
+        </div>
+      </td>
+    </tal:block>
+    </tal:block>
+  </tr>
+  <tr><td></td>
+    <td><input type="submit" class="standalone"
+          name="cpsdirectory_search_button" value="button_search"
+          i18n:attributes="value" /></td>
+  </tr>
+</table>
+</form>
+</div>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_directory/layout_waeup_dir_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_directory/layout_waeup_dir_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_directory/layout_waeup_dir_view.pt	(revision 2226)
@@ -0,0 +1,31 @@
+<tal:block define="layout options/layout;
+                   dirname string:members;
+                   dir here/portal_directories/?dirname;
+                   id_field dir/id_field;
+                   ">
+<div class="group">
+  <table cellpadding="2" cellspacing="2" summary="layout">
+    <tr tal:repeat="row layout/rows">
+      <tal:block repeat="cell row">
+      <tal:block define="widget cell/widget">
+        <td align="right" valign="top">
+          <div class="dlabel">
+          <span i18n:translate="" tal:condition="widget/is_i18n"
+            tal:content="widget/label">label</span
+          ><span tal:condition="not:widget/is_i18n"
+            tal:content="widget/label">label</span
+          >&nbsp;:
+          </div>
+        </td>
+        <td valign="top" colspan="1"
+          tal:attributes="colspan python:cell['ncols']*2-1">
+          <div tal:attributes="class widget/css_class|nothing">
+            <tal:block replace="structure cell/widget_rendered" />
+          </div>
+        </td>
+      </tal:block>
+      </tal:block>
+    </tr>
+  </table>
+</div>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_directory/member_create_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_directory/member_create_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_directory/member_create_form.pt	(revision 2226)
@@ -0,0 +1,30 @@
+<tal:block define="
+  global dirname request/dirname|string:members;
+  global dir here/portal_directories/?dirname;
+  global dirtitle dir/title_or_id;
+  "/>
+<metal:block use-macro="here/main_template/macros/master">
+
+  <metal:block fill-slot="action_slot" 
+               tal:define="actions python:context.getMembersDirectoryActions('create')">   
+     <span metal:use-macro="here/member_view/macros/members_actions" />
+  </metal:block>
+  <metal:block fill-slot="main" tal:define="
+          dummy dir/checkCreateEntryAllowed;
+          validate python: request.has_key('member_create_form');
+          create_request python: validate and request or nothing;
+          res python: dir.renderCreateEntryDetailed(
+          validate=validate, request=create_request,
+          created_callback='member_created');
+          global rendered_main python: res[0];
+          rendered_ok python: res[1];
+          ds python: res[2];
+          global portal_status_message python: validate and (rendered_ok and 
+          'psm_content_changed' or 'psm_content_error') or '';"
+          >
+    <h3>
+      Create Member     
+    </h3>        
+    <div tal:replace="structure rendered_main">Rendered main...</div>
+  </metal:block>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_directory/member_created.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_directory/member_created.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_directory/member_created.py	(revision 2226)
@@ -0,0 +1,23 @@
+##parameters=datastructure
+"""
+Do the necessary rendering or redirection after an entry has been
+successfully created and filled with the initial values by the user.
+
+The context is the directory.
+
+May return a rendered document, or do a redirect.
+"""
+
+from urllib import urlencode
+
+dirname = context.getId()
+id_field = context.id_field
+id = datastructure.getDataModel()[id_field]
+
+portal_url = context.portal_url()
+args = urlencode({'dirname': dirname,
+                  'id': id,
+                  'portal_status_message': 'psm_entry_created',
+                  })
+action_path = 'member_edit_form?'+args
+context.REQUEST.RESPONSE.redirect('%s/%s' % (portal_url, action_path))
Index: WAeUP_SRP/trunk_not_used/skins/waeup_directory/member_delete.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_directory/member_delete.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_directory/member_delete.py	(revision 2226)
@@ -0,0 +1,41 @@
+##parameters=dirname=None, id=None, ids=[], REQUEST=None
+# $Id: member_delete.py 21607 2005-05-17 08:36:35Z atchertchian $
+"""
+This script can be both called with request parameters or with form parameters
+"""
+
+from zLOG import LOG, DEBUG
+logKey = 'member_delete'
+
+if REQUEST is not None:
+    psm = 'psm_entry_deleted'
+    if REQUEST.form.has_key('dirname'):
+        dirname = REQUEST.form.get('dirname')
+        #LOG(logKey, DEBUG, "dirname = %s" % dirname)
+
+    if REQUEST.form.get('ids'):
+        ids = REQUEST.form.get('ids')
+        #LOG(logKey, DEBUG, "ids = %s" % str(ids))
+
+dir = context.portal_directories[dirname]
+
+if id:
+    try:
+        dir.deleteEntry(id)
+    except ValueError, e:
+        msg = str(e)
+        if REQUEST is not None and \
+               msg.find("Operation not allowed on non-leaf") > 0:
+            psm = 'psm_entry_delete_not_allowed_on_non_leaf'
+        else:
+            raise
+
+if ids:
+    for id in ids:
+        dir.deleteEntry(id)
+
+if REQUEST is not None:
+    portal_url = context.portal_url()
+    REQUEST.RESPONSE.redirect('%s/search_members_form?dirname=%s'
+                              '&portal_status_message=%s' %
+                              (portal_url, dirname, psm))
Index: WAeUP_SRP/trunk_not_used/skins/waeup_directory/member_edit_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_directory/member_edit_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_directory/member_edit_form.pt	(revision 2226)
@@ -0,0 +1,31 @@
+<tal:block define="
+  global id request/id;
+  global dirname string:members;
+  global dir here/portal_directories/?dirname;
+  global dirtitle dir/title_or_id;
+  "/>
+<metal:block use-macro="here/main_template/macros/master">
+  <metal:block fill-slot="action_slot" 
+               tal:define="actions python:context.getMembersDirectoryActions('edit')">   
+     <span metal:use-macro="here/member_view/macros/members_actions" />
+  </metal:block>
+  <metal:block fill-slot="main" tal:define="
+          title_field dir/title_field;
+          validate python: request.has_key('member_edit_form');
+          edit_request python: validate and request or nothing;
+          res python: dir.renderEditEntryDetailed(id, request=edit_request);
+          global rendered_main python: res[0];
+          rendered_ok python: res[1];
+          ds python: res[2];
+          global title ds/?title_field|id;
+          portal_status_message request/portal_status_message|nothing;
+          global portal_status_message python: portal_status_message or (validate 
+          and (rendered_ok and 'psm_content_changed' or 'psm_content_error')) 
+          or '';"
+          >
+    <h3>
+      <span tal:content="ds/fullname" />     
+    </h3>        
+    <div tal:replace="structure rendered_main">Rendered main...</div>
+  </metal:block>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_directory/member_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_directory/member_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_directory/member_view.pt	(revision 2226)
@@ -0,0 +1,44 @@
+<tal:block define="
+  global id request/id;
+  global dirname string:members;
+  global dir here/portal_directories/?dirname;
+  global dirtitle dir/title_or_id;
+  "/>
+  <metal:block use-macro="here/main_template/macros/master">
+  <metal:block fill-slot="action_slot" tal:define="
+                        actions python:context.getMembersDirectoryActions('view')">   
+  <metal:block define-macro="members_actions">
+  <div class="fontColornavigation fontShapeaverage cpsskinsHBox body" >
+    <span tal:repeat="action actions" tal:omit-tag="">
+      <a tal:define="icon_tag action/icon_tag"
+         tal:attributes="href action/url;
+         class python:icon_tag and 'noicon' or None"
+         >
+        <tal:block condition="python:icon_tag"
+                   content="structure icon_tag"/>
+        <tal:block condition="python:not icon_tag">
+          <img tal:attributes="src
+          string:${base_url}noicon.png;
+          alt action/title" 
+          />
+        </tal:block>
+        <tal:block i18n:translate="" content="action/title" />
+      </a>
+    </span>
+  </div>
+  </metal:block>
+  </metal:block>
+
+  <metal:block fill-slot="main" tal:define="
+         res python: dir.renderEntryDetailed(id);
+         global rendered_main python: res[0];
+         ds python: res[1];">
+    <h3>
+      <span tal:content="ds/fullname" />     
+    </h3>
+    <div tal:replace="structure rendered_main">Rendered main...</div>
+    <input type="submit" name="back" i18n:attributes="value"
+           class="standalone" value="button_back" onClick="history.back()" />
+  </metal:block>
+</metal:block>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_directory/search_members.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_directory/search_members.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_directory/search_members.py	(revision 2226)
@@ -0,0 +1,109 @@
+## Script (Python) "search_members"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=dir, datastructure, **kw
+##title=
+##
+# $Id$
+
+from Products.CPSDirectory.BaseDirectory import SearchSizeLimitExceeded
+from Products.AdvancedQuery import Eq, Between, Le,In
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+try:
+    aq_portal = context.portal_catalog.evalAdvancedQuery
+except:
+    aq_portal = context.portal_catalog_real.evalAdvancedQuery
+
+datamodel = datastructure.getDataModel()
+
+mapping = {}
+for key, value in datamodel.items():
+    if value:
+        mapping[key] = value
+
+#mapping['homeless'] = True
+#result_fields = context.getDirectoryResultFields(dir.getId(),
+#       
+id_field = getattr(dir, 'id_field', 'id')
+result_fields = [{'id': 'sn', 'title': 'Last Name', 'sort': 'asc'},
+                  {'id': 'givenName', 'title': 'First Name'},
+                  {'id': 'email', 'title': 'Email Address'},
+                  {'id': id_field, 'title': 'User Name'},
+                  ]
+if dir.getId() == "members":
+    result_fields.append({'id': 'groups', 'title': 'Group(s)'})
+
+return_fields = []
+sort_by = None
+sort_direction = None
+process_fields = {}
+for field in result_fields:
+    return_fields.append(field['id'])
+    sorted = field.get('sort')
+    if sorted == 'asc':
+        sort_by = field['id']
+        sort_direction = 'asc'
+    elif sorted == 'desc':
+        sort_by = field['id']
+        sort_direction = 'desc'
+    if field.get('process'):
+        process_fields[field['id']] = field['process']
+
+# empty search will not return anything
+if not mapping:
+    return dir.search_members_results(results=[]), 'results'
+
+try:
+    results = dir.searchEntries(return_fields=return_fields, **mapping)
+except SearchSizeLimitExceeded, e:
+    rendered = dir.member_search_errors(exception=e)
+    return rendered, 'results'
+for field, process_meth in process_fields.items():
+    meth = getattr(context, process_meth, None)
+    if not meth:
+        continue
+    for item in results:
+        value = item[1].get(field)
+        item[1][field] = meth(field, value)
+
+if sort_by:
+    items = [(str(item[1].get(sort_by, 'ZZZZ')).lower(), item) for item in results]
+    items.sort()
+    if sort_direction == 'desc':
+        items.reverse()
+    results = [item[1] for item in items]
+
+allres = []
+for item in results:
+    user_id = item[0]
+    data = item[1]
+    query = In('portal_type',('Faculty','Department','StudyLevel')) &\
+            In('localUsersWithRoles',('user:%s' % user_id,)) &\
+            ~ Eq('Creator',user_id)
+    res = aq_portal(query)
+    facs = []
+    roles = []
+    for r in res:
+        p = r.getPath().split('/')
+        fac = p[4]
+        if len(p) == 5:
+            facs.append(fac)
+            roles.append(r)
+        elif len(p) > 5:
+            if fac not in facs:
+                roles.append(r)
+    item[1]['roles'] = roles
+    if "groups" in return_fields:
+        item[1]['groups'] = " ".join(item[1]['groups'])
+
+rendered = dir.search_members_results(results=results,result_fields=result_fields)
+
+return rendered, 'results'
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_directory/search_members_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_directory/search_members_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_directory/search_members_form.pt	(revision 2226)
@@ -0,0 +1,26 @@
+<tal:block define="
+  global dirname request/dirname|string:members;
+  global dir here/portal_directories/?dirname;
+  global dirtitle dir/title_or_id;
+  "/>
+  <metal:block use-macro="here/main_template/macros/master" >
+  <metal:block fill-slot="action_slot" 
+               tal:define="actions python:context.getMembersDirectoryActions('search')">   
+     <span metal:use-macro="here/member_view/macros/members_actions" />
+  </metal:block>
+  <metal:block fill-slot="main" tal:define="
+          validate python: request.has_key('cpsdirectory_search_button');
+          res python: dir.renderSearchDetailed(request=request, validate=validate,
+          callback='search_members');
+          global rendered_main python: res[0];
+          global ok python: res[1];
+          ds python: res[2];
+          global portal_status_message python: (validate and not ok and
+          'psm_content_error') or request.form.get('portal_status_message', '');">
+    <h3>
+      Search Member Section
+    </h3>
+    <br />
+    <div tal:replace="structure rendered_main">Rendered main...</div>
+  </metal:block>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_directory/search_members_results.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_directory/search_members_results.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_directory/search_members_results.pt	(revision 2226)
@@ -0,0 +1,133 @@
+<tal:block define="results options/results;
+  params python:here.getDisplayParams(nb_items=len(results));
+  columns python:1;
+  items_per_page params/items_per_page;
+  batches_all python:here.getBatchList(results, columns, items_per_page);
+  batch_list python:batches_all[0];
+  batch_info python:batches_all[1];
+  form request/form;
+  mq nocall:modules/ZTUtils/make_query;
+  portal_url here/portal_url;
+  dirname here/getId;
+  title_field here/title_field;
+  fields options/result_fields;
+  isAdmin python:here.portal_membership.getAuthenticatedMember().has_role(['Manager',]);
+  cpsmcat nocall:here/translation_service;
+  ">
+  <div style="padding-left: 1.5em">
+    <form action="member_delete" method="post">
+      <table tal:condition="results" summary="search result list">
+        <tr>
+          <th tal:condition="isAdmin">
+            &nbsp;
+          </th>
+          <tal:block repeat="field fields">
+            <th i18n:translate="" tal:content="field/title">id</th>
+          </tal:block>
+        <th>Roles in</th>
+        </tr>
+        <tal:block repeat="result python:batch_list[0]">
+          <tal:block define="id python:result[0];
+            data python:result[1];
+            even repeat/result/even;
+            ">
+            <tr tal:attributes="class python:test(even, 'even', 'odd')">
+              <tal:block repeat="field fields">
+                <tal:block tal:condition="isAdmin">
+                  <td tal:condition="not:repeat/field/index">
+                    <input type="checkbox" name="ids:list" tal:attributes="value id" />
+                  </td>
+                </tal:block>
+                <td>
+              <span tal:condition="repeat/field/start">
+                  <a href="."
+                    tal:attributes="href string:${portal_url}/member_view?id=${id}"
+                    ><strong tal:content="structure python:data.get(field['id'])">john</strong></a>
+              </span>
+              <span tal:condition="not:repeat/field/start"
+                    tal:content="structure python:data.get(field['id'])" />
+                </td>
+              </tal:block>
+          <td nowrap tal:define="roles python:data['roles']">
+            <form action="." method="get"
+                  tal:condition="roles"
+                  tal:attributes="action context/portal_url">
+              <select tal:condition="python:0" class="form-element" name=":action" 
+                      onChange="location.href='/'+this.options[this.selectedIndex].value"
+                      tal:attributes="onChange string:location.href='${context/portal_url}'+this.options[this.selectedIndex].value">
+                <option  value="/search_members_form">&nbsp;Goto&nbsp;</option>
+                <option tal:repeat="role roles" value="." 
+                        tal:attributes="value string:${role/getPath}/folder_localrole_form">
+                   <span tal:define="pathobj python:role.getPath().split('/')"
+                         tal:content="python:pathobj[4]+'/'+pathobj[5]+'/'+pathobj[7]+'/'+pathobj[8]" />
+                </option>
+              </select>
+              <input tal:condition="python:0" class="form-element" type="submit" name="submit" value=" view " />
+            </form>
+            <span  tal:condition="python:1" tal:repeat="role roles"> 
+              <a href="" tal:define="pathobj python:role.getPath().replace('certificates/','').split('/')" 
+                         tal:attributes="href string:${role/getPath}/folder_localrole_form">
+                   <span tal:content="python:pathobj[4]" />     
+                   <span tal:repeat="item python:pathobj[5:]"
+                         tal:content="python:' / '+item" />              
+              </a><br />
+            </span>
+          </td>
+        </tr>
+          </tal:block>
+        </tal:block>
+      </table>
+      <div tal:condition="not:results">
+        <span i18n:translate="label_no_results" />
+      </div>
+      <p>
+        <input type="hidden" name="dirname" tal:attributes="value dirname" />
+        <input type="hidden" name="ids:tokens:default" value="" />
+        <tal:block condition="python:isAdmin and results">
+          <input type="button" value="button_select_all" class="context"
+            i18n:attributes="value"
+            tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+            % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" />
+          <input type="submit" class="destructive" value="button_delete"
+            i18n:attributes="value"
+            tal:attributes="onclick python:'return window.confirm(\'%s\')'
+            % cpsmcat('description_confirm_delete')" />
+        </tal:block>
+        <input type="button" class="context" value="button_back"
+          onclick="javascript:history.back()" i18n:attributes="value" />
+      </p>
+    </form>
+    <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
+      <br />
+      <table width="100%" cellspacing="0" cellpadding="0"
+        summary="navigation layout">
+        <tr class="even">
+          <td align="center" width="100%">
+            <span i18n:translate="label_page">Pages</span>:
+            <a tal:define="previous batch_info/previous"
+               tal:condition="python:previous is not None"
+               tal:attributes="href python:'%s?%s'%(request['URL'],
+                                              mq(request.form, b_start=previous))"
+               i18n:translate="batch_previous">Previous</a>
+            <tal:block repeat="page batch_info/pages">
+              <a tal:condition="python:page != batch_info['start'] - 1"
+                tal:attributes="href python:'%s?%s'%(request['URL'],
+                mq(request.form, b_start=page))"
+                tal:content="repeat/page/number">1</a>
+              <span tal:condition="python:page == batch_info['start'] - 1"
+                tal:content="string:[${repeat/page/number}]" />
+            </tal:block>
+            <a tal:define="next batch_info/next"
+               tal:condition="python:next is not None"
+               tal:attributes="href python:'%s?%s'%(request['URL'],
+                                                  mq(request.form, b_start=next))"
+               i18n:translate="batch_next">Next</a>
+          </td>
+        </tr>
+        <tr>
+          <td>&nbsp;</td>
+        </tr>
+      </table>
+    </tal:block>
+  </div>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_documents/documents_index.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_documents/documents_index.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_documents/documents_index.py	(revision 2226)
@@ -0,0 +1,23 @@
+## Script (Python) "documents_index"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=batch=None
+##title=
+##
+# $Id: documents_index.py 937 2006-11-25 09:00:34Z henrik $
+"""
+return the appropriate page in the documents section
+"""
+
+request = context.REQUEST
+redirect = request.RESPONSE.redirect
+pm = context.portal_membership
+
+if pm.isAnonymousUser():
+    return redirect("%s/srp_anonymous_view" % context.portal_url())
+else:
+    return context.documents_view()
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_documents/documents_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_documents/documents_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_documents/documents_view.pt	(revision 2226)
@@ -0,0 +1,81 @@
+<metal:html tal:define="info context/getDocumentsInfo;
+            is_so context/isSectionOfficer;"
+            >
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:block fill-slot="header">
+      <a href=""
+         tal:attributes="href string:${here/academicsParent}">
+        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+        Up one level
+      </a>
+      <h3 tal:content="here/title_or_id" />
+      <div tal:condition="python:0" tal:content="info/container_path"/>
+      <br />
+    </metal:block>
+    <metal:main fill-slot="main">
+      <span tal:omit-tag=""  
+            tal:content="structure python: info['doc'].render(layout_mode='view')" />
+      
+      <form action="" method="post" class="group"
+            tal:attributes="action info/action"
+            tal:define="rows python: info['items'];"
+            >
+        <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">      
+          <tr tal:repeat="row rows"
+            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+            <td align="left" valign="middle" style="width: 5px;" 
+                tal:condition="is_so">
+              <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                     tal:condition="is_so"
+                     tal:define="id row/id"
+                     tal:attributes="value id;
+                     id python:'cb_' + id;
+                     checked python:id in info['choosen_ids'];" 
+                     />
+            </td>
+            <td><strong tal:content="row/title" /></td>
+            <td> <a href="view" tal:attributes="href string:${row/url}"> <span tal:content="row/id" /></a>  </td>
+
+            <td> 
+            <a tal:condition="row/is_editable"
+                href="edit" tal:attributes="href string:${row/url}/external_edit_form"
+                target="edit"
+                onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
+                [edit]
+                </a> 
+            </td>
+
+          </tr>
+        </table>
+        <table width="100%" cellspacing="0" cellpadding="2"
+               summary="contents of the folder"
+               class="folderButtons">
+          <tr>
+            <td align="left" valign="top" rowspan="3"></td>
+            <td align="left" valign="top">
+              <span tal:condition="is_so">
+                <input type="button" value="button_select_all" class="context"
+                       onclick="someJavaScriptFunctionThatWillBeReplaced"
+                       i18n:attributes="value"
+                       tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                       />
+                <input type="submit" name="folder_delete:method" value="button_delete"
+                       class="destructive" i18n:attributes="value"
+                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                       (cpsmcat('description_confirm_delete'), )" 
+                       />
+                <input tal:condition="python: context.portal_type not in ('Semester','Certificate')"
+                       type="submit" name="id_rename_form:method"
+                       class="context" value="Change Object ID" i18n:attributes="value" 
+                       />
+              </span>
+            </td>
+          </tr>
+        </table>
+      </form>
+    </metal:main>
+    
+    <metal:sub fill-slot="sub"/>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_documents/getDocumentsInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_documents/getDocumentsInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_documents/getDocumentsInfo.py	(revision 2226)
@@ -0,0 +1,46 @@
+## Script (Python) "getDocumentsInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id:getFacultiesInfo.py 486 2006-09-06 10:09:39Z joachim $
+"""
+return Info about the Faculties
+"""
+request = context.REQUEST
+def cmp_id(a,b):
+    s1 = "%(id)s" % a
+    s2 = "%(id)s" % b
+    if s1 == s2:
+        return 0
+    if s1 > s2:
+        return 1
+    return -1
+
+wf = context.portal_workflow
+mtool = context.portal_membership
+path_info = request.get('PATH_INFO').split('/')
+
+info = {}
+info['action'] = "%s" % context.absolute_url()
+info['choosen_ids'] = request.get('ids',[])
+info['doc'] = context.getContent()
+
+items = []
+facs = context.portal_catalog(portal_type='WAeUPDocument')
+for f in facs:
+    row = {}
+    fo = f.getObject()
+    fd = fo.getContent()
+    row['id'] = fo.getId()
+    row['title'] = fd.Title()
+    row['url'] = fo.absolute_url()
+    row['is_editable'] = mtool.checkPermission('Modify portal content', fo)
+    items.append(row)
+items.sort(cmp_id)
+info['items'] = items
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_epayment/approve_epayment.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_epayment/approve_epayment.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_epayment/approve_epayment.py	(revision 2226)
@@ -0,0 +1,45 @@
+## Script (Python) "approve_epayment"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: aprove_epayment.py 1425 2007-02-15 17:52:01Z joachim $
+"""
+"""
+import logging
+logger = logging.getLogger('Skins.approve_epayment')
+import DateTime
+if context.portal_membership.isAnonymousUser():
+    return None
+
+request = context.REQUEST
+students = context.portal_url.getPortalObject().campus.students
+wftool = context.portal_workflow
+mtool = context.portal_membership
+is_anon = mtool.isAnonymousUser()
+member = mtool.getAuthenticatedMember()
+student_id = context.getStudentId()
+is_so = context.isSectionOfficer()
+if student_id is None or not is_so:
+    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+student = getattr(students,student_id)
+
+pd = {}
+#from Products.zdb import set_trace;set_trace()
+doc = context.getContent()
+review_state = wftool.getInfoFor(context,'review_state',None)
+if review_state != "opened":
+    return "not opened %s" % review_state
+pd['resp_code'] = 'AP'
+pd['resp_desc'] = 'Payment approved by %s, %s' % (member,DateTime.DateTime())
+doc.edit(mapping=pd)
+if doc.type_description.startswith('School Fee'):
+    wftool.doActionFor(student,'pay_school_fee')
+logger.info('%s approves epayment for %s' % (member,student_id))
+wftool.doActionFor(context,'close')
+return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
Index: WAeUP_SRP/trunk_not_used/skins/waeup_epayment/check_online_payments.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_epayment/check_online_payments.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_epayment/check_online_payments.py	(revision 2226)
@@ -0,0 +1,69 @@
+## Script (Python) "check_online_payments"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+payment callback
+"""
+import logging
+logger = logging.getLogger('Skins.check_online_payments')
+from AccessControl import Unauthorized
+import DateTime
+if context.portal_membership.isAnonymousUser():
+    return None
+
+request = context.REQUEST
+response = request.RESPONSE
+students = context.portal_url.getPortalObject().campus.students
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+student_id = context.getStudentId()
+online_transactions = context.online_payments_import
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write("%s<br>\n" % s)
+from Products.AdvancedQuery import Eq, Between, Le,In
+try:
+    aq_portal = context.portal_catalog.evalAdvancedQuery
+except:
+    aq_portal = context.portal_catalog_real.evalAdvancedQuery
+aq_students = context.students_catalog.evalAdvancedQuery
+
+query1 = Eq('portal_type','Payment')
+query2 = Eq('SearchableText',"Approved Successful")             
+online_payments = aq_portal(query1 & query2)
+set_trace()
+online_transactions = context.online_payments_import
+
+for op_brain in online_payments:
+    student_id = op_brain.getPath().split('/')[-3]
+    payment_doc = op_brain.getObject().getContent()
+    order_id = "%s%s" % (student_id[1:],op_brain.getId[1:])
+    transactions = online_transactions(student_id = student_id)
+    payment_id = op_brain.getId
+    if payment_doc.resp_code == "00" and not transactions:
+        rwrite('"%s","%s","no transaction for successfull payment","","%s"' % (student_id,payment_id,payment_doc.date))
+        continue
+    for transaction in transactions:
+        t_order_id = transaction.order_id
+        if t_order_id == order_id:
+            rwrite('"%s","%s","%s","%s","%s"' % (student_id,
+                                                                        op_brain.getId,
+                                                                        transaction.response_code,
+                                                                        payment_doc.resp_code,
+                                                                        payment_doc.date
+                                                                        ))
+            continue
Index: WAeUP_SRP/trunk_not_used/skins/waeup_epayment/check_transactions.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_epayment/check_transactions.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_epayment/check_transactions.py	(revision 2226)
@@ -0,0 +1,101 @@
+## Script (Python) "check_transactions"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+payment callback
+"""
+import logging
+logger = logging.getLogger('Skins.check_transactions')
+from AccessControl import Unauthorized
+import DateTime
+if context.portal_membership.isAnonymousUser():
+    return None
+
+request = context.REQUEST
+response = request.RESPONSE
+students = context.portal_url.getPortalObject().campus.students
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+#student_id = context.getStudentId()
+online_transactions = context.online_payments_import
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write("%s<br>\n" % s)
+correct = 0
+count = 0
+approved = 0
+for ot_brain in online_transactions():
+    student_id = ot_brain.student_id
+    if not students.hasObject(student_id):
+        rwrite("%s not found" % student_id)
+        continue
+    student_obj = getattr(students,student_id)
+    if not student_obj.hasObject('payments'):
+        rwrite("%s payments-folder not found" % student_id)
+        continue
+    payments_folder = getattr(student_obj,'payments')
+    payment_id = "p%s" % ot_brain.order_id[6:]
+    if not payments_folder.hasObject(payment_id):
+        rwrite("%s payment %s not found" % (student_id,payment_id))
+        continue
+    payment_obj = getattr(payments_folder,payment_id)
+    payment_doc = payment_obj.getContent()
+    response_code = ot_brain.response_code
+    count +=1
+    if payment_doc.resp_code != response_code:
+        rwrite('"%d","%d","%s","%s","%s","%s"' % (
+                                                  count,correct,
+                                                  student_id,
+                                                  payment_id,
+                                                  response_code,
+                                                  payment_doc.resp_code
+                                                  ))
+    elif payment_doc.resp_code == response_code:
+        correct +=1
+        rwrite('"%d","%d","%s","%s","%s","%s"' % (
+                                                  count,correct,
+                                                  student_id,
+                                                  payment_id,
+                                                  response_code,
+                                                  payment_doc.resp_code
+                                                  ))
+    #if payment_doc.resp_code == "" and response_code == "00":
+    if response_code == "00":
+        pd = {}
+        review_state = context.getStudentReviewState(student_id)
+        if review_state != "cleared_and_validated":
+            #logger.info('%s review_state = %s' % (student_id,review_state))
+            continue
+        review_state = wftool.getInfoFor(payment_obj,'review_state',None)
+        if payment_doc.resp_code == "":
+            if review_state != "opened":
+                logger.info("Payment object of %s is closed and won't be reopend" % (student_id))
+                continue
+            logger.info('%s approves epayment for %s by import' % (member,student_id))
+        else:
+            if review_state == "closed":
+                logger.info('%s approves epayment for %s by import, old resp_code: %s' % (member,student_id,payment_doc.resp_code))
+                wftool.doActionFor(payment_obj,'open')
+            # cannot happen but anyway ...
+            else:
+                logger.info('%s approves epayment for %s by import. Payment object was opened, old resp_code: %s' % (member,student_id,payment_doc.resp_code))
+        pd['resp_code'] = 'IP'
+        pd['resp_desc'] = 'Payment approved by import, %s' % (DateTime.DateTime())
+        payment_doc.edit(mapping=pd)
+        if payment_doc.type_description.startswith('School Fee'):
+            wftool.doActionFor(student_obj,'pay_school_fee')
+        wftool.doActionFor(payment_obj,'close')
+        approved += 1
+        if approved > 50:
+            context.waeup_tool.doCommit()
+            logger.info('%s transactions commited' % (approved))
+            approved = 0
Index: WAeUP_SRP/trunk_not_used/skins/waeup_epayment/epayment_cb.py_not_used
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_epayment/epayment_cb.py_not_used	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_epayment/epayment_cb.py_not_used	(revision 2226)
@@ -0,0 +1,74 @@
+## Script (Python) "epayment_cb"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: epayment_cb.py 1867 2007-06-08 09:59:59Z joachim $
+"""
+payment callback
+"""
+import logging
+logger = logging.getLogger('Skins.epayment_cb')
+from AccessControl import Unauthorized
+import DateTime
+if context.portal_membership.isAnonymousUser():
+    return None
+
+request = context.REQUEST
+students = context.portal_url.getPortalObject().campus.students
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+student_id = context.getStudentId()
+if student_id is None or student_id != member_id:
+    logger.info('%s tried to access payment object of %s' % (member_id,student_id))
+    referer = request.get('HTTP_REFERER','none')
+    logger.info('%s:%s illegal access, referer = %s' % (member_id,student_id,referer))
+    real_ip = request.get('HTTP_X_REAL_IP',"none")
+    logger.info('%s:%s illegal access, real_x_ip = %s' % (member_id,student_id,real_ip))
+    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+student = getattr(students,student_id)
+
+resp_codes = (("x_RespDesc","resp_desc"),
+              ("x_RespPayRef","resp_pay_reference"),
+              ("x_RespCode","resp_code"),
+              ("x_CardNum","resp_card_num"),
+              ("x_ApprAmt","resp_approved_amount"),
+              )
+pd = {}
+#from Products.zdb import set_trace;set_trace()
+for rc,pdk in resp_codes:
+    pd[pdk] = request.get(rc)
+try:
+    context.getContent().edit(mapping=pd)
+except UnAuthorized,E:
+    logger.info('%s ' % student_id)
+
+#resp = pd['resp_desc']
+#if  resp.startswith('Appro') and resp.endswith('essful'):
+resp = pd['resp_code']
+if  resp == '00':
+    wftool.doActionFor(student,'pay_school_fee')
+    logger.info('%s received valid callback' % student_id)
+    referer = request.get('HTTP_REFERER','none')
+    logger.info('%s valid callback referer = %s' % (student_id,referer))
+    real_ip = request.get('HTTP_X_REAL_IP',"none")
+    logger.info('%s valid callback real_ip = %s' % (student_id,real_ip))
+
+elif len(resp) < 3:
+    logger.info('%s received no callback' % student_id)
+else:
+    logger.info('%s received unsuccessfull callback' % student_id)
+try:
+    wftool.doActionFor(context,'close')
+except:
+    logger.info('%s no workflow action close' % student_id)
+        
+
+return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
Index: WAeUP_SRP/trunk_not_used/skins/waeup_epayment/getPaymentInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_epayment/getPaymentInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_epayment/getPaymentInfo.py	(revision 2226)
@@ -0,0 +1,72 @@
+## Script (Python) "getPaymentInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+return Info about the current Student
+"""
+import logging
+logger = logging.getLogger('Skins.getStudentBaseInfo')
+from DateTime import DateTime
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+request = context.REQUEST
+mtool = context.portal_membership
+wf = context.portal_workflow
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+
+if mtool.isAnonymousUser():
+    return None
+info = {}
+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))
+    return None
+elif context.isStaff():
+    student_id = requested_id
+else:
+    student_id = member_id
+
+
+#students_object = context.portal_url.getPortalObject().campus.students
+#student = getattr(students_object,student_id)
+
+res = context.students_catalog(id = student_id)
+if len(res) != 1:
+    return None
+sbrain = res[0]
+info['id'] = student_id
+info['student'] = context.getFormattedStudentEntry(sbrain)
+payment = context.getContent()
+info['payment_doc'] = payment
+info['is_online_pmt'] = io = payment.resp_code in ('00','AP','IP')
+info['is_scratchcard_pmt'] = isc =  payment.resp_code == 'SC'
+#set_trace()
+# if isc:
+#     p,b,n = str(payment.order_id).split('-')
+#     batch_object = getattr(context.pins,"%s_%s" % (p,b),None)
+#     if batch_object is None:
+#         info['cost'] = "unknown"
+#     else:
+#         cost = batch_object.getContent().cost
+#         info['cost'] = "%6.2f N" % cost
+#         #info['cost'] = "%6.2f N" % getattr(batch_object.getContent(),'cost',0.0)
+info['is_interrupted'] = ii = payment.resp_code == ''
+info['unknown_code'] = not (io or isc or ii)
+info['resp_code'] = payment.resp_code
+info['resp_desc'] = payment.resp_desc
+#info['entry_mode'] = sbrain.entry_mode
+
+
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_epayment/getPaymentsFolderInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_epayment/getPaymentsFolderInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_epayment/getPaymentsFolderInfo.py	(revision 2226)
@@ -0,0 +1,108 @@
+## Script (Python) "getPaymentsFolderInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+Info for the PaymentsFolder
+"""
+
+mtool = context.portal_membership
+if mtool.isAnonymousUser():
+    return None
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+
+#import logging
+#logger = logging.getLogger('Skins.getPaymentsFolderInfo')
+def cmp_id(a,b):
+    s1 = "%(id)s" % a
+    s2 = "%(id)s" % b
+    if s1 == s2:
+        return 0
+    if s1 > s2:
+        return 1
+    return -1
+
+import DateTime
+request = context.REQUEST
+students = context.portal_url.getPortalObject().campus.students
+student_id = context.getStudentId()
+if student_id is None:
+    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+student = getattr(students,student_id)
+s_brain = context.students_catalog(id = student_id)[0]
+
+payments = []
+#from Products.zdb import set_trace;set_trace()
+
+info = {}
+is_so = info['is_so'] = context.isSectionOfficer()
+is_student = info['is_student'] = context.isStudent()
+info['student_name'] = s_brain.name
+info['query_url'] = "https://webpay.interswitchng.com/paydirect/services/TransactionQueryURL.aspx"
+review_state = info['review_state'] = s_brain.review_state
+parttime = s_brain.mode.endswith('_pt')
+fulltime = s_brain.mode.endswith('_ft')
+online_payment = False
+sc_payment = False
+if review_state == 'cleared_and_validated' or (parttime and review_state == 'returning'):
+    online_payment = True
+elif fulltime and review_state == 'returning':
+    sc_payment = True
+info['online_payment'] = online_payment
+info['sc_payment'] = sc_payment
+info['prod_id'] = '61'
+session = s_brain.session
+info['next_session'], info['next_session_str'] = context.getNextSessionId(session)
+
+info['student_name'] = s_brain.name
+payments_path = "%s/campus/students/%s/payments" % (context.portal_url.getPortalPath(),student_id)
+sos = context.portal_catalog(container_path=payments_path)
+info['is_so'] = is_so
+
+for so in sos:
+    row = {}
+    row['id'] = so.getId
+    row['title'] = so.Title
+    url = row['url'] = "%s/%s" % (payments_path,so.getId)
+    so_doc = context.restrictedTraverse(url,default=None).getContent()
+    row['type'] = so.portal_type
+    review_state = row['review_state'] = so.review_state
+    if so_doc.type_description.startswith('School Fee'):
+        row['is_approvable'] = is_so and (review_state == "opened") and info['review_state'] == 'cleared_and_validated'
+    else:
+        row['is_approvable'] = is_so and (review_state == "opened")
+    row['is_requeryable'] = False
+    #set_trace()
+    row['resp_desc'] = getattr(so_doc,'resp_desc','no response')
+    row['trans_ref'] = getattr(so_doc,'order_id','')
+    if so_doc.type_description.startswith('School Fee'):
+        if review_state == 'opened' and info['review_state'] == 'cleared_and_validated' and hasattr(so_doc, 'order_id') and not so_doc.resp_code:
+            row['is_requeryable'] = True
+            row['callback_url'] = "%s/payments/%s/interswitch_cb" % (student.absolute_url(),
+                                                            so.getId)
+            href = '%(query_url)s' % info
+            href += '?transRef=%(trans_ref)s' % row
+            href += '&prodID=%(prod_id)s' % info
+            href += '&redirectURL=%(callback_url)s' % row
+            row['href'] = href
+    if (review_state == "closed") and so_doc.resp_code in ('SC','00','AP','IP',):
+        row['confirmed'] = 'active'
+    else:
+        row['confirmed'] = 'unsuccessful'
+    payments.append(row)
+
+payments.sort(cmp_id)
+info['payments'] = payments
+return info
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_epayment/getSchoolFee.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_epayment/getSchoolFee.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_epayment/getSchoolFee.py	(revision 2226)
@@ -0,0 +1,119 @@
+## Script (Python) "getSchoolFee"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=brain=None
+##title=
+##
+# $Id$
+"""
+return SchoolFee
+"""
+
+fee1 = ("ART",
+        "SSC",
+        "LAW",
+        "EDU",
+        )
+session_fees = {'99': ('22200','23700'),
+                '00': ('22200','23700'),
+                '01': ('22200','23700'),
+                '02': ('22200','23700'),
+                '03': ('22200','23700'),
+                '04': ('22200','23700'),
+                '05': ('22200','23700'),
+                '06': ('22200','23700'),
+                }
+pt_fees = {
+            "DIF":{'description':"Diploma in French",'returning':"17700",'new':"32200"},
+            "DTA":{'description':"Diploma in Theatre Arts",'returning':"19700",'new':"34200"},
+            "DISD":{'description':"Diploma in International Studies",'returning':"27700",'new':"42200"},
+            "DFA":{'description':"Diploma in Fine & Applied Arts",'returning':"19700",'new':"34200"},
+            "DAE":{'description':"Diploma in Agric Econs",'returning':"25700",'new':"41700"},
+            "DFS":{'description':"Diploma in Fishery, Forestry & Wildlife",'returning':"22700",'new':"38700"},
+            "DAC":{'description':"Diploma in Agric Crop Science",'returning':"19700",'new':"35700"},
+            "DFBS":{'description':"Diploma in Food & Brewering Science",'returning':"22700",'new':"38700"},
+            "DIA":{'description':"Diploma in Accounting",'returning':"27700",'new':"42200"},
+            "DBF":{'description':"Diploma in Banking & Finance",'returning':"27700",'new':"42200"},
+            "DAIC":{'description':"Diploma in Applied Industrial Chemistry",'returning':"22700",'new':"38700"},
+            "DAM":{'description':"Diploma in Applied Microbiology",'returning':"22700",'new':"38700"},
+            "DIG":{'description':"Diploma in Geology",'returning':"25700",'new':"41700"},
+            "DSLT":{'description':"Diploma in Science Lab Tech.",'returning':"25700",'new':"41700"},
+            "DES":{'description':"Diploma in Environmental Science",'returning':"22700",'new':"38700"},
+            "DICE":{'description':"Diploma in Computer Engineering",'returning':"27700",'new':"43700"},
+            "DICHE":{'description':"Diploma in Chemical Engineering",'returning':"27700",'new':"43700"},
+            "DDP":{'description':"Diploma in Data Processing",'returning':"27700",'new':"43700"},
+            "DCG":{'description':"Diploma in Cartography",'returning':"19700",'new':"34200"},
+            "DSW":{'description':"Diploma in Social Works",'returning':"25700",'new':"40200"},
+            "DIL":{'description':"Diploma in Law",'returning':"27700",'new':"42200"},
+            "DHT":{'description':"Diploma in Recreation, Hotel & Tourism Management",'returning':"27700",'new':"42200"},
+            "DIE":{'description':"Diploma in Epidermiology",'returning':"27700",'new':"42200"},
+            "CIE":{'description':"Certificate in Epidermiology",'returning':"21200",'new':"36200"},
+            "CEHD":{'description':"Certificate in early Child Health & Development",'returning':"21200",'new':"36200"},
+            "DLS":{'description':"Diploma in Library & Information Science",'returning':"24200",'new':"37200"},
+            "BFA":{'description':"Bachelor in Fine & Applied Arts",'returning':"27700",'new':"42200"},
+            "BTA":{'description':"Bachelor in Theatre Arts",'returning':"27700",'new':"42200"},
+            "BEL":{'description':"Bachelor in English",'returning':"27700",'new':"42200"},
+            "BFR":{'description':"Bachelor in French",'returning':"27700",'new':"42200"},
+            "BISD":{'description':"Bachelor in International Studies & Diplomacy",'returning':"27700",'new':"42200"},
+            "BAE":{'description':"Bachelor in Agric Econs",'returning':"32700",'new':"48700"},
+            "BAN":{'description':"Bachelor in Animal Science",'returning':"27700",'new':"43700"},
+            "BAC":{'description':"Bachelor in Crop Science",'returning':"27700",'new':"43700"},
+            "BAS":{'description':"Bachelor in Soil Science",'returning':"27700",'new':"43700"},
+            "BIA":{'description':"Bachelor in Accounting",'returning':"32700",'new':"47200"},
+            "BBF":{'description':"Bachelor in Banking & Finance",'returning':"32700",'new':"47200"},
+            "BLG":{'description':"Bachelor in Local Govt. Admin.",'returning':"22700",'new':"37200"},
+            "BPA":{'description':"Bachelor in Public Admin.",'returning':"32700",'new':"47200"},
+            "BSW":{'description':"Bachelor in Social Works",'returning':"27700",'new':"42200"},
+            "BES":{'description':"Bachelor in Environmental Science",'returning':"27700",'new':"43700"},
+            "BSLT":{'description':"Bachelor in Science Lab. Tech.",'returning':"27700",'new':"43700"},
+            "BIP":{'description':"Bachelor in Industrial Physics",'returning':"27700",'new':"43700"},
+            "BSCS":{'description':"Bachelor in Statistics & Computer",'returning':"29700",'new':"45700"},
+            "BEEL":{'description':"Bachelor in Electronic & Electrical Engineering",'returning':"32700",'new':"48700"},
+            "BECV":{'description':"Bachelor in Civil Engineering",'returning':"32700",'new':"48700"},
+            "BEMCH":{'description':"Bachelor in Mechanical Engineering",'returning':"32700",'new':"48700"},
+            "BEPE":{'description':"Bachelor in Petroleum Engineering",'returning':"32700",'new':"48700"},
+            "BESTR":{'description':"Bachelor in Structural Engineering",'returning':"32700",'new':"48700"},
+            "BECE":{'description':"Bachelor in Chemical Engineering",'returning':"32700",'new':"48700"},
+            "BPRE":{'description':"Bachelor in Production Engineering",'returning':"32700",'new':"48700"},
+            "LLBPT":{'description':"Bachelor in Law",'returning':"32700",'new':"48700"},
+            "ODPT":{'description':"Doctor of Optometry",'returning':"42700",'new':"58700"},
+            "PHARMD":{'description':"Doctor of Pharmacy",'returning':"44700",'new':"58700"},
+            "CPA":{'description':"Certificate in Public Admin",'returning':"21200",'new':"35200"},
+            "DHAM":{'description':"Diploma in Health Management",'returning':"24200",'new':"37200"},
+            "DNAM":{'description':"Diploma in Nursing Admin & Management",'returning':"27200",'new':"40200"},
+            "DPA":{'description':"Diploma in Public Admin",'returning':"27200",'new':"40200"},
+            "DHS":{'description':"Diploma in Primary Health Care & Statistics",'returning':"27200",'new':"40200"},
+            "ADHFM":{'description':"Advanced Diploma in Health Care Financing and Management",'returning':"29200",'new':"42200"},
+            "DAE":{'description':"Diploma in Adult Education",'returning':"20200",'new':"33200"},
+            "DME":{'description':"Diploma in Maths Education",'returning':"23200",'new':"36200"},
+            "DPE":{'description':"Diploma in Physical Education",'returning':"23200",'new':"36200"},
+            "DHE":{'description':"Diploma in Health Education",'returning':"23200",'new':"36200"},
+            "DEC":{'description':"Diploma in Early Childhood Education",'returning':"20200",'new':"33200"},
+            "DLS":{'description':"Diploma in Library & Information Science",'returning':"24200",'new':"37200"}
+         }
+
+#sessionstring = "School Fee for Session %s" % context.portal_vocabularies.sessions.get(session)
+# sessionstring = "School Fee for Session %s" % context.sessions_voc(key=session)
+# fee_1_data = ("22200",sessionstring)
+# fee_2_data = ("23700",sessionstring)
+
+# if faculty in fee1:
+#     return fee_1_data
+# return fee_2_data
+d = {}
+if brain.mode.endswith('_ft'):
+    f = 1
+    if brain.faculty in fee1:
+        f = 0
+    d['new'] = session_fees[brain.session][f]
+    d['returning'] = 'not set'
+    d['description'] = "School Fee for Session %s" % context.sessions_voc(key=brain.session)
+if pt_fees.has_key(brain.course):
+    d = pt_fees[brain.course]
+    d['description'] = "School Fee for Session %s, %s" % (context.sessions_voc(key=brain.session),
+                                                         d['description'])
+return d
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_epayment/goto_interswitch_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_epayment/goto_interswitch_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_epayment/goto_interswitch_form.pt	(revision 2226)
@@ -0,0 +1,43 @@
+<metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main"
+                tal:define="info options/info">
+                
+        <h3>Authorize Online Payment! </h3>
+        <br />
+                
+      <form method="post" action="pay_online"
+            tal:attributes="action info/action ">
+      <span tal:repeat="arg python:info['args'].items()"
+            tal:omit-tag="">
+          <input type="hidden" tal:attributes="name python:arg[0];value python:arg[1]" />
+      </span>          
+        <table>
+          <tr>
+            <td width="100px">
+            Payment:</td>
+            <td tal:content="info/type_description"></td>
+          </tr>
+          <tr>
+            <td>
+            Name:
+            </td>
+            <td tal:content="info/pay_bill_to" />
+          </tr>
+          <tr>
+            <td >
+            Amount:
+            </td>
+            <td> Naira <span tal:content="info/amount" /></td>
+          </tr>
+      
+        </table>
+        <br />
+        <input type="submit" 
+               class="standalone" 
+               name="goto_bank" 
+               value="Proceed to Payment Gateway" 
+               />
+      </form>
+    </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_epayment/goto_wema_form.pt_not_used
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_epayment/goto_wema_form.pt_not_used	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_epayment/goto_wema_form.pt_not_used	(revision 2226)
@@ -0,0 +1,48 @@
+<metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main"
+                tal:define="info options/info">
+                
+        <h3>Authorize Online Payment! </h3>
+        <br />
+                
+      <form method="post" action="pay_online"
+            tal:attributes="action info/action ">
+      <span tal:repeat="arg python:info['args'].items()"
+            tal:omit-tag="">
+          <input type="hidden" tal:attributes="name python:arg[0];value python:arg[1]" />
+      </span>          
+        <table>
+          <tr>
+            <td width="100px">
+            Payment:</td>
+            <td tal:content="info/type_description"></td>
+          </tr>
+          <tr>
+            <td>
+            Name:
+            </td>
+            <td tal:content="info/pay_bill_to" />
+          </tr>
+          <tr>
+            <td >
+            Amount:
+            </td>
+            <td> Naira <span tal:content="info/amount" /></td>
+          </tr>
+          <tr>
+            <td >
+            Bank:
+            </td>
+            <td>Wema Bank</td>
+          </tr>          
+        </table>
+        <br />
+        <input type="submit" 
+               class="standalone" 
+               name="goto_bank" 
+               value="Proceed to Bank" 
+               />
+      </form>
+    </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_epayment/interswitch_cb.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_epayment/interswitch_cb.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_epayment/interswitch_cb.py	(revision 2226)
@@ -0,0 +1,108 @@
+## Script (Python) "interswitch_cb"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+payment callback
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+import logging
+logger = logging.getLogger('Skins.interswitch_cb')
+from AccessControl import Unauthorized
+import DateTime
+if context.portal_membership.isAnonymousUser():
+    return None
+
+request = context.REQUEST
+students = context.portal_url.getPortalObject().campus.students
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+student_id = context.getStudentId()
+if student_id is None: # or student_id != member_id:
+    logger.info('%s tried to access payment object of %s' % (member_id,student_id))
+    referer = request.get('HTTP_REFERER','none')
+    logger.info('%s:%s illegal access, referer = %s' % (member_id,student_id,referer))
+    real_ip = request.get('HTTP_X_REAL_IP',"none")
+    logger.info('%s:%s illegal access, real_x_ip = %s' % (member_id,student_id,real_ip))
+    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+student = getattr(students,student_id)
+resp_codes = (("desc","resp_desc"),
+              ("resp","resp_code"),
+              ("txnRef","pay_reference"),
+              ("payRef","resp_pay_reference"),
+              ("retRef","retRef"),
+              ("cardNum","resp_card_num"),
+              ("apprAmt","resp_approved_amount"),
+              )
+pd = {}
+for rc,pdk in resp_codes:
+    pd[pdk] = request.get(rc,'')
+
+# for testing purposes
+#pd['resp_desc'] = 'Simulated Callback'
+#pd['resp_pay_reference'] = 'XXXX'
+#pd['resp_code'] = '00'
+#pd['resp_card_num'] = '0000'
+#pd['resp_approved_amount'] = '10000'
+
+if pd['resp_code'] == '00' and len(pd['resp_approved_amount']) > 4:
+    pd['resp_approved_amount'] = pd['resp_approved_amount'][:-2]
+else:
+    pd['resp_approved_amount'] = '0'
+
+review_state = wftool.getInfoFor(context,'review_state',None)
+if pd['resp_code'] == '' and review_state == 'opened':
+    logger.info('%s requeried payment %s and got empty response' % (student_id,context.getId()))
+    wftool.doActionFor(context,'close')
+    return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
+context.getContent().edit(mapping = pd)
+resp = pd['resp_code']
+
+s_brain = context.students_catalog(id=student_id)[0]
+session = s_brain.session
+next_session, next_session_str = context.getNextSessionId(session)
+
+if  resp == '00':
+    if context.getStudentReviewState() == "school_fee_paid":
+        logger.info('%s paid school_fee in state school_fee_paid' % (student_id))
+    else:
+        if next_session == context.getSessionId()[-2:]:
+            wftool.doActionFor(student,'pay_school_fee')
+        else:
+            study_course = getattr(student,'study_course')
+            try:
+                wftool.doActionFor(study_course,'open')
+            except:
+                pass
+            study_course_doc = study_course.getContent()
+            next_level = "%s" % (int(s_brain.level) + 100)
+            study_course_doc.edit(mapping= {'current_level': next_level,
+                                            'current_session': next_session,})
+    logger.info('%s received valid callback' % student_id)
+    referer = request.get('HTTP_REFERER','none')
+    logger.info('%s valid callback referer = %s' % (student_id,referer))
+    real_ip = request.get('HTTP_X_REAL_IP',"none")
+    logger.info('%s valid callback real_ip = %s' % (student_id,real_ip))
+
+else:
+    logger.info('%s received unsuccessfull callback: %s' % (student_id,pd['resp_desc']))
+try:
+    wftool.doActionFor(context,'close')
+except:
+    logger.info('%s no workflow action close' % student_id)
+
+
+return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
Index: WAeUP_SRP/trunk_not_used/skins/waeup_epayment/interswitch_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_epayment/interswitch_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_epayment/interswitch_form.pt	(revision 2226)
@@ -0,0 +1,41 @@
+<metal:body use-macro="here/main_template/macros/master">
+  <metal:main fill-slot="main"
+              tal:define="info options/info">
+    <h3>Confirm Your Payment Data! </h3>
+    <br />
+    <span tal:condition="not: info/payment_possible">
+      No payment information for your course available.
+    </span>
+    <span tal:condition="info/payment_possible">
+      <form method="post" action="pay_interswitch">
+        <table>
+          <tr>
+            <td width="100px">
+            Payment:</td>
+            <td tal:content="info/type_description"></td>
+          </tr>
+          <tr>
+            <td>
+            Name:
+            </td>
+            <td tal:content="info/pay_bill_to" />
+          </tr>
+          <tr>
+            <td >
+            Amount:
+            </td>
+            <td> Naira <span tal:content="info/amount" /></td>
+          </tr>
+        </table>
+        <br />
+        <input type="submit" 
+               class="standalone" 
+               name="goto_bank" 
+               value="Confirm" 
+               />
+
+      </form>
+    </span>
+    </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_epayment/pay_by_sc.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_epayment/pay_by_sc.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_epayment/pay_by_sc.py	(revision 2226)
@@ -0,0 +1,118 @@
+## Script (Python) "pay_by_sc"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+pay online
+"""
+import logging
+from urllib import urlencode
+logger = logging.getLogger('Skins.pay_by_sc')
+import DateTime
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+if context.portal_membership.isAnonymousUser():
+    return None
+
+lt = context.portal_layouts
+request = context.REQUEST
+students = context.portal_url.getPortalObject().campus.students
+student_id = context.getStudentId()
+if student_id is None:
+    return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+student = getattr(students,student_id)
+s_brain = context.students_catalog(id=student_id)[0]
+session = s_brain.session
+next_session, next_session_str = context.getNextSessionId(session)
+validate = request.has_key("cpsdocument_create_button")
+res,psm,ds = lt.renderLayout(layout_id= 'student_schoolfee',
+                      schema_id= 'payment',
+                      context=context,
+                      mapping=validate and request,
+                      ob={},
+                      layout_mode="create",
+                      formaction = "pay_by_sc",
+                      button = 'Pay',
+                      commit = False,
+                      )
+if psm == 'invalid':
+    psm = 'Please correct your errors!'
+    return context.pay_by_sc_form(rendered = res,
+                                 psm = psm,
+                                 mode = 'edit',
+                                 next_session_str = next_session_str,
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.pay_by_sc_form(rendered = res,
+                                 psm = None,
+                                 mode = 'edit',
+                                 next_session_str = next_session_str,
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    pass
+if "payments" not in student.objectIds():
+    student.invokeFactory('PaymentsFolder','payments')
+    payments = getattr(student,'payments')
+    d = {}
+    d['Title'] = 'Payments'
+    payments.getContent().edit(mapping=d)
+    wftool.doActionFor(payments,'open')
+else:
+    payments = getattr(student,'payments')
+#from Products.zdb import set_trace; set_trace()
+info = {}
+order_id = ds.get('pin_n')
+p_id = "p%s" % order_id
+pin = str(ds.get('pin'))
+try:
+    cost = context.portal_pins(pin="".join(pin.split('-')))[0].cost
+except:
+    cost = "n/a"
+try:
+    x = float(cost)
+except:
+    cost = "n/a"
+
+if not hasattr(payments,p_id):
+    now = DateTime.DateTime()
+    info['date'] = now
+    info['amount'] = cost
+    pin = info['order_id'] = "%s" % (pin)
+    info['type_code'] = "%s" % pin
+    info['type_description'] = 'School Fee for Session %s' % next_session_str
+    info['resp_code'] = "SC"
+    info['resp_desc'] = "SC Payment Successful"
+    payments.invokeFactory('Payment', p_id)
+    payment = getattr(payments,p_id)
+    wftool = context.portal_workflow
+    wftool.doActionFor(payment,'open')
+    payment.getContent().edit(mapping=info)
+    wftool.doActionFor(payment,'close')
+    if next_session == context.getSessionId()[-2:]:
+        wftool.doActionFor(student,'pay_school_fee')
+    else:
+        study_course = getattr(student,'study_course')
+        #wftool.doActionFor(study_course,'open')
+        study_course_doc = study_course.getContent()
+        next_level = "%s" % (int(s_brain.level) + 100)
+        study_course_doc.edit(mapping= {'current_level': next_level,
+                                        'current_session': next_session,})
+    logger.info('%s paid school fee by scratch card' % student_id)
+else:
+    logger.info('%s repeatedly paid school fee by scratch card' % student_id)
+url = "%s/payments" % (student.absolute_url())
+request.RESPONSE.redirect(url)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_epayment/pay_by_sc_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_epayment/pay_by_sc_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_epayment/pay_by_sc_form.pt	(revision 2226)
@@ -0,0 +1,23 @@
+<tal:block define="rendered_main options/rendered;
+           portal_status_message options/psm;
+           data_storage options/ds;
+           edition python:1;"
+           >
+  <metal:block define-macro="edit_form">
+    <metal:block use-macro="here/main_template/macros/master">
+      <metal:block fill-slot="header"
+                   tal:define="creation creation|nothing;
+                   edition edition|nothing;
+                   metadata metadata|nothing"
+                   >
+      </metal:block>
+      <metal:block fill-slot="main">
+        <h3>Pay Your <span tal:replace="options/next_session_str" /> School Fee by Scratch Card!</h3>
+        <br />
+        <div tal:replace="structure rendered_main" />
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_epayment/pay_interswitch.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_epayment/pay_interswitch.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_epayment/pay_interswitch.py	(revision 2226)
@@ -0,0 +1,163 @@
+## Script (Python) "pay_online"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+pay online
+"""
+from urllib import urlencode
+import logging
+logger = logging.getLogger('Skins.pay_interswitch')
+import DateTime
+
+if context.portal_membership.isAnonymousUser():
+    return None
+
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+request = context.REQUEST
+wftool = context.portal_workflow
+students = context.portal_url.getPortalObject().campus.students
+
+
+student_id = context.getStudentId()
+student = getattr(students,student_id)
+
+sbrain = context.students_catalog(id=student_id)[0]
+#amount,description = context.getSchoolFee(sbrain.faculty,sbrain.session,sbrain.course)
+info = {}
+info['student'] = sbrain
+info['payment_possible'] = False
+info['amount'] = '0'
+info['bank'] = ''
+info['type_description'] = ''
+info['pay_bill_to'] = ''
+fee_dict = context.getSchoolFee(sbrain)
+fulltime = sbrain.mode.endswith('_ft')
+#new =  sbrain.entry_session == context.getSessionId()[-2:]
+new = sbrain.review_state == 'cleared_and_validated'
+returning = sbrain.review_state == 'returning'
+if not fee_dict or (not new and fulltime) or not (new or returning):
+    return context.interswitch_form(info=info)
+info['site_id'] = '61'
+info['currency_id'] = '566'
+if new:
+    amount = info['amount'] = fee_dict['new']
+elif returning:
+    amount = info['amount'] = fee_dict['returning']
+if fulltime:
+    pay_item_id = "6100"
+    info['type_code'] = sbrain.faculty
+    info['bank'] = ''
+else:
+    pay_item_id = "6101"
+    info['type_code'] = sbrain.course
+    info['bank'] = ''
+info['payment_possible'] = True
+info['type_description'] = fee_dict['description']
+info['pay_bill_to'] = sbrain.name
+info['pay_ship_to'] = "University of Benin"
+info['student_id'] = student_id
+info['student_name'] = sbrain.name
+info['student_email'] = sbrain.email
+now = DateTime.DateTime()
+info['date'] = now
+order_id = info['order_id'] = "%d" % int(now.timeTime()*1000)
+info['order_id'] = "%s%s" % (student_id[1:],order_id)
+p_id = "p%s" % order_id
+
+if student_id is None:
+    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+if True or context.portal_url().find('uniben-demo.waeup.org') >-1 or\
+   context.portal_url().find('uniben.waeup.org') >-1:
+    info['action'] = "https://webpay.interswitchng.com/paydirect/webpay/pay.aspx"
+else:
+    #pass
+    #return None
+    info['action'] = "%s/payments/%s/simulate_callback" % (student.absolute_url(),p_id)
+
+
+if "payments" not in student.objectIds():
+    student.invokeFactory('PaymentsFolder','payments')
+    payments = getattr(student,'payments')
+    d = {}
+    d['Title'] = 'Payments'
+    payments.getContent().edit(mapping=d)
+    wftool.doActionFor(payments,'open')
+else:
+    payments = getattr(student,'payments')
+if request.has_key('epayment'):
+    return context.interswitch_form(info=info)
+
+
+payments.invokeFactory('Payment', p_id)
+payment = getattr(payments,p_id)
+wftool.doActionFor(payment,'open')
+d = {}
+d.update(info)
+#from Products.zdb import set_trace;set_trace()
+payment.getContent().edit(mapping=d)
+#wftool.doActionFor(payment,'close')
+#wftool.doActionFor(student,'pay_school_fee')
+info['callback_url'] = "%s/payments/%s/interswitch_cb?echo=%s" % (student.absolute_url(),
+                                                                  p_id,
+                                                                  p_id)
+
+logger.info('%(student_id)s initiated online school fee payment with order_id %(order_id)s and callback url %(callback_url)s' % info)
+payment_fields = (('product_id','site_id'),
+                  ('site_redirect_url','callback_url'),
+                  ('Currency','currency_id'),
+                  ('cust_id','student_id'),
+                  ('cust_id_desc','type_description'),
+                  ('cust_name','student_name'),
+                  ('txn_ref','order_id'),
+                  ('Amount','amount'),
+                  )
+args = {}
+for arg,field in payment_fields:
+    args[arg] = info[field]
+itotal = int(amount)*100
+wema_amount = 10000
+provider_amount = 35000
+interswitch_amount = 15000
+#uniben_amount = itotal - wema_amount - provider_amount - interswitch_amount
+uniben_amount = itotal - interswitch_amount
+xmldict = {}
+xmldict['detail_ref'] = args['txn_ref']
+xmldict['department'] = sbrain.department
+xmldict['faculty'] = sbrain.faculty
+#xmldict['wema_amt'] = "%d" % wema_amount
+#xmldict['provider_amt'] = "%d" % provider_amount
+xmldict['uniben_amt'] = "%d" % uniben_amount
+##<item_detail item_id="2" item_name="WEMA" item_amt="%(wema_amt)s" bank_id="16" acct_num="48398023902" />
+##<item_detail item_id="3" item_name="Portal Provider" item_amt="%(provider_amt)s" bank_id="47" acct_num="0980938209483" />
+xmltext = """
+<payment_item_detail>
+<item_details detail_ref="%(detail_ref)s" college="UNIBEN" department="%(department)s"
+faculty="%(faculty)s">
+<item_detail item_id="1" item_name="UNIBEN" item_amt="%(uniben_amt)s" bank_id="16" acct_num="384950902390" />
+</item_details>
+</payment_item_detail>
+""" % xmldict
+#total = int(xmldict['uniben_amt'])+int(xmldict['wema_amt'])+int(xmldict['provider_amt'])
+total = int(xmldict['uniben_amt'])
+args['Amount'] = "%d" % (total + 15000)
+args['site_name'] = "uniben.waeup.org"
+args['cust_name_desc'] = "Student Name"
+args['pay_item_id'] = pay_item_id
+args['pay_item_name'] = "UNIBEN Tuition Payments"
+args['payment_params'] = 'switch_college_split'
+#args['xml_data'] = xmltext % info
+args['xml_data'] = ''
+info['args'] = args
+return context.goto_interswitch_form(info=info)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_epayment/pay_online.py_not_used
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_epayment/pay_online.py_not_used	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_epayment/pay_online.py_not_used	(revision 2226)
@@ -0,0 +1,113 @@
+## Script (Python) "pay_online"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: pay_online.py 1633 2007-03-23 22:20:52Z henrik $
+"""
+pay online
+"""
+from urllib import urlencode
+import logging
+logger = logging.getLogger('Skins.pay_online')
+import DateTime
+
+if context.portal_membership.isAnonymousUser():
+    return None
+
+request = context.REQUEST
+wftool = context.portal_workflow
+students = context.portal_url.getPortalObject().campus.students
+
+student_id = context.getStudentId()
+student = getattr(students,student_id)
+
+sbrain = context.students_catalog(id=student_id)[0]
+amount,description = context.getSchoolFee(sbrain.faculty)
+##res = context.portal_catalog(portal_type="Certificate",
+##                                     id = sbrain.course)
+##
+##if not res:
+##    logger.info('"%s","certificate not found", "%s"' % (student_id,course))
+##    sfc = "ART"
+##else:
+##    sfc = res[0].getPath().split('/')[-4]
+info = {}
+info['site_id'] = '300100100'
+info['currency_id'] = '566'
+info['amount'] = amount
+info['type_code'] = sbrain.faculty
+info['type_description'] = description
+info['pay_bill_to'] = sbrain.name
+info['pay_ship_to'] = "University of Benin"
+info['student_id'] = student_id
+info['student_name'] = sbrain.name
+info['student_email'] = sbrain.email
+now = DateTime.DateTime()
+info['date'] = now
+order_id = info['order_id'] = "%d" % int(now.timeTime()*1000)
+info['order_id'] = "%s%s" % (student_id[1:],order_id)
+p_id = "p%s" % order_id
+
+#from Products.zdb import set_trace;set_trace()
+if student_id is None:
+    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+if context.portal_url().find('uniben-demo.waeup.org') >-1 or\
+   context.portal_url().find('uniben.waeup.org') >-1:
+    info['action'] = "http://www.wemaonlinepayments.biz/payment.aspx"
+else:
+    #pass
+    #return None
+    info['action'] = "%s/payments/%s/simulate_callback" % (student.absolute_url(),p_id)
+
+
+if "payments" not in student.objectIds():
+    student.invokeFactory('PaymentsFolder','payments')
+    payments = getattr(student,'payments')
+    d = {}
+    d['Title'] = 'Payments'
+    payments.getContent().edit(mapping=d)
+    wftool.doActionFor(payments,'open')
+else:
+    payments = getattr(student,'payments')
+if request.has_key('epayment'):
+    return context.wema_form(info=info)
+
+
+payments.invokeFactory('Payment', p_id)
+payment = getattr(payments,p_id)
+wftool.doActionFor(payment,'open')
+d = {}
+d.update(info)
+#from Products.zdb import set_trace;set_trace()
+payment.getContent().edit(mapping=d)
+#wftool.doActionFor(payment,'close')
+#wftool.doActionFor(student,'pay_school_fee')
+info['callback_url'] = "%s/payments/%s/epayment_cb" % (student.absolute_url(),p_id)
+
+logger.info('%(student_id)s initiated online school fee payment with order_id %(order_id)s and callback url %(callback_url)s' % info)
+payment_fields = (('x_SiteID','site_id'),
+                  ('x_Redirect_url','callback_url'),
+                  ('x_CurrencyID','currency_id'),
+                  ('x_PaymentCode','type_code'),
+                  ('x_PayDesc','type_description'),
+                  ('x_Billto','pay_bill_to'),
+                  ('x_Shipto','pay_ship_to'),
+                  ('x_PayerID','student_id'),
+                  ('x_PayerNames','student_name'),
+                  ('x_PayerEmail','student_email'),
+                  ('x_OrderID','order_id'),
+                  ('x_amt','amount'),
+                  )
+args = {}
+for arg,field in payment_fields:
+    args[arg] = info[field]
+info['args'] = args
+return context.goto_wema_form(info=info)
+url = info['action'] + "?" + urlencode(args)
+request.RESPONSE.redirect(url)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_epayment/payment_receipt.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_epayment/payment_receipt.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_epayment/payment_receipt.pt	(revision 2226)
@@ -0,0 +1,115 @@
+<metal:body use-macro="here/slip_template/macros/master">
+    <metal:main fill-slot="main"
+                tal:define="info context/getPaymentInfo;">
+      <span tal:condition="python: not info">
+        <span tal:content="here/illegal_view" />
+      </span>
+      
+      <span tal:condition="python: info">
+        <metal:block tal:condition="info/is_online_pmt">
+        <h3>Online Payment Receipt</h3>
+        <br />
+        <table tal:define="student info/student">
+        <tr>
+          <td width="220px">Name:</td> 
+          <td><span tal:content="student/name" /></td>
+        </tr>
+        <tr>
+          <td>Student Id:</td>
+          <td tal:content="student/id" />
+        </tr>        
+        <tr>
+          <td>JAMB Registration Number:</td>
+          <td tal:content="student/jamb_reg_no" />
+        </tr>           
+        <tr>
+          <td>Certificate Id:</td>
+          <td tal:content="student/course" />
+        </tr>
+        <tr>
+          <td>Faculty:</td>
+          <td tal:content="student/faculty" />
+        </tr>        
+        <tr>
+          <td>Department:</td>
+          <td tal:content="student/department" />
+        </tr>        
+        </table>                 
+        <span tal:omit-tag=""
+              tal:content="structure python: info['payment_doc'].render(layout_mode='view')" 
+              />
+        </metal:block>
+        <metal:block tal:condition="info/is_scratchcard_pmt">            
+        <h3>Scratch Card Payment Receipt</h3>
+        <br />
+        <table tal:define="student info/student">
+        <tr>
+          <td width="220px">Name:</td> 
+          <td><span tal:content="student/name" /></td>
+        </tr>
+        <tr>
+          <td>Student Id:</td>
+          <td tal:content="student/id" />
+        </tr>        
+        <tr>
+          <td>JAMB Registration Number:</td>
+          <td tal:content="student/jamb_reg_no" />
+        </tr> 
+        <tr>
+          <td>Matriculation Number:</td>
+          <td tal:content="student/matric_no" />
+        </tr>                   
+        <tr>
+          <td>Certificate Id:</td>
+          <td tal:content="student/course" />
+        </tr>
+        <tr>
+          <td>Faculty:</td>
+          <td tal:content="student/faculty" />
+        </tr>        
+        <tr>
+          <td>Department:</td>
+          <td tal:content="student/department" />
+        </tr>             
+        </table>                 
+        <table tal:define="pm nocall: info/payment_doc">
+        <tr>
+          <td width="220px">Access Code:</td> 
+          <td><span tal:content="pm/type_code" /></td>
+        </tr>     
+        <tr>
+          <td width="220px">Payment Description:</td> 
+          <td><span tal:content="pm/type_description" /></td>
+        </tr>
+        <tr>
+          <td width="220px">Amount (Naira):</td> 
+          <td><span tal:content="pm/amount" /></td>
+        </tr>        
+        <tr>        
+          <td width="220px">Transaction Date:</td> 
+          <td><span tal:content="python:pm.date.ISO()" /></td>
+        </tr>       
+        <tr>
+          <td width="220px">Response Code:</td> 
+          <td><span tal:content="pm/resp_code" /></td>
+        </tr>         
+        <tr>
+          <td width="220px">Response Description:</td> 
+          <td><span tal:content="pm/resp_desc" /></td>
+        </tr>              
+        </table>
+        </metal:block>
+
+        <metal:block tal:condition="info/is_interrupted">            
+        <h3>Payment Process Interrupted!</h3>
+        <br />        
+        </metal:block>
+        
+        <metal:block tal:condition="info/unknown_code">
+        <h3>Response from Bank: "<span tal:content="info/resp_desc" />"</h3>
+        <br />        
+        </metal:block>
+
+      </span>
+    </metal:main>
+</metal:body>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_epayment/payments_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_epayment/payments_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_epayment/payments_view.pt	(revision 2226)
@@ -0,0 +1,82 @@
+<metal:body use-macro="here/main_template/macros/master">
+  <metal:main fill-slot="main"
+              tal:define="info context/getPaymentsFolderInfo;">
+    <span tal:condition="not: info">
+      <span tal:content="here/illegal_view" />
+    </span>
+    <span tal:condition="info" tal:omit-tag="">
+      <span tal:define= " rows info/payments;
+      review_state info/review_state;
+      is_student info/is_student;
+      s_name info/student_name;"
+      >
+        <a href=""
+           tal:attributes="href string:${context/aq_parent/absolute_url}">
+          <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+          Up one level
+        </a>
+        <h3> 
+          <span tal:condition="not:is_student" tal:omit-tag="">
+            <span tal:content="s_name" />:</span>
+          <span tal:condition="is_student" tal:omit-tag="">My</span> <span tal:content="here/title_or_id" />
+        </h3>
+        <br />
+        <table class="registration" width="100%">
+          <tr>
+            <th>Description, Amount, Date</th>
+            <th>Response</th>
+            <th>Transaction Code</th>
+          </tr>
+          <tr tal:repeat="row rows"
+              tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+            <td style="white-space:normal" tal:attributes="class string:${row/confirmed}">
+              <a style="white-space:normal"  target="slip" href="" tal:attributes="href string:${context/absolute_url}/${row/id}/payment_receipt"
+                 onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+                <strong tal:content="row/title" /></a> 
+            </td>
+            <td style="white-space:normal" tal:content="row/resp_desc" />
+            <td tal:content="row/trans_ref" />
+            <td>
+              <a tal:condition="row/is_approvable"
+                 tal:attributes="href string:${context/absolute_url}/${row/id}/approve_epayment;
+                 onclick python:'return window.confirm(\'%s\')' %(cpsmcat('Are you sure? You will not be able to undo the approval.'), );"
+                 >
+                [approve]
+              </a>             
+            </td>
+            <td>
+              <a tal:condition="row/is_requeryable"
+                 tal:attributes="href row/href;
+                 onclick python:'return window.confirm(\'%s\')' %(cpsmcat('Are you sure?'), );"
+                 >
+                [requery]
+              </a>             
+            </td>
+          </tr>
+        </table>
+        <br />
+        <div>
+          <form tal:condition="info/online_payment" 
+                tal:attributes="action string: ${context/absolute_url}/pay_interswitch" method="post" class="group">
+            <input type="submit" name="epayment" 
+                   class="context" 
+                   value="Initiate School Fee Online Payment" 
+                   />
+          </form>  
+          <form tal:condition="info/sc_payment" 
+                tal:attributes="action string: ${context/absolute_url}/pay_by_sc" method="post" class="group">
+            <input type="hidden" name="paid_session" 
+                   tal:attributes="value info/next_session"
+                   />
+            <input type="submit" name="epayment" 
+                   class="context" 
+                   value="Pay School Fee by Scratch Card"
+                   tal:attributes="value string:Pay ${info/next_session_str} School Fee by Scratch Card"
+                   />
+          </form>          
+        </div>        
+      </span>
+    </span>
+  </metal:main>
+</metal:body>
+  
Index: WAeUP_SRP/trunk_not_used/skins/waeup_epayment/simulate_callback.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_epayment/simulate_callback.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_epayment/simulate_callback.py	(revision 2226)
@@ -0,0 +1,29 @@
+##parameters=REQUEST,matric_no=None
+# $Id$
+"""
+process the Application Form
+return html renderer + psm
+"""
+import DateTime
+current = DateTime.DateTime()
+pr = context.portal_registration
+validate = REQUEST.has_key("cpsdocument_edit_button")
+
+import logging
+logger = logging.getLogger('Skins.simulate_callback')
+
+args = {}
+args['x_RespDesc'] = 'Simulated Callback'
+args['x_RespPayRef'] = 'GTB|WEB|ISW|1-01-2000|000234'
+args['x_RespCode'] = 'XX'
+args['x_CardNum'] = '0000'
+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))
+url = "%s" % (context.absolute_url())
+return REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_epayment/wema_form.pt_not_used
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_epayment/wema_form.pt_not_used	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_epayment/wema_form.pt_not_used	(revision 2226)
@@ -0,0 +1,44 @@
+<metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main"
+                tal:define="info options/info">
+                
+        <h3>Confirm Your Payment Data! </h3>
+        <br />
+                
+      <form method="post" action="pay_online">
+        <table>
+          <tr>
+            <td width="100px">
+            Payment:</td>
+            <td tal:content="info/type_description"></td>
+          </tr>
+          <tr>
+            <td>
+            Name:
+            </td>
+            <td tal:content="info/pay_bill_to" />
+          </tr>
+          <tr>
+            <td >
+            Amount:
+            </td>
+            <td> Naira <span tal:content="info/amount" /></td>
+          </tr>
+          <tr>
+            <td >
+            Bank:
+            </td>
+            <td>Wema Bank</td>
+          </tr>          
+        </table>
+        <br />
+        <input type="submit" 
+               class="standalone" 
+               name="goto_bank" 
+               value="Confirm" 
+               />
+
+      </form>
+    </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_pins/batch_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_pins/batch_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_pins/batch_view.pt	(revision 2226)
@@ -0,0 +1,57 @@
+<metal:html tal:define="info options/info;
+                        rendered options/rendered;
+                        mtool here/portal_membership;
+                        member mtool/getAuthenticatedMember;
+                        ">
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:block fill-slot="header">
+      <a href=""
+         tal:attributes="href string:${here/academicsParent}">
+        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+        Up one level
+      </a>
+      <h3 tal:content="here/title_or_id" />
+      <div tal:condition="nothing" tal:content="info/container_path"/>
+    </metal:block>
+
+    <metal:main fill-slot="main">
+      <span tal:condition="isAnon">
+      </span>
+      <span tal:condition="python:not isAnon and info">
+        <span tal:omit-tag="" 
+              tal:content="structure python: info['batch_doc'].render(proxy=info['batch_doc'],
+              layout_mode='view', 
+              )" 
+              />
+        <br />
+        <h3><span tal:replace="info/nr_used" /> Pins used out of 
+        <span tal:replace="info/batch_doc/no_of_pins" /></h3>
+        <span tal:replace="structure rendered" />
+        <table tal:condition="info/used">
+          <tr tal:repeat="pin info/used">
+            <td tal:content="python:path('repeat/pin/index')+1">: </td>
+            <td width="50px"> <span tal:content="pin/serial" /></td>
+            <td tal:content="pin/pin" />
+            <td tal:content="pin/student_id" />
+            <td>
+              <a tal:condition="pin/student_url" href="" tal:content="pin/student"
+                 tal:attributes="href pin/student_url"></a>
+              <span tal:condition="python: not pin['student_url'] and not pin['student'].startswith('disabled')" tal:content="pin/student" />
+            </td>
+          </tr>
+        </table>
+        <br />
+        <span tal:condition="python:member.id in ('admin','joachim')">        
+        ---top secret---
+        <table>
+          <tr tal:repeat="pin python: info['unused'][:2]">
+            <td width="50px"> <span tal:content="pin/serial" />: </td>
+            <td tal:content="pin/pin" />
+          </tr>
+        </table>
+        ---top secret---
+        </span>        
+      </span>
+    </metal:main>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_pins/disable_pins.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_pins/disable_pins.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_pins/disable_pins.py	(revision 2226)
@@ -0,0 +1,42 @@
+## Script (Python) "disable_pins"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST,ids=[]
+##title=
+##
+# $Id$
+"""
+disable pins
+"""
+import DateTime
+current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+import logging
+logger = logging.getLogger('Skins.disable_pins')
+
+request = REQUEST
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+#from Products.zdb import set_trace
+#set_trace()
+
+if not ids:
+    return
+
+pincat = context.portal_pins
+for pid in ids:
+    serial,prefix = pid.split("_")
+    res = pincat(prefix_batch=prefix,
+                 serial=int(serial))
+    if len(res) != 1:
+        continue
+    uid = res[0].pin
+    dict = {"pin": uid,
+            "student": "disabled by %s on %s" % (member,current)
+            }
+    pincat.modifyRecord(**dict)
+    logger.info('%s disabled pin %s' % (member,uid))
+return request.RESPONSE.redirect("%s/campus/pins/search_pins" % context.portal_url())
Index: WAeUP_SRP/trunk_not_used/skins/waeup_pins/enable_pins.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_pins/enable_pins.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_pins/enable_pins.py	(revision 2226)
@@ -0,0 +1,45 @@
+## Script (Python) "enable_pins"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST,ids=[]
+##title=
+##
+# $Id$
+"""
+enable pins
+"""
+import DateTime
+current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
+import logging
+logger = logging.getLogger('Skins.enable_pins')
+
+request = REQUEST
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+#from Products.zdb import set_trace
+#set_trace()
+
+if not ids:
+    return
+
+pincat = context.portal_pins
+for pid in ids:
+    serial,prefix = pid.split("_")
+    res = pincat(prefix_batch=prefix,
+                 serial=int(serial))
+    if len(res) != 1:
+        continue
+    rec = res[0]
+    uid = rec.pin
+    if not rec.student.startswith('disabled'):
+        continue
+    dict = {"pin": uid,
+            "student": ""
+            }
+    pincat.modifyRecord(**dict)
+    logger.info('%s enabled pin %s' % (member,uid))
+return request.RESPONSE.redirect("%s/campus/pins/search_pins" % context.portal_url())
Index: WAeUP_SRP/trunk_not_used/skins/waeup_pins/pins_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_pins/pins_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_pins/pins_view.pt	(revision 2226)
@@ -0,0 +1,73 @@
+<metal:html tal:define="info options/info;
+                        rendered options/rendered;
+                        mtool here/portal_membership;
+                        member mtool/getAuthenticatedMember;
+                        ">
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main">
+      <span tal:condition="isAnon">
+      </span>  
+      <h3>Search PIN Section</h3>
+      <br />      
+      <span tal:condition="not:isAnon">
+        <span tal:replace="structure rendered" />
+      <form action="." method="post">
+        <table>
+          <tr tal:repeat="pin info/used">
+            <td>
+              <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                     tal:define="id string:${pin/serial}_${pin/prefix}"
+                     tal:attributes="value id;
+                     id python:'cb_' + id;"
+                     />
+            </td>
+            <td width="50px"> <span tal:content="pin/serial" />: </td>
+            <td tal:content="pin/pin" />
+            <td tal:content="pin/student_id" />
+            <td>
+              <a tal:condition="pin/student_url" href="" tal:content="pin/student"
+                 tal:attributes="href pin/student_url"></a>
+              <span tal:condition="python: not pin['student_url'] and not pin['student'].startswith('disabled')" tal:content="pin/student" />
+            </td>
+          </tr>
+        </table>
+
+        <span tal:condition="info/used">
+        <br />
+        <input type="submit" name="disable_pins:method" 
+               value="disable pins"
+               class="destructive"
+               tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+               (cpsmcat('really disable ?'), )" 
+               />
+  
+        &nbsp;
+        
+        <input type="submit" name="enable_pins:method" 
+               value="enable pins"
+               class="destructive"
+               tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+               (cpsmcat('really enable ?'), )" 
+               />
+         <br />      
+         </span>
+
+      </form>
+      <br />
+      <h3>PIN Batches</h3>
+      <br />
+      <form action="." method="get">
+        <select class="form-element" name=":action" 
+                tal:attributes="onChange string:location.href='${context/absolute_url}/'+this.options[this.selectedIndex].value"
+                >
+          <option value="--">Goto Batch ...</option>
+          <option tal:repeat="batch context/objectIds"
+                  tal:attributes="value batch"
+                  tal:content="batch">
+          </option>
+        </select>
+      </form>
+      </span>
+    </metal:main>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_pins/scratch_card_batch_create_do.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_pins/scratch_card_batch_create_do.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_pins/scratch_card_batch_create_do.py	(revision 2226)
@@ -0,0 +1,37 @@
+##parameters=type_name, datamodel
+# $Id$
+"""
+Create an empty object in the context according to the datamodel.
+
+Datamodel may be examined to create a suitable id.
+"""
+from Products.CMFCore.utils import getToolByName
+
+prefix = datamodel.get('prefix').upper()
+datamodel.set('prefix',prefix)
+bl = context.portal_catalog({'meta_type': "ScratchCardBatch",})
+b_ids = []
+for b in bl:
+    b_ids.append(b.getId)
+next = 1
+while b_ids and "%s_%d" % (prefix,next) in b_ids:
+    next += 1
+id = "%s_%d" % (prefix,next)
+datamodel.set('batch_no',next)
+##language = datamodel.get('Language')
+##if not language:
+##    ts = getToolByName(context, 'translation_service')
+##    language = ts.getSelectedLanguage()
+
+# Datamodel is passed so that flexti can initialize the object.
+new_id = context.invokeFactory(type_name, id, datamodel=datamodel,
+                               )
+if new_id is not None:
+    id = new_id
+
+ob = getattr(context, id)
+ob.getContent().edit(mapping=datamodel)
+
+#context.notifyCPSDocumentCreation(ob=ob) # BBB obsolete in CPS 3.5.0
+
+return ob
Index: WAeUP_SRP/trunk_not_used/skins/waeup_pins/scratch_card_batch_created.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_pins/scratch_card_batch_created.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_pins/scratch_card_batch_created.py	(revision 2226)
@@ -0,0 +1,14 @@
+## Script (Python) "cpsdocument_created"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=object=None
+##title=
+##
+# $Id$
+if object is not None:
+    batch = object
+batch.getContent().makePins()
+return
Index: WAeUP_SRP/trunk_not_used/skins/waeup_pins/search_pins.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_pins/search_pins.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_pins/search_pins.py	(revision 2226)
@@ -0,0 +1,154 @@
+## Script (Python) "search_pins"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST
+##title=
+##
+# $Id: search_students.py 911 2006-11-20 15:11:29Z henrik $
+"""
+list Students for ClearanceOfficers
+"""
+
+request = REQUEST
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+roles = member.getRolesInContext(context)
+pincat = context.portal_pins
+students = context.portal_url.getPortalObject().campus.students
+def check_hostel_pins(term):
+    items = pincat(prefix_batch = term)
+    not_found = []
+    #from Products.zdb import set_trace;set_trace()
+    for item in items:
+        if item.student == '':
+            continue
+        student = getattr(students,item.student,None)
+        if student is None:
+            not_found.append(item)
+        elif not "accommodation_2006" in student.objectIds():
+            not_found.append(item)
+        else:
+            acco = student.accommodation_2006
+            acco_doc = acco.getContent()
+            pin = "".join(str(acco_doc.acco_res_sc_pin).split('-'))
+            if pin != item.pin:
+                not_found.append(item)
+    return not_found
+
+def set_used_pins(items, from_cat=False):
+    l = []
+    for i in items:
+        item = {}
+        if from_cat:
+            sno = i.student
+            prefix = i.prefix_batch
+            serial = i.serial
+            pin = i.pin
+        else:
+            sno = i['student']
+            prefix = i.get('prefix_batch')
+            serial = i.get('serial')
+            pin = i.get('pin')
+        item['student'] = sno
+        item['prefix'] = prefix
+        item['serial'] = serial
+        if len(sno) > 0:
+            item['pin'] = pin
+        else:
+            if str(member) in ('admin','joachim'):
+                item['pin'] = "%s" % (pin,)
+            else:
+                item['pin'] = "%s%s****%s" % (i.prefix_batch,pin[-10:-7],pin[-3:])
+        
+        if sno.startswith('disabled'):
+            item['student_url'] = None
+            item['student_id'] = sno
+        elif len(sno)==10 or '/' in sno:
+            #res = context.portal_catalog(SearchableText=sno,portal_type='StudentApplication')
+            res = context.students_catalog(jamb_reg_no=sno.upper())
+            if len(res) > 0:
+                item['student_url'] = "%s/campus/students/%s/application" % (context.portal_url(),res[0].id)
+                item['student_id'] = res[0].id
+            else:
+                item['student_url'] = None
+                item['student_id'] = ''
+        elif sno:
+            item['student_url'] = '%s/campus/students/%s' % (context.portal_url(),item['student'])
+            item['student_id'] = item['student']
+        else:
+            item['student_url'] = ''
+            item['student_id'] = "not used"
+        l.append(item)
+    return l
+
+lt = context.portal_layouts
+validate = request.has_key("cpsdocument_edit_button")
+default = {'search_mode': 'student',}
+rend,psm,ds = lt.renderLayout(layout_id= 'scratch_card_search',
+                      schema_id= 'student_search',
+                      context=context,
+                      mapping=validate and request,
+                      ob=default,
+                      layout_mode='edit',
+                      formaction="search_pins",
+                      commit = False,
+                      )
+info = {}
+info['used'] = []
+#from Products.zdb import set_trace;set_trace()
+if context.portal_type == "ScratchCardBatch":
+    info['batch_doc'] = context.getContent()
+    #info['used'] = set_used_pins(info['batch_doc'].getUsedPins())
+    info['used'] = []
+    info['unused'] = info['batch_doc'].getUnusedPins()
+    info['nr_used'] = info['batch_doc'].getNumberOfUsedPins()
+    view = context.batch_view
+elif context.portal_type == "ScratchCardBatchesFolder":
+    view = context.pins_view
+if psm == '':
+    return view(rendered = rend,
+                psm = psm,
+                #psm = "%s, %s" % (psm,ds),
+                info = info,
+                allowed = True,
+                )
+what = ds.get('search_mode')
+term = ds.get('search_string')
+
+items=[]
+if term != "":
+    if what == 'student' :
+        items_1 = pincat(student = term.upper())
+        items_2 = pincat(student = term.lower())
+        items = items_1 + items_2
+    elif what == 'pin':
+        if context.portal_type == "ScratchCardBatch" and term == "HOS1":
+            items = check_hostel_pins(term)
+        else:
+            items = pincat(pin = term.upper())
+    elif what == 'serial':
+        try:
+            snr = int(term.strip())
+            items = pincat(serial = snr)
+        except ValueError:
+            psm = "invalid number"
+            items = []
+            pass
+    else:
+        items = []
+
+info['used'] = set_used_pins(items,from_cat=True)
+
+
+
+return view(rendered = rend,
+            psm = psm,
+            #psm = "%s, %s" % (psm,ds),
+            info = info,
+            allowed = True,
+            )
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/accommodation_slip.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/accommodation_slip.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/accommodation_slip.pt	(revision 2226)
@@ -0,0 +1,70 @@
+<metal:body use-macro="here/slip_template/macros/master">
+    <metal:main fill-slot="main"
+                tal:define="info_acco context/getAccommodationInfo;
+                            info_app  context/getApplicationInfo">
+      <span tal:condition="python: not info_acco or not info_acco['acco']">
+            <span tal:content="here/illegal_view" />
+      </span>   
+      <span tal:condition="python: info_acco and info_acco['acco']">                   
+          <h3>Hostel Allocation Slip (and Maintenance Receipt)</h3>
+          <br />
+          - updated database -
+          <br /><br />
+           
+          <table width="" cellpadding="2" cellspacing="0" summary="Form layout">
+    
+            <tr tal:condition="python: 'passport' in info_acco['student'].application.getContent().objectIds()">
+              <td colspan="2"><img tal:attributes="src string:${here/portal_url}/campus/students/${info_acco/id}/application/passport"/>
+              </td>
+            </tr>   
+            <tr>
+              <td width="180px">Student ID:</td> 
+              <td><span tal:content="info_acco/id" /></td>
+            </tr>
+            <tr tal:condition="info_acco/matric_no">
+              <td>Matriculation Number:</td> 
+              <td><span tal:content="info_acco/matric_no" /></td>
+            </tr>      
+            <tr>
+              <td>JAMB Registration Number:</td> 
+              <td><span tal:content="info_acco/jamb_reg_no" /></td>
+            </tr>             
+            <tr>
+              <td>Student Name:</td> 
+              <td><span tal:content="info_acco/name" /></td>
+            </tr>    
+            <tr>
+              <td>Sex:</td> 
+              <td><span tal:content="info_acco/sex" /></td>
+            </tr>      
+            <tr>
+              <td>Level:</td> 
+              <td><span tal:content="info_acco/level" /></td>
+            </tr>             
+            <tr>
+              <td>Bed Category:</td> 
+              <td><span tal:content="info_acco/student_status" /></td>
+            </tr>            
+            <tr tal:condition="info_acco/email">
+              <td>Email:</td> 
+              <td><span tal:content="info_acco/email" /></td>
+            </tr>      
+            <tr tal:condition="not:info_acco/email">
+              <td>Email:</td> 
+              <td><span tal:content="info_app/app_doc/app_email" /></td>
+            </tr>  
+            <tr tal:condition="info_app/app_doc/app_mobile">
+              <td>Mobile Phone Number:</td> 
+              <td><span tal:content="info_app/app_doc/app_mobile" /></td>
+            </tr>          
+                             
+          </table>
+          
+          <span tal:omit-tag=""
+                tal:content="structure python: info_acco['acco_doc'].render(proxy=info_acco['acco_doc'],
+                layout_mode='view_slip', 
+                layout_id='student_accommodation_fe')" 
+                />
+      </span>      
+    </metal:main>
+</metal:body>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/accommodation_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/accommodation_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/accommodation_view.pt	(revision 2226)
@@ -0,0 +1,36 @@
+<metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main"
+            tal:define="info context/getAccommodationInfo">
+      <span tal:condition="python: not info or not info['acco']">
+        <span tal:content="here/illegal_view" />
+      </span>
+      <span tal:condition="python: info and info['acco']">
+
+        <div style="text-align: right">
+        <a href="" target="slip" tal:attributes="href string:accommodation_slip"
+            onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+            Accommodation Slip
+        </a>
+        </div>
+        <a href=""
+           tal:attributes="href string:${here/academicsParent}">
+          <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+          Up one level
+        </a>        
+        <h3>My Accommodation Record</h3>
+        <br />
+        <span tal:omit-tag=""
+              tal:content="structure python: info['acco_doc'].render(proxy=info['acco_doc'],
+              layout_mode='view', 
+              layout_id='student_accommodation_fe')" 
+              />
+         <table>
+         <tr>
+          <td width="220px">Level:</td><td tal:content="info/level" />
+         </tr>
+         </table>
+      </span>
+    </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/add_course_result.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/add_course_result.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/add_course_result.py	(revision 2226)
@@ -0,0 +1,85 @@
+## Script (Python) "add_course_result"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST=None, action_after_validate=''
+##title=
+##
+# $Id$
+"""
+add a StudentCourseResult object
+"""
+
+import logging
+logger = logging.getLogger('Skins.add_course_result')
+
+from urllib import urlencode
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+request = context.REQUEST
+course_cat = context.courses_catalog
+from Products.AdvancedQuery import Eq, Between, Le,In
+try:
+    aq_portal = context.portal_catalog.evalAdvancedQuery
+except:
+    aq_portal = context.portal_catalog_real.evalAdvancedQuery
+course_id = request.get('course_id')
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+
+
+d = context.getCourseInfo(course_id)
+args = {}
+err = ''
+d['core_or_elective'] = True
+while True:
+    if not course_id:
+        err = "Empty course id!"
+        break
+    if d['title'] == 'unknown':
+        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!"
+        #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!"
+        #logger.info('%s tried to add StudentCourseResult object %s which already exists as carryover course' % (member,course_id))
+        break
+    break
+
+if err:
+    args['course_id'] = course_id
+    #args['error'] = err
+    args['portal_status_message'] = err
+    url = context.absolute_url() + '/' + action_after_validate + '?' + urlencode(args)
+    return request.RESPONSE.redirect(url)
+
+
+cr_id = context.invokeFactory('StudentCourseResult',course_id)
+cr = getattr(context,cr_id)
+context.portal_workflow.doActionFor(cr,'open')
+cr.getContent().edit(mapping=d)
+#context.portal_workflow.doActionFor(cr,'close')
+#args['course_id'] = course_id
+
+logger.info('%s added StudentCourseResult object %s at level %s for %s' % (member,
+                                                                           course_id,
+                                                                           context.getId(),
+                                                                           context.getStudentId()))
+
+psm = "You successfully added course %s!" % course_id
+args['portal_status_message'] = psm
+if action_after_validate:
+    url = context.absolute_url() + '/' + action_after_validate + '?' + urlencode(args)
+else:
+    url = context.absolute_url() + '?' + urlencode(args)
+return REQUEST.RESPONSE.redirect(url)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/add_student.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/add_student.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/add_student.py	(revision 2226)
@@ -0,0 +1,77 @@
+##parameters=REQUEST
+# $Id$
+"""
+process the the accommodation reservation
+"""
+import DateTime
+current = DateTime.DateTime()
+pr = context.portal_registration
+wftool = context.portal_workflow
+lt = context.portal_layouts
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+acco_cat = context.portal_accommodation
+import logging
+logger = logging.getLogger('Skins.add_student')
+
+validate = REQUEST.has_key("cpsdocument_edit_button") and\
+           REQUEST.get("cpsdocument_edit_button").startswith('Add')
+d = {}
+mode = 'edit'
+rendered,psm,ds = lt.renderLayout(layout_id= 'import_student',
+                      schema_id= 'import_student',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob=d,
+                      layout_mode=mode,
+                      commit = False
+                      )
+if psm == 'invalid':
+    psm = "Please correct your input."
+    return context.add_student_form(rendered = rendered,
+                                 psm = psm,
+                                 #psm = "%s, %s" % (psm,ds),
+                                 mode = mode,
+                                 formaction = "add_student",
+                                 button = "Add",
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.add_student_form(rendered = rendered,
+                                 psm = psm,
+                                 mode = mode,
+                                 formaction = "add_student",
+                                 button = "Add",
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    pass
+matric_no = ds.get('matric_no')
+if matric_no:
+    res = context.students_catalog(matric_no = matric_no)
+    if res:
+        psm = "Student with matric_no %s exists with Id: %s" % (matric_no,res[0].id)
+        return context.add_student_form(rendered = rendered,
+                                 psm = psm,
+                                 #psm = "%s, %s" % (psm,ds),
+                                 mode = mode,
+                                 formaction = "add_student",
+                                 button = "Add",
+                                 ds = ds,
+                                 )
+dict = {}
+dict.update(ds)
+sid,password = context.waeup_tool.addStudent(dict)
+dict['sid'] = sid
+dict['password'] = password
+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))
+return context.add_student_form(rendered = rendered,
+                                 mode = 'view',
+                                 psm = psm,
+                                 ds = dict,
+                                 student = student_rec,
+                                 )
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/add_student_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/add_student_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/add_student_form.pt	(revision 2226)
@@ -0,0 +1,87 @@
+<tal:block define="rendered_main options/rendered;
+           portal_status_message options/psm;
+           info options/ds;
+           mode options/mode;
+           student options/student|nothing;
+           formaction options/formaction|nothing;
+           matric_no options/matric_no|nothing;
+           name options/name|nothing;"
+           >
+  <metal:block define-macro="edit_form">
+    <metal:block use-macro="here/main_template/macros/master">
+      <metal:block fill-slot="header">
+      </metal:block>
+      <metal:block fill-slot="main">
+        <span tal:condition="python: mode == 'view'" tal:omit-tag="">
+        <h3>Notify Student of Authentication Data!</h3>
+        <br />
+          <table>
+            <tr>
+              <td>Student Id:</td>
+              <td tal:content="info/sid" />
+            </tr>                
+            <tr>
+              <td>Password:</td>
+              <td tal:content="info/password" />
+            </tr>                
+            <tr>
+              <td>Name:</td>
+              <td tal:content="student/name" />
+            </tr>                
+            <tr>
+              <td>Sex:</td>
+              <td tal:content="student/sex" />
+            </tr>                
+            <tr>
+              <td>Email:</td>
+              <td tal:content="student/email" />
+            </tr>                
+            <tr>
+              <td>Entry Mode:</td>
+              <td tal:content="student/entry_mode" />
+            </tr>        
+            <tr>
+              <td>Matriculation No:</td>
+              <td tal:content="student/matric_no" />
+            </tr>       
+            <tr>
+              <td>JAMB Registration No:</td>
+              <td tal:content="student/jamb_reg_no" />
+            </tr>                            
+            <tr>
+              <td>Study Course:</td>
+              <td tal:content="student/course" />
+            </tr>        
+            <tr>
+              <td>URL:</td>
+              <td><a tal:attributes="href string:${here/portal_url}/campus/students/${info/sid}">
+                <span tal:content="string:${here/portal_url}/campus/students/${info/sid}" />  
+              </a></td>
+            </tr>                  
+          </table>
+         <form tal:attributes="action string:${here/portal_url}/campus/students/${info/sid}/mail_password_form" method="post" class="group">
+            <input type="submit" class="context" value="Send Email with Authentication Data" />
+         </form> 
+        </span>
+        <span tal:condition="python: mode != 'view'" tal:omit-tag="">
+        <h3>Add Student Record!</h3>
+        <br />
+          <form action="" id="editForm" method="post" 
+              enctype="multipart/form-data" class="workflow"
+              tal:attributes="action options/formaction"
+              >
+          <div tal:replace="structure rendered_main" />
+          <br />
+          <input type="submit" class="standalone" name="cpsdocument_edit_button"
+                 value="Save" 
+                 id="cpsdocument_edit_button"
+                 tal:attributes="value options/button"
+                 />
+        </form>
+        </span>
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/admission_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/admission_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/admission_form.pt	(revision 2226)
@@ -0,0 +1,86 @@
+<metal:html tal:define="info context/getStudentInfo">
+  <span tal:condition="not: info">
+    <span tal:content="here/illegal_view" />
+  </span>
+<metal:block tal:condition="info"> 
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main">
+    <span tal:condition="not: info">
+      <span tal:content="here/illegal_view" />
+    </span>
+    <span tal:condition="info"
+          tal:define="review_state info/review_state">
+          
+
+      <div style="text-align: right"
+           tal:condition="python:review_state in ('admitted', 'clearance_pin_entered', 'clearance_requested', 'cleared', 'objection_raised',)">
+      <a href="" target="slip" tal:attributes="href string:admission_slip"
+          onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+          <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+          Admission Slip
+      </a>
+      </div>          
+  
+          
+      <h3>This is to inform you that you have been provisionally admitted into University of Benin as follows:
+      </h3>
+
+      <br />
+      <span tal:omit-tag=""
+            tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'],
+            layout_mode='view_info', 
+            layout_id='student_application_fe')" 
+            />
+
+      <h4>Your Study Course:</h4>
+      <table tal:define="sc python: info['course_doc']">
+        <tr>
+          <td width="180px">Certificate:</td> 
+          <td><span tal:content="sc/title" /></td>
+        </tr>
+        <tr>
+          <td>Certificate ID:</td>
+          <td tal:content="sc/study_course" />
+        </tr>
+          <span tal:define="f_id sc/faculty;
+          d_id sc/department;
+          f_title context/academics/?f_id/Title|string:Faculty not yet in Prospectus;
+          d_title context/academics/?f_id/?d_id/Title|string:Department not yet in Prospectus"
+          >
+            <tr>
+              <td>Faculty:</td>
+              <td tal:content="f_title" />
+            </tr>
+            <tr>
+              <td>Department:</td> 
+              <td><span tal:content="d_title" /></td>
+            </tr>
+          </span>
+        </table>        
+        
+        <br />
+        
+      <strong tal:condition="python: 'pt' in info['app_doc'].entry_mode ">Clearance commences on resumption and ends exactly on 1st June 2007.
+              Any breach of this directive will result in forfeiture of the admission offer.</strong>
+      <strong tal:condition="python: 'ft' in info['app_doc'].entry_mode ">Clearance commences on resumption and ends exactly two(2) weeks after resumption date.
+              Any breach of this directive will result in forfeiture of the admission offer.</strong>           
+              
+      <br /><br />      
+  
+     
+      <form action="." method="post" class="group">
+
+                <input  tal:condition="python:review_state=='admitted'" type="submit" name="raise_objection:method" value="Raise an Objection"
+                       class="destructive"
+                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                       (cpsmcat('Confirm that you want to raise an objection.'), )" 
+                       />
+                <input tal:condition="python:review_state in ('admitted', 'objection_raised',)" type="submit" name="application_edit:method"
+                       class="context" value="Continue" 
+                       />
+       </form>
+    </span>
+    </metal:main>
+  </metal:body>
+</metal:block>     
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/admission_rejected_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/admission_rejected_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/admission_rejected_view.pt	(revision 2226)
@@ -0,0 +1,7 @@
+<metal:body use-macro="here/main_template/macros/master">
+  <metal:main fill-slot="main">
+
+    <h3>You are not admitted into the University of Benin!</h3>
+
+  </metal:main>
+</metal:body>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/admission_slip.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/admission_slip.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/admission_slip.pt	(revision 2226)
@@ -0,0 +1,62 @@
+<metal:html tal:define="info context/getStudentInfo">
+  <span tal:condition="not: info">
+    <span tal:content="here/illegal_view" />
+  </span>
+<metal:block tal:condition="info"> 
+  <metal:body use-macro="here/slip_template/macros/master">
+    <metal:main fill-slot="main">
+    <span tal:condition="not: info">
+      <metal:block use-macro="here/error_not_found/macros/not_found" />
+    </span>
+    <span tal:condition="info">
+
+      <h3>This is to inform you that you have been provisionally admitted into University of Benin as follows:
+      </h3>
+
+      <br />
+      
+           
+      <span tal:omit-tag=""
+            tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'],
+            layout_mode='view_info', 
+            layout_id='student_application_fe')" 
+            />
+
+      <h4>Your Study Course:</h4>
+      <table tal:define="sc python: info['course_doc']">
+        <tr>
+          <td width="180px">Certificate:</td> 
+          <td><span tal:content="sc/title" /></td>
+        </tr>
+        <tr>
+          <td>Certificate ID:</td>
+          <td tal:content="sc/study_course" />
+        </tr>
+        <span tal:define="f_id sc/faculty;
+                        d_id sc/department;
+                        f_title context/academics/?f_id/Title|string:Faculty not yet in Prospectus;
+                        d_title context/academics/?f_id/?d_id/Title|string:Department not yet in Prospectus"
+                        >
+            <tr>
+              <td>Faculty:</td>
+              <td tal:content="f_title" />
+            </tr>
+            <tr>
+              <td>Department:</td> 
+              <td><span tal:content="d_title" /></td>
+            </tr>
+          </span>
+        </table>        
+      </span>
+      
+      <br />
+      
+      <strong tal:condition="python: 'pt' in info['app_doc'].entry_mode ">Clearance commences on resumption and ends exactly on 1st June 2007.
+              Any breach of this directive will result in forfeiture of the admission offer.</strong>
+      <strong tal:condition="python: 'ft' in info['app_doc'].entry_mode ">Clearance commences on resumption and ends exactly two(2) weeks after resumption date.
+              Any breach of this directive will result in forfeiture of the admission offer.</strong>              
+    
+    </metal:main>
+  </metal:body>
+</metal:block>      
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/application_edit.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/application_edit.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/application_edit.py	(revision 2226)
@@ -0,0 +1,69 @@
+## Script (Python) "application_edit"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST, cpsdocument_edit_button=None, cpsdocument_edit_and_view_button=None, action=None
+##title=
+# $Id$
+"""
+"""
+wftool = context.portal_workflow
+from urllib import urlencode
+from Products.CPSDocument.utils import getFormUidUrlArg
+import DateTime
+current = DateTime.DateTime()
+import logging
+logger = logging.getLogger('Skins.application_edit')
+
+# Until ajax posts directly to its own script...
+##if 'ajax_edit' in REQUEST.form:
+##    return context.cpsdocument_edit_ajax(REQUEST, cluster=cluster)
+
+# Check flexible controls
+#context.editLayouts(REQUEST=REQUEST)
+
+# Validate the document and write it if it's valid
+# (We don't call getEditableContent here, validate does it when needed.)
+info = context.getApplicationInfo()
+
+if info is None:
+    logger.info('Anonymous user tried to access %s' % REQUEST.get('URL0'))
+    return REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+student = info['student']
+app = info['app']
+app_doc = info['app_doc']
+state = info['review_state']
+is_valid, ds = app_doc.validate(request=REQUEST,
+                                schema_id = 'student_application',
+                                layout_id = 'student_application_fe',
+                                proxy=app,
+                                use_session=True)
+
+psm = ""
+args = {}
+action = "/application_edit_form"
+base_url = app.absolute_url()
+
+if is_valid:
+    if cpsdocument_edit_button:
+        if app_doc.passport is not None:
+            args['portal_status_message'] = 'You successfully uploaded your passport picture!'
+        else:
+            args['portal_status_message'] = "You didn't upload a passport picture!"
+    elif cpsdocument_edit_and_view_button:
+        if 1: ## app_doc.passport is not None:
+            logger.info('%s proceeded to start clearance' % (info['id']))
+            action = "/start_clearance"
+            base_url = student.absolute_url()
+            url = base_url + action
+            return REQUEST.RESPONSE.redirect(url)
+        else:
+            args['portal_status_message'] = "You didn't upload a passport picture!"
+if args:
+  url = base_url + action + '?' + urlencode(args)
+else:
+  url = base_url + action
+REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/application_edit_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/application_edit_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/application_edit_form.pt	(revision 2226)
@@ -0,0 +1,53 @@
+<metal:html tal:define="info context/getApplicationInfo">
+  <span tal:condition="not: info">
+    <span tal:content="here/illegal_view" />
+  </span>
+<metal:block tal:condition="info"> 
+<metal:block tal:define="rendered_main python:info['app_doc'].render(
+                      layout_mode='edit',
+                      schema_id = 'student_application',
+                      layout_id = 'student_application_fe',
+                      request=request, 
+                      use_session=True,);
+           form_action string:application_edit;
+           edition python:True;
+           session2006 python:True;
+           metadata nothing;
+            ">
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:block fill-slot="header">
+      <h3>Update Your Application Data!</h3>
+      <br />
+    </metal:block>  
+  
+    <metal:main fill-slot="main">
+    <form action="ACTION" method="post" id="editForm"
+          enctype="multipart/form-data" class="workflow"
+          tal:attributes="action form_action">
+      <span tal:condition="not: info">
+        <metal:block use-macro="here/error_not_found/macros/not_found" />
+      </span>
+      <span tal:condition="info">
+        <span tal:omit-tag="" tal:replace="structure rendered_main"/>
+      </span>
+      <input type="submit" class="standalone" 
+             name="cpsdocument_edit_button"
+             value="Save & Return Later" 
+             id="cpsdocument_edit_button"
+             tal:condition="not:session2006" />
+      <input type="submit" class="standalone" 
+             name="cpsdocument_edit_and_view_button"
+             value="Save & Apply"
+             id="cpsdocument_edit_and_view_button" 
+             tal:condition="not:session2006" />
+      <input type="submit" class="standalone" 
+             name="cpsdocument_edit_and_view_button"
+             value="Save & Continue"
+             id="cpsdocument_edit_and_view_button" 
+             tal:condition="session2006" />             
+    </form>
+    </metal:main>
+  </metal:body>
+</metal:block>
+</metal:block>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/application_pin_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/application_pin_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/application_pin_form.pt	(revision 2226)
@@ -0,0 +1,32 @@
+<tal:block define="rendered_main options/rendered;
+                   portal_status_message options/psm;
+                   data_storage options/ds;
+                   jamb options/jamb/getContent|nothing;
+                   edition python:1;"
+                   >
+<metal:block define-macro="edit_form">
+  <metal:block use-macro="here/main_template/macros/master">
+  <metal:block fill-slot="header"
+    tal:define="creation creation|nothing;
+                edition edition|nothing;
+                metadata metadata|nothing"
+                >
+    </metal:block>
+      <metal:block fill-slot="main">
+        <h3>Apply for the Post University Matriculation Examination! </h3>
+        <br />
+        <div tal:replace="structure rendered_main" />
+          <p>Instructions :</p>
+          <ul>
+            <li>Buy an Application Scratch Card.</li> 
+            <li>Enter your JAMB Registration Number and the Application PIN above.</li> 
+            <li>Upload your passport picture.</li> 
+            <li>Apply for admission.</li>
+            <li>Print the Application Acknowledgement Slip.</li>
+          </ul>
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/application_slip.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/application_slip.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/application_slip.pt	(revision 2226)
@@ -0,0 +1,20 @@
+<metal:body use-macro="here/slip_template/macros/master">
+    <metal:main fill-slot="main"
+                tal:define="info context/getApplicationInfo">
+      <span tal:condition="not: info">
+        <span tal:content="here/illegal_view" />w
+      </span>
+      <span tal:condition="info">
+            
+        <h3>Application Slip</h3>
+        <br />
+        <span tal:omit-tag=""
+              tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'],
+              layout_mode='view_slip', 
+              layout_id='student_application_fe')" 
+              />
+      </span>
+    </metal:main>
+</metal:body>
+    
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/application_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/application_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/application_view.pt	(revision 2226)
@@ -0,0 +1,32 @@
+<metal:body use-macro="here/main_template/macros/master">
+   <metal:main fill-slot="main"
+                 tal:define="info context/getApplicationInfo">
+      <span tal:condition="not: info">
+        <span tal:content="here/illegal_view" />
+      </span>
+      <span tal:condition="info">
+            
+        <div style="text-align: right" tal:define="review_state info/review_state"
+             tal:condition="python:review_state not in ('created','application_pin_entered',)">
+        <a href="" target="slip" tal:attributes="href string:application_slip"
+            onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+            Application Slip
+        </a>
+        
+          </div>
+        <a href=""
+           tal:attributes="href string:${here/academicsParent}">
+          <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+          Up one level
+        </a>
+        <h3>My Application Record</h3>
+        <br />
+        <span tal:omit-tag=""
+              tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'],
+              layout_mode='view', 
+              layout_id='student_application_fe')" 
+              />
+      </span>
+   </metal:main>
+</metal:body>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/apply_admission.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/apply_admission.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/apply_admission.py	(revision 2226)
@@ -0,0 +1,53 @@
+##parameters=REQUEST
+# $Id$
+"""
+process the Application Form
+return html renderer + psm
+"""
+import DateTime
+current = DateTime.DateTime()
+pr = context.portal_registration
+
+
+type_name = 'StudentApplication'
+ti = context.portal_types[type_name]
+REQUEST.set('type_name',type_name)
+
+validate = REQUEST.has_key("cpsdocument_create_button")
+
+lt = context.portal_layouts
+pr = context.portal_registration
+
+res,psm,ds = lt.renderLayout(layout_id= 'student_application_fe',
+                      schema_id= 'student_application',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      formaction = "apply_admission",
+                      button = "Open JAMB Record",
+                      )
+if psm == 'invalid':
+    return context.application_pin_form(rendered = res,
+                                 psm = "Please correct your input!",
+                                 #psm = "%s, %s" % (psm,ds),
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.application_pin_form(rendered = res,
+                                 psm = None,
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    s_id = ds.get('s_id')
+    pin = str(ds.get('app_ac_pin'))
+    return context.REQUEST.RESPONSE.redirect("%s/logged_in?__ac_name=%s&__ac_password=%s&pin=%s"
+          % (context.absolute_url(),s_id,pin.split('-')[2],pin))
+
+return
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/apply_pume.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/apply_pume.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/apply_pume.py	(revision 2226)
@@ -0,0 +1,232 @@
+## Script (Python) "apply_pume"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST
+##title=
+##
+# $Id$
+"""
+process the Pume Application Form
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+import DateTime
+import logging
+logger = logging.getLogger('Skins.apply_pume')
+
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+
+current = DateTime.DateTime()
+pr = context.portal_registration
+request = REQUEST
+
+#type_name = 'StudentApplication'
+#ti = context.portal_types[type_name]
+#REQUEST.set('type_name',type_name)
+create = "create" in request.keys()
+apply_pume = "apply" in request.keys()
+edit = "edit" in request.keys()
+slip = "slip" in request.keys()
+manage = "manage" in request.keys()
+submitted = False
+mode = request.get('mode','')
+if not mode:
+    if apply_pume or edit or manage:
+        mode = "edit"
+    else:
+        mode = "create"
+validate = create or edit or apply_pume
+
+if manage:
+    validate = False
+
+lt = context.portal_layouts
+reg_no = request.get('widget__reg_no','').upper()
+if not reg_no:
+    reg_no = request.form.get('reg_no','').upper()
+pin = request.form.get('pin','')
+object = {}
+if reg_no:
+    brains = context.applicants_catalog(reg_no = reg_no)
+    if len(brains) == 1:
+        for field in context.applicants_catalog.schema():
+            object[field] = getattr(brains[0],field,None)
+        if not object['passport']:
+                object['passport'] = ''
+        if object['status'] and 'submitted' in object['status']:
+            submitted = True
+        
+        if not (create or slip) and (pin != object['pin'] and not context.isSectionOfficer()):
+            logger.info('%s/%s entered wrong pin %s' % (member,reg_no,pin))
+            return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+        
+        # For the next PUME application session it should be reverted to
+        # (see comment 09/06/07 16:40:52 in ticket #328):
+
+        #if not create and (pin != object['pin'] and not context.isSectionOfficer()):
+            #logger.info('%s/%s entered wrong pin %s' % (member,reg_no,pin))
+            #return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())        
+
+if slip:
+    mode = "view_slip"
+    logger.info('%s/%s views application slip' % (member,reg_no))
+
+res,psm,ds = lt.renderLayout(layout_id= 'application',
+                             schema_id= 'application',
+                             layout_mode = mode,
+                             context=context,
+                             mapping=validate and REQUEST,
+                             ob=object,
+                             commit = False,
+                            )
+
+if slip:
+    return context.apply_pume_slip(rendered = res,
+                                   psm = "",
+                                   #psm = "%s, %s" % (psm,ds),
+                                   mode = mode,
+                                   ds = ds,
+                                  )
+
+if psm == 'invalid':
+    return context.apply_pume_form(rendered = res,
+                                   psm = "Please correct your input!",
+                                   #psm = "%s, %s" % (psm,ds),
+                                   mode = mode,
+                                   ds = ds,
+                                  )
+elif psm == '' and not manage:
+    return context.apply_pume_form(rendered = res,
+                                   psm = psm,
+                                   ds = ds,
+                                   mode = mode,
+                                  )
+elif psm == 'valid' or (psm == '' and manage):
+    pass
+data = {}
+dm = ds.getDataModel()
+for field in context.applicants_catalog.schema():
+    if dm.has_key("%s" % field):
+        data[field] = dm.get(field)
+data['reg_no'] = reg_no
+
+
+
+if apply_pume:
+    if submitted:
+        mode = "view"
+        psm = "The form has already been submitted and you are not allowed to resubmit the data!"
+        logger.info('%s/%s tried to resubmit application record' % (member,reg_no))
+        res,psm_dummy,ds_dummy = lt.renderLayout(layout_id= 'application',
+                                schema_id= 'application',
+                                layout_mode = mode,
+                                context=context,
+                                mapping={},
+                                ob=object,
+                                commit = False,
+                                )
+    elif not request.has_key('confirm'):
+        mode = "edit"
+        psm = "Please confirm Passport Photograph!"
+        logger.info('%s/%s tried to submit without ticking confirmation check box' % (member,reg_no))
+    else:
+        mode = "view"
+        psm = "You successfully applied for PUME!"
+        if object['status'] == 'edited':
+            data['status'] = "submitted"
+            data['application_date'] = current
+            logger.info('%s/%s modified and submitted application record' % (member,reg_no))
+        elif object['status'] == 'reset':
+            data['status'] = 'resubmitted on %s' % DateTime.DateTime().strftime('%A, %B %d, %Y')
+            logger.info('%s/%s modified and resubmitted application record' % (member,reg_no))
+        object['status'] = data['status']
+        context.applicants_catalog.modifyRecord(**data)
+
+        res,psm_dummy,ds = lt.renderLayout(layout_id= 'application',
+                                schema_id= 'application',
+                                layout_mode = mode,
+                                context=context,
+                                mapping=validate and REQUEST,
+                                ob=object,
+                                commit = False,
+                                )
+elif create:
+    if submitted:
+        mode = "view"
+        logger.info('%s/%s views application record' % (member,reg_no))
+    else:
+        mode = "edit"
+        logger.info('%s/%s edits application record' % (member,reg_no))
+    psm = ""
+    #set_trace()
+    object['pin'] = str(ds.get('pin'))
+    res,psm,ds_dummy = lt.renderLayout(layout_id= 'application',
+                                schema_id= 'application',
+                                layout_mode = mode,
+                                context=context,
+                                mapping={},
+                                ob=object,
+                                commit = False,
+                                )
+elif edit:
+    if submitted:
+        mode = "view"
+        psm = "The form has already been submitted and you are not allowed to modify the data!"
+        logger.info('%s/%s tried to edit submitted application record' % (member,reg_no))
+        res,psm_dummy,ds_dummy = lt.renderLayout(layout_id= 'application',
+                                schema_id= 'application',
+                                layout_mode = mode,
+                                context=context,
+                                mapping={},
+                                ob=object,
+                                commit = False,
+                                )
+    else:
+        mode = "edit"
+        psm = "Content changed!"
+        data['status'] = "edited"
+        context.applicants_catalog.modifyRecord(**data)
+        logger.info('%s/%s modified application record' % (member,reg_no))
+
+elif manage:
+    if submitted:
+        mode = "view"
+        psm = "You are now assuming the applicant's role!"
+        logger.info('%s/%s entered application record' % (member,reg_no))
+        res,psm_dummy,ds_dummy = lt.renderLayout(layout_id= 'application',
+                                schema_id= 'application',
+                                layout_mode = mode,
+                                context=context,
+                                mapping={},
+                                ob=object,
+                                commit = False,
+                                )
+    else:
+        mode = "edit"
+        psm = "You are now assuming the applicant's role!"
+        logger.info('%s/%s entered application record' % (member,reg_no))
+
+
+try:
+    passport_uploaded = bool(data['passport'])
+except:
+    passport_uploaded = False
+
+return context.apply_pume_form(rendered = res,
+                            psm = psm,
+                            #psm = "%s, %s" % (psm,ds),
+                            mode = mode,
+                            show_submit = passport_uploaded,
+                            ds = ds,
+                            )
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/apply_pume_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/apply_pume_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/apply_pume_form.pt	(revision 2226)
@@ -0,0 +1,69 @@
+<tal:block define="rendered_main options/rendered;
+           portal_status_message options/psm;
+           ds options/ds;
+           jamb options/jamb/getContent|nothing;
+           mode options/mode;
+           show_submit options/show_submit|nothing;
+           "
+           >
+  <metal:block define-macro="edit_form">
+    <metal:block use-macro="here/main_template/macros/master">
+      <metal:block fill-slot="main">
+        <h3 tal:condition="python:not mode=='view'">Apply for Post UME Screening (2007/2008)! </h3>
+        <h3 tal:condition="python:mode=='view'">Your PUME Application Record</h3>
+        <br />
+        <form action="" id="editForm" method="post" 
+              enctype="multipart/form-data" class="workflow"
+              tal:attributes="action string:${context/absolute_url}/apply_pume"
+              >
+          <input type="hidden" name="reg_no"
+                 tal:attributes="value ds/reg_no|nothing"
+                 tal:condition="ds/reg_no|nothing"/>
+          <input type="hidden" name="pin"
+                 tal:attributes="value ds/pin|nothing"
+                 tal:condition="ds/pin|nothing"/>
+
+          <div tal:replace="structure rendered_main" />
+          
+          <metal:block tal:condition="python: show_submit and mode == 'edit'">
+            <br/>
+            <input type="checkbox" class="standalone" 
+                   name="confirm"
+                   value="" 
+                   />
+              I confirm that the Passport Photograph uploaded on this form is a true picture of me.
+            <br/><br/>
+          </metal:block>
+
+          
+          <input type="submit" class="standalone" 
+                 name="edit"
+                 value="Save" 
+                 tal:condition="python: mode == 'edit'" />
+          <input type="submit" class="standalone" name="apply"
+                 value="Final Submit"
+                 tal:condition="python: show_submit and mode == 'edit'"
+                 />
+          <input type="submit" 
+                 class="standalone" 
+                 name="create"
+                 value="Show Application Record"
+                 tal:condition="python: mode == 'create'" 
+                 />
+          </form>
+          <metal:block tal:condition="python: mode in ('create','edit')">
+          <p>Instructions :</p>
+          <ul>
+            <li>Enter your JAMB Registration Number and the Application PIN.</li> 
+            <li>Fill the form and upload your Passport Photograph with red background in jpg format.</li> 
+            <li>Save and preview picture.
+            <li>Press the 'Final Submit' button.</li>
+          </ul>
+          <br />
+          <font color="red">Application submission deadline is at Midnight on Thursday, 6th September 2007.  
+          No application will be treated after the deadline. </font>
+          </metal:block>
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/apply_pume_manage.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/apply_pume_manage.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/apply_pume_manage.py	(revision 2226)
@@ -0,0 +1,134 @@
+## Script (Python) "apply_pume_manage"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST
+##title=
+##
+# $Id$
+"""
+search for  Pume Applications
+"""
+
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+import DateTime
+import logging
+logger = logging.getLogger('Skins.apply_pume_manage')
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+
+current = DateTime.DateTime()
+pr = context.portal_registration
+request = REQUEST
+
+
+if not context.isSectionOfficer():
+    return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.absolete_url())
+
+#type_name = 'StudentApplication'
+#ti = context.portal_types[type_name]
+#REQUEST.set('type_name',type_name)
+
+search = "search" in request.keys()
+reset = "reset" in request.keys()
+edit = "edit" in request.keys()
+lt = context.portal_layouts
+
+reg_no = request.get('reg_no','').upper()
+new_reg_no = request.get('new_reg_no','').upper()
+
+if reset or edit:
+    reg_no = reg_no
+elif new_reg_no:
+    reg_no = new_reg_no
+
+res = ''
+psm = ''
+object = {}
+ds = []
+found = False
+
+validate = not search
+
+if reg_no:
+    brains = context.applicants_catalog(reg_no = reg_no)
+
+    if len(brains) == 1:
+        found = True
+        for field in context.applicants_catalog.schema():
+            object[field] = getattr(brains[0],field,None)
+        res,psm,ds = lt.renderLayout(layout_id= 'application_manage',
+                                     schema_id= 'application',
+                                     layout_mode = "edit",
+                                     context=context,
+                                     mapping=validate and REQUEST,
+                                     ob=object,
+                                     commit = False,
+                                    )
+
+
+
+if psm == 'invalid':
+    return context.apply_pume_manage_form(rendered = res,
+                                   psm = "Please correct your input!",
+                                   #psm = "%s, %s" % (psm,ds),
+                                   ds = ds,
+                                  )
+elif psm == '':
+    if search and not found:
+        psm = 'Registration Number not found!'
+    return context.apply_pume_manage_form(rendered = res,
+                                   psm = psm,
+                                   ds = ds,
+                                  )
+elif psm == 'valid':
+    psm = ''
+    pass
+
+data = {}
+dm = ds.getDataModel()
+for field in context.applicants_catalog.schema():
+    if dm.has_key("%s" % field):
+        data[field] = dm.get(field)
+
+
+if reset and reg_no:
+    #data['reg_no'] = reg_no
+    psm = "You successfully reset the record! The applicant will be able to edit and resubmit the data."
+    data['status'] = "reset"
+    context.applicants_catalog.modifyRecord(**data)
+    logger.info('%s reset application record of %s' % (member,reg_no))
+
+if edit and reg_no:
+    #data['reg_no'] = reg_no
+    psm = "Content changed!"
+    context.applicants_catalog.modifyRecord(**data)
+    logger.info('%s edited application record of %s' % (member,reg_no))
+
+
+for field in context.applicants_catalog.schema():
+    object[field] = getattr(brains[0],field,None)
+
+res,psm_dummy,ds = lt.renderLayout(layout_id= 'application_manage',
+                             schema_id= 'application',
+                             layout_mode = "edit",
+                             context=context,
+                             ob=object,
+                             commit = False,
+                            )
+    
+
+return context.apply_pume_manage_form(rendered = res,
+                                      psm = psm,
+                                      reg_no = reg_no,
+                                      ds = ds
+                                     )
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/apply_pume_manage_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/apply_pume_manage_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/apply_pume_manage_form.pt	(revision 2226)
@@ -0,0 +1,102 @@
+<tal:block define="rendered_main options/rendered|nothing;
+           portal_status_message options/psm|nothing;
+           reg_no options/reg_no|nothing;
+           ds options/ds|nothing;
+           "
+           >	
+  <metal:block define-macro="edit_form">
+    <metal:block use-macro="here/main_template/macros/master">
+      <metal:block fill-slot="main">
+
+        <form action="" id="editForm" method="post" 
+              enctype="multipart/form-data" class="workflow"
+              tal:attributes="action string:${context/absolute_url}/apply_pume_manage"
+              >
+
+          <span tal:condition="not: rendered_main">
+            <h3>Application Process</h3>
+            <br />
+            
+            <table tal:define="info_applicants context/getApplicantsStatistics">
+            <tr> 
+              <td>Number of records viewed:</td> 
+              <td><span tal:replace="info_applicants/pin_entered" /></td>  
+            </tr>
+            <tr> 
+              <td>Number of records submitted:</td> 
+              <td><span tal:replace="info_applicants/submitted" /></td>
+            </tr>
+            </table>            
+            
+            <br/>
+            
+            <div class="label">Registration No:</div>
+            <input type="text" name="reg_no" size="15"
+                   />
+            <input type="submit" class="standalone" 
+                   name="search"
+                   value="Search" 
+                   />
+          </span>
+
+          <span tal:condition="rendered_main">
+            <h3>PUME Application Record <span tal:replace="reg_no"/></h3>
+            <br />
+            <div tal:replace="structure rendered_main" />
+                        
+            <input type="hidden" name="reg_no"
+                   tal:attributes="value reg_no|nothing"
+                   />
+            <input type="submit" class="standalone" 
+                   name="reset"
+                   value="Reset" 
+                   tal:condition="python: 'submitted' in ds['status']"
+                   />
+                   
+                   
+                   
+                   
+                   
+            <input type="submit" class="standalone" 
+                   name="edit"
+                   value="Save" 
+                   />                   
+                   
+                   
+                   
+                   
+                   
+            <br /><br />
+            
+
+            <div class="label">Registration No:</div>
+            <input type="text" name="new_reg_no" size="15"
+                   /> &nbsp;
+            <input type="submit" class="standalone" 
+                   name="search"
+                   value="Search next" 
+                   />
+          </span>
+        </form>
+        
+        <br/>
+        
+        <form action="" id="editForm" method="post" 
+            enctype="multipart/form-data" class="workflow"
+            tal:attributes="action string:${context/absolute_url}/apply_pume"
+            tal:condition="rendered_main"
+            >
+        <input type="hidden" name="reg_no"
+               tal:attributes="value ds/reg_no|nothing"
+               tal:condition="ds/reg_no|nothing"/>
+        <input type="submit" 
+               class="standalone" 
+               name="manage"
+               value="Assume Applicant's Role"
+               />             
+        </form>          
+        
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/apply_pume_slip.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/apply_pume_slip.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/apply_pume_slip.pt	(revision 2226)
@@ -0,0 +1,23 @@
+<tal:block define="rendered_main options/rendered;
+           portal_status_message options/psm;
+           ds options/ds;
+           jamb options/jamb/getContent|nothing;
+           mode options/mode;
+           name python:ds['lastname'];
+           "
+           >
+  <metal:block define-macro="edit_form">
+    <metal:block use-macro="here/slip_template/macros/master">
+      <metal:block fill-slot="main">
+        <h3>Post UME Screening (2007/2008) Aknowledgement Slip</h3>
+        <br />
+        <div tal:replace="structure rendered_main" />
+        
+        The applicant has confirmed that the picture shown on this slip is a true picture of him/her. 
+        <br/><br/>
+        Please check for your screening venue at any of the UNIBEN entry gates or
+        at the Sports Complex and come to the screening venue with a copy of this slip.  
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/change_password.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/change_password.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/change_password.py	(revision 2226)
@@ -0,0 +1,89 @@
+##parameters=
+# $Id$
+"""
+
+"""
+
+return
+
+
+
+
+
+
+
+
+request = context.REQUEST
+import DateTime,logging
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+current = DateTime.DateTime()
+#pr = context.portal_registration
+logger = logging.getLogger('Skins.change_password')
+validate = request.has_key("change_password")
+students_dir = context.portal_directories.students
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+lt = context.portal_layouts
+wt = context.waeup_tool
+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))
+    return None
+elif context.isStaff():
+    student_id = requested_id
+else:
+    student_id = member_id
+res,psm,ds = lt.renderLayout(layout_id= 'student_change_password',
+                      schema_id= 'student_change_password',
+                      context=context,
+                      mapping=validate and request,
+                      ob = {},
+                      layout_mode='edit',
+                      button = "Change Password",
+                      commit = False,
+                      )
+if psm == '':
+    return context.change_password_form(rendered = res,
+                                 psm = None,
+                                 ds = ds,
+                                 mode = "edit",
+                                 formaction = "change_password",
+                                 button = "Change Password",
+                                 )
+elif psm == 'invalid':
+    psm = "Please correct your input!"
+    return context.change_password_form(rendered = res,
+                                 psm = psm,
+                                 ds = ds,
+                                 mode = "edit",
+                                 formaction = "change_password",
+                                 button = "Change Password",
+                                 )
+else:
+    pass
+old_password = request.get('widget__old_password')
+if not wt.checkPassword(student_id,old_password):
+    psm = "Old Password is not correct"
+    return context.change_password_form(rendered = res,
+                             psm = psm,
+                             ds = ds,
+                             mode = "edit",
+                             formaction = "change_password",
+                             button = "Change Password",
+                             )
+#set_trace()
+password = request.get('widget__password')
+wt.editPassword(student_id,password)
+args = {}
+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))
+return request.RESPONSE.redirect(url)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/change_password_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/change_password_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/change_password_form.pt	(revision 2226)
@@ -0,0 +1,33 @@
+<tal:block define="rendered_main options/rendered;
+           portal_status_message options/psm;
+           data_storage options/ds;
+           mode options/mode;
+           formaction options/formaction;
+           matric_no options/matric_no|nothing;
+           name options/name|nothing;
+           creation creation|nothing;"
+           >
+  <metal:block define-macro="edit_form">
+    <metal:block use-macro="here/main_template/macros/master">
+      <metal:block fill-slot="header">
+      </metal:block>
+      <metal:block fill-slot="main">
+      <h3>Change Your Password!</h3>
+      <br />      
+        <form action="" id="editForm" method="post" 
+              enctype="multipart/form-data" class="workflow"
+              tal:attributes="action options/formaction"
+              >
+          <div tal:replace="structure rendered_main" />
+          <br />
+          <input type="submit" class="standalone" 
+                 name="change_password"
+                 tal:attributes="value options/button"
+                 tal:condition="not:creation" />
+        </form>
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/check_admission.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/check_admission.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/check_admission.py	(revision 2226)
@@ -0,0 +1,83 @@
+##parameters=REQUEST
+# $Id$
+"""
+request Clearance
+"""
+import DateTime
+from urllib import urlencode
+current = DateTime.DateTime()
+pr = context.portal_registration
+type_name = 'StudentApplication'
+ti = context.portal_types[type_name]
+REQUEST.set('type_name',type_name)
+redirect = REQUEST.RESPONSE.redirect
+wf = context.portal_workflow
+validate = REQUEST.has_key("cpsdocument_create_button")
+
+mtool = context.portal_membership
+is_anon = mtool.isAnonymousUser()
+member = mtool.getAuthenticatedMember()
+
+lt = context.portal_layouts
+pr = context.portal_registration
+
+res,psm,ds = lt.renderLayout('student_application_fe',
+                             'student_application',
+                             context,
+                             mapping=validate and REQUEST,
+                             layout_mode='create',
+                             ob={},
+                             commit=False,
+                             formaction = "check_admission",
+                             button = "Check",
+                             )
+if psm == 'invalid':
+    return context.check_admission_pin_form(rendered = res,
+                                 psm = "Please correct your input!",
+                                 #psm = "%s, %s" % (psm,ds),
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.check_admission_pin_form(rendered = res,
+                                 psm = None,
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    s_id = ds.get('s_id')
+    if is_anon and not s_id:
+        return context.check_admission_pin_form(rendered = res,
+                                 psm = "You are not allowed to call this form in this context. Please try to log in.",
+                                 #psm = "%s, %s" % (psm,ds),
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+    elif not is_anon:
+        return context.check_admission_pin_form(rendered = res,
+                                 psm = "You are already logged in!",
+                                 #psm = "%s, %s" % (psm,ds),
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+##
+##    email = ds.get('app_email')
+    student = getattr(context.campus.students, s_id)
+    review_state = wf.getInfoFor(student,'review_state',None)
+    if review_state == "admission_rejected":
+        url = "%s/campus/students/%s/pume/admission_rejected_view" % (context.portal_url(),s_id)
+        return redirect(url)
+    pw = str(ds.get('app_ac_pin_n'))
+    args = {}
+    args['__ac_name'] = s_id
+    #args['__ac_password'] = pin.split('-')[2]
+    args['__ac_password'] = pw
+    args['pin'] = str(ds.get('app_ac_pin_p')) + '-' + str(ds.get('app_ac_pin_b')) + '-' + str(ds.get('app_ac_pin_n'))
+##    args['email'] = email
+    url = "%s/logged_in?%s" % (context.absolute_url(),urlencode(args))
+    return redirect(url)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/check_admission_pin_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/check_admission_pin_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/check_admission_pin_form.pt	(revision 2226)
@@ -0,0 +1,31 @@
+<tal:block define="rendered_main options/rendered;
+                   portal_status_message options/psm;
+                   data_storage options/ds;
+                   jamb options/jamb/getContent|nothing;
+                   edition python:1;"
+                   >
+<metal:block define-macro="edit_form">
+  <metal:block use-macro="here/main_template/macros/master">
+  <metal:block fill-slot="header"
+    tal:define="creation creation|nothing;
+                edition edition|nothing;
+                metadata metadata|nothing"
+                >
+    </metal:block>
+      <metal:block fill-slot="main">
+        <h3>Check Your Admission Status! </h3>
+        <br />
+        <div tal:replace="structure rendered_main" />
+          <p>Instructions :</p>
+          <ul>
+            <li>Buy an Application Scratch Card.</li> 
+            <li>Enter your Registration Number and the Admission PIN.</li> 
+            <li>If you already checked admission, you can use this form to retrieve your Student Id but not 
+                to log in. <strong><font color="red">You must proceed to "Student Login".</font></strong></li> 
+          </ul>
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/clearance_edit.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/clearance_edit.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/clearance_edit.py	(revision 2226)
@@ -0,0 +1,155 @@
+## Script (Python) "clearance_edit"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST, acknowledge=None
+##title=
+# $Id$
+"""
+"""
+wftool = context.portal_workflow
+from urllib import urlencode
+from Products.CPSDocument.utils import getFormUidUrlArg
+import DateTime
+current = DateTime.DateTime()
+import logging
+logger = logging.getLogger('Skins.clearance_edit')
+request = REQUEST
+
+cpsdocument_edit_button = REQUEST.has_key('cpsdocument_edit_button')
+cpsdocument_edit_and_view_button = REQUEST.has_key('cpsdocument_edit_and_view_button')
+clear_and_validate_button = REQUEST.has_key('clear_and_validate_button')
+reject_clearance_button = REQUEST.has_key('reject_clearance_button')
+result_edit_button = REQUEST.has_key('result_edit_button')
+
+# Until ajax posts directly to its own script...
+##if 'ajax_edit' in REQUEST.form:
+##    return context.cpsdocument_edit_ajax(REQUEST, cluster=cluster)
+
+# Validate the document and write it if it's valid
+# (We don't call getEditableContent here, validate does it when needed.)
+wftool = context.portal_workflow
+info = context.getClearanceInfo()
+
+#'Sorry, you are not allowed to access this page!'
+if info == None:
+  return REQUEST.RESPONSE.redirect(context.standard_error_message())
+student = info['student']
+#app = info['app']
+#app_doc = info['app_doc']
+clear = info['clear']
+clear_doc = info['clear_doc']
+student_id = info['id']
+member_id = str(context.portal_membership.getAuthenticatedMember())
+result_widgets = ('fst_sit_results',
+                  'scd_sit_results',
+                  'alr_results',
+                  )
+required_scans = ('fst_sit_scan',
+#                 'jamb_slip',
+                  'ref_let',
+                  'acc_let'
+                 )
+form = request.form
+psm = ""
+args = {}
+action = "/external_clearance_edit_form"
+clearance_closed = False
+
+if context.isStudent():
+    action = "/clearance_edit_form"
+    if info['clear_review_state'] == 'closed':
+        clearance_closed = True
+
+if not clearance_closed:
+    is_valid, ds = clear_doc.validate(request=REQUEST,
+                                schema_id = 'student_clearance',
+                                layout_id = 'student_clearance',
+                                proxy=clear,
+                                use_session=True)
+if clear_and_validate_button and info['review_state'] == "clearance_requested":
+    logger.info('%s cleared %s' % (member_id,student_id ))
+    #from Products.zdb import set_trace
+    #set_trace()
+    info['clear_doc'].edit(mapping = {'cleared_date': current,})
+    wftool.doActionFor(info['student'],'clear_and_validate')
+    psm = "Clearance and eligibility record is validated and student is cleared!"
+elif clear_and_validate_button and info['review_state'] == "cleared_and_validated":
+    psm = "This student is already cleared!"
+elif reject_clearance_button:
+    logger.info('%s rejected clearance for %s' % (member_id,student_id ))
+    wftool.doActionFor(info['clear'],'open')
+    wftool.doActionFor(info['student'],'reject_clearance')
+    action = "/external_contact_student_form"
+    psm = "Student's clearance request has been rejected! Please fill and submit the form below!"
+    subject = "Clearance request rejected"
+    args['subject'] = subject
+    args['continue'] = 'external_clearance_edit_form'
+elif clearance_closed:
+    action = "/clearance_view"
+    logger.info('%s tried to edit closed clearance object of %s' % (member_id,student_id ))
+elif is_valid:
+    if cpsdocument_edit_button or result_edit_button:
+        psm = "Content changed!"
+        logger.info('%s edited clearance object of %s' % (member_id,student_id ))
+
+        ## No idea why the following lines were still active until July 6.
+        ## The code does not make any sense. When editing the clearance object 
+        ## as admin, always the PIN HOS-1-4921190317
+        ## was filled in. This was the only PIN ever used by admin.
+        
+        #if clear_doc.clr_ac_pin == "":
+        #    res = context.portal_pins(student=member_id)
+        #    if res:
+        #        p = res[0].pin
+        #        if len(p) > 10:
+        #            pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:])
+        #        else:
+        #            pin = p
+        #        clear_doc.edit(mapping={'clr_ac_pin': pin})
+
+        ## simple method to remove the wrong PIN
+        
+        #if clear_doc.clr_ac_pin.startswith('HOS'):
+        #    pin=''
+        #    clear_doc.edit(mapping={'clr_ac_pin': pin})
+
+
+    elif cpsdocument_edit_and_view_button:
+        if acknowledge and info['review_state'] == "clearance_pin_entered":
+            missing = False
+            files = clear_doc.objectIds()
+            for scan in required_scans:
+                if scan not in files:
+                    missing = True
+                    break
+            if not missing:
+                if not "age_dec" in files and not "birth_certificate" in files:
+                    missing = True
+            if missing:
+                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))
+                info['clear_doc'].edit(mapping = {'request_date': current,})
+                wftool.doActionFor(info['clear'],'close')
+                wftool.doActionFor(info['student'],'request_clearance',dest_container=1)
+                psm = "You successfully requested clearance!"
+                if context.isStudent():
+                    action = "/clearance_view"
+        elif acknowledge and info['review_state'] != "clearance_pin_entered":
+            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!"
+else:
+    psm = "Please correct your errors!"
+    args = getFormUidUrlArg(REQUEST)
+    logger.info('%s got error when editing the clearance object of %s' % (member_id,student_id))
+
+args['portal_status_message'] = psm
+url = clear.absolute_url() + action + '?' + urlencode(args)
+return REQUEST.RESPONSE.redirect(url)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/clearance_edit_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/clearance_edit_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/clearance_edit_form.pt	(revision 2226)
@@ -0,0 +1,80 @@
+<metal:definetemplate tal:define="template here/main_template/macros/master">
+<metal:definemacro define-macro="clearance_edit_form">
+<metal:usemacro use-macro=template>
+
+  <metal:main fill-slot="main"
+           tal:define="
+               info context/getClearanceInfo;">
+               
+      <metal:block tal:condition="not: info">
+        <span tal:content="here/illegal_view" />
+      </metal:block>
+      <metal:block tal:condition="info">
+      <metal:block tal:define="               
+               is_so context/isSectionOfficer;
+               is_staff context/isStaff;
+               is_co context/isClearanceOfficer;
+               is_student context/isStudent;
+               review_state info/review_state;
+               clear_review_state info/clear_review_state;
+               editable python:not is_co and (is_student and clear_review_state == 'opened' or is_so);
+               mode python: test(editable,'edit','view');
+               layout_id python: test(is_so,'student_clearance','student_clearance_fe');
+               rendered_main python:info['clear_doc'].render(request=request,
+                                                   layout_mode = mode,
+                                                   schema_id='student_clearance',
+                                                   layout_id=layout_id,
+                                                   use_session=True);
+               form_action string:clearance_edit;
+               creation python:False;">
+
+    <!--  Administration -->
+    <tal:block condition="python: not(is_staff or is_so or is_student)">
+      <metal:block use-macro="here/error_not_found/macros/not_found" />
+    </tal:block>
+    <tal:block condition="is_staff">
+      <h3> 
+        <span tal:condition="info">
+          <span tal:content="info/student/Title" />:
+        </span>
+        <span tal:content="here/title_or_id" />
+      </h3>
+      <br />    
+    </tal:block>
+    <!-- Student -->
+    <tal:block condition="python: is_student">
+      <a href=""
+         tal:attributes="href string:${here/academicsParent}">
+        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+        Up one level
+      </a>
+      <h3>Fill Your Clearance/Eligibility Form!</h3>
+      <br />    
+    </tal:block>
+
+               
+    <form action="ACTION" method="post" id="editForm"
+          enctype="multipart/form-data" class="workflow"
+          tal:attributes="action form_action">
+      <div class="group">
+        <div class="documentFields">
+          <tal:block define="getFormUidHtml nocall:modules/Products.CPSDocument.utils/getFormUidHtml"
+                     replace="structure python:getFormUidHtml(request)"/>
+          <input type="hidden" id="button_placeholder" name="button_placeholder" value="" />
+          <div id="rendered_main" tal:content="structure rendered_main">
+            CONTENT
+          </div>
+        </div>
+      </div>
+      <metal:block use-macro="here/clearance_edit_lib/macros/buttons" />
+      </form>
+      <div id="ajax_psm" style="display:none">
+        ajax feedback
+      </div>
+    </metal:block>
+    </metal:block>          
+  </metal:main>
+
+</metal:usemacro> 
+</metal:definemacro>
+</metal:definetemplate>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/clearance_edit_lib.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/clearance_edit_lib.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/clearance_edit_lib.pt	(revision 2226)
@@ -0,0 +1,77 @@
+<!--  clearance_edit_lib -->
+<!-- $Id$ -->
+
+<!--  buttons -->
+<metal:block define-macro="buttons">
+  <tal:block condition="is_so"> 
+  <!-- SectionOfficer -->
+    <div tal:condition="python:info['review_state'] == 'clearance_pin_entered'">
+      <input type="checkbox" value="True" name="acknowledge" />     &nbsp;&nbsp;  
+      I hereby acknowledge by ticking this check box 
+      that, if it is discovered at any time that I do not possess any of the 
+      qualifications which I claim to have obtained, I will be expelled from the 
+      University and shall not be re-admitted for the same or any other programme, 
+      even if I have upgraded my previous qualifications or possess additional 
+      qualifications.    
+    </div>
+    <br />
+    <input type="submit" class="standalone" 
+           name="cpsdocument_edit_button"
+           value="Save & Return Later" 
+           id="cpsdocument_edit_button" />
+    <input type="submit" class="standalone"
+           name="cpsdocument_edit_and_view_button"
+           value="Save & Submit" 
+           id="cpsdocument_edit_and_view_button"
+           tal:condition="python: review_state == 'clearance_pin_entered'" />
+    <input type="submit" class="standalone" 
+           name="clear_and_validate_button"
+           value="Validate & Clear" 
+           id="clear_and_validate_button"
+           tal:condition="python:review_state == 'clearance_requested'" />
+    <input type="submit" class="standalone"
+           name="reject_clearance_button"
+           value="Reject Clearance" 
+           id="reject_clearance_button"
+           tal:condition="python:review_state in ('cleared_and_validated','clearance_requested',)" />
+  </tal:block>
+  <tal:block condition="is_co"> 
+  <!--  ClearanceOfficer -->
+    <input type="submit" class="standalone" 
+           name="clear_and_validate_button"
+           value="Validate & Clear" 
+           id="clear_and_validate_button"
+           tal:condition="python:review_state == 'clearance_requested'" />
+    <input type="submit" class="standalone"
+           name="reject_clearance_button"
+           value="Reject Clearance" 
+           id="reject_clearance_button"
+           tal:condition="python:review_state in ('cleared_and_validated','clearance_requested',)" />
+  </tal:block>
+  <tal:block condition="is_student"> 
+  <!--  Student -->
+     <div tal:condition="python:info['review_state'] == 'clearance_pin_entered'">
+      <input type="checkbox" value="True" name="acknowledge" />     &nbsp;&nbsp;  
+      I hereby acknowledge by ticking this check box 
+      that, if it is discovered at any time that I do not possess any of the 
+      qualifications which I claim to have obtained, I will be expelled from the 
+      University and shall not be re-admitted for the same or any other programme, 
+      even if I have upgraded my previous qualifications or possess additional 
+      qualifications.    
+    </div>
+    <br />
+    <input type="submit" class="standalone" 
+           name="cpsdocument_edit_button"
+           value="Save & Return Later" 
+           id="cpsdocument_edit_button"
+           tal:condition="python: review_state == 'clearance_pin_entered'" />
+    <input type="submit" class="standalone"
+           name="cpsdocument_edit_and_view_button"
+           value="Save & Submit" 
+           id="cpsdocument_edit_and_view_button"
+           tal:condition="python: review_state == 'clearance_pin_entered'" 
+           tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                       (cpsmcat('Are you sure? You will not be able to edit your data after submission.'), )"
+           />
+  </tal:block>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/clearance_pin_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/clearance_pin_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/clearance_pin_form.pt	(revision 2226)
@@ -0,0 +1,31 @@
+<tal:block define="rendered_main options/rendered;
+                   portal_status_message options/psm;
+                   data_storage options/ds;
+                   info options/info|nothing;
+                   edition python:1;"
+                   >
+<metal:block define-macro="edit_form">
+  <metal:block use-macro="here/main_template/macros/master">
+  <metal:block fill-slot="header"
+    tal:define="creation creation|nothing;
+                edition edition|nothing;
+                metadata metadata|nothing"
+                >
+    </metal:block>
+      <metal:block fill-slot="main">
+        <h3>Start Clearance! </h3>
+        <br />
+        <div tal:replace="structure rendered_main" />
+
+        <br />
+        <font color="red"><strong tal:condition="info/penalty">
+          You are required to pay and obtain a receipt, the sum of Three Thousand Naira Only (N3,000.00)
+          as penalty for late clearance as your clearance ended on 22nd December 2006.
+        </strong></font>
+
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/clearance_slip.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/clearance_slip.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/clearance_slip.pt	(revision 2226)
@@ -0,0 +1,69 @@
+<metal:body use-macro="here/slip_template/macros/master">
+    <metal:main fill-slot="main"
+                 tal:define="info context/getClearanceInfo">
+      <span tal:condition="not: info">
+        <span tal:content="here/illegal_view" />
+      </span>
+      <span tal:omit-tag=""  tal:condition="info">
+      <div style="text-align: right" tal:condition="info/penalty"> 
+      <strong>Late Clearance!</strong></div>
+            
+        <h3>Clearance/Eligibility Slip</h3>
+        <br />
+        <span tal:omit-tag=""
+              tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'],
+              layout_mode='view_info', 
+              layout_id='student_application_fe')" 
+              />        
+              
+        <table tal:define="sc python: info['course_doc']">
+        <tr>
+          <td width="180px">Certificate:</td> 
+          <td><span tal:content="sc/title" /></td>
+        </tr>
+        <tr>
+          <td>Certificate ID:</td>
+          <td tal:content="sc/study_course" />
+        </tr>
+        <span  tal:omit-tag="" 
+               tal:define="f_id sc/faculty;
+                        d_id sc/department;
+                        f_title context/academics/?f_id/Title|string:Faculty not yet in Prospectus;
+                        d_title context/academics/?f_id/?d_id/Title|string:Department not yet in Prospectus"
+                        >
+            <tr>
+              <td>Faculty:</td>
+              <td tal:content="f_title" />
+            </tr>
+            <tr>
+              <td>Department:</td> 
+              <td><span tal:content="d_title" /></td>
+            </tr>
+          </span>
+        </table>                 
+              
+        <span tal:omit-tag=""
+              tal:content="structure python: info['clear_doc'].render(proxy=info['clear_doc'],
+              layout_mode='view', 
+              layout_id='student_clearance_fe')" 
+              />
+        <span tal:condition="not:context/isStudent">   
+              <br /><br />
+              <table  width=100%>
+              <tr >
+              <td width=50%>Date:</td><td>Date:</td>
+              </tr>
+              </table>
+              
+              <br /><br /><br /><br />
+              <table  width=100%>
+              <tr >
+              <td width=50% style="border-top-style:solid; border-top-width:1px; border-top-color:black"> Student</td>
+              <td width=50% style="border-top-style:solid; border-top-width:1px; border-top-color:black">Clearance Officer</td>
+              </tr>
+              </table>
+         </span>              
+              
+      </span>
+    </metal:main>
+</metal:body>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/clearance_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/clearance_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/clearance_view.pt	(revision 2226)
@@ -0,0 +1,45 @@
+<metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main"
+                tal:define="info context/getClearanceInfo;
+                        is_so context/isSectionOfficer;
+                        is_student context/isStudent;
+                        ">
+      <span tal:condition="not: info">
+        <span tal:content="here/illegal_view" />
+      </span>
+      <span tal:condition="info">
+            
+        <div style="text-align: right"
+             tal:condition="python:info['review_state'] in ('cleared_and_validated','school_fee_paid','courses_registered','courses_validated')">
+        <a href="" target="slip" tal:attributes="href string:clearance_slip"
+            onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+            Clearance/Eligibility Slip
+        </a>
+        </div>
+
+        <a href=""
+           tal:attributes="href string:${here/academicsParent}">
+          <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+          Up one level
+        </a>        
+        
+        <h3> 
+           <span tal:condition="python:is_so and info">
+             <span tal:content="info/student/Title" />:
+           </span>
+           <span tal:condition="python:is_student">
+             My
+           </span>
+           <span tal:content="here/title_or_id" />
+        </h3>        
+
+        <br />
+        <span tal:omit-tag=""
+              tal:content="structure python: info['clear_doc'].render(proxy=info['clear_doc'],
+              layout_mode='view', 
+              layout_id='student_clearance_fe')" 
+              />
+      </span>
+    </metal:main>
+</metal:body>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/contact_student_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/contact_student_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/contact_student_form.pt	(revision 2226)
@@ -0,0 +1,83 @@
+<metal:definetemplate tal:define="template here/main_template/macros/master">
+<metal:block define-macro="contact_student_form">
+<metal:body use-macro=template>
+    <metal:main fill-slot="main"
+                tal:define="member python:context.portal_membership.getAuthenticatedMember();
+                        info context/getStudentBaseInfo;
+                        subject python:context.REQUEST.get('subject');
+                        continue python:context.REQUEST.get('continue')
+                        ">
+      <span tal:condition="not: info">
+        <span tal:content="here/illegal_view" />
+      </span>                        
+    
+      <span tal:condition="python: info and subject">
+      <h3>Contact Student</h3>
+      <br />
+      <span tal:condition="not:info/student/email"> 
+      Sorry, the student did not provide an email address.
+      </span>
+      <span tal:condition="info/student/email">
+      <form id="form1" name="form1" method="post" action="mail2student">
+
+      <input type="hidden" name="co_name" type="text" id="co_name"
+             tal:attributes="value python:member.getProperty('fullname',None)"/>
+      <input type="hidden" name="co_email" type="text" id="co_email"
+             tal:attributes="value python:member.getProperty('email',None)"/>             
+      <input type="hidden" name="student_email" type="text" id="student_email"
+             tal:attributes="value info/student/email"/>                   
+      <input type="hidden" name="probtype" type="text" id="probtype"
+             tal:attributes="value subject"/>     
+      <input type="hidden" name="action" type="text" id="action"
+             tal:attributes="value continue"/>  
+             
+      <table width="100%" border="0" cellspacing="5" cellpadding="0">
+        <tr>
+          <td width="150px">
+             <strong>Student's Name: </strong>
+          </td>
+          <td>
+             <span tal:content="info/student/name" />
+          </td>
+        </tr>
+        <tr>
+          <td>
+             <strong>Student's Email: </strong>
+          </td>
+          <td>
+             <span tal:content="info/student/email" />
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+             <strong>Reason of Notification: </strong>
+          </td>
+          <td valign="bottom">
+             <span tal:content="subject" />
+          </td>
+        </tr>        
+        <tr>
+          <td valign="top">
+             <strong>Your Message:</strong>
+          </td>
+          <td>
+             <textarea name="commt" rows="10" cols="60" id="commt"></textarea>
+          </td>
+        </tr>
+        <tr>
+          <td>&nbsp;</td>
+          <td><input name="Submit" type="submit" class="standalone" value="Submit" /><br /><br /></td>
+        </tr>
+      </table>
+      </form>
+      </span>
+      <form action="." method="post" class="group">
+            <input type="submit" name="."
+                       tal:attributes="name string:${continue}:method"
+                       class="context" value="Continue" />
+      </form>      
+      </span>
+    </metal:main>
+</metal:body>
+</metal:block>
+</metal:definetemplate>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/course_edit.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/course_edit.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/course_edit.py	(revision 2226)
@@ -0,0 +1,73 @@
+## Script (Python) "course_edit"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST, cpsdocument_edit_button=None, cpsdocument_edit_and_view_button=None, action=None
+##title=
+# $Id: course_edit.py 1071 2006-12-16 15:53:13Z joachim $
+"""
+"""
+wf = context.portal_workflow
+from urllib import urlencode
+from Products.CPSDocument.utils import getFormUidUrlArg
+import DateTime
+current = DateTime.DateTime()
+import logging
+logger = logging.getLogger('Skins.course_edit')
+
+info = context.getCourseResultInfo()
+
+if info is None:
+    logger.info('Anonymous user tried to access %s' % REQUEST.get('URL0'))
+    return REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+student = info['student']
+#per = info['per']
+course_doc = info['course_doc']
+state = info['review_state']
+result_state = wf.getInfoFor(context,'review_state',None)
+if result_state == "closed":
+    try:
+        context.portal_workflow.doActionFor(context,'open')
+    except:
+        pass
+
+is_valid, ds = course_doc.validate(request=REQUEST,
+                                schema_id = 'student_course_result',
+                                layout_id = 'student_course_result_fe',
+                                proxy=context,
+                                use_session=True)
+
+psm = ""
+args = {}
+action = "/course_edit_form"
+base_url = context.absolute_url()
+
+if is_valid:
+    if cpsdocument_edit_button:
+        #name = "%(firstname)s %(middlename)s %(lastname)s" % ds
+        #name = name.strip()
+        #name = name.replace('  ',' ')
+        #email = ds.get('email')
+        #phone = ds.get('phone')
+        #student_id = context.getStudentId()
+        #context.students_catalog.modifyRecord(id = student_id,
+        #                                      name = name,
+        #                                      email = email,
+        #                                      phone = phone,
+        #                                      sex = ds.get('sex'),
+        #                                     )
+        logger.info('%s (%s) edited course result data %s' % (info['id'],info['review_state'],context.id))
+        #action = ""
+        #base_url = student.absolute_url()
+        #url = base_url + action
+        psm = 'psm_content_changed'
+else:
+    psm = 'psm_content_error'
+    args = getFormUidUrlArg(REQUEST)
+
+args['portal_status_message'] = psm
+url = base_url + action + '?' + urlencode(args)
+REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/course_edit_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/course_edit_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/course_edit_form.pt	(revision 2226)
@@ -0,0 +1,41 @@
+<metal:body use-macro="here/slip_template/macros/master">
+
+    <metal:main fill-slot="main"
+                  tal:define="info context/getCourseResultInfo;">
+      <metal:block tal:condition="not: info">
+        <span tal:content="here/illegal_view" />
+      </metal:block>
+      <metal:block tal:condition="info">
+      <metal:block tal:define="rendered_main python:info['course_doc'].render(
+                              layout_mode='edit',
+                              schema_id = 'student_course_result',
+                              layout_id = 'student_course_result_fe',
+                              request=request, 
+                              use_session=True,);
+           form_action string:course_edit;
+           edition python:True;
+           metadata nothing;
+            ">
+    <h3>Update Your Course <span tal:content='here/id' /> </h3>
+    <br />            
+            
+    <form action="ACTION" method="post" id="editForm"
+          enctype="multipart/form-data" class="workflow"
+          tal:attributes="action form_action">
+      <span tal:condition="not: info">
+        <metal:block use-macro="here/error_not_found/macros/not_found" />
+      </span>
+      <span tal:condition="info">
+        <span tal:omit-tag="" tal:replace="structure rendered_main"/>
+      </span>
+      <br/>
+      <input type="submit" class="standalone" 
+             name="cpsdocument_edit_button"
+             value="Save" 
+             id="cpsdocument_edit_button"/>
+    </form>
+    </metal:block>
+    </metal:block>    
+    </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/course_registration_slip.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/course_registration_slip.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/course_registration_slip.pt	(revision 2226)
@@ -0,0 +1,110 @@
+<metal:body use-macro="here/slip_template/macros/master">
+  <metal:main fill-slot="main"
+              tal:define="info context/getStudyLevelInfo;"
+              >
+    <span tal:condition="not: info">
+      <span tal:content="here/illegal_view" />
+    </span>
+    <span tal:condition="info" tal:omit-tag="">
+      <span tal:omit-tag=""
+          tal:define="is_so info/is_so;
+          is_ca info/is_ca;
+          show_check_boxes info/show_check_boxes;
+          is_student info/is_student;
+          status_info info/status_info;
+          review_state info/review_state;
+          validated python:review_state in ('courses_validated',);
+          view_only info/view_only"
+          >
+      <h3>Course Registration Slip for <span tal:content="here/title_or_id" /></h3>
+      <br />
+      <div tal:condition="validated">
+        - validated by <span tal:condition="info/doc/validated_by|nothing" tal:omit-tag="">
+          <span tal:replace="info/doc/validated_by" /> on <span tal:replace="python:info['doc'].validation_date.aCommon()" />
+        </span> -
+      </div>
+      <div tal:condition="not: validated">
+        - not yet validated by Course Adviser -
+      </div>
+      <br />
+      <span tal:omit-tag=""
+            tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'],
+            layout_mode='view_info', 
+            layout_id='student_application_fe')" 
+            />           
+      <table  cellpadding="2" cellspacing="0">
+        <tr>
+          <td valign="top" width="180px"><span class="dlabel">Faculty Id</span>:
+          </td>
+          <td> 
+            <span tal:content="info/student/faculty" />
+          </td>      
+        </tr>
+        <tr>
+          <td valign="top"><span class="dlabel">Department Id</span>:
+          </td>
+          <td> 
+            <span tal:content="info/student/department" />
+          </td>      
+        </tr>
+        <tr>
+          <td valign="top"><span class="dlabel">Study Course Id</span>:
+          </td>
+          <td> 
+            <span tal:content="info/student/course" />
+          </td>      
+        </tr>
+      </table>
+      <form action="." method="post" class="group">
+        <span tal:condition="info/carry_overs" tal:omit-tag="">
+          <h4>Carryover Courses</h4>
+          <br />
+          <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">
+            <tr tal:repeat="row info/carry_overs"
+                tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+              <td width="78%" tal:content="row/title"></td>
+              <td width="10%" tal:content="row/code"></td>
+              <td width="2%">S<span tal:content="row/semester" /></td>
+              <td width="2%" tal:content="row/credits"></td>
+              <td width="8%" tal:content="row/grade|string:"></td>
+            </tr>
+          </table>
+        </span>
+        <h4>Session Courses</h4>
+        <br />
+        <table class="contentListing" width="100%" summary="content layout" id="folder_content">      
+          <tr tal:repeat="row info/normal"
+              tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+            <td width="78%" tal:content="row/title"></td>
+            <td width="10%" tal:content="row/code"></td>
+            <td width="2%">S<span tal:content="row/semester" /></td>
+            <td width="2%" tal:content="row/credits"></td>
+            <td width="8%" tal:content="row/coe|nothing"></td>
+          </tr>
+          <tr>
+            <th colspan="2" align="right">Total Credits:</th>
+            <td></td>
+            <td width="2%" tal:content="info/credits_total"></td>
+          </tr>
+        </table>
+      </form>
+      <span tal:condition="is_ca">   
+        <br /><br />
+        <table  width=100%>
+          <tr >
+            <td width=50%>Date:</td><td>Date:</td>
+          </tr>
+        </table>
+        <br /><br /><br /><br />
+        <table  width=100%>
+          <tr >
+            <td width=50% style="border-top-style:solid; border-top-width:1px; border-top-color:black"> Student</td>
+            <td width=50% style="border-top-style:solid; border-top-width:1px; border-top-color:black">Course Adviser</td>
+          </tr>
+        </table>
+      </span>              
+    </span>              
+    </span>              
+  </metal:main>
+</metal:body>
+  
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/create_level.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/create_level.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/create_level.py	(revision 2226)
@@ -0,0 +1,149 @@
+##parameters=
+# $Id$
+"""
+process the Application Form
+return html renderer + psm
+"""
+request = context.REQUEST
+import DateTime,logging
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+from Products.AdvancedQuery import Eq, Between, Le,In
+try:
+    aq_portal = context.portal_catalog.evalAdvancedQuery
+except:
+    aq_portal = context.portal_catalog_real.evalAdvancedQuery
+aq_courses = context.courses_catalog.evalAdvancedQuery
+
+current = DateTime.DateTime()
+request = context.REQUEST
+#session = request.SESSION
+response = request.RESPONSE
+redirect = response.redirect
+logger = logging.getLogger('Skins.create_level')
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+lt = context.portal_layouts
+wt = context.waeup_tool
+student = context.students_catalog(id=context.getStudentId())[0]
+cert_id = student.course
+current_level = student.level
+current_session = student.session
+in_progress =  request.get('in_progress','not started')
+#level_created =  request.get('level_created','xxx')
+create_level =  request.get('create_level',None)
+
+##if context.hasObject(current_level) and create_level:
+##    if getattr(context,current_level).objectIds():
+##        logger.info('%s tried to add already existing level %s' % (student.id,current_level))
+##    return
+logger.info('%s started to create level %s' % (student.id,current_level))
+
+##if in_progress in ('not started','started'):
+##    session.set('in_progress','started')
+##    view = context.in_progress_view(refresh=20,page='create_level?in_progress=started')
+##    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+##    response.setHeader('Content-length','%d' % (len(view)))
+##    response.setStatus('OK')
+##    response.write(view)
+##    response.write('')
+##    if in_progress == 'started':
+##        return
+
+if context.hasObject(current_level):
+    level = getattr(context,"%s" % current_level)
+else:
+    context.invokeFactory('StudentStudyLevel',"%s" % current_level)
+    level = getattr(context,"%s" % current_level)
+    context.portal_workflow.doActionFor(level,'open')
+    #study_session = context.getSessionString()
+    level.getContent().edit(mapping={'session': current_session})
+    context.portal_workflow.doActionFor(level,'close_for_edit')
+    context.waeup_tool.doCommit()
+results = []
+if student.matric_no:
+    results = context.results_import(matric_no = student.matric_no)
+if results:
+    #carry_overs = [brain for brain in results if brain.GRADE in ('D','E','F')]
+    l = []
+    carry_overs = results
+
+    # carry_overs for probation students: yes or not, that is the question
+    #if student.verdict == "C": # on probation
+    #    carry_overs = []
+
+    for co in carry_overs:
+        cr_id = "%s_co" % co.CosCode
+        if level.hasObject(cr_id):    #already created
+            continue
+        carry_over = False
+        query = Eq('code',co.CosCode)
+        c_res = aq_courses(query)
+        if not c_res:
+            #logger.info('%s", course %s not found in courses_catalog' % (student.id,co.CosCode))
+            continue
+        course_cat_entry = c_res[0]
+        passmark = getattr(course_cat_entry,'passmark',None)
+        if not passmark:
+            carry_over = co.GRADE in ('D','E','F')
+        else:
+            try:
+                score = int(co.Score)
+            except:
+                # logger.info('%s, course %s has invalid score %s"' % (student.id,
+                #                                                     co.CosCode,
+                #                                                     co.Score))
+                continue
+            if int(c_res[0].passmark) <= score:
+                continue
+            carry_over = True
+        if not carry_over:
+            continue
+        d = context.getCourseInfo(co.CosCode)
+        d['grade'] = co.GRADE
+        d['carry_level'] = co.CarryLevel
+        cr_id = level.invokeFactory('StudentCourseResult',"%s_co" % co.CosCode)
+        course_result = getattr(level,cr_id)
+        context.portal_workflow.doActionFor(course_result,'open')
+        course_result.getContent().edit(mapping=d)
+        context.waeup_tool.doCommit()
+#level['create_course_results'](cert_id,current_level)
+res = context.portal_catalog(portal_type="Certificate", id = cert_id)
+l = []
+if res:
+    cert = res[0]
+    path = cert.getPath()
+    #set_trace()
+    query = Eq("path","%s/%s" % (path,current_level)) &\
+            Eq('portal_type','CertificateCourse')
+    courses = aq_portal(query)
+    for c in courses:
+        cr_id = "%s" % c.getId
+        if level.hasObject(cr_id):    #already created
+            continue
+        d = context.getCourseInfo(c.getId)
+        cr_id = level.invokeFactory('StudentCourseResult',c.getId)
+        course_result = getattr(level,cr_id)
+        context.portal_workflow.doActionFor(course_result,'open')
+        #d['core_or_elective'] = getattr(c.getObject().getContent(),'core_or_elective')
+        d['core_or_elective'] = True
+        course_result.getContent().edit(mapping=d)
+        context.waeup_tool.doCommit()
+logger.info('%s finished to create level %s' % (student.id,current_level))
+
+if current_session == '05':
+    next_session = '06'
+    next_level = "%s" % (int(current_level) + 100)
+    study_course = getattr(student,'study_course')
+    context.portal_workflow.doActionFor(study_course,'open')
+    study_course_doc = study_course.getContent()
+    study_course_doc.edit(mapping= {'current_level': next_level,
+                                    'current_session': next_session,})
+    context.portal_workflow.doActionFor(study_course,'close_for_edit')
+
+return response.redirect("%s/%s" % (context.absolute_url(),current_level))
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/delete_course_result.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/delete_course_result.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/delete_course_result.py	(revision 2226)
@@ -0,0 +1,57 @@
+## Script (Python) "delete_course_result"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=ids=[], REQUEST=None, action_after_reject=None, action_after_validate=''
+##title=
+##
+# $Id: delete_course_result.py 1557 2007-03-15 16:00:27Z joachim $
+"""
+FIXME: add docstring.
+"""
+
+from Products.CMFCore.utils import getToolByName
+from AccessControl import Unauthorized
+
+here = context
+from urllib import urlencode
+import logging
+logger = logging.getLogger('Skins.delete_course_result')
+mtool = context.portal_membership
+wf = context.portal_workflow
+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)
+    for cr_id in real_ids:
+        cr = getattr(context,cr_id)
+        if wf.getInfoFor(cr,'review_state',None) == "closed":
+            context.portal_workflow.doActionFor(cr,'open')
+    if real_ids:
+        try:
+            context.manage_delObjects(real_ids)
+            logger.info('%s deleted StudentCourseResult object %s for %s' % (member,id,context.getStudentId()))
+            message = 'psm_item(s)_deleted'
+        except Unauthorized:
+            logger.info('%s has no permission to delete StudentCourseResult objects for %s' % (member,context.getStudentId()))
+            message = 'no item(s) deleted'
+else:
+    message = 'psm_select_at_least_one_document'
+
+args = {}
+args['portal_status_message'] = message
+
+if action_after_validate:
+    url = context.absolute_url() + '/' + action_after_validate + '?' + urlencode(args)
+else:
+    url = context.absolute_url() + '?' + urlencode(args)
+if REQUEST is not None:
+    return REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/display_cest_results.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/display_cest_results.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/display_cest_results.py	(revision 2226)
@@ -0,0 +1,48 @@
+##parameters=REQUEST
+# $Id: display_pume_result.py 970 2006-11-30 12:16:52Z joachim $
+"""
+process the Application Form
+return html renderer + psm
+"""
+import DateTime
+current = DateTime.DateTime()
+pr = context.portal_registration
+
+
+type_name = 'StudentApplication'
+ti = context.portal_types[type_name]
+REQUEST.set('type_name',type_name)
+
+validate = REQUEST.has_key("cpsdocument_create_button")
+
+lt = context.portal_layouts
+pr = context.portal_registration
+
+res,psm,ds = lt.renderLayout('student_application_search',
+                             'student_application',
+                             context,
+                             mapping=validate and REQUEST,
+                             layout_mode='create',
+                             ob={"jamb_reg_no": '',},
+                             commit=False,
+                             formaction = "display_cest_results",
+                             button = "Search",
+                            )
+if psm == 'invalid':
+    return context.display_cest_results_form(rendered = res,
+                                 psm = "Please correct your input!",
+                                 #psm = "%s, %s" % (psm,ds),
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.display_cest_results_form(rendered = res,
+                                 psm = None,
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    return context.entry_results_anon_view(pume=ds['pume'])
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/display_cest_results_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/display_cest_results_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/display_cest_results_form.pt	(revision 2226)
@@ -0,0 +1,23 @@
+<tal:block define="rendered_main options/rendered;
+                   portal_status_message options/psm;
+                   data_storage options/ds;
+                   edition python:1;"
+                   >
+<metal:block define-macro="edit_form">
+  <metal:block use-macro="here/main_template/macros/master">
+  <metal:block fill-slot="header"
+    tal:define="creation creation|nothing;
+                edition edition|nothing;
+                metadata metadata|nothing"
+                >
+    </metal:block>
+      <metal:block fill-slot="main">
+        <h3>Display Your Common Entrance Screening Test Results!</h3>
+        <br />
+        <div tal:replace="structure rendered_main" />
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/display_pde_results.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/display_pde_results.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/display_pde_results.py	(revision 2226)
@@ -0,0 +1,48 @@
+##parameters=REQUEST
+# $Id: display_pume_result.py 970 2006-11-30 12:16:52Z joachim $
+"""
+process the Application Form
+return html renderer + psm
+"""
+import DateTime
+current = DateTime.DateTime()
+pr = context.portal_registration
+
+
+type_name = 'StudentApplication'
+ti = context.portal_types[type_name]
+REQUEST.set('type_name',type_name)
+
+validate = REQUEST.has_key("cpsdocument_create_button")
+
+lt = context.portal_layouts
+pr = context.portal_registration
+
+res,psm,ds = lt.renderLayout(layout_id= 'student_application_search',
+                      schema_id= 'student_application',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      formaction = "display_pde_results",
+                      button = "Search",
+                      commit=False,
+                      )
+if psm == 'invalid':
+    return context.display_pde_results_form(rendered = res,
+                                 psm = "Please correct your input!",
+                                 #psm = "%s, %s" % (psm,ds),
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.display_pde_results_form(rendered = res,
+                                 psm = None,
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    return context.entry_results_anon_view(pume=ds['pume'])
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/display_pde_results_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/display_pde_results_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/display_pde_results_form.pt	(revision 2226)
@@ -0,0 +1,23 @@
+<tal:block define="rendered_main options/rendered;
+                   portal_status_message options/psm;
+                   data_storage options/ds;
+                   edition python:1;"
+                   >
+<metal:block define-macro="edit_form">
+  <metal:block use-macro="here/main_template/macros/master">
+  <metal:block fill-slot="header"
+    tal:define="creation creation|nothing;
+                edition edition|nothing;
+                metadata metadata|nothing"
+                >
+    </metal:block>
+      <metal:block fill-slot="main">
+        <h3>Display Your Post Direct Entry Screening Results! </h3>
+        <br />
+        <div tal:replace="structure rendered_main" />
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/display_pume_results.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/display_pume_results.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/display_pume_results.py	(revision 2226)
@@ -0,0 +1,48 @@
+##parameters=REQUEST
+# $Id: display_pume_result.py 970 2006-11-30 12:16:52Z joachim $
+"""
+process the Application Form
+return html renderer + psm
+"""
+import DateTime
+current = DateTime.DateTime()
+pr = context.portal_registration
+
+
+type_name = 'StudentApplication'
+ti = context.portal_types[type_name]
+REQUEST.set('type_name',type_name)
+
+validate = REQUEST.has_key("cpsdocument_create_button")
+
+lt = context.portal_layouts
+pr = context.portal_registration
+
+res,psm,ds = lt.renderLayout(layout_id= 'student_application_search',
+                      schema_id= 'student_application',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      formaction = "display_pume_results",
+                      button = "Search",
+                      commit=False,
+                      )
+if psm == 'invalid':
+    return context.display_pume_results_form(rendered = res,
+                                 psm = "Please correct your input!",
+                                 #psm = "%s, %s" % (psm,ds),
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.display_pume_results_form(rendered = res,
+                                 psm = None,
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    return context.entry_results_anon_view(pume=ds['pume'])
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/display_pume_results_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/display_pume_results_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/display_pume_results_form.pt	(revision 2226)
@@ -0,0 +1,23 @@
+<tal:block define="rendered_main options/rendered;
+                   portal_status_message options/psm;
+                   data_storage options/ds;
+                   edition python:1;"
+                   >
+<metal:block define-macro="edit_form">
+  <metal:block use-macro="here/main_template/macros/master">
+  <metal:block fill-slot="header"
+    tal:define="creation creation|nothing;
+                edition edition|nothing;
+                metadata metadata|nothing"
+                >
+    </metal:block>
+      <metal:block fill-slot="main">
+        <h3>Display Your Post University Matriculation Examination Screening Results! </h3>
+        <br />
+        <div tal:replace="structure rendered_main" />
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/display_session_results.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/display_session_results.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/display_session_results.py	(revision 2226)
@@ -0,0 +1,99 @@
+##parameters=REQUEST
+# $Id$
+"""
+process the Application Form
+return html renderer + psm
+"""
+import DateTime
+current = DateTime.DateTime()
+pr = context.portal_registration
+
+validate = REQUEST.has_key("cpsdocument_create_button")
+
+lt = context.portal_layouts
+#pr = context.portal_registration
+
+res,psm,ds = lt.renderLayout('student_session_results_search',
+                             'student_returning',
+                             context,
+                             mapping=validate and REQUEST,
+                             layout_mode='create',
+                             ob = {},
+                             commit=False,
+                             formaction = "display_session_results",
+                             button = "Search",
+                             )
+if psm == 'invalid':
+    return context.display_session_results_form(rendered = res,
+                                 psm = "Please correct your input!",
+                                 #psm = "%s, %s" % (psm,ds),
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.display_session_results_form(rendered = res,
+                                 psm = None,
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    pass
+s_fields = context.returning_import.schema()
+student_rec = ds.get('student')
+student = {}
+for field in s_fields:
+    student[field] = getattr(student_rec,field)
+brains = ds.get('results')
+sem1 = []
+sem2 = []
+with_courses_cat = hasattr(context,'courses_catalog')
+
+fields = context.results_import.schema()
+verdict = None
+session = None
+for r in brains:
+    if verdict is None:
+        verdict = r.Verdict
+        session = r.Session
+    result = {}
+    for field in fields:
+        result[field] = getattr(r,field)
+    if with_courses_cat:
+        res = context.courses_catalog(code = r.CosCode)
+    if r.CosCode == 'N/A':
+        result['title'] = 'N/A'
+    elif with_courses_cat and res:
+        result['title'] = res[0].title
+    else:
+        result['title'] = "To Be Determined"
+    if r.Semester == '2':
+        sem2.append(result)
+    else:
+        sem1.append(result)
+#from Products.zdb import set_trace;set_trace()
+results = (sem1, sem2)
+student['verdict'] = verdict
+student['session'] = session
+registered = None
+res = context.returning_import(matric_no = student_rec.matric_no)
+if res:
+    student_id = res[0].id
+
+    #There was one student with empty id in returning_import (BMS0406035)
+    student_obj = None
+    if student_id:
+        student_obj = getattr(context.portal_url.getPortalObject().campus.students,student_id,None)
+    else:
+        registered = ' '
+
+    if student_obj and hasattr(student_obj,'application'):
+        registered = student_id
+else:
+    registered = "no_student_object"
+return context.session_results_anon_view(student=student,
+                                           results=results,
+                                           name = "%(Firstname)s %(Middlename)s %(Lastname)s" % student_rec,
+                                           registered = registered)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/display_session_results_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/display_session_results_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/display_session_results_form.pt	(revision 2226)
@@ -0,0 +1,23 @@
+<tal:block define="rendered_main options/rendered;
+           portal_status_message options/psm;
+           data_storage options/ds;
+           edition python:1;"
+           >
+  <metal:block define-macro="edit_form">
+    <metal:block use-macro="here/main_template/macros/master">
+      <metal:block fill-slot="header"
+                   tal:define="creation creation|nothing;
+                   edition edition|nothing;
+                   metadata metadata|nothing"
+                   >
+      </metal:block>
+      <metal:block fill-slot="main">
+        <h3>Display Your 2005/2006 Session Results! </h3>
+        <br />
+        <div tal:replace="structure rendered_main" />
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/entry_results_anon_slip.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/entry_results_anon_slip.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/entry_results_anon_slip.pt	(revision 2226)
@@ -0,0 +1,50 @@
+<metal:body use-macro="here/slip_template/macros/master">
+    <metal:main fill-slot="main"
+                tal:define="pume python:context.portal_pumeresults(jamb_reg_no=request.get('nr'))[0]">
+    
+    
+       <span tal:condition="python:pume['result_type'] not in ('DE','CEST')">
+         <h3>PUME Results of <span tal:content="pume/name" /></h3>
+       </span>
+                                   
+       <span tal:condition="python:pume['result_type']=='DE'">
+         <h3>PDE Results of <span tal:content="pume/name" /></h3>
+       </span>         
+
+       <span tal:condition="python:pume['result_type']=='CEST'">
+         <h3>CEST Results of <span tal:content="pume/name" /></h3>
+       </span>       
+
+       <br />      
+       
+       <strong  tal:condition="python:pume.status=='Admitted'">You have been provisionally admitted into University of Benin. 
+                                                               Please check your admission details!
+                                                               <br /><br /></strong> 
+                             
+       <table>
+        <tr>
+          <th>JAMB Registration Number:</th><td tal:content="pume/jamb_reg_no"></td>
+        </tr>
+        <tr>
+          <th>Name:</th><td tal:content="pume/name"></td>
+        </tr>
+        <tr>
+          <th>Sex:</th><td tal:content="pume/sex"></td>
+        </tr>        
+        <tr>
+          <th>Score:</th><td tal:content="pume/score"></td>
+        </tr>
+        <tr>
+          <th>Status:</th><td tal:content="pume/status"></td>
+        </tr>
+        <tr>
+          <th>Course Requested:</th><td> <span tal:content="pume/course" /></td>
+        </tr>
+        <tr>
+          <th>Course Code:</th><td><span tal:content="pume/course_code_org" /></td>
+        </tr>
+      </table>
+      
+    </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/entry_results_anon_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/entry_results_anon_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/entry_results_anon_view.pt	(revision 2226)
@@ -0,0 +1,75 @@
+<metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main"
+                 tal:define="pume options/pume;
+                      result_type pume/result_type">
+
+                      
+        <span tal:condition="python:result_type not in ('DE','CEST')">        
+        <div style="text-align: right">
+        <a href="" target="slip" tal:attributes="href string:entry_results_anon_slip?nr=${pume/jamb_reg_no}"
+            onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+            PUME Result Slip
+        </a>
+        </div>
+          <h3>PUME Results of <span tal:content="pume/name" /></h3>
+        </span>       
+                     
+
+        <span tal:condition="python:result_type == 'DE'">
+        <div style="text-align: right">
+        <a href="" target="slip" tal:attributes="href string:entry_results_anon_slip?nr=${pume/jamb_reg_no}"
+            onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+            PDE Result Slip
+        </a>
+        </div>          
+          <h3>PDE Results of <span tal:content="pume/name" /></h3>
+        </span>     
+        
+        <span tal:condition="python:result_type == 'CEST'">
+        <div style="text-align: right">
+        <a href="" target="slip" tal:attributes="href string:entry_results_anon_slip?nr=${pume/jamb_reg_no}"
+            onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+            CEST Result Slip
+        </a>
+        </div>          
+          <h3>CEST Results of <span tal:content="pume/name" /></h3>
+        </span>             
+        
+       <br />              
+       
+       <strong  tal:condition="python:pume.status=='Admitted'">You have been provisionally admitted into University of Benin. 
+                                                               Please check your admission details!
+                                                               <br /><br /></strong>              
+       <strong  tal:condition="python:pume.status=='Not Admitted'">Sorry, you have not been admitted. 
+                                                                   Do not check admission details! There are no more data available.
+                                                               <br /><br /></strong>                                                    
+                     
+       <table>
+        <tr>
+          <th>Registration Number:</th><td tal:content="pume/jamb_reg_no"></td>
+        </tr>
+        <tr>
+          <th>Name:</th><td tal:content="pume/name"></td>
+        </tr>
+        <tr>
+          <th>Sex:</th><td tal:content="pume/sex"></td>
+        </tr>        
+        <tr>
+          <th>Score:</th><td tal:content="pume/score"></td>
+        </tr>
+        <tr>
+          <th>Status:</th><td tal:content="pume/status"></td>
+        </tr>
+        <tr>
+          <th>Course Requested:</th><td> <span tal:content="pume/course" /></td>
+        </tr>
+        <tr>
+          <th>Course Code:</th><td><span tal:content="pume/course_code_org" /></td>
+        </tr>
+      </table>
+    </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/entry_results_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/entry_results_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/entry_results_view.pt	(revision 2226)
@@ -0,0 +1,61 @@
+<metal:html tal:define="pume options/pume">
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main">
+
+        <span tal:condition="python:pume['result_type']!='DE'">        
+        <div style="text-align: right">
+        <a href="" target="slip" tal:attributes="href string:entry_results_anon_slip?nr=${pume/jamb_reg_no}"
+            onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+            PUME Result Slip
+        </a>
+        </div>
+          <h3>PUME Results of <span tal:content="pume/name" /></h3>
+        </span>       
+                     
+        <span tal:condition="python:pume['result_type']=='DE'">
+        <div style="text-align: right">
+        <a href="" target="slip" tal:attributes="href string:entry_results_anon_slip?nr=${pume/jamb_reg_no}"
+            onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+            PDE Result Slip
+        </a>
+        </div>          
+          <h3>PDE Results of <span tal:content="pume/name" /></h3>
+        </span>     
+        
+       <br />              
+       
+       <strong  tal:condition="python:pume.status=='Admitted'">You have been provisionally admitted into University of Benin. 
+                                                               Please check your admission details!
+                                                               <br /><br /></strong>              
+       <strong  tal:condition="python:pume.status=='Not Admitted'">Sorry, you have not been admitted. 
+                                                                   Do not check admission details! There are no more data available.
+                                                               <br /><br /></strong>                                                    
+                     
+       <table>
+        <tr>
+          <th>JAMB Registration Number:</th><td tal:content="pume/jamb_reg_no"></td>
+        </tr>
+        <tr>
+          <th>Name:</th><td tal:content="pume/name"></td>
+        </tr>
+        <tr>
+          <th>Sex:</th><td tal:content="pume/sex"></td>
+        </tr>        
+        <tr>
+          <th>Score:</th><td tal:content="pume/score"></td>
+        </tr>
+        <tr>
+          <th>Status:</th><td tal:content="pume/status"></td>
+        </tr>
+        <tr>
+          <th>Course Requested:</th><td> <span tal:content="pume/course" /></td>
+        </tr>
+        <tr>
+          <th>Course Code:</th><td><span tal:content="pume/course_code_org" /></td>
+        </tr>
+      </table>
+    </metal:main>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/external_clearance_edit_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/external_clearance_edit_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/external_clearance_edit_form.pt	(revision 2226)
@@ -0,0 +1,5 @@
+<metal:definetemplate tal:define="template here/slip_template/macros/master">
+  <metal:block use-macro="here/clearance_edit_form/macros/clearance_edit_form" />
+</metal:definetemplate>
+  
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/external_contact_student_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/external_contact_student_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/external_contact_student_form.pt	(revision 2226)
@@ -0,0 +1,3 @@
+<metal:definetemplate tal:define="template here/slip_template/macros/master">
+  <metal:block use-macro="here/contact_student_form/macros/contact_student_form" />
+</metal:definetemplate>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/external_study_level_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/external_study_level_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/external_study_level_view.pt	(revision 2226)
@@ -0,0 +1,205 @@
+<metal:body use-macro="here/slip_template/macros/master">
+  <metal:main fill-slot="main"
+          tal:define="info context/getStudyLevelInfo;">
+             
+    <span tal:condition="not: info">
+      <span tal:content="here/illegal_view" />
+    </span>
+    <span tal:condition="info">
+    <span tal:define= "is_so context/isSectionOfficer;
+                       is_ca info/is_ca;
+                       show_check_boxes info/show_check_boxes;
+                       is_student info/is_student;
+                       status_info info/status_info;
+                       review_state info/review_state;
+                       view_only info/view_only">       
+
+    <div style="text-align: right" 
+         tal:condition="python:review_state in ('courses_registered','courses_validated',)">
+    <a href="" target="slip" tal:attributes="href string:course_registration_slip"
+        onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+        <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+        Course Registration Slip
+    </a>
+    </div>
+
+
+      <h3> 
+        <span tal:condition="python: is_so or is_ca">
+          <span tal:content="info/student/name" />:
+        </span>
+        Course Registration Form for <span tal:content="here/title_or_id" />
+      </h3>
+
+      <form action="." method="post" class="group">
+        <span tal:condition="info/carry_overs" tal:omit-tag="">
+        <h4>Carryover Courses</h4>
+        <br />
+        <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">
+          <tr tal:repeat="row info/carry_overs"
+              tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+            <td align="left" valign="middle" style="width: 5px;"
+                tal:condition="show_check_boxes">
+              <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                     tal:define="id row/id"
+                     tal:attributes="value id;
+                     id python:'cb_' + id;
+                     checked python:id in info['choosen_ids'];" 
+                     />
+            </td>
+            <td width="78%" tal:content="row/title"></td>
+            <td width="10%" tal:content="row/code"></td>
+            <td width="2%">S<span tal:content="row/semester" /></td>
+            <td width="2%" tal:content="row/credits"></td>
+            <td width="8%" tal:content="row/grade|string:"></td>
+          </tr>
+        </table>
+        </span> 
+        <br />
+        <h4>Session Courses</h4>
+        <br />
+      <div class="" tal:condition="not: info/normal">
+        Your faculty has not yet provided the list of courses for your certificate. Please contact your faculty!
+      </div>
+        <table class="contentListing" width="100%" id="folder_content"
+               tal:condition="info/normal">      
+          <tr tal:repeat="row info/normal"
+              tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+            <td align="left" valign="middle" style="width: 5px;"
+	              tal:condition="show_check_boxes">
+              <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                     tal:define="id row/id"
+                     tal:attributes="value id;
+                     id python:'cb_' + id;
+                     checked python:id in info['choosen_ids'];" 
+                     />
+            </td>
+            <td width="78%" tal:content="row/title"></td>
+            <td width="10%" tal:content="row/code"></td>
+            <td width="2%">S<span tal:content="row/semester" /></td>
+            <td width="2%" tal:content="row/credits"></td>
+            <td width="8%" tal:content="row/coe|nothing"></td>
+          </tr>
+          <tr>
+            <td tal:condition="show_check_boxes" colspan="1"></td>
+            <td colspan="1"></td>
+            <th colspan="2">Total Credits:</th>
+            <td align="center" width="2%" tal:content="info/credits_total"></td>
+          </tr>
+        </table>
+
+        
+      
+        
+        <table tal:condition="python: is_student and review_state == 'school_fee_paid'" width="100%" cellspacing="0" cellpadding="2"
+               class="folderButtons">
+          <tr>
+            <td align="left" valign="top" rowspan="3"></td>
+            <td align="left" valign="top">
+                <input type="submit" name="delete_course_result:method" value="Delete selected"
+                       class="destructive" i18n:attributes="value"
+                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                       ('Do you really want to delete selected courses?', )" 
+                       />
+                <input type="submit" name="refresh_level:method"
+                       class="context" value="Update" 
+                       />
+                <br /><br />
+                <input tal:condition="info/normal" 
+                       type="submit" name="register_courses:method"
+                       class="context" value="Submit" />
+            </td>
+          </tr>
+        </table>
+        <table tal:condition="python:is_so" width="100%" cellspacing="0" cellpadding="2"
+               class="folderButtons">
+          <tr>
+            <td align="left" valign="top" rowspan="3"></td>
+            <td align="left" valign="top">
+                <input type="button" value="Select all" class="context"
+                       onclick="someJavaScriptFunctionThatWillBeReplaced"
+                       i18n:attributes="value"
+                       tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                       />
+                <input type="submit" name="delete_course_result:method" value="Delete selected"
+                       class="destructive" i18n:attributes="value"
+                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                       ('Do you really want to delete the courses selected?', )" 
+                       />
+                <input 
+                       type="submit" name="refresh_level:method"
+                       class="context" value="Update" 
+                       />
+                <input tal:condition="python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method"
+                       class="context" value="Submit" />  
+                <input tal:condition="python: review_state == 'courses_registered'" type="submit" name="validate_courses:method"
+                       class="context" value="Validate" />
+                <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method"
+                       class="context" value="Reject" />
+
+            </td>
+          </tr>
+        </table>
+        <table tal:condition="python:is_ca" width="100%" cellspacing="0" cellpadding="2"
+               class="folderButtons">
+          <tr>
+            <td align="left" valign="top" rowspan="3"></td>
+            <td align="left" valign="top">
+                <input tal:condition="python: review_state == 'school_fee_paid'"
+                       type="button" value="Select all" class="context"
+                       onclick="someJavaScriptFunctionThatWillBeReplaced"
+                       i18n:attributes="value"
+                       tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                       />
+                <input tal:condition="python: review_state == 'school_fee_paid'"
+                       type="submit" name="delete_course_result:method" value="Delete selected"
+                       class="destructive" i18n:attributes="value"
+                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                       ('Do you really want to delete the courses selected?', )" 
+                       />
+                <input tal:condition="python: review_state == 'school_fee_paid'"
+                       type="submit" name="refresh_level:method"
+                       class="context" value="Update" 
+                       />
+                <input tal:condition="python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method"
+                       class="context" value="Submit" />  
+                <input tal:condition="python: review_state == 'courses_registered'" type="submit" name="validate_courses:method"
+                       class="context" value="Validate" />
+                <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method"
+                       class="context" value="Reject" />
+
+                <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
+                       tal:attributes="value string:external_study_level_view"/>                         
+                <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
+                       tal:attributes="value string:external_contact_student_form"/>    
+                                           
+
+            </td>
+          </tr>
+        </table>
+
+      </form>
+      <br />
+        <form action="add_course_result" method="post" class="group"
+            tal:condition="show_check_boxes">
+        <table>
+          <tr>
+            <th>Course Id</th>
+            <td><input type="text" name="course_id" 
+                       tal:attributes="value request/course_id|nothing"/></td>
+            <td colspan="2">
+              <input type="submit" name="add"
+                     class="context" value="Add Course" 
+                     />
+              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
+                       tal:attributes="value string:external_study_level_view"/>                      
+            </td>                
+        </table>
+        </form>         
+  </span>
+  </span>          
+  </metal:main>
+</metal:body>
+  
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/firsttime_login.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/firsttime_login.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/firsttime_login.py	(revision 2226)
@@ -0,0 +1,49 @@
+##parameters=REQUEST
+# $Id: firsttime_login.py 1747 2007-05-07 20:56:24Z joachim $
+"""
+process the Application Form
+return html renderer + psm
+"""
+import DateTime
+from urllib import urlencode
+current = DateTime.DateTime()
+pr = context.portal_registration
+
+validate = REQUEST.has_key("cpsdocument_create_button")
+
+lt = context.portal_layouts
+#pr = context.portal_registration
+
+res,psm,ds = lt.renderLayout(layout_id= 'student_firsttime_login',
+                      schema_id= 'student_returning',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      formaction = "firsttime_login",
+                      button = "Search",
+                      commit=False,
+                      )
+if psm == 'invalid':
+    return context.firsttime_login_form(rendered = res,
+                                 psm = "Please correct your input!",
+                                 #psm = "%s, %s" % (psm,ds),
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.firsttime_login_form(rendered = res,
+                                 psm = None,
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    pass
+action = "/set_access_data"
+args = {}
+args['matric_no'] = ds.get('matric_no')
+args['name'] = ds.get('student').name
+url = context.absolute_url() + action + '?' + urlencode(args)
+REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/firsttime_login_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/firsttime_login_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/firsttime_login_form.pt	(revision 2226)
@@ -0,0 +1,14 @@
+<metal:block use-macro="here/main_template/macros/master">
+
+  
+  <metal:block fill-slot="main" tal:condition="python:1"
+         tal:define="rendered_main options/rendered;
+             portal_status_message options/psm;
+             data_storage options/ds;
+             edition python:1;">
+    <h3>Search Your Record! </h3>
+    <br />
+    <div tal:replace="structure rendered_main" />
+  </metal:block>
+</metal:block>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getApplicantsStatistics.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getApplicantsStatistics.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getApplicantsStatistics.py	(revision 2226)
@@ -0,0 +1,36 @@
+## Script (Python) "getApplicantsStatistics"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: getApplicantsStatistics.py 1277 2007-01-11 21:11:37Z joachim $
+"""
+return Student Statistics
+"""
+
+import logging
+logger = logging.getLogger('Skins.getApplicantsStatistics')
+
+logger.info('%s invoked statistics' % context.portal_membership.getAuthenticatedMember())
+if not context.isStaff():
+    return 'Not allowed'
+
+
+info = {}
+res_entered = context.applicants_catalog(status = 'entered')
+res_edited = context.applicants_catalog(status = 'edited')
+res_submitted = context.applicants_catalog(status = 'submitted')
+info['entered'] = len(res_entered)
+info['edited'] = len(res_edited)
+info['submitted'] = len(res_submitted)
+info['pin_entered'] = info['entered'] + info['submitted'] + info['edited']
+
+
+return info
+
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getApplicationInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getApplicationInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getApplicationInfo.py	(revision 2226)
@@ -0,0 +1,47 @@
+## Script (Python) "getApplicationInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+return Info about the current Student
+"""
+import logging
+logger = logging.getLogger('Skins.getApplicationInfo')
+
+request = context.REQUEST
+mtool = context.portal_membership
+wf = context.portal_workflow
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+path_info = request.get('PATH_INFO').split('/')
+##from Products.zdb import set_trace
+##set_trace()
+if mtool.isAnonymousUser():
+    return None
+info = {}
+requested_id = context.getStudentId()
+if requested_id and not context.isStaff() and 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
+else:
+    student_id = member_id
+
+
+students_object = context.portal_url.getPortalObject().campus.students
+student = getattr(students_object, student_id)
+info['id'] = student_id
+info['student'] = student
+info['review_state'] = context.getStudentReviewState()
+info['app'] = student.application
+info['app_doc'] = student.application.getContent()
+#info['name'] = context.getStudentName()
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getClearanceInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getClearanceInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getClearanceInfo.py	(revision 2226)
@@ -0,0 +1,74 @@
+## Script (Python) "getClearanceInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+return Info about the current Student
+"""
+import logging
+logger = logging.getLogger('Skins.getClearanceInfo')
+from DateTime import DateTime
+
+request = context.REQUEST
+mtool = context.portal_membership
+wf = context.portal_workflow
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+path_info = request.get('PATH_INFO').split('/')
+
+if mtool.isAnonymousUser():
+    return None
+info = {}
+#from Products.zdb import set_trace
+#set_trace()
+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))
+    return None
+elif context.isStaff():
+    student_id = requested_id
+else:
+    student_id = member_id
+
+
+students_object = context.portal_url.getPortalObject().campus.students
+student = getattr(students_object, student_id)
+res = context.portal_catalog(portal_type='Student',id = student_id)
+if len(res) == 0:
+    return None
+creation_date = DateTime(res[0].CreationDate)
+info['penalty'] = creation_date.lessThan(DateTime('2006/12/5'))
+info['id'] = student_id
+info['student'] = student
+info['review_state'] = context.getStudentReviewState()
+info['app'] = student.application
+info['app_doc'] = student.application.getContent()
+info['clear'] = student.clearance
+info['clear_doc'] = student.clearance.getContent()
+info['clear_review_state'] = wf.getInfoFor(student.clearance,'review_state',None)
+if info['review_state'] in ('clearance_requested', 'cleared_and_validated',):
+    info['penalty'] = info['penalty'] and\
+                      info['clear_doc'].entry_date.greaterThan(DateTime('2006/12/30'))
+course = getattr(student,'study_course',None)
+if course:
+    cert_id = course.getContent().study_course
+    res = context.portal_catalog(portal_type = "Certificate", id = cert_id)
+    ci = {}
+    if len(res) > 0:
+        info['course'] = course
+        brain = res[0]
+        ci['study_course'] = brain.getId
+        ci['title'] = brain.Title
+        pl = brain.getPath().split('/')
+        ci['faculty'] = pl[-4]
+        ci['department'] = pl[-3]
+        info['course_doc'] = ci
+    else:
+        info['course'] = None
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getCourseResultInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getCourseResultInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getCourseResultInfo.py	(revision 2226)
@@ -0,0 +1,49 @@
+## Script (Python) "getPersonalInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: getApplicationInfo.py 1161 2006-12-31 07:50:50Z henrik $
+"""
+return Info about the current Student
+"""
+import logging
+logger = logging.getLogger('Skins.getPersonalInfo')
+
+request = context.REQUEST
+mtool = context.portal_membership
+wf = context.portal_workflow
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+path_info = request.get('PATH_INFO').split('/')
+##from Products.zdb import set_trace
+##set_trace()
+if mtool.isAnonymousUser():
+    return None
+info = {}
+requested_id = context.getStudentId()
+if requested_id and not context.isStaff() and 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
+else:
+    student_id = member_id
+
+
+students_object = context.portal_url.getPortalObject().campus.students
+student = getattr(students_object, student_id)
+info['student'] = student
+##res = context.portal_catalog(id = student_id)
+##if res:
+##    info['review_state'] = res[0].review_state
+info['id'] = student_id
+info['review_state'] = context.getStudentReviewState()
+#info['per'] = student.personal
+info['course_doc'] = context.getContent()
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getEntryMode.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getEntryMode.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getEntryMode.py	(revision 2226)
@@ -0,0 +1,21 @@
+## Script (Python) "getEntryMode"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=jamb
+##title=
+##
+# $Id$
+
+# this method is only used for full-time returning students (impported into returning_import)
+
+digits = 8
+letters = 2
+em = 'ume_ft'
+if jamb and len(jamb) >= (digits + letters) and jamb[:digits].isdigit()\
+   and jamb[digits:].isalpha():
+       if jamb[1] == '1':
+           em = 'de_ft'
+return em
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getFormattedStudentEntry.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getFormattedStudentEntry.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getFormattedStudentEntry.py	(revision 2226)
@@ -0,0 +1,29 @@
+## Script (Python) "getFormattedStudentEntry"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=brain
+##title=
+##
+# $Id$
+"""
+return a formatted StudentCatalog Entry
+"""
+#from Products.zdb import set_trace;set_trace()
+fields = context.students_catalog.schema()
+d = {}
+for f in fields:
+    d[f] = getattr(brain,f,'')
+    if not d[f]:
+        d[f] = ''
+    if f == "sex":
+        if d[f]:
+            d[f] = 'F'
+        else:
+            d[f] = 'M' 
+    elif f == "name":
+        d[f] = d[f].strip()
+            
+return d            
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getIdCardInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getIdCardInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getIdCardInfo.py	(revision 2226)
@@ -0,0 +1,66 @@
+## Script (Python) "getIdCardInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: getTransferInfo.py 1339 2007-01-21 22:55:34Z henrik $
+"""
+return Info about the current Student
+"""
+import logging
+logger = logging.getLogger('Skins.getIdCardInfo')
+from DateTime import DateTime
+
+request = context.REQUEST
+mtool = context.portal_membership
+wf = context.portal_workflow
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+
+
+if member_id not in ('admin','isouaba','obadejo','joachim','babu','taiyelabegan'):
+    return None
+
+if mtool.isAnonymousUser():
+    return None
+info = {}
+#from Products.zdb import set_trace
+#set_trace()
+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))
+    return None
+elif context.isStaff():
+    student_id = requested_id
+else:
+    student_id = member_id
+
+
+students_object = context.portal_url.getPortalObject().campus.students
+student = getattr(students_object,student_id)
+
+res = context.students_catalog(id = student_id)
+if len(res) != 1:
+    return None
+sbrain = res[0]
+info['id'] = student_id
+info['scatalog'] = context.getFormattedStudentEntry(sbrain)
+info['student'] = student
+#info['entry_mode'] = sbrain.entry_mode
+
+personal = getattr(student,'personal',None)
+if personal:
+    personal_doc = personal.getContent()
+    info['personal'] = personal_doc
+
+#cert_id = sbrain.course
+#res = context.portal_catalog(portal_type = "Certificate", id = cert_id)
+#if res:
+#    brain = res[0]
+#    info['sc_title'] = brain.Title
+
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getLevelFromResultsCosCode.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getLevelFromResultsCosCode.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getLevelFromResultsCosCode.py	(revision 2226)
@@ -0,0 +1,27 @@
+## Script (Python) "getLevelFromResultsList"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=list
+##title=
+##
+# $Id$
+lnr = 0
+for e in list:
+    if e.CosCode == "N/A": 
+        
+        # used for medical dummy results
+        # return 2
+        
+        # used for 'Temporary Withdrawal' dummy results
+        return int(e.Level[0])
+    try:
+        cc = int(e.CosCode[3])
+    except:
+        continue
+    if lnr <= cc:
+        lnr = cc
+return lnr
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getLogData.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getLogData.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getLogData.py	(revision 2226)
@@ -0,0 +1,37 @@
+## Script (Python) "getLogData"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+"""
+return logfile entries
+"""
+
+wtool = context.waeup_tool
+
+# Default values...
+filename = "event.log"
+numlines = 30
+
+# Validate posted vars...
+request = container.REQUEST
+if 'filename' in request.keys():
+    if request['filename'] in ['event.log','Z2.log']:
+        filename = request['filename']
+
+if 'numlines' in request.keys():
+    try:
+        reqlines = int(request['numlines'])
+        if reqlines > 0 and reqlines < 1000:
+            numlines = reqlines
+    except:
+        pass
+
+return { 'filename' : filename,
+         'numlines' : numlines,
+         'lines' : wtool.getLogfileLines(filename, numlines)
+       }
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getMaintenancePrefix.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getMaintenancePrefix.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getMaintenancePrefix.py	(revision 2226)
@@ -0,0 +1,19 @@
+## Script (Python) "getMaintenancePrefix"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id:getMaintenancePrefix.py 486 2006-09-06 10:09:39Z joachim $
+"""
+return the Prefix for hostel maintenance scratchcards
+"""
+s_info = context.getAccommodationInfo()
+if s_info.has_key('acco_doc'):
+    info = context.waeup_tool.getHallInfo(s_info['acco_doc'].bed)
+    if info:
+        return info['maintenance_code']
+return ""
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getMemberInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getMemberInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getMemberInfo.py	(revision 2226)
@@ -0,0 +1,112 @@
+## Script (Python) "getMemberInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: getApplicationInfo.py 1161 2006-12-31 07:50:50Z henrik $
+"""
+return Info about the current Student
+"""
+import logging
+logger = logging.getLogger('Student.Member.Info')
+
+request = context.REQUEST
+mtool = context.portal_membership
+wf = context.portal_workflow
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+path_info = request.get('PATH_INFO').split('/')
+if mtool.isAnonymousUser():
+    return None
+info = {}
+requested_id = context.getStudentId()
+if requested_id and not context.isStaff() and 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
+else:
+    student_id = member_id
+
+
+students_object = context.portal_url.getPortalObject().campus.students
+student = getattr(students_object, student_id)
+
+if hasattr(student,"application"):
+
+    info['student'] = student
+    info['id'] = student_id
+    info['review_state'] = context.getStudentReviewState()
+    info['per'] = student.personal
+    info['app'] = student.application
+    info['per_doc'] = student.personal.getContent()
+    info['app_doc'] = student.application.getContent()
+    info['clear_doc'] = student.clearance.getContent()
+    info['password'] = context.waeup_tool.getCredential(student_id)
+
+    if info['per_doc'].email:
+        info['email'] = info['per_doc'].email
+    else:
+        info['email'] = info['app_doc'].app_email
+
+    msg="""
+Your SRP Member Details
+-----------------------
+
+Fullname: %s
+Student Id: %s
+Matriculation Number: %s
+JAMB Registration Number: %s
+Registration Status: %s
+Email Address in Application Data: %s
+Email Address in Personal Data: %s
+Date of Birth: %s
+Password: '%s'
+
+"""
+
+    info['message'] = msg % (
+        student.Title(),
+        student_id,
+        info['clear_doc'].matric_no,
+        info['app_doc'].jamb_reg_no,
+        info['review_state'],
+        info['app_doc'].app_email,
+        info['per_doc'].email,
+        info['clear_doc'].birthday,
+        info['password']
+        )
+else:
+
+    info['student'] = student
+    info['id'] = student_id
+    info['review_state'] = wf.getInfoFor(student,'review_state',None)
+    info['password'] = context.waeup_tool.getCredential(student_id)
+    info['email'] = 'N/A'
+
+    msg="""
+Your SRP Member Details
+-----------------------
+
+Fullname: %s
+Student Id: %s
+Password: %s
+
+"""
+
+    info['message'] = msg % (
+        'N/A',
+        student_id,
+        info['password']
+        )
+
+
+
+
+
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getNewStudentStatistics.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getNewStudentStatistics.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getNewStudentStatistics.py	(revision 2226)
@@ -0,0 +1,116 @@
+## Script (Python) "getNewStudentStatistics"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: getStudentStatistics.py 1277 2007-01-11 21:11:37Z joachim $
+"""
+return Student Statistics
+"""
+
+import logging
+logger = logging.getLogger('Skins.getNewStudentStatistics')
+
+logger.info('%s invoked statistics' % context.portal_membership.getAuthenticatedMember())
+if not context.isStaff():
+    return 'Not allowed'
+
+entry_sessions = ('-1','06','6')
+
+# students with entry_session None (-1) are interprteted as new AND returning students if they are 
+# in either of the last three states
+
+new_states =      ('admitted',
+                   'clearance_pin_entered',
+                   'objection_raised',
+                   'clearance_requested',
+                   'cleared_and_validated',
+                   'school_fee_paid',
+                   'courses_registered',
+                   'courses_validated',
+                   )
+
+full_time =       ('ume_ft','de_ft','ug_ft','pg_ft')
+part_time =       (         'de_pt','ug_pt','pg_pt')
+
+faculties = context.portal_catalog(portal_type="Faculty")
+
+l = []
+
+
+fac_res = {}
+
+dict = {}
+dict['id'] = 'All Faculties'
+dict['title'] = 'All Faculties'
+
+res_ft = context.students_catalog(entry_session = entry_sessions,  mode = full_time, review_state = new_states)
+dict['total_ft'] = len(res_ft)
+
+res_pt = context.students_catalog(entry_session = entry_sessions,  mode = part_time, review_state = new_states)
+dict['total_pt'] = len(res_pt)
+
+for state in new_states:
+    # full_time
+    res_ft = context.students_catalog(entry_session = entry_sessions, review_state = state,  mode = full_time)
+    state_ft = state + '_ft'
+    dict[state_ft] = len(res_ft)
+    statepercent = state+'_ft_percent'
+    if dict['total_ft'] > 0:
+        dict[statepercent] = "%.0f" % round(dict[state_ft]*100.0/dict['total_ft'])
+    else:
+        dict[statepercent] = 0
+        
+    # part_time
+    res_pt = context.students_catalog(entry_session = entry_sessions, review_state = state,  mode = part_time)
+    state_pt = state + '_pt'
+    dict[state_pt] = len(res_pt)
+    statepercent = state+'_pt_percent'
+    if dict['total_pt'] > 0:
+        dict[statepercent] = "%.0f" % round(dict[state_pt]*100.0/dict['total_pt'])
+    else:
+        dict[statepercent] = 0        
+        
+l.append(dict)
+
+
+for f in faculties:
+    dict = {}
+    dict['id'] = f.getId
+    dict['title'] = f.Title
+    res_ft = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = full_time)
+    dict['total_ft'] = len(res_ft)
+    res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = part_time)
+    dict['total_pt'] = len(res_pt)    
+    for state in new_states:
+        # full_time
+        res_ft = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state, mode = full_time)
+        state_ft = state + '_ft'
+        dict[state_ft] = len(res_ft)
+        statepercent = state+'_ft_percent'
+        if dict['total_ft'] > 0:
+            dict[statepercent] = "%.0f" % round(dict[state_ft]*100.0/dict['total_ft'])
+        else:
+            dict[statepercent] = 0
+            
+        # part_time
+        res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state, mode = part_time)
+        state_pt = state + '_pt'
+        dict[state_pt] = len(res_pt)
+        statepercent = state+'_pt_percent'
+        if dict['total_pt'] > 0:
+            dict[statepercent] = "%.0f" % round(dict[state_pt]*100.0/dict['total_pt'])
+        else:
+            dict[statepercent] = 0            
+            
+    l.append(dict)
+
+
+
+return l
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getPersonalInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getPersonalInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getPersonalInfo.py	(revision 2226)
@@ -0,0 +1,49 @@
+## Script (Python) "getPersonalInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: getApplicationInfo.py 1161 2006-12-31 07:50:50Z henrik $
+"""
+return Info about the current Student
+"""
+import logging
+logger = logging.getLogger('Skins.getPersonalInfo')
+
+request = context.REQUEST
+mtool = context.portal_membership
+wf = context.portal_workflow
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+path_info = request.get('PATH_INFO').split('/')
+##from Products.zdb import set_trace
+##set_trace()
+if mtool.isAnonymousUser():
+    return None
+info = {}
+requested_id = context.getStudentId()
+if requested_id and not context.isStaff() and 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
+else:
+    student_id = member_id
+
+
+students_object = context.portal_url.getPortalObject().campus.students
+student = getattr(students_object, student_id)
+info['student'] = student
+##res = context.portal_catalog(id = student_id)
+##if res:
+##    info['review_state'] = res[0].review_state
+info['id'] = student_id
+info['review_state'] = context.getStudentReviewState()
+info['per'] = student.personal
+info['per_doc'] = student.personal.getContent()
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getRetStudentStatistics.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getRetStudentStatistics.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getRetStudentStatistics.py	(revision 2226)
@@ -0,0 +1,106 @@
+## Script (Python) "getRetStudentStatistics"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: getStudentStatistics.py 1277 2007-01-11 21:11:37Z joachim $
+"""
+return Student Statistics
+"""
+
+import logging
+logger = logging.getLogger('Skins.getRetStudentStatistics')
+
+logger.info('%s invoked statistics' % context.portal_membership.getAuthenticatedMember())
+if not context.isStaff():
+    return 'Not allowed'
+
+entry_sessions = ('-1','94','95','96','97','98','99','00','01','02','03','04','05','0','1','2','3','4','5')
+
+ret_states =      ('returning',
+                   'school_fee_paid',
+                   'courses_registered',
+                   'courses_validated',
+                   )
+full_time =       ('ume_ft','de_ft','ug_ft','pg_ft')
+part_time =       (         'de_pt','ug_pt','pg_pt')
+
+faculties = context.portal_catalog(portal_type="Faculty")
+
+l = []
+
+
+fac_res = {}
+
+dict = {}
+dict['id'] = 'All Faculties'
+dict['title'] = 'All Faculties'
+
+res_ft = context.students_catalog(entry_session = entry_sessions,  mode = full_time, review_state = ret_states)
+dict['total_ft'] = len(res_ft)
+
+res_pt = context.students_catalog(entry_session = entry_sessions,  mode = part_time, review_state = ret_states)
+dict['total_pt'] = len(res_pt)
+
+for state in ret_states:
+    # full_time
+    res_ft = context.students_catalog(entry_session = entry_sessions, review_state = state,  mode = full_time)
+    state_ft = state + '_ft'
+    dict[state_ft] = len(res_ft)
+    statepercent = state+'_ft_percent'
+    if dict['total_ft'] > 0:
+        dict[statepercent] = "%.0f" % round(dict[state_ft]*100.0/dict['total_ft'])
+    else:
+        dict[statepercent] = 0
+
+    # part_time
+    res_pt = context.students_catalog(entry_session = entry_sessions, review_state = state,  mode = part_time)
+    state_pt = state + '_pt'
+    dict[state_pt] = len(res_pt)
+    statepercent = state+'_pt_percent'
+    if dict['total_pt'] > 0:
+        dict[statepercent] = "%.0f" % round(dict[state_pt]*100.0/dict['total_pt'])
+    else:
+        dict[statepercent] = 0
+
+l.append(dict)
+
+
+for f in faculties:
+    dict = {}
+    dict['id'] = f.getId
+    dict['title'] = f.Title
+    res_ft = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = full_time)
+    dict['total_ft'] = len(res_ft)
+    res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = part_time)
+    dict['total_pt'] = len(res_pt)
+    for state in ret_states:
+        # full_time
+        res_ft = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state, mode = full_time)
+        state_ft = state + '_ft'
+        dict[state_ft] = len(res_ft)
+        statepercent = state+'_ft_percent'
+        if dict['total_ft'] > 0:
+            dict[statepercent] = "%.0f" % round(dict[state_ft]*100.0/dict['total_ft'])
+        else:
+            dict[statepercent] = 0
+
+        # part_time
+        res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state, mode = part_time)
+        state_pt = state + '_pt'
+        dict[state_pt] = len(res_pt)
+        statepercent = state+'_pt_percent'
+        if dict['total_pt'] > 0:
+            dict[statepercent] = "%.0f" % round(dict[state_pt]*100.0/dict['total_pt'])
+        else:
+            dict[statepercent] = 0
+
+    l.append(dict)
+
+return l
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getSchoolFeePrefix.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getSchoolFeePrefix.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getSchoolFeePrefix.py	(revision 2226)
@@ -0,0 +1,38 @@
+## Script (Python) "getSchoolFeePrefix"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id:getMaintenancePrefix.py 486 2006-09-06 10:09:39Z joachim $
+"""
+return the Prefix for Schoolfee
+"""
+
+if context.portal_membership.isAnonymousUser():
+    return None
+
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+import logging
+logger = logging.getLogger('Skins.getSchoolFeePrefix')
+
+student_id = context.getStudentId()
+sbrain = context.students_catalog(id=student_id)[0]
+res = context.portal_catalog(portal_type="Certificate",
+                                     id = sbrain.course)
+#set_trace()
+if not res:
+    logger.info('%s, certificate %s not found' % (student_id,course))
+    prefix = "--"
+else:
+    prefix = res[0].getObject().getContent().school_fee_code
+    if not prefix or prefix == 'none':
+        prefix = res[0].getPath().split('/')[-4]
+return prefix
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getSessionResults.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getSessionResults.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getSessionResults.py	(revision 2226)
@@ -0,0 +1,132 @@
+# $Id: display_session_results.py 1166 2006-12-31 18:11:47Z henrik $
+"""
+process the Application Form
+return html renderer + psm
+"""
+import DateTime
+current = DateTime.DateTime()
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+pr = context.portal_registration
+request = context.REQUEST
+returning = context.returning_import
+results = context.results_import
+scatalog = context.students_catalog
+
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+
+if mtool.isAnonymousUser():
+    return None
+info = {}
+requested_id = context.getStudentId()
+if requested_id and not context.isStaff() and member_id != requested_id:
+    import logging
+    logger = logging.getLogger('Skins.getSessionResults')
+    logger.info('%s tried to access %s' % (member_id,requested_id))
+    return None
+elif context.isStaff():
+    student_id = requested_id
+else:
+    student_id = member_id
+
+students_object = context.portal_url.getPortalObject().campus.students
+##student = getattr(students_object, student_id)
+##clear = getattr(student,'clearance',None)
+##if clear:
+##    value = clear.getContent().matric_no
+##else:
+##    return None
+
+res = scatalog(id = student_id)
+matric_no = res[0].matric_no
+student_from_cat = res[0]
+
+#res = returning(matric_no = matric_no)
+#if res:
+#    student_from_returning = res[0]
+#else:
+#    return None
+
+if matric_no:
+    res = results(matric_no = matric_no)
+    results = res
+else: 
+    results = []
+
+
+sem1 = []
+sem2 = []
+with_courses_cat = hasattr(context,'courses_catalog')
+fields = context.results_import.schema()
+gpa = 0
+course_count = 0
+session = None
+
+for r in results:
+    if session is None:
+        session = r.Session
+    result = {}
+    for field in fields:
+        result[field] = getattr(r,field)
+    if with_courses_cat:
+        res = context.courses_catalog(code = r.CosCode)
+    if with_courses_cat and res:
+        result['title'] = res[0].title
+        result['credits'] = res[0].credits
+        try:
+            weight = int(result['WEIGHT'])
+            credits = int(res[0].credits)
+            gpa_course =  int(res[0].credits) * weight
+            gpa += gpa_course
+            course_count += credits
+            result['gpa'] = 'ok'
+        except:
+            result['gpa'] = 'N/A'
+    else:
+        result['title'] = ""
+        result['credits'] = "N/A"
+        result['gpa'] = 'N/A'
+        #result['WEIGHT'] = 'N/A'
+        #result['GRADE'] = 'N/A'
+    if r.Semester == '2':
+        sem2.append(result)
+    else:
+        sem1.append(result)
+if course_count:
+    gpa = float(gpa) / course_count
+    gpa = "%4.2f" % gpa
+
+#set_trace()
+verdict_voc = context.portal_vocabularies.verdicts
+verdict_code = student_from_cat.verdict
+if verdict_code:
+    info['verdict'] = verdict = verdict_voc.get(verdict_code,'N/A').upper()
+else:
+    info['verdict'] = verdict = 'N/A'
+
+if student_from_cat.level:
+    if student_from_cat.sex:
+        info['sex'] = 'F'
+    else:
+        info['sex'] = 'M'
+    if verdict in ('A','B'):
+        info['level'] = int(student_from_cat.level)-100
+    else:
+        info['level'] = int(student_from_cat.level)
+else:
+    info['sex'] = 'N/A'
+    info['level'] = 'N/A'
+
+info['session'] = session
+info['gpa'] = gpa
+info['results'] = (sem1, sem2)
+#info['student_from_returning'] = student_from_returning
+info['student'] = student_from_cat
+info['s_id'] = student_id
+return info
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getSimpleStudentStatistics.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getSimpleStudentStatistics.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getSimpleStudentStatistics.py	(revision 2226)
@@ -0,0 +1,148 @@
+## Script (Python) "getRetStudentStatistics"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: getStudentStatistics.py 1277 2007-01-11 21:11:37Z joachim $
+"""
+return Student Statistics
+"""
+
+import logging
+logger = logging.getLogger('Skins.getSimpleStudentStatistics')
+
+logger.info('%s invoked statistics' % context.portal_membership.getAuthenticatedMember())
+if not context.isStaff():
+    return 'Not allowed'
+
+#entry_sessions = ('-1','94','95','96','97','98','99','00','01','02','03','04','05','0','1','2','3','4','5')
+
+catA =      (      'school_fee_paid',
+                   'courses_registered',
+                   'courses_validated',
+                   )
+
+catB =      (      'courses_registered',
+                   'courses_validated',
+                   )
+
+catC =      (      'returning',
+                   'admitted',
+                   'clearance_pin_entered',
+                   'objection_raised',
+                   'clearance_requested',
+                   'cleared_and_validated',
+                   )
+
+
+full_time =       ('ume_ft','de_ft','ug_ft','pg_ft')
+part_time =       (         'de_pt','ug_pt','pg_pt')
+diploma   =       ('dp_ft','dp_pt')
+
+
+faculties = context.portal_catalog(portal_type="Faculty")
+
+l = []
+
+fac_res = {}
+
+dict = {}
+dict['id'] = 'All Faculties'
+dict['title'] = 'All Faculties'
+
+
+res_ft = context.students_catalog(mode = full_time)
+dict['total_ft'] = len(res_ft)
+
+res_pt = context.students_catalog(mode = part_time)
+dict['total_pt'] = len(res_pt)
+
+res_dp = context.students_catalog(mode = diploma)
+dict['total_dp'] = len(res_dp)
+
+res_Aft = context.students_catalog(review_state = catA, mode = full_time)
+dict['total_Aft'] = len(res_Aft)
+
+res_Apt = context.students_catalog(review_state = catA, mode = part_time)
+dict['total_Apt'] = len(res_Apt)
+
+res_Adp = context.students_catalog(review_state = catA, mode = diploma)
+dict['total_Adp'] = len(res_Adp)
+
+res_Bft = context.students_catalog(review_state = catB, mode = full_time)
+dict['total_Bft'] = len(res_Bft)
+
+res_Bpt = context.students_catalog(review_state = catB, mode = part_time)
+dict['total_Bpt'] = len(res_Bpt)
+
+res_Bdp = context.students_catalog(review_state = catB, mode = diploma)
+dict['total_Bdp'] = len(res_Bpt)
+
+res_Cft = context.students_catalog(review_state = catC, mode = full_time)
+dict['total_Cft'] = len(res_Cft)
+
+res_Cpt = context.students_catalog(review_state = catC, mode = part_time)
+dict['total_Cpt'] = len(res_Cpt)
+
+res_Cdp = context.students_catalog(review_state = catC, mode = diploma)
+dict['total_Cdp'] = len(res_Cdp)
+
+
+res_total = context.students_catalog()
+dict['total_in_catalog'] = len(res_total)
+dict['not_categorized'] = dict['total_in_catalog'] - dict['total_Aft'] - dict['total_Apt'] - dict['total_Adp'] - dict['total_Cft'] - dict['total_Cpt'] - dict['total_Cdp']
+
+l.append(dict)
+
+
+for f in faculties:
+    dict = {}
+    dict['id'] = f.getId
+    dict['title'] = f.Title
+
+    res_ft = context.students_catalog(faculty = f.getId, mode = full_time)
+    dict['total_ft'] = len(res_ft)
+
+    res_pt = context.students_catalog(faculty = f.getId, mode = part_time)
+    dict['total_pt'] = len(res_pt)
+
+    res_dp = context.students_catalog(faculty = f.getId, mode = diploma)
+    dict['total_dp'] = len(res_dp)
+
+    res_Aft = context.students_catalog(faculty = f.getId, review_state = catA, mode = full_time)
+    dict['total_Aft'] = len(res_Aft)
+
+    res_Apt = context.students_catalog(faculty = f.getId, review_state = catA, mode = part_time)
+    dict['total_Apt'] = len(res_Apt)
+
+    res_Adp = context.students_catalog(faculty = f.getId, review_state = catA, mode = diploma)
+    dict['total_Adp'] = len(res_Adp)
+
+    res_Bft = context.students_catalog(faculty = f.getId, review_state = catB, mode = full_time)
+    dict['total_Bft'] = len(res_Bft)
+
+    res_Bpt = context.students_catalog(faculty = f.getId, review_state = catB, mode = part_time)
+    dict['total_Bpt'] = len(res_Bpt)
+
+    res_Bdp = context.students_catalog(faculty = f.getId, review_state = catB, mode = diploma)
+    dict['total_Bdp'] = len(res_Bpt)
+
+    res_Cft = context.students_catalog(faculty = f.getId, review_state = catC, mode = full_time)
+    dict['total_Cft'] = len(res_Cft)
+
+    res_Cpt = context.students_catalog(faculty = f.getId, review_state = catC, mode = part_time)
+    dict['total_Cpt'] = len(res_Cpt)
+
+    res_Cdp = context.students_catalog(faculty = f.getId, review_state = catC, mode = diploma)
+    dict['total_Cdp'] = len(res_Cdp)
+
+
+    l.append(dict)
+
+return l
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentBaseInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentBaseInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentBaseInfo.py	(revision 2226)
@@ -0,0 +1,51 @@
+## Script (Python) "getStudentBaseInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: getTransferInfo.py 1339 2007-01-21 22:55:34Z henrik $
+"""
+return Info about the current Student
+"""
+import logging
+logger = logging.getLogger('Skins.getStudentBaseInfo')
+from DateTime import DateTime
+
+request = context.REQUEST
+mtool = context.portal_membership
+wf = context.portal_workflow
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+
+if mtool.isAnonymousUser():
+    return None
+info = {}
+#from Products.zdb import set_trace
+#set_trace()
+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))
+    return None
+elif context.isStaff():
+    student_id = requested_id
+else:
+    student_id = member_id
+
+
+#students_object = context.portal_url.getPortalObject().campus.students
+#student = getattr(students_object,student_id)
+
+res = context.students_catalog(id = student_id)
+if len(res) != 1:
+    return None
+sbrain = res[0]
+info['id'] = student_id
+info['student'] = context.getFormattedStudentEntry(sbrain)
+#info['entry_mode'] = sbrain.entry_mode
+
+
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentFolderInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentFolderInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentFolderInfo.py	(revision 2226)
@@ -0,0 +1,106 @@
+## Script (Python) "getStudentFolderInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=with_items=None
+##title=
+##
+# $Id$
+"""
+return Info about the current Student
+"""
+request = context.REQUEST
+form = request.form
+fget = form.get
+wf = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+path_info = request.get('PATH_INFO').split('/')
+
+import logging
+logger = logging.getLogger('Skins.getStudentFolderInfo')
+
+
+info = {}
+member_id = str(member)
+#from Products.zdb import set_trace;set_trace()
+is_student = info['is_student'] = context.isStudent()
+is_staff = info['is_staff'] = context.isStaff()
+is_sectionofficer = info['is_sectionofficer'] = context.isSectionOfficer()
+while True:
+    if mtool.isAnonymousUser():
+        return None
+    requested_id = context.getStudentId()
+    if not is_student and requested_id:
+        student_id = requested_id
+        break
+    if member_id != requested_id:
+        logger.info('%s tried to access %s' % (member_id,requested_id))
+        student_id = member_id
+        mtool.assertViewable(context)
+        break
+    student_id = member_id
+    break
+student_path_root = "%s/campus/students/%s" % (context.portal_url.getPortalPath(),student_id)
+student_path = "%s/campus/students/%s" % (context.portal_url(),student_id)
+res = context.students_catalog(id = student_id)
+if not res:
+    return None
+st_brain = res[0]
+#from Products.zdb import set_trace;set_trace()
+for field in context.students_catalog.schema():
+    info[field] = getattr(st_brain,field)
+
+#res = context.portal_catalog(portal_type='Student',id = student_id)
+#if res:
+#    info['review_state'] = res[0].review_state
+
+info['review_state'] = context.getStudentReviewState()
+
+info['session'] = False
+if st_brain.matric_no:
+    res = context.results_import(matric_no = st_brain.matric_no)
+    if res:
+       info['session'] = True
+
+
+info['id'] = student_id
+items = []
+s_edit_links = {'StudentApplication': 'application_edit_form',
+              'StudentAccommodation': 'reserve_accommodation',
+              'StudentClearance': 'clearance_edit_form',
+              'StudentPersonal': 'personal_edit_form',
+              }
+s_view_links = {'StudentApplication': 'application_view',
+              'StudentAccommodation': 'accommodation_view',
+              'StudentClearance': 'clearance_view',
+              'StudentPersonal': 'personal_view',
+              'StudentStudyCourse': 'study_course_view',
+              'PaymentsFolder': 'payments_view',
+              'StudentPume': 'pume_view',
+              }
+sos = context.portal_catalog(container_path=student_path_root)
+for so in sos:
+    row = {}
+    row['id'] = so.getId
+    row['title'] = so.Title
+    url = row['url'] = "%s/%s" % (student_path,so.getId)
+    row['type'] = so.portal_type
+    review_state = row['review_state'] = so.review_state
+    row['is_editable'] = (is_student and review_state == "opened") or is_sectionofficer
+    sv_link = s_view_links.get(so.portal_type,None) or "waeup_document_view"
+    row['s_view_link'] = "%s/%s" % (url,sv_link)
+    se_link = s_edit_links.get(so.portal_type,None)
+    row['s_edit_link'] = None
+    if se_link:
+        row['s_edit_link'] = "%s/%s" % (url,se_link)
+    row['display'] = review_state in ('opened','closed','bed_reserved','maintenance_fee_paid',)\
+                    and so.portal_type not in  ('StudentPume','StudentAccommodation','PaymentsFolder',) or\
+                    so.portal_type == 'StudentStudyCourse'
+    items.append(row)
+info['items'] = items
+info['member'] = member
+return info
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentId.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentId.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentId.py	(revision 2226)
@@ -0,0 +1,26 @@
+## Script (Python) "getStudentId"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+return StudentId from request
+"""
+
+ptls = context.REQUEST.get('PATH_INFO')
+start = ptls.find('/students/')
+if start < -1:
+    return None
+start += 10
+student_id = ptls[start:start+7]
+try:
+    int(student_id[1:])
+    return student_id
+except:
+    return None
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentInfo.py	(revision 2226)
@@ -0,0 +1,118 @@
+## Script (Python) "getStudentInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None, with_items=None
+##title=
+##
+# $Id$
+"""
+return Info about the current Student
+"""
+request = context.REQUEST
+form = request.form
+fget = form.get
+wf = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+path_info = request.get('PATH_INFO').split('/')
+
+import logging
+logger = logging.getLogger('Skins.getStudentInfo')
+
+
+info = {}
+member_id = str(member)
+#from Products.zdb import set_trace
+#set_trace()
+student_id = None
+if student is None:
+    while True:
+        if mtool.isAnonymousUser():
+            return None
+        try:
+            requested_id = path_info[path_info.index('students')+1]
+        except (ValueError,IndexError):
+            student_id = member_id
+            break
+        if not context.isStudent() and 'students' in path_info:
+            student_id = requested_id
+            break
+        if member_id != requested_id:
+            logger.info('%s tried to access %s' % (member_id,requested_id))
+            student_id = member_id
+            mtool.assertViewable(context)
+            break
+        student_id = member_id
+        break
+else:
+    student_id = student.getId()
+
+#roles = member.getRoles()
+student_path = "%s/campus/students/%s" % (context.portal_url.getPortalPath(),student_id)
+student = context.restrictedTraverse(student_path,default=None)
+
+if student is None or student.portal_type != "Student":
+    return None
+##res = context.portal_catalog(id = student_id,portal_type='Student')
+##if not res:# or len(res) > 1:
+##    return None
+##brain = res[-1]
+##student = brain.getObject()
+
+info['review_state'] = context.getStudentReviewState()
+info['student'] = student
+info['id'] = student.getId()
+info['url'] = student.absolute_url()
+info['student_doc'] = student.getContent()
+info['app'] = student.application
+info['app_doc'] = student.application.getContent()
+#info['per'] = getattr(student,'personal',None)
+#info['sex'] = 'male'
+#if info['per'] is not None:
+#    info['per_doc'] = student.personal.getContent()
+#    if info['per_doc'].sex:
+#        info['sex'] = 'female'
+#else:
+#    if info['app_doc'].jamb_sex == "F":
+#        info['sex'] = 'female'
+course = getattr(student,'study_course',None)
+if course:
+    cert_id = course.getContent().study_course
+    res = context.portal_catalog(portal_type = "Certificate", id = cert_id)
+    ci = {}
+    if len(res) > 0:
+        info['course'] = course
+        brain = res[0]
+        ci['study_course'] = brain.getId
+        ci['title'] = brain.Title
+        pl = brain.getPath().split('/')
+        ci['faculty'] = pl[-4]
+        ci['department'] = pl[-3]
+        info['course_doc'] = ci
+    else:
+        info['course'] = None
+#
+
+#clear = getattr(student,'clearance',None)
+#info['clear'] = clear
+#if clear is not None:
+#    info['clear_doc'] = clear.getContent()
+#    info['clear_review_state'] = wf.getInfoFor(clear,'review_state',None)
+#
+#pume = getattr(student,'pume',None)
+#info['pume'] = pume
+#if pume is not None:
+#    info['pume_doc'] = pume.getContent()
+#    info['pume_review_state'] = wf.getInfoFor(pume,'review_state',None)
+#else:
+#    info['pume'] = None
+
+if not with_items:
+    return info
+
+request.set('student_id',student_id)
+request.set('student_url',info['url'])
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentName.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentName.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentName.py	(revision 2226)
@@ -0,0 +1,23 @@
+## Script (Python) "getStudentName"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+return Info about the current Student
+"""
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+if mtool.isAnonymousUser():
+    return None
+if not context.isStudent():
+    return None
+res = context.students_catalog(id = str(member))
+if len(res) != 1:
+    return None
+return res[0].name
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentNameInContext.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentNameInContext.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentNameInContext.py	(revision 2226)
@@ -0,0 +1,18 @@
+## Script (Python) "getStudentNameInContext"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: getStudentName.py 1162 2006-12-31 09:39:14Z henrik $
+"""
+return Info about the current Student in context
+"""
+id = context.getStudentId()
+res = context.students_catalog(id = id)
+if len(res) != 1:
+    return None
+return res[0].name
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentReviewState.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentReviewState.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentReviewState.py	(revision 2226)
@@ -0,0 +1,31 @@
+## Script (Python) "getStudentReviewState"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student_id=None
+##title=
+##
+# $Id$
+"""
+return the review_state of the Student
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+# from Products.AdvancedQuery import Eq, Between, Le,In
+# try:
+#     aq_portal = context.portal_catalog.evalAdvancedQuery
+# except:
+#     aq_portal = context.portal_catalog_real.evalAdvancedQuery
+if student_id is None:
+    student_id = context.getStudentId()
+#query = Eq('id',student_id)
+#res = aq_portal(query)
+res = context.students_catalog(id = student_id)
+if not res:
+    return None
+return res[0].review_state
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentWorkflowInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentWorkflowInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudentWorkflowInfo.py	(revision 2226)
@@ -0,0 +1,36 @@
+## Script (Python) "getStudentWorkflowInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+return Info about the current Student
+"""
+mtool = context.portal_membership
+wf = context.portal_workflow
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+if mtool.isAnonymousUser():
+    return None
+info = {}
+if not context.isStudent():
+    return None
+student_id = member_id
+students_object = context.portal_url.getPortalObject().campus.students
+student = getattr(students_object, student_id)
+info['id'] = student_id
+#info['student'] = student
+info['url'] = student.absolute_url()
+review_state = info['review_state'] = context.getStudentReviewState(student_id)
+info['cr'] = review_state in  ('returning',
+                                           'school_fee_paid',
+                                           'courses_registered',
+                                           'courses_validated',
+                                           )
+info['tr'] = review_state in  ('returning',)
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudyCourseInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudyCourseInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudyCourseInfo.py	(revision 2226)
@@ -0,0 +1,92 @@
+## Script (Python) "getStudyCourseInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id$
+"""
+return Info about the Students StudyCourse
+"""
+
+mtool = context.portal_membership
+if mtool.isAnonymousUser():
+    return None
+
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+request = context.REQUEST
+
+wftool = context.portal_workflow
+path_info = request.get('PATH_INFO').split('/')
+
+info = {}
+info['is_so'] = context.isSectionOfficer()
+info['action'] = "%s" % context.absolute_url()
+info['choosen_ids'] = request.get('ids',[])
+course  = info['doc'] = context.getContent()
+student_id = context.getStudentId()
+res = context.students_catalog(id = student_id)
+if not res:
+    return None
+sbrain = res[0]
+info['student'] = sbrain
+cert_id = sbrain.course
+res = context.portal_catalog(portal_type = "Certificate", id = cert_id)
+ci = {}
+if res:
+    info['cert_id'] = cert_id
+    brain = res[0]
+    ci['study_course'] = brain.getId
+    ci['title'] = brain.Title
+    pl = brain.getPath().split('/')
+    ci['faculty'] = pl[-4]
+    ci['department'] = pl[-3]
+    info['course_doc'] = ci
+else:
+    info['cert_id'] = 'N/A'
+    ci['study_course'] = 'N/A'
+    ci['title'] = 'N/A'
+    ci['faculty'] = 'N/A'
+    ci['department'] = 'N/A'
+    info['course_doc'] = ci
+
+items = []
+current_level = sbrain.level
+levels = context.objectIds()
+review_state = wftool.getInfoFor(context,'review_state',None)
+student_review_state = context.getStudentReviewState()
+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\
+               current_level not in levels and\
+               (sbrain.verdict in ('A','B','C','F','J','M') or sbrain.jamb_reg_no.startswith('6'))
+
+levels.sort()
+info['create_level'] = None
+if may_register:
+    info['create_level'] = current_level
+for l in levels:
+    row = {}
+    row['id'] = l
+    #row['title'] = "Level %s" % l
+    row['title'] = context.portal_vocabularies.levels_voc[l]
+    row['url'] = "%s/%s" % (context.absolute_url(),l)
+    items.append(row)
+
+info['items'] = items
+
+try:
+    info['verdict'] = context.portal_vocabularies.verdicts.get(info['doc'].current_verdict).upper()
+except:
+    info['verdict'] = course.current_verdict
+
+return info
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudyLevelInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudyLevelInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getStudyLevelInfo.py	(revision 2226)
@@ -0,0 +1,138 @@
+## Script (Python) "getStudyLevelInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id$
+"""
+return Info about the Studylevel
+"""
+
+wf = context.portal_workflow
+mtool = context.portal_membership
+if mtool.isAnonymousUser():
+    return None
+
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+
+from Products.AdvancedQuery import Eq, Between, Le,In
+try:
+    aq_portal = context.portal_catalog.evalAdvancedQuery
+except:
+    aq_portal = context.portal_catalog_real.evalAdvancedQuery
+request = context.REQUEST
+#session = request.SESSION
+response = request.RESPONSE
+
+def calculateGPA():
+    """calculate the gpa"""
+    sum = 0
+    course_count = 0
+    for sc in context.objectValues():
+        result = sc.getContent()
+        if not result.grade:
+            continue
+        res = context.portal_catalog({'meta_type': 'Course',
+                                      'id': sc.aq_parent.id})
+        if len(res) < 1:
+            continue
+        course = res[0].getObject().getContent()
+    if course_count:
+        return sum/course_count
+    return 0.0
+
+def cmp_semester_id(a,b):
+    s1 = "%(semester)s%(id)s" % a
+    s2 = "%(semester)s%(id)s" % b
+    if s1 == s2:
+        return 0
+    if s1 > s2:
+        return 1
+    return -1
+
+student_id = context.getStudentId()
+
+info = {}
+info['is_so'] = is_so = context.isSectionOfficer()
+info['is_student'] = is_student = context.isStudent()
+info['is_ca'] = is_ca = context.isCourseAdviser()
+info['student'] = student = context.students_catalog(id=student_id)[0]
+info['review_state'] = review_state = context.getStudentReviewState()
+info['view_only'] =  review_state != "school_fee_paid"
+info['show_check_boxes'] =  (is_ca and review_state in ('school_fee_paid',)) or\
+                            (is_student and context.getStudentReviewState() == "school_fee_paid") or\
+                            (is_so)
+info['choosen_ids'] = request.get('ids',[])
+info['status_info'] = ""
+if is_student:
+    if review_state == 'courses_registered':
+        info['status_info'] = "Request for Course Validation pending"
+    elif review_state == 'courses_validated':
+        info['status_info'] = "Courses validated"
+elif is_ca:
+    if review_state == 'courses_registered':
+        info['status_info'] = "Please validate these Courses"
+    elif review_state == 'courses_validated':
+        info['status_info'] = "Courses validated"
+info['doc'] = context.getContent()
+##study_course = context.aq_parent.getContent()
+##cert_id = study_course.study_course
+cert_id = student.course
+info['cert_id'] = cert_id
+normal = []
+carry_overs = []
+credits_total = 0
+for id,obj in context.objectItems():
+    #try:
+    #    credit = int(obj.getContent().credits)
+    #except ValueError:
+    #    credit = 3
+    #credits_total += credit
+    if not id:
+        continue
+    if id.endswith('_co'):
+        d = context.getCourseInfo(id[:-3])
+        try:
+            credits_total += int(d['credits'])
+        except ValueError:
+            credits_total += 0
+        d['id'] = id
+        d['grade'] = obj.getContent().grade
+        carry_overs.append(d)
+    else:
+        d = context.getCourseInfo(id)
+        d['id'] = id
+        coe = getattr(obj.getContent(),'core_or_elective',True)
+        d['coe'] = 'Core'
+        try:
+            credits_total += int(d['credits'])
+        except ValueError:
+            credits_total += 0
+        if not coe:
+            d['coe'] = 'Elective'
+        normal.append(d)
+info['credits_total'] = credits_total
+info['credits_exceeded'] = credits_total > 51
+current_session = student.session
+info['submission_allowed']= not info['credits_exceeded'] and current_session == context.getSessionId()[-2:]
+carry_overs.sort(cmp_semester_id)
+info['carry_overs'] = carry_overs
+normal.sort(cmp_semester_id)
+info['normal'] = normal
+
+students_object = context.portal_url.getPortalObject().campus.students
+student = getattr(students_object, student_id)
+info['app'] = student.application
+info['app_doc'] = student.application.getContent()
+
+return info
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getTransferInfo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getTransferInfo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getTransferInfo.py	(revision 2226)
@@ -0,0 +1,73 @@
+## Script (Python) "getTransferInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+return Info about the current Student
+"""
+import logging
+logger = logging.getLogger('Skins.getTransferInfo')
+from DateTime import DateTime
+
+request = context.REQUEST
+mtool = context.portal_membership
+wf = context.portal_workflow
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+
+if mtool.isAnonymousUser():
+    return None
+info = {}
+#from Products.zdb import set_trace
+#set_trace()
+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))
+    return None
+elif context.isStaff():
+    student_id = requested_id
+else:
+    student_id = member_id
+
+
+students_object = context.portal_url.getPortalObject().campus.students
+
+student = getattr(students_object,student_id)
+payments = getattr(student,'payments').objectIds()
+info['paid'] = False
+for payment in payments:
+    if payment.startswith('transfer'):
+        info['paid'] = True
+        payments_obj = getattr(student,'payments')
+        payment_obj = getattr(payments_obj,payment)
+        info['pin'] = payment_obj.getContent().order_id
+        break
+
+
+#student = getattr(students_object, student_id)
+res = context.students_catalog(id = student_id)
+if len(res) != 1:
+    return None
+sbrain = res[0]
+info['id'] = student_id
+info['student'] = context.getFormattedStudentEntry(sbrain)
+info['entry_mode'] = sbrain.entry_mode
+results = context.results_import(matric_no=sbrain.matric_no)
+taken = []
+if len(results) > 0:
+    for r in results:
+        taken.append(r)
+info['taken'] = taken
+
+# for testing of transfer forms
+#info['paid'] = True
+#info['pin'] = 'CLR-1-0123456789'
+
+
+return info
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/getVerdict.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/getVerdict.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/getVerdict.py	(revision 2226)
@@ -0,0 +1,27 @@
+## Script (Python) "getVerdict"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=verdict
+##title=
+##
+# $Id$
+
+verdicts = {'SUCCESSFUL STUDENT': ('A',True),
+            'STUDENT WITH CARRYOVER COURSES': ('B',True),
+            'STUDENT ON PROBATION': ('C',False),
+            'WITHDRAWAL STUDENT': ('D',False),
+            'FIRST CLASS HONOURS': ('A',True),
+            'SECOND CLASS HONOURS (UPPER DIVISION)': ('A',True),
+            'SECOND CLASS HONOURS (LOWER DIVISION)': ('A',True),
+            'THIRD CLASS': ('A',True),
+            'PASS': ('A',True),
+            'Temporary Withdrawal': ('J',False),
+            'REINSTATEMENT': ('M',False),
+#            '': ('',False),
+            }
+
+return verdicts.get(verdict,('no_such_verdict',False))
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/get_levels_voc.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/get_levels_voc.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/get_levels_voc.py	(revision 2226)
@@ -0,0 +1,12 @@
+##parameters=key=None
+# $Id$
+"""
+Return the levels as an vocabulary
+
+"""
+if key is None:
+    return [("%s" % l,"Level %s" % l) for l in range(100,700,100)]
+if not int(key) % 100:
+    return "Level %s" % key
+return "Level %s0 (on probation)" % key[:-1]
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/get_searchable_student_states.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/get_searchable_student_states.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/get_searchable_student_states.py	(revision 2226)
@@ -0,0 +1,30 @@
+## Script (Python) "get_searchable_student_states"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=key=None
+##title=
+##
+# $Id$
+"""
+return the searchable student_states depending on context
+"""
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+roles = member.getRolesInContext(context)
+voc = context.portal_vocabularies.searchable_student_states
+
+if key is not None:
+    return voc.get(key)
+if "ClearanceOfficers" in member.getGroups():
+    return [item for item in voc.items() if item[0].startswith('clear') or
+                                         item[0] in ("all",)]
+elif "CourseAdvisers" in member.getGroups():
+    return [item for item in voc.items() if item[0].startswith('courses') or
+                                         item[0] in ("all",)]
+return voc.items()
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/id_card_demo.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/id_card_demo.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/id_card_demo.pt	(revision 2226)
@@ -0,0 +1,152 @@
+<metal:body use-macro="here/idcard_template/macros/master">
+  <metal:main fill-slot="main"
+              tal:define="global info context/getIdCardInfo;">
+
+    <span tal:condition="not: info">
+      <span tal:content="here/illegal_view" />
+    </span>
+    <span tal:condition="info"
+          tal:define="pd python: info['personal']">
+
+    
+    <table border=0 style="border-style:solid; border-width:1px; border-color:black" cellpadding="0px" cellspacing="10px" width="450px" height="300px">
+    <tr>
+      <td colspan=2>
+        <div style="background-color:red; font-weight:bold; color:white; font-family:Courier New; font-size:120%">
+        STUDENT IDENTITY CARD
+        </div>
+        <div style="background-color:white; font-weight:bold; color:black; font-family:Courier New; font-size:120%"> 
+        UNIVERSITY OF ILORIN, ILORIN, NIGERIA    
+        </div>
+      </td>
+    </tr>
+    
+    <tr>
+    <td width="70%" valign="top">
+      <table border=0 style="font-family:Courier New; font-size:100%;
+                             background-image:url(ilorin_gray_demo.gif); background-repeat:no-repeat; background-position:50px 30px;
+                             background-attachment:scroll;">
+          <tr>
+            <td valign="top" width="40%">NAMES:</td> 
+            <td><span tal:content="info/scatalog/name" /></td>
+          </tr>           
+                
+          <tr>
+            <td>MATRIC NO:</td> 
+            <td><span tal:content="info/scatalog/matric_no" /></td>
+          </tr>      
+          
+          <tr>
+            <td>LEVEL:</td> 
+            <td><span tal:content="info/scatalog/level" /></td>
+          </tr>
+                    
+          
+          <span tal:define="f_id info/scatalog/faculty;
+                            d_id info/scatalog/department;
+                            f_title context/academics/?f_id/Title|string:Faculty not yet in Prospectus;
+                            d_title context/academics/?f_id/?d_id/Title|string:Department not yet in Prospectus"
+                            >
+            <tr>
+              <td valign="top">FACULTY:</td>
+              <td tal:content="f_title" />
+            </tr>
+            <tr>
+              <td valign="top">DEPARTMENT:</td> 
+              <td><span tal:content="d_title" /></td>
+            </tr>
+          </span>
+          
+          <tr>
+            <td>ISSUE DATE:</td> 
+            <td />
+          </tr>   
+          
+          <tr>
+            <td>EXPIRY DATE:</td> 
+            <td />
+          </tr>     
+                
+        </table>
+      </td>
+      
+      <td width="30%" align="center">
+        <table style="font-family:Courier New; font-size:100%">
+          <tr>
+            <td align="center" tal:condition="python: 'passport' in info['student'].application.getContent().objectIds()">
+            <img height="150px" tal:attributes="src string:${here/portal_url}/campus/students/${info/scatalog/id}/application/passport"/>
+            </td>
+          </tr>
+          <tr >
+           <td style="padding:15px">&nbsp;</td> 
+          </tr>    
+          <tr>
+           <td align="center" style="border-top-style:solid; border-top-width:1px; 
+                                    border-top-color:black; margin:100px; font-size:80%">
+             Student's Signature
+           </td> 
+          </tr>   
+        </table>
+      </td>
+      
+      </tr>
+      </table>
+      
+      <br /><br />
+      
+    <table border=0 style="border-style:solid; border-width:1px; border-color:black; font-family:Courier New; font-size:100% " 
+                  width="450px" height="300px" cellpadding="0px" cellspacing="0px" >
+        
+      
+    <tr>
+      <td>
+        <div style="background-color:black; margin:0px; padding:4px; margin-top:10px">
+        &nbsp; </div>
+
+      </td>
+    </tr>        
+    <tr height="50%" >
+      <td>
+      <div style="padding:10px">This identity card is not transferable. It must be produced anytime it's requested by any 
+      officer of the University or any authorized person(s).
+      <br /><br />
+      Loss of this card must be reported immediately to the registrar, University of Ilorin, P.M.B. 1515,
+      Ilorin, Nigeria. Telephone: (031) 221554, 221557
+      </div>
+      </td>
+    </tr>
+    
+    <tr>
+    <td valign="top">
+      <table border=0  cellpadding="0px" cellspacing="0px" width="100%" style="margin-left:10px;">
+          
+      <tr>
+        <td width="50%" valign="top">Hall of Residence:</td> 
+        <td width="10%"><span tal:content="pd/hall" /></td>
+        <td width="40%"></td>
+      </tr>        
+
+      <tr>
+        <td valign="top">Next of Kin:</td> 
+        <td><span tal:content="pd/next_kin_lastname"/> <span tal:content="pd/next_kin_firstname"/> <span tal:content="pd/next_kin_middlename"/></td>
+        <td></td>
+      </tr>          
+
+      <tr>
+        <td valign="top">Address of Next of Kin:</td> 
+        <td><span tal:content="pd/next_kin_address"/>
+        <td align="center" style="font-size:80%">
+             Registrar's Signature
+        </td> 
+      </tr>       
+      
+   
+      </table>
+      </td>
+      </tr>
+      </table>     
+
+  </span>
+  </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/inter_faculty_transfer_1.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/inter_faculty_transfer_1.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/inter_faculty_transfer_1.pt	(revision 2226)
@@ -0,0 +1,74 @@
+<metal:body use-macro="here/slip_template/macros/master">
+  <metal:main fill-slot="main"
+              tal:define="info context/getTransferInfo">
+
+              
+    <span tal:condition="python: not info or not info.get('paid',False)">
+        <span tal:content="here/illegal_view" />
+    </span>       
+    <span tal:condition="info/paid|nothing">   
+    <h3><center>INTER-FACULTY TRANSFER, 2006/2007 SESSION</center></h3>
+    <h3><center>- APPLICATION FORM -</center></h3>
+    <br />
+    <center><font color="red"><span tal:content="info/pin"/></font></center>
+    <br />
+    TO BE PRINTED IN TRIPLICATE AND SUBMITTED TO THE STUDENT'S PRESENT DEAN.
+    <br /><br />    
+    <strong>NOTE:</strong> INTER-FACULTY TRANSFER IS A PRIVILEGE, AND NOT A RIGHT.
+    STUDENTS WHO HAVE PREVIOUSLY TRANSFERRED FROM ANOTHER DEPARTMENT OR FACULTY/SCHOOL ARE NOT ELIGIBLE FOR TRANSFERS.
+    <br /><br />
+    <strong>SECTION A:</strong>	 TO BE COMPLETED BY STUDENT
+    
+    <br /><br />
+    
+    <table border=0 width=100%>
+    <tr><td width="10px">1.</td><td width="240px">Name of Student:</td><td valign="top" tal:content="info/student/name" /></tr>
+    <tr><td valign="top">2.</td><td>Mode of Entry:</td><td valign="top" tal:content="info/student/entry_mode" /></tr>
+    <tr><td>&nbsp;</td><td>UME (Indicate Scores):</td><td style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">&nbsp;</td></tr>
+    <tr><td>&nbsp;</td><td>Direct Entry (Indicate Grades):</td><td style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">&nbsp;</td></tr>
+    <tr><td valign="top">3.</td><td>Matriculation No:</td><td valign="top" tal:content="info/student/matric_no" /></tr>
+    <tr><td valign="top">4.</td><td>Present Faculty/School:</td><td valign="bottom" tal:content="info/student/faculty" /></tr>
+    <tr><td>&nbsp;</td><td>Present Department (if applicable):</td><td valign="bottom" tal:content="info/student/department" /></tr>        
+    <tr><td valign="top">5.</td><td>Present Level:</td><td valign="top" tal:content="info/student/level" /></tr> 
+    <tr><td valign="top">6.</td><td valign="top">Courses Taken Last Session:</td>
+        <td> <span tal:repeat="course info/taken"> <span valign="top" tal:content="course/CosCode" />, </span>
+        </td>
+    </tr> 
+    <tr><td>7.</td><td>Proposed Department:</td><td style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">&nbsp;</td></tr> 
+    <tr><td valign="top">8.</td><td>Reason(s) for Transfer (Tick)</td><td></td></tr> 
+    <tr><td></td><td>(a) Personal Wish:</td><td>( )</td></tr> 
+    <tr><td></td><td width="210px">(b) Advised to Withdraw from Faculty/School:</td><td>( )</td></tr> 
+    <tr><td valign="top">9.</td><td width="210px">Have you previously transferred from any other Faculty/School or Department?</td><td valign="top">YES / NO</td></tr>                             
+    </table>
+    
+    <br /><br /><br /><br />
+    <table width=100%>
+    <tr >
+    <td width=40% style="border-top-style:dotted; border-top-width:1px; border-top-color:black"> Date</td>
+    <td></td>
+    <td width=40% style="border-top-style:dotted; border-top-width:1px; border-top-color:black">Signature of Student</td>
+    </tr>
+    </table>    
+ 
+    <br /><br /><br />
+    
+    <form action="" method="post"
+          tal:attributes="action string:inter_faculty_transfer_2">
+      <input type="submit" 
+             class="standalone" 
+             value="Page 2/3"
+             name="submit" />
+    </form>    
+    <form action="" method="post"
+          tal:attributes="action string:inter_faculty_transfer_3">
+      <input type="submit" 
+             class="standalone" 
+             value="Page 3/3"
+             name="submit" />
+    </form>    
+
+    </span>   
+    
+  </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/inter_faculty_transfer_2.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/inter_faculty_transfer_2.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/inter_faculty_transfer_2.pt	(revision 2226)
@@ -0,0 +1,120 @@
+<metal:body use-macro="here/slip_template/macros/master">
+  <metal:main fill-slot="main"
+              tal:define="info context/getTransferInfo">
+
+    <span tal:condition="python: not info or not info.get('paid',False)">
+        <span tal:content="here/illegal_view" />
+    </span>                
+    <span tal:condition="info/paid|nothing">                 
+    <center><font color="red"><span tal:content="info/pin"/></font></center>
+    <br />
+    <strong>SECTION B:</strong>	To be completed by the Dean of the Present Faculty/School in Consultation with the Head of Department (if applicable).
+    <br /><br />
+    <table border=0 width=100%>
+    
+    <tr><td width="10px" valign="top">10.</td><td valign="top">
+         a) Enter Marks and other records for last Session: 2003/2004. (Please seek the assistance of the Faculty Examinations Officer)</td></tr>
+         
+    <tr><td>&nbsp;</td>
+    <td valign="top">
+    
+          <table border=0 width="100%">
+            <tr>
+              <td>First Semester Results</td><td>Second Semester Results</td>
+            </tr>
+            <tr>
+              <td>
+              <span tal:repeat="course info/taken"> <div valign="top" tal:condition="python:course['Semester']=='1'"> <span tal:content="course/CosCode" />: <span tal:content="course/GRADE" /></div></span>
+              </td>
+              <td>
+              <span tal:repeat="course info/taken"> <div valign="top" tal:condition="python:course['Semester']=='2'"> <span tal:content="course/CosCode" />: <span tal:content="course/GRADE" /></div></span>
+              </td>
+            </tr>
+          </table>
+    </td>
+    </tr>
+   
+    <tr><td width="10px" valign="top"></td><td valign="top">
+         b) Was the student advised to withdraw from the Faculty/School:&nbsp;&nbsp;&nbsp; YES / NO</td></tr>   
+
+    </table>
+
+    <br />
+  
+   
+    <table border=0 width=100%>
+    
+    <tr><td width="10px" valign="top">11.</td><td valign="top">
+         Comments on Academic Records, Character and Discipline:</td></tr>
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>     
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>    
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>          
+             
+    <tr><td>&nbsp;</td><td>&nbsp;</td></tr> 
+    <tr><td width="10px" valign="top">12.</td><td valign="top">
+         Pending Disciplinary Action, if any (give details):</td></tr>
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>     
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>    
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>        
+         
+    <tr><td>&nbsp;</td><td>&nbsp;</td></tr> 
+    <tr><td width="10px" valign="top">13.</td><td valign="top">
+         Are you willing to release this student?&nbsp;&nbsp;&nbsp;YES / NO</td></tr>
+         
+    <tr><td>&nbsp;</td><td>&nbsp;</td></tr> 
+    <tr><td width="10px" valign="top">14.</td><td valign="top">
+         Give reason(s):</td></tr>
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>     
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>    
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>        
+         
+    </table>    
+    
+    <br /><br />
+
+    <table width=100% border=0>
+    <tr>
+    <td width=40%>Date:</td>
+    <td></td>
+    <td width=40%>Date:</td>
+    </tr>
+    <tr><td>&nbsp;</td><td>&nbsp;</td></tr> 
+    <tr><td>&nbsp;</td><td>&nbsp;</td></tr> 
+    <tr>
+    <td width=40% style="border-top-style:dotted; border-top-width:1px; border-top-color:black">Head of Department's Signature</td>
+    <td></td>
+    <td width=40% style="border-top-style:dotted; border-top-width:1px; border-top-color:black">Signature of Dean</td>
+    </tr>
+    </table>        
+    <br /><br />
+    
+    <form action="" method="post"
+          tal:attributes="action string:inter_faculty_transfer_1">
+      <input type="submit" 
+             class="standalone" 
+             value="Page 1/3"
+             name="submit" />
+    </form>    
+    <form action="" method="post"
+          tal:attributes="action string:inter_faculty_transfer_3">
+      <input type="submit" 
+             class="standalone" 
+             value="Page 3/3"
+             name="submit" />
+    </form>    
+
+    
+    </span>
+    
+  </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/inter_faculty_transfer_3.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/inter_faculty_transfer_3.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/inter_faculty_transfer_3.pt	(revision 2226)
@@ -0,0 +1,125 @@
+<metal:body use-macro="here/slip_template/macros/master">
+  <metal:main fill-slot="main"
+              tal:define="info context/getTransferInfo">
+
+    <span tal:condition="python: not info or not info.get('paid',False)">
+        <span tal:content="here/illegal_view" />
+    </span>                
+    <span tal:condition="info/paid|nothing">                 
+    <center><font color="red"><span tal:content="info/pin"/></font></center>
+    <br />
+    <strong>SECTION C:</strong>	To be completed by the Dean of the Proposed Faculty/School in consultation with the Head of Department Concerned (if applicable).
+    <br /><br />
+    <table border=0 width=100%>
+    
+    
+    <tr><td width="10px" valign="top">15.</td><td valign="top">
+         Are you willing to accept this student? &nbsp;&nbsp;&nbsp; YES / NO</td></tr>       
+    <tr><td width="10px" valign="top">16.</td><td valign="top">
+                   If YES, state</td></tr>       
+    <tr><td width="10px" valign="top">&nbsp;</td><td>
+        <table width=100% border=0>
+              <tr>
+               <td valign="top" width="100px">
+                 a) Department:
+               </td>
+               <td style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black"> &nbsp;</td>
+              </tr>
+              <tr>
+               <td valign="top" width="100px">
+                 b) Level:
+               </td>
+               <td style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black"> &nbsp;</td>
+              </tr>
+              <tr>
+               <td valign="top" width="100px">
+                 c) Course:
+               </td>
+               <td style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black"> &nbsp;</td>
+              </tr>                            
+        </table>  
+    </td></tr>
+    <tr><td>&nbsp;</td><td>&nbsp;</td></tr>  
+    <tr><td width="10px" valign="top">17.</td><td valign="top">
+         Give reasons for accepting the student:</td></tr>
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>     
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>    
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>          
+    <tr><td>&nbsp;</td><td>&nbsp;</td></tr> 
+    <tr><td width="10px" valign="top">18.</td><td valign="top">
+         If NO, give reasons for not accepting the student:</td></tr>
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>     
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>    
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>        
+
+    </table>    
+    
+    <br /><br />
+
+    <table width=100% border=0>
+    <tr>
+    <td width=40%>Date:</td>
+    <td></td>
+    <td width=40%>Date:</td>
+    </tr>
+    <tr><td>&nbsp;</td><td>&nbsp;</td></tr> 
+    <tr><td>&nbsp;</td><td>&nbsp;</td></tr> 
+    <tr>
+    <td width=40% style="border-top-style:dotted; border-top-width:1px; border-top-color:black">Head of Department Signature (if applicable)</td>
+    <td></td>
+    <td width=40% style="border-top-style:dotted; border-top-width:1px; border-top-color:black">Signature of Dean</td>
+    </tr>
+    </table>        
+
+    <br /><br />    
+    
+    <strong>SECTION D:</strong>	Decision(s) taken by the Central Committee
+    
+    <br /><br />
+    
+    <table border=0 width=100%>
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>     
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>     
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>                       
+    </table>  
+
+    <br /><br /><br /><br />
+    <table width=100%>
+    <tr >
+    <td width=40% style="border-top-style:dotted; border-top-width:1px; border-top-color:black">Date</td>
+    <td></td>
+    <td width=40% style="border-top-style:dotted; border-top-width:1px; border-top-color:black">Chairman's Signature</td>
+    </tr>
+    </table>   
+    <br /><br />
+    
+    <form action="" method="post"
+          tal:attributes="action string:inter_faculty_transfer_1">
+      <input type="submit" 
+             class="standalone" 
+             value="Page 1/3"
+             name="submit" />
+    </form>    
+    <form action="" method="post"
+          tal:attributes="action string:inter_faculty_transfer_2">
+      <input type="submit" 
+             class="standalone" 
+             value="Page 2/3"
+             name="submit" />
+    </form>    
+
+    
+    </span>
+    
+  </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/intra_faculty_transfer_1.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/intra_faculty_transfer_1.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/intra_faculty_transfer_1.pt	(revision 2226)
@@ -0,0 +1,77 @@
+<metal:body use-macro="here/slip_template/macros/master">
+  <metal:main fill-slot="main"
+              tal:define="info context/getTransferInfo">
+
+              
+    <span tal:condition="python: not info or not info.get('paid',False)">
+        <span tal:content="here/illegal_view" />
+    </span>       
+    <span tal:condition="info/paid|nothing">   
+    <h3><center>INTER DEPARTMENTAL TRANSFER, 2006/2007 SESSION</center></h3>
+    <h3><center>- APPLICATION FORM -</center></h3>
+    <br />
+    <center><font color="red"><span tal:content="info/pin"/></font></center>
+    <br />
+    
+    TO BE PRINTED IN TRIPLICATE AND SUBMITTED TO THE STUDENT'S DEAN.
+    <br /><br />
+    <strong>NOTE:</strong> INTER-DEPARTMENTAL TRANSFER IS A PRIVILEGE, 
+    NOT A RIGHT, STUDENTS WITHOUT GENUINE AND ACCEPTABLE REASONS OR WHO HAVE 
+    PREVIOUSLY TRANSFERRED FROM ANOTHER DEPARTMENT OR FACULTY/SCHOOL ARE NOT 
+    ELIGIBLE TO TRANSFER.
+    <br /><br />
+    <strong>SECTION A:</strong>	 TO BE COMPLETED BY STUDENT
+    
+    <br /><br />
+    
+    <table border=0 width=100%>
+    <tr><td width="10px">1.</td><td width="240px">Name of Student:</td><td valign="top" tal:content="info/student/name" /></tr>
+    <tr><td valign="top">2.</td><td>Mode of Entry:</td><td valign="top" tal:content="info/student/entry_mode" /></tr>
+    <tr><td>&nbsp;</td><td>UME (Indicate Scores):</td><td style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">&nbsp;</td></tr>
+    <tr><td>&nbsp;</td><td>Direct Entry (Indicate Grades):</td><td style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">&nbsp;</td></tr>
+    <tr><td valign="top">3.</td><td>Matriculation No:</td><td valign="top" tal:content="info/student/matric_no" /></tr>
+    <tr><td valign="top">4.</td><td>Present Faculty/School:</td><td valign="bottom" tal:content="info/student/faculty" /></tr>
+    <tr><td>&nbsp;</td><td>Present Department (if applicable):</td><td valign="bottom" tal:content="info/student/department" /></tr>        
+    <tr><td valign="top">5.</td><td>Present Level:</td><td valign="top" tal:content="info/student/level" /></tr> 
+    <tr><td valign="top">6.</td><td valign="top">Courses Taken Last Session:</td>
+        <td> <span tal:repeat="course info/taken"> <span valign="top" tal:content="course/CosCode" />, </span>
+        </td>
+    </tr> 
+    <tr><td valign="top">7.</td><td>Proposed Faculty/School:</td><td style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">&nbsp;</td></tr> 
+    <tr><td></td><td>Proposed Department (if applicable):</td><td style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">&nbsp;</td></tr> 
+    <tr><td valign="top">8.</td><td>Reason(s) for Transfer (Tick)</td><td></td></tr> 
+    <tr><td></td><td>(a) Personal Wish:</td><td>( )</td></tr> 
+    <tr><td></td><td width="210px">(b) Advised to Withdraw from Faculty/School:</td><td>( )</td></tr> 
+    <tr><td valign="top">9.</td><td width="210px">Have you previously transferred from any other Faculty/School or Department?</td><td valign="top">YES / NO</td></tr>                             
+    </table>
+    
+    <br /><br /><br /><br />
+    <table width=100%>
+    <tr >
+    <td width=40% style="border-top-style:dotted; border-top-width:1px; border-top-color:black"> Date</td>
+    <td></td>
+    <td width=40% style="border-top-style:dotted; border-top-width:1px; border-top-color:black">Signature of Student</td>
+    </tr>
+    </table>    
+ 
+    <br /><br /><br />
+    
+    <form action="" method="post"
+          tal:attributes="action string:intra_faculty_transfer_2">
+      <input type="submit" 
+             class="standalone" 
+             value="Page 2/3"
+             name="submit" />
+    </form>    
+    <form action="" method="post"
+          tal:attributes="action string:intra_faculty_transfer_2">
+      <input type="submit" 
+             class="standalone" 
+             value="Page 3/3"
+             name="submit" />
+    </form>        
+    </span>   
+    
+  </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/intra_faculty_transfer_2.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/intra_faculty_transfer_2.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/intra_faculty_transfer_2.pt	(revision 2226)
@@ -0,0 +1,134 @@
+<metal:body use-macro="here/slip_template/macros/master">
+  <metal:main fill-slot="main"
+              tal:define="info context/getTransferInfo">
+
+    <span tal:condition="python: not info or not info.get('paid',False)">
+        <span tal:content="here/illegal_view" />
+    </span>                
+    <span tal:condition="info/paid|nothing">                 
+    <center><font color="red"><span tal:content="info/pin"/></font></center>
+    <br />
+    <strong>SECTION B:</strong>	To be completed by the Heads of Department concerned and the Dean.
+    <br /><br />
+    <table border=0 width=100%>
+    
+    <tr><td width="10px" valign="top">10.</td><td valign="top">
+         a) Enter Marks and other records for last Session: 2003/2004. (Please seek the assistance of the Faculty Examinations Officer)</td></tr>
+         
+    <tr><td>&nbsp;</td>
+    <td valign="top">
+    
+          <table border=0 width="100%">
+            <tr>
+              <td>First Semester Results</td><td>Second Semester Results</td>
+            </tr>
+            <tr>
+              <td>
+              <span tal:repeat="course info/taken"> <div valign="top" tal:condition="python:course['Semester']=='1'"> <span tal:content="course/CosCode" />: <span tal:content="course/GRADE" /></div></span>
+              </td>
+              <td>
+              <span tal:repeat="course info/taken"> <div valign="top" tal:condition="python:course['Semester']=='2'"> <span tal:content="course/CosCode" />: <span tal:content="course/GRADE" /></div></span>
+              </td>
+            </tr>
+          </table>
+    </td>
+    </tr>
+   
+    <tr><td width="10px" valign="top"></td><td valign="top">
+         b) Was the student advised to withdraw from the Faculty/School:&nbsp;&nbsp;&nbsp; YES / NO</td></tr>   
+
+    </table>
+
+    <br />
+  
+   
+    <table border=0 width=100%>
+    
+    <tr><td width="10px" valign="top">11.</td><td valign="top">
+         Releasing Head of Department's comments:  (Head of Department is advised to make appropriate consultations in his department before completing this section):</td></tr>
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>     
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>    
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>          
+             
+    <tr><td>&nbsp;</td><td>&nbsp;</td></tr> 
+    <tr><td width="10px" valign="top">12.</td><td valign="top">
+         Proposal Head of Department's Comments: (Head of Department is advised to make appropriate consultations in the department before completing the section):</td></tr>
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>     
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>    
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>        
+          
+    </table>    
+    
+    <br /><br />
+
+    <table width=100% border=0>
+    <tr>
+    <td width=40%>Date:</td>
+    <td></td>
+    <td width=40%>Date:</td>
+    </tr>
+    <tr><td>&nbsp;</td><td>&nbsp;</td></tr> 
+    <tr><td>&nbsp;</td><td>&nbsp;</td></tr> 
+    <tr>
+    <td width=40% style="border-top-style:dotted; border-top-width:1px; border-top-color:black">Releasing Head of Department's Signature</td>
+    <td></td>
+    <td width=40% style="border-top-style:dotted; border-top-width:1px; border-top-color:black">Proposal Head of Department's Signature</td>
+    </tr>
+    </table>   
+    
+    <table border=0 width=100%>
+    <tr><td>&nbsp;</td><td>&nbsp;</td></tr> 
+    <tr><td width="10px" valign="top">13.</td><td valign="top">
+         Dean's Comments:</td></tr>
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>     
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>    
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>        
+          
+    </table>    
+    
+    
+    <table width=100% border=0>
+    <tr><td>&nbsp;</td><td></td><td>&nbsp;</td></tr> 
+    <tr>
+    <td width=40%>Date:</td>
+    <td></td>
+    <td width=40%>&nbsp;</td>
+    </tr>
+    <tr><td>&nbsp;</td><td>&nbsp;</td></tr> 
+    <tr><td>&nbsp;</td><td>&nbsp;</td></tr>
+    <tr>
+    <td width=40% style="border-top-style:dotted; border-top-width:1px; border-top-color:black">Signature of Dean</td>
+    <td></td>
+    <td>&nbsp;</td>
+    </tr>    
+    </table>        
+    <br /><br />
+    
+    <form action="" method="post"
+          tal:attributes="action string:intra_faculty_transfer_1">
+      <input type="submit" 
+             class="standalone" 
+             value="Page 1/3"
+             name="submit" />
+    </form>    
+    <form action="" method="post"
+          tal:attributes="action string:intra_faculty_transfer_3">
+      <input type="submit" 
+             class="standalone" 
+             value="Page 3/3"
+             name="submit" />
+    </form>        
+    </span>
+    
+  </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/intra_faculty_transfer_3.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/intra_faculty_transfer_3.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/intra_faculty_transfer_3.pt	(revision 2226)
@@ -0,0 +1,52 @@
+<metal:body use-macro="here/slip_template/macros/master">
+  <metal:main fill-slot="main"
+              tal:define="info context/getTransferInfo">
+
+    <span tal:condition="python: not info or not info.get('paid',False)">
+        <span tal:content="here/illegal_view" />
+    </span>                
+    <span tal:condition="info/paid|nothing">                
+    <center><font color="red"><span tal:content="info/pin"/></font></center>
+    <br />
+    <strong>SECTION D:</strong>	Decision(s) taken by the Central Committee
+    <br /><br />
+    <table border=0 width=100%>
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>     
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>     
+    <tr><td width="10px" valign="top"></td><td valign="top" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:black">
+         &nbsp;</td></tr>                       
+    </table>  
+
+    <br /><br /><br /><br />
+    <table width=100%>
+    <tr >
+    <td width=40% style="border-top-style:dotted; border-top-width:1px; border-top-color:black">Date</td>
+    <td></td>
+    <td width=40% style="border-top-style:dotted; border-top-width:1px; border-top-color:black">Chairman's Signature</td>
+    </tr>
+    </table>   
+    <br /><br />
+    
+    <form action="" method="post"
+          tal:attributes="action string:intra_faculty_transfer_1">
+      <input type="submit" 
+             class="standalone" 
+             value="Page 1/3"
+             name="submit" />
+    </form>    
+    <form action="" method="post"
+          tal:attributes="action string:intra_faculty_transfer_2">
+      <input type="submit" 
+             class="standalone" 
+             value="Page 2/3"
+             name="submit" />
+    </form>    
+
+    
+    </span>
+    
+  </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_application_create.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_application_create.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_application_create.pt	(revision 2226)
@@ -0,0 +1,138 @@
+<tal:block define="global creation python:1;
+                   global formaction string:apply_admission" />
+<!-- a layout_lib macro -->
+<!-- $Id$ -->
+
+<metal:block define-macro="default_edit"
+  tal:define="layout options/layout;
+  ds options/datastructure;
+  dm ds/getDataModel;
+  formaction options/formaction;
+  creation creation|nothing;
+  metadata metadata|nothing;
+  type_name request/type_name|nothing;
+  ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None);
+  cpsmcat nocall:here/translation_service;
+  apply request/apply_button|nothing;
+  widgets python:context.getRenderedWidgets(layout);
+  ">
+  <form action="" id="editForm" method="post" 
+        enctype="multipart/form-data" class="workflow"
+        tal:attributes="action formaction"
+        >
+  <table class="layoutDefault" summary="Form layout"
+         tal:condition="layout/rows">
+    <span tal:repeat="row python: layout['rows']" valign="top" >
+      <span tal:repeat="cell row">
+        <tr tal:define="widget cell/widget;
+              wid widget/getWidgetId;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              css_class python:test(err, 'row error','row')"
+              tal:condition="python: wid != 'passport'"
+              >
+          <div tal:attributes="class widget_css_class;
+          id python:widget.getHtmlWidgetId()+'_widget';"
+          >
+            <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+            </td>
+            <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+            </td>
+          </div>
+        </tr>
+      </span>
+    </span>
+    <tr tal:condition="widgets/passport|nothing" 
+        tal:define="cell widgets/passport|nothing;">
+      <tal:block tal:define="widget cell/widget;
+      wid widget/getWidgetId;
+      err python:ds.getError(wid);
+      err_mapping python:ds.getErrorMapping(wid);
+      is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+      tooltip_id python:wid + '_help';
+      widget_css_class widget/widget_css_class|nothing;
+      css_class python:test(err, 'row error','row')"
+      >
+        <div tal:attributes="class widget_css_class;
+        id python:widget.getHtmlWidgetId()+'_widget';"
+        >
+          <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+          </td>
+          <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+          </td>
+        </div>
+      </tal:block>
+    </tr>
+  </table>
+  <br />
+  <input type="submit" class="standalone" name="cpsdocument_edit_button"
+         value="Save" 
+         id="cpsdocument_edit_button"
+         tal:condition="not:creation" />
+  <input type="submit" class="standalone" name="apply_admission"
+         value="apply for admission"
+         id="cpsdocument_edit_and_view_button"
+         tal:condition="apply" 
+         tal:attributes="value apply"/>
+  <input type="submit" 
+         class="standalone" 
+         name="cpsdocument_create_button"
+         value="apply"
+         tal:attributes="value options/button"
+         tal:condition="creation" />
+
+</form>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_application_edit.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_application_edit.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_application_edit.pt	(revision 2226)
@@ -0,0 +1,108 @@
+<metal:block define-macro="default_edit"
+  tal:define="layout options/layout;
+  ds options/datastructure;
+  dm ds/getDataModel;
+  formaction options/formaction|string:application_edit;
+  creation creation|nothing;
+  cpsmcat nocall:here/translation_service;
+  proceed options/proceed|nothing;
+  widgets python:context.getRenderedWidgets(layout);
+  ">
+  <table class="layoutDefault" summary="Form layout"
+         tal:condition="layout/rows">
+    <span tal:repeat="row python: layout['rows']" valign="top" >
+      <span tal:repeat="cell row">
+        <tr tal:define="widget cell/widget;
+              wid widget/getWidgetId;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required python: widget.is_required;
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              css_class python:test(err, 'row error','row')"
+              tal:condition="python: wid != 'passport'"
+              >
+          <div tal:attributes="class widget_css_class;
+          id python:widget.getHtmlWidgetId()+'_widget';"
+          >
+            <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+            </td>
+            <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+            </td>
+          </div>
+        </tr>
+      </span>
+    </span>
+    <tr tal:condition="widgets/passport|nothing" 
+        tal:define="cell widgets/passport|nothing;">
+      <tal:block tal:define="widget cell/widget;
+      wid widget/getWidgetId;
+      err python:ds.getError(wid);
+      err_mapping python:ds.getErrorMapping(wid);
+      is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+      tooltip_id python:wid + '_help';
+      widget_css_class widget/widget_css_class|nothing;
+      css_class python:test(err, 'row error','row')"
+      >
+        <div tal:attributes="class widget_css_class;
+        id python:widget.getHtmlWidgetId()+'_widget';"
+        >
+          <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+          </td>
+          <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+          </td>
+        </div>
+      </tal:block>
+    </tr>
+  </table>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_application_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_application_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_application_view.pt	(revision 2226)
@@ -0,0 +1,71 @@
+<!-- a layout_lib macro -->
+<!-- $Id$ -->
+<metal:block define-macro="default_view"
+  tal:define="layout options/layout;
+              dm options/datastructure/getDataModel;
+              widgets python:context.getRenderedWidgets(layout);
+              fields python:('jamb_reg_no',
+                                 'app_ac_pin',
+                                 'app_ac_date',
+                                 'app_email',
+                                 'app_mobile',)"
+                                 >
+  <table cellpadding="2" cellspacing="2" summary="layout">
+    <tr>
+      <td valign="top"><span class="dlabel">Name</span>:
+      </td>
+      <td> 
+        <span tal:content="python:context.getStudentBaseInfo()['student']['name']" />
+      </td>      
+    </tr>
+    <tr>
+      <td valign="top"><span class="dlabel">Sex</span>:
+      </td>
+      <td> 
+        <span tal:content="python:context.getStudentBaseInfo()['student']['sex']" />
+      </td>      
+    </tr>          
+    <tr valign="top">
+      <td><span class="dlabel">Student ID</span>:
+      </td>
+      <td> 
+        <span tal:content="python:context.getStudentBaseInfo()['id']" />
+      </td>      
+    </tr>
+    <tr tal:repeat="field fields">
+      <tal:block tal:define="cell python: widgets[field]">
+        <tal:block define="widget cell/widget">
+          <div tal:attributes="class cell/widget_css_class|string:label;
+            id python:widget.getHtmlWidgetId()+'_widget';">
+            <td >
+             <span class="dlabel"
+                    tal:condition="widget/label"
+                    tal:content="widget/label">label</span>:
+            </td>
+            <td> 
+               <span tal:replace="structure cell/widget_rendered" />
+            </td>
+          </div>
+        </tal:block>
+      </tal:block>
+    </tr>
+    <tr>
+      <tal:block define="cell widgets/passport;
+                         widget cell/widget"
+                         >
+          <div tal:attributes="class cell/widget_css_class|nothing;
+              id python:widget.getHtmlWidgetId()+'_widget';">
+            <td valign="top">
+            <tal:block condition="widget/label">
+              <span class="label"
+                    tal:content="widget/label">label</span>:
+            </tal:block>
+            </td>
+            <td>
+              <img src="img" tal:replace="structure cell/widget_rendered">
+            </td>
+          </div>
+      </tal:block>
+    </tr>    
+  </table>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_application_view_info.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_application_view_info.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_application_view_info.pt	(revision 2226)
@@ -0,0 +1,83 @@
+<metal:block define-macro="default_view"
+  tal:define="layout options/layout;
+              dm options/datastructure/getDataModel;
+              widgets python:context.getRenderedWidgets(layout);
+              info context/getStudentBaseInfo;"
+              >
+  
+      <tal:block define="cell widgets/passport;
+                         widget cell/widget">
+          <img src="img" tal:replace="structure cell/widget_rendered" />
+      </tal:block>
+      
+      <br />
+
+      <table width="" cellpadding="2" cellspacing="0" summary="Form layout">
+        <tr>
+          <td valign="top" width="180px"><span class="dlabel">Name</span>:
+          </td>
+          <td> 
+            <span tal:content="info/student/name" />
+          </td>      
+        </tr>
+        <tr>
+          <td valign="top" width="180px"><span class="dlabel">Sex</span>:
+          </td>
+          <td> 
+            <span tal:content="info/student/sex" />
+          </td>      
+        </tr>          
+        <tr valign="top">
+          <td><span class="dlabel">Student ID</span>:
+          </td>
+          <td> 
+            <span tal:content="info/id" />
+          </td>      
+        </tr>
+        <tr valign="top">
+          <td><span class="dlabel">Matriculation No</span>:
+          </td>
+          <td> 
+            <span tal:content="info/student/matric_no" />
+          </td>      
+        </tr>        
+        <tr valign="top">
+          <td><span class="dlabel">Registration No</span>:
+          </td>
+          <td> 
+            <span tal:content="info/student/jamb_reg_no" />
+          </td>      
+        </tr>   
+        <tr valign="top">
+          <td><span class="dlabel">Email</span>:
+          </td>
+          <td> 
+            <span tal:content="info/student/email" />
+          </td>      
+        </tr>         
+        <tr valign="top">
+          <td><span class="dlabel">Phone</span>:
+          </td>
+          <td> 
+            <span tal:content="info/student/phone" />
+          </td>      
+        </tr>         
+        <tr valign="top">
+          <td><span class="dlabel">Current Session</span>:
+          </td>
+          <td> 
+            <span tal:content="python:context.portal_vocabularies.sessions.get(info['student']['session'])" />  
+          </td>      
+        </tr>           
+        <tr valign="top">
+          <td><span class="dlabel">Current Level</span>:
+          </td>
+          <td> 
+            <span tal:content="python:context.portal_vocabularies.levels.get(info['student']['level'])" />  
+          </td>      
+        </tr>             
+      </table>
+        
+        
+
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_application_view_slip.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_application_view_slip.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_application_view_slip.pt	(revision 2226)
@@ -0,0 +1,69 @@
+<metal:block define-macro="default_view"
+  tal:define="layout options/layout;
+              info context/getStudentBaseInfo;
+              dm options/datastructure/getDataModel;
+              widgets python:context.getRenderedWidgets(layout);
+              fields python:('jamb_reg_no',
+                                 'app_ac_pin',
+                                 'app_ac_date',
+                                 'app_email',
+                                 'app_mobile',
+                                 'entry_mode',
+                                 'jamb_state',
+                                  )"
+                                 >
+  <table cellpadding="10px" cellspacing="">
+    <tr>
+      <tal:block define="cell widgets/passport;
+                 widget cell/widget"
+                 >
+        <td valign="top">
+          <img src="img" tal:replace="structure cell/widget_rendered" />
+        </td>
+      </tal:block>
+      <td>
+        <table width="" cellpadding="2" cellspacing="0" summary="Form layout">
+          <tr>
+            <td valign="top"><span class="dlabel">Name</span>:
+            </td>
+            <td> 
+              <span tal:content="info/student/name" />
+            </td>      
+          </tr>
+          <tr>
+            <td valign="top"><span class="dlabel">Sex</span>:
+            </td>
+            <td> 
+              <span tal:content="info/student/sex" />
+            </td>      
+          </tr>          
+          <tr valign="top">
+            <td><span class="dlabel">Student ID</span>:
+            </td>
+            <td> 
+              <span tal:content="info/student/id" />
+            </td>      
+          </tr>
+          <tr tal:repeat="field fields">
+            <tal:block tal:define="cell python: widgets[field]">
+              <tal:block define="widget cell/widget">
+                <div tal:attributes="class cell/widget_css_class|string:label;
+                id python:widget.getHtmlWidgetId()+'_widget';"
+                >
+                  <td valign="top">
+                    <span class="dlabel"
+                          tal:condition="widget/label"
+                          tal:content="widget/label">label</span>:
+                  </td>
+                  <td valign="top"> 
+                    <span tal:replace="structure cell/widget_rendered" />
+                  </td>
+                </div>
+              </tal:block>
+            </tal:block>
+          </tr>
+        </table>
+      </td>
+    </tr>
+  </table>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_apply_pume_create.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_apply_pume_create.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_apply_pume_create.pt	(revision 2226)
@@ -0,0 +1,58 @@
+<tal:block define="global creation python:1;
+                   global formaction string:apply_admission" />
+<!-- a layout_lib macro -->
+<!-- $Id$ -->
+
+<metal:block define-macro="default_table"
+  tal:define="layout options/layout;
+  ds options/datastructure;
+  dm ds/getDataModel;
+  creation creation|nothing;
+  metadata metadata|nothing;
+  cpsmcat nocall:here/translation_service;
+  apply request/apply_button|nothing;">
+  
+  <table  cellpadding="2" cellspacing="2" summary="Form layout" border=0
+       tal:condition="layout/rows">
+  <tr tal:repeat="row layout/rows" valign="top">
+
+  <span tal:repeat="cell row"> 
+        <tal:block define="widget cell/widget;
+                           wid widget/getWidgetId;
+                           err python:ds.getError(wid);
+                           err_mapping python:ds.getErrorMapping(wid);
+                           is_required widget/is_required|nothing;
+                           tooltip_id python:wid + '_help';
+                           widget_css_class cell/widget_css_class|nothing;
+                           css_class python:test(err, 'row error','row')">
+          <span tal:attributes="class widget_css_class;
+                               id python:widget.getHtmlWidgetId()+'_widget';
+                              ">
+                              
+                    
+            <td tal:condition="python:widget.label_edit and widget.label_edit!='label field'">               
+              <div class="label">
+                <label tal:content="widget/label_edit"
+                  tal:attributes="for cell/widget_input_area_id|nothing;">label</label>
+              </div>
+            </td>
+            
+            <td>
+              <div tal:attributes="class python:test(widget.label_edit == 'label field', 'label','')">          
+              <label tal:replace="structure cell/widget_rendered"/> 
+              </div>          
+              <tal:block condition="err">
+                  <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                    <br /><em style="color: red"
+                      tal:content="msg">err</em>
+                  </tal:block>
+              </tal:block>
+            </td>
+  
+          </span>
+        </tal:block>
+  </span>      
+  </tr>
+  </table>
+  <br/>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_apply_pume_edit.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_apply_pume_edit.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_apply_pume_edit.pt	(revision 2226)
@@ -0,0 +1,1 @@
+<metal:block use-macro="here/layout_apply_pume_create/macros/default_table" />
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_apply_pume_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_apply_pume_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_apply_pume_view.pt	(revision 2226)
@@ -0,0 +1,15 @@
+<metal:block use-macro="here/layout_apply_pume_create/macros/default_table" />
+<form action="" id="editForm" method="post" 
+      enctype="multipart/form-data" class="workflow"
+      tal:attributes="action string:${context/absolute_url}/apply_pume"
+      >
+  <input type="hidden" name="reg_no"
+         tal:attributes="value ds/reg_no|nothing"
+         tal:condition="ds/reg_no|nothing"/>
+  <input type="hidden" name="pin"
+         tal:attributes="value ds/pin|nothing"
+         tal:condition="ds/pin|nothing"/>
+  <input type="submit" class="standalone" name="slip"
+         value="Print Aknowledgement Slip"
+         />
+</form>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_apply_pume_view_slip.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_apply_pume_view_slip.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_apply_pume_view_slip.pt	(revision 2226)
@@ -0,0 +1,1 @@
+<metal:block use-macro="here/layout_apply_pume_create/macros/default_table" />
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_clearance_edit.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_clearance_edit.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_clearance_edit.pt	(revision 2226)
@@ -0,0 +1,72 @@
+<!-- a layout_lib macro -->
+<!-- $Id$ -->
+
+<metal:block define-macro="default_edit"
+  tal:define="layout options/layout;
+  ds options/datastructure;
+  dm ds/getDataModel;
+  formaction options/formaction|string:clearance_edit;
+  creation creation|nothing;
+  metadata metadata|nothing;
+  type_name request/type_name|nothing;
+  cpsmcat nocall:here/translation_service;
+  proceed options/proceed|nothing;
+  widgets python:context.getRenderedWidgets(layout);
+  ">
+  <table class="layoutDefault" summary="Form layout"
+         tal:condition="layout/rows">
+    <span tal:repeat="row python: layout['rows']" valign="top" >
+      <span tal:repeat="cell row">
+        <span tal:define="widget cell/widget;
+              wid widget/getWidgetId;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required python: widget.is_required;
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              css_class python:test(err, 'row error','row')"
+              tal:condition="python: wid != 'passport'"
+              >
+        <tr tal:condition="widget/description|nothing" class="even ajaxtd">
+          <th colspan="5" align="left"><h3 tal:replace="widget/description" /></th>
+        </tr>
+        <tr>
+          <div tal:attributes="class widget_css_class;
+          id python:widget.getHtmlWidgetId()+'_widget';"
+          >
+            <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+            </td>
+            <td valign="bottom">
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="python:err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+            </td>
+          </div>
+        </tr>
+      </span>
+      </span>
+    </span>
+  </table>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_clearance_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_clearance_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_clearance_view.pt	(revision 2226)
@@ -0,0 +1,47 @@
+<!-- a layout_lib macro -->
+<!-- $Id$ -->
+<metal:block define-macro="default_view"
+  tal:define="layout options/layout;
+              widgets python:context.getRenderedWidgets(layout);
+              fields_not_displayed python:('',)"
+                                 >
+  <table>
+    <span tal:omit-tag=""  tal:repeat="row layout/rows">
+        <span  tal:omit-tag="" tal:repeat="cell row">
+          <span tal:omit-tag="" tal:condition="python:cell['widget_rendered'] 
+                               and not cell['widget_rendered'] in ('None','-',)
+                               or cell['widget_id'] == 'birth_certificate'">
+          <span tal:omit-tag=""  tal:define="widget cell/widget"
+                tal:condition="python:cell['widget_id'] not in fields_not_displayed">
+            <div tal:omit-tag=""
+                 tal:attributes="class cell/widget_css_class|nothing;">
+                 
+            <tr tal:condition="widget/description|nothing" class="even ajaxtd">
+              <th colspan="5" align="left"><h3 tal:replace="widget/description" /></th>
+            </tr>
+            <tr>                         
+            <tal:block condition="widget/label">
+            <td width="180px" valign="top">
+              <span i18n:translate="" tal:condition="widget/is_i18n">
+                  <span tal:content="widget/label" />:</span>
+              <span tal:condition="not:widget/is_i18n">
+                  <span tal:content="widget/label" />:</span>
+            </td>
+            </tal:block>
+            <tal:block condition="not: widget/label">
+            <td valign="top">
+              <div> no label </div>
+            </td>
+            </tal:block>              
+            <td valign="bottom">
+             <div class="ddescription" tal:condition="cell/widget_rendered" tal:content="structure cell/widget_rendered"></div>
+             <div class="ddescription" tal:condition="not:cell/widget_rendered"> none </div>
+              </td>
+            </tr>
+            </div>
+          </span>
+          </span>
+      </span>
+    </span>
+  </table>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_enter_access_code.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_enter_access_code.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_enter_access_code.pt	(revision 2226)
@@ -0,0 +1,138 @@
+<tal:block define="global creation python:1;
+                   global formaction string:apply_admission" />
+<!-- a layout_lib macro -->
+<!-- $Id$ -->
+
+<metal:block define-macro="default_edit"
+  tal:define="layout options/layout;
+  ds options/datastructure;
+  dm ds/getDataModel;
+  formaction options/formaction;
+  creation creation|nothing;
+  metadata metadata|nothing;
+  type_name request/type_name|nothing;
+  ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None);
+  cpsmcat nocall:here/translation_service;
+  apply request/apply_button|nothing;
+  widgets python:context.getRenderedWidgets(layout);
+  ">
+  <form action="" id="editForm" method="post" 
+        enctype="multipart/form-data" class="workflow"
+        tal:attributes="action formaction"
+        >
+  <table class="layoutDefault" summary="Form layout"
+         tal:condition="layout/rows">
+    <span tal:repeat="row python: layout['rows']" valign="top" >
+      <span tal:repeat="cell row">
+        <tr tal:define="widget cell/widget;
+              wid widget/getWidgetId;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              css_class python:test(err, 'row error','row')"
+              tal:condition="python: wid != 'passport'"
+              >
+          <div tal:attributes="class widget_css_class;
+          id python:widget.getHtmlWidgetId()+'_widget';"
+          >
+            <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+            </td>
+            <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+            </td>
+          </div>
+        </tr>
+      </span>
+    </span>
+    <tr tal:condition="widgets/passport|nothing" 
+        tal:define="cell widgets/passport|nothing;">
+      <tal:block tal:define="widget cell/widget;
+      wid widget/getWidgetId;
+      err python:ds.getError(wid);
+      err_mapping python:ds.getErrorMapping(wid);
+      is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+      tooltip_id python:wid + '_help';
+      widget_css_class widget/widget_css_class|nothing;
+      css_class python:test(err, 'row error','row')"
+      >
+        <div tal:attributes="class widget_css_class;
+        id python:widget.getHtmlWidgetId()+'_widget';"
+        >
+          <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+          </td>
+          <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+          </td>
+        </div>
+      </tal:block>
+    </tr>
+  </table>
+  <br />
+  <input type="submit" class="standalone" name="cpsdocument_edit_button"
+         value="Save" 
+         id="cpsdocument_edit_button"
+         tal:condition="not:creation" />
+  <input type="submit" class="standalone" name="apply_admission"
+         value="apply for admission"
+         id="cpsdocument_edit_and_view_button"
+         tal:condition="apply" 
+         tal:attributes="value apply"/>
+  <input type="submit" 
+         class="standalone" 
+         name="cpsdocument_create_button"
+         value="apply"
+         tal:attributes="value options/button"
+         tal:condition="creation" />
+
+</form>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_personal_edit.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_personal_edit.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_personal_edit.pt	(revision 2226)
@@ -0,0 +1,121 @@
+<metal:block define-macro="default_edit"
+  tal:define="layout options/layout;
+  ds options/datastructure;
+  dm ds/getDataModel;
+  formaction options/formaction|string:personal_edit;
+  creation creation|nothing;
+  cpsmcat nocall:here/translation_service;
+  proceed options/proceed|nothing;
+  widgets python:context.getRenderedWidgets(layout);
+  ">
+  <table class="layoutDefault" summary="Form layout"
+         tal:condition="layout/rows">
+         
+    <tr tal:define="lga python:context.getStudentBaseInfo()['student']['lga'];
+                    lga_voc python:context.portal_vocabularies.local_gov_areas.get(lga)">
+      <td><div class="label">State / LGA</div>:
+      </td>
+      <td tal:condition="lga_voc"> 
+         <span tal:replace="lga_voc" />
+      </td>      
+      <td tal:condition="not: lga_voc"> 
+         <span tal:replace="lga" />
+      </td>           
+    </tr>    
+         
+    <span tal:repeat="row python: layout['rows']" valign="top" >
+      <span tal:repeat="cell row">
+        <tr tal:define="widget cell/widget;
+              wid widget/getWidgetId;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required python: widget.is_required;
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              css_class python:test(err, 'row error','row')"
+              tal:condition="python: wid != 'passport'"
+              >
+          <div tal:attributes="class widget_css_class;
+          id python:widget.getHtmlWidgetId()+'_widget';"
+          >
+            <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+            </td>
+            <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+            </td>
+          </div>
+        </tr>
+      </span>
+    </span>
+    <tr tal:condition="widgets/passport|nothing" 
+        tal:define="cell widgets/passport|nothing;">
+      <tal:block tal:define="widget cell/widget;
+      wid widget/getWidgetId;
+      err python:ds.getError(wid);
+      err_mapping python:ds.getErrorMapping(wid);
+      is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+      tooltip_id python:wid + '_help';
+      widget_css_class widget/widget_css_class|nothing;
+      css_class python:test(err, 'row error','row')"
+      >
+        <div tal:attributes="class widget_css_class;
+        id python:widget.getHtmlWidgetId()+'_widget';"
+        >
+          <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+          </td>
+          <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+          </td>
+        </div>
+      </tal:block>
+    </tr>
+  </table>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_personal_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_personal_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_personal_view.pt	(revision 2226)
@@ -0,0 +1,59 @@
+<!-- a layout_lib macro -->
+<!-- $Id: layout_application_view.pt 980 2006-12-02 07:18:27Z henrik $ -->
+<metal:block define-macro="default_view"
+  tal:define="layout options/layout;
+              dm options/datastructure/getDataModel;">
+
+  <table cellpadding="2" cellspacing="2" summary="layout">
+    <tr>
+      <td><span class="dlabel">Student ID</span>:
+      </td>
+      <td> 
+         <span tal:replace="context/getStudentId" />
+      </td>      
+    </tr>
+    
+    <tr tal:define="lga python:context.getStudentBaseInfo()['student']['lga'];
+                    lga_voc python:context.portal_vocabularies.local_gov_areas.get(lga)">
+      <td><span class="dlabel">State / LGA</span>:
+      </td>
+      <td tal:condition="lga_voc"> 
+         <span tal:replace="lga_voc" />
+      </td>      
+      <td tal:condition="not: lga_voc"> 
+         <span tal:replace="lga" />
+      </td>           
+    </tr>    
+    
+    <span tal:repeat="row layout/rows">
+        <span tal:repeat="cell row">
+          <span tal:condition="python:cell['widget_rendered']">
+          <span tal:define="widget cell/widget">
+            <div tal:omit-tag=""
+                 tal:attributes="class cell/widget_css_class|nothing;">
+            <tr>                         
+            <tal:block condition="widget/label">
+            <td width="180px" valign="top" nowrap>
+              <span i18n:translate="" tal:condition="widget/is_i18n">
+                  <span tal:content="widget/label" />:</span>
+              <span tal:condition="not:widget/is_i18n">
+                  <span tal:content="widget/label" />:</span>
+            </td>
+            </tal:block>
+            <tal:block condition="not: widget/label">
+            <td valign="top">
+              <div> no label </div>
+            </td>
+            </tal:block>              
+            <td valign="top">
+             <div class="ddescription" tal:condition="cell/widget_rendered" tal:content="structure cell/widget_rendered"></div>
+             <div class="ddescription" tal:condition="not:cell/widget_rendered"> none </div>
+            </td>
+            </tr>
+            </div>
+          </span>
+          </span>
+      </span>
+    </span>    
+  </table>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_plain_edit.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_plain_edit.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_plain_edit.pt	(revision 2226)
@@ -0,0 +1,110 @@
+<metal:block define-macro="default_edit"
+  tal:define="layout options/layout;
+  ds options/datastructure;
+  dm ds/getDataModel;
+  formaction options/formaction|string:personal_edit;
+  creation creation|nothing;
+  cpsmcat nocall:here/translation_service;
+  proceed options/proceed|nothing;
+  widgets python:context.getRenderedWidgets(layout);
+  ">
+  <table class="layoutDefault" summary="Form layout"
+         tal:condition="layout/rows">
+         
+        
+    <span tal:repeat="row python: layout['rows']" valign="top" >
+      <span tal:repeat="cell row">
+        <tr tal:define="widget cell/widget;
+              wid widget/getWidgetId;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required python: widget.is_required;
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              css_class python:test(err, 'row error','row')"
+              tal:condition="python: wid != 'passport'"
+              >
+          <div tal:attributes="class widget_css_class;
+          id python:widget.getHtmlWidgetId()+'_widget';"
+          >
+            <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+            </td>
+            <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+            </td>
+          </div>
+        </tr>
+      </span>
+    </span>
+    <tr tal:condition="widgets/passport|nothing" 
+        tal:define="cell widgets/passport|nothing;">
+      <tal:block tal:define="widget cell/widget;
+      wid widget/getWidgetId;
+      err python:ds.getError(wid);
+      err_mapping python:ds.getErrorMapping(wid);
+      is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+      tooltip_id python:wid + '_help';
+      widget_css_class widget/widget_css_class|nothing;
+      css_class python:test(err, 'row error','row')"
+      >
+        <div tal:attributes="class widget_css_class;
+        id python:widget.getHtmlWidgetId()+'_widget';"
+        >
+          <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+          </td>
+          <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+          </td>
+        </div>
+      </tal:block>
+    </tr>
+  </table>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_plain_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_plain_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_plain_view.pt	(revision 2226)
@@ -0,0 +1,47 @@
+<!-- a layout_lib macro -->
+<!-- $Id: layout_application_view.pt 980 2006-12-02 07:18:27Z henrik $ -->
+<metal:block define-macro="default_view"
+  tal:define="layout options/layout;
+              dm options/datastructure/getDataModel;">
+
+  <table cellpadding="2" cellspacing="2" summary="layout">
+    <tr>
+      <td><span class="dlabel">Student ID</span>:
+      </td>
+      <td> 
+         <span tal:replace="context/getStudentId" />
+      </td>      
+    </tr>
+    
+    <span tal:repeat="row layout/rows">
+        <span tal:repeat="cell row">
+          <span tal:condition="python:cell['widget_rendered']">
+          <span tal:define="widget cell/widget">
+            <div tal:omit-tag=""
+                 tal:attributes="class cell/widget_css_class|nothing;">
+            <tr>                         
+            <tal:block condition="widget/label">
+            <td width="180px" valign="top" nowrap>
+              <span i18n:translate="" tal:condition="widget/is_i18n">
+                  <span tal:content="widget/label" />:</span>
+              <span tal:condition="not:widget/is_i18n">
+                  <span tal:content="widget/label" />:</span>
+            </td>
+            </tal:block>
+            <tal:block condition="not: widget/label">
+            <td valign="top">
+              <div> no label </div>
+            </td>
+            </tal:block>              
+            <td valign="top">
+             <div class="ddescription" tal:condition="cell/widget_rendered" tal:content="structure cell/widget_rendered"></div>
+             <div class="ddescription" tal:condition="not:cell/widget_rendered"> none </div>
+            </td>
+            </tr>
+            </div>
+          </span>
+          </span>
+      </span>
+    </span>    
+  </table>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_pume_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_pume_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_pume_view.pt	(revision 2226)
@@ -0,0 +1,1 @@
+<metal:block use-macro="here/layout_waeup_lib/macros/table_view" />
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_pume_view_slip.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_pume_view_slip.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_pume_view_slip.pt	(revision 2226)
@@ -0,0 +1,29 @@
+<!-- a layout_lib macro -->
+<!-- $Id$ -->
+<metal:block define-macro="default_view"
+       tal:define="layout options/layout;
+              dm options/datastructure/getDataModel;
+              widgets python:context.getRenderedWidgets(layout);
+              fields python:('pume_tot_score',)"
+              >
+  <table width="" cellpadding="2" cellspacing="0" summary="Form layout">
+    <tr tal:repeat="field fields">
+      <tal:block tal:define="cell python: widgets[field]">
+        <tal:block define="widget cell/widget">
+          <div tal:attributes="class cell/widget_css_class|string:label;
+            id python:widget.getHtmlWidgetId()+'_widget';">
+            <td width="180px">
+             <span class="dlabel"
+                    tal:condition="widget/label"
+                    tal:content="widget/label">label</span>:
+            </td>
+            <td> 
+               <span tal:condition="cell" tal:content="structure cell/widget_rendered"></span>
+               <span tal:condition="not:cell/widget_rendered"> none </span>
+            </td>
+          </div>
+        </tal:block>
+      </tal:block>
+    </tr>
+  </table>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_search_pume_create.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_search_pume_create.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_search_pume_create.pt	(revision 2226)
@@ -0,0 +1,138 @@
+<tal:block define="global creation python:1;
+                   global formaction string:display_pume_result" />
+<!-- a layout_lib macro -->
+<!-- $Id$ -->
+
+<metal:block define-macro="default_edit"
+  tal:define="layout options/layout;
+  ds options/datastructure;
+  dm ds/getDataModel;
+  formaction options/formaction;
+  creation creation|nothing;
+  metadata metadata|nothing;
+  type_name request/type_name|nothing;
+  ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None);
+  cpsmcat nocall:here/translation_service;
+  apply request/apply_button|nothing;
+  widgets python:context.getRenderedWidgets(layout);
+  ">
+  <form action="" id="editForm" method="post" 
+        enctype="multipart/form-data" class="workflow"
+        tal:attributes="action formaction"
+        >
+  <table class="layoutDefault" summary="Form layout"
+         tal:condition="layout/rows">
+    <span tal:repeat="row python: layout['rows']" valign="top" >
+      <span tal:repeat="cell row">
+        <tr tal:define="widget cell/widget;
+              wid widget/getWidgetId;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              css_class python:test(err, 'row error','row')"
+              tal:condition="python: wid != 'passport'"
+              >
+          <div tal:attributes="class widget_css_class;
+          id python:widget.getHtmlWidgetId()+'_widget';"
+          >
+            <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+            </td>
+            <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+            </td>
+          </div>
+        </tr>
+      </span>
+    </span>
+    <tr tal:condition="widgets/passport|nothing" 
+        tal:define="cell widgets/passport|nothing;">
+      <tal:block tal:define="widget cell/widget;
+      wid widget/getWidgetId;
+      err python:ds.getError(wid);
+      err_mapping python:ds.getErrorMapping(wid);
+      is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+      tooltip_id python:wid + '_help';
+      widget_css_class widget/widget_css_class|nothing;
+      css_class python:test(err, 'row error','row')"
+      >
+        <div tal:attributes="class widget_css_class;
+        id python:widget.getHtmlWidgetId()+'_widget';"
+        >
+          <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+          </td>
+          <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+          </td>
+        </div>
+      </tal:block>
+    </tr>
+  </table>
+  <br />
+  <input type="submit" class="standalone" name="cpsdocument_edit_button"
+         value="Save" 
+         id="cpsdocument_edit_button"
+         tal:condition="not:creation" />
+  <input type="submit" class="standalone" name="apply_admission"
+         value="apply for admission"
+         id="cpsdocument_edit_and_view_button"
+         tal:condition="apply" 
+         tal:attributes="value apply"/>
+  <input type="submit" 
+         class="standalone" 
+         name="cpsdocument_create_button"
+         value="apply"
+         tal:attributes="value options/button"
+         tal:condition="creation" />
+
+</form>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_search_session_create.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_search_session_create.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_search_session_create.pt	(revision 2226)
@@ -0,0 +1,91 @@
+<tal:block define="global creation python:1;
+                   global formaction string:display_pume_result" />
+<!-- a layout_lib macro -->
+<!-- $Id$ -->
+
+<metal:block define-macro="default_edit"
+  tal:define="layout options/layout;
+  ds options/datastructure;
+  dm ds/getDataModel;
+  formaction options/formaction;
+  creation creation|nothing;
+  metadata metadata|nothing;
+  type_name request/type_name|nothing;
+  ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None);
+  cpsmcat nocall:here/translation_service;
+  apply request/apply_button|nothing;
+  ">
+  <form action="" id="editForm" method="post" 
+        enctype="multipart/form-data" class="workflow"
+        tal:attributes="action formaction"
+        >
+  <table class="layoutDefault" summary="Form layout"
+         tal:condition="layout/rows">
+    <span tal:repeat="row python: layout['rows']" valign="top" >
+      <span tal:repeat="cell row">
+        <tr tal:define="widget cell/widget;
+              wid widget/getWidgetId;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              css_class python:test(err, 'row error','row')"
+              tal:condition="python: wid != 'passport'"
+              >
+          <div tal:attributes="class widget_css_class;
+          id python:widget.getHtmlWidgetId()+'_widget';"
+          >
+            <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+            </td>
+            <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+            </td>
+          </div>
+        </tr>
+      </span>
+    </span>
+  </table>
+  <br />
+  <input type="submit" class="standalone" name="cpsdocument_edit_button"
+         value="Save" 
+         id="cpsdocument_edit_button"
+         tal:condition="not:creation" />
+  <input type="submit" class="standalone" name="apply_admission"
+         value="apply for admission"
+         id="cpsdocument_edit_and_view_button"
+         tal:condition="apply" 
+         tal:attributes="value apply"/>
+  <input type="submit" 
+         class="standalone" 
+         name="cpsdocument_create_button"
+         value="apply"
+         tal:attributes="value options/button"
+         tal:condition="creation" />
+
+</form>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_search_session_edit.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_search_session_edit.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_search_session_edit.pt	(revision 2226)
@@ -0,0 +1,91 @@
+<tal:block define="global creation python:0;
+                   global formaction string:set_access_data" />
+<!-- a layout_lib macro -->
+<!-- $Id$ -->
+
+<metal:block define-macro="default_edit"
+  tal:define="layout options/layout;
+  ds options/datastructure;
+  dm ds/getDataModel;
+  formaction options/formaction;
+  matric_no options/matric_no|nothing;
+  name options/name|nothing;
+  creation creation|nothing;
+  cpsmcat nocall:here/translation_service;
+  ">
+  <form action="" id="editForm" method="post" 
+        enctype="multipart/form-data" class="workflow"
+        tal:attributes="action formaction"
+        >
+  
+<input type="hidden" name="name" tal:attributes="value name"/>
+<input type="hidden" name="matric_no" tal:attributes="value matric_no"/>
+  <table class="layoutDefault" summary="Form layout"
+         tal:condition="layout/rows">
+    <span tal:repeat="row python: layout['rows']" valign="top" >
+      <span tal:repeat="cell row">
+        <tr tal:define="widget cell/widget;
+              wid widget/getWidgetId;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              css_class python:test(err, 'row error','row')"
+              tal:condition="python: wid != 'passport'"
+              >
+          <div tal:attributes="class widget_css_class;
+          id python:widget.getHtmlWidgetId()+'_widget';"
+          >
+            <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+            </td>
+            <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+            </td>
+          </div>
+        </tr>
+      </span>
+    </span>
+  </table>
+  <br />
+  <input type="checkbox" value="True" name="acknowledge" />     &nbsp;
+        <strong>I hereby acknowledge, by ticking this check box, 
+        that I'm the above designated person.</strong>    
+  <br /><br />
+  <input type="submit" class="standalone" name="cpsdocument_edit_button"
+         value="Save & First-time Login" 
+         id="cpsdocument_edit_button"
+         tal:condition="not:creation" />
+  <input type="submit" 
+         class="standalone" 
+         name="cpsdocument_create_button"
+         value="apply"
+         tal:attributes="value options/button"
+         tal:condition="creation" />
+
+</form>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_student_acco_create.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_student_acco_create.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_student_acco_create.pt	(revision 2226)
@@ -0,0 +1,138 @@
+<tal:block define="global creation python:1;
+                   global formaction string:apply_admission" />
+<!-- a layout_lib macro -->
+<!-- $Id$ -->
+
+<metal:block define-macro="default_edit"
+  tal:define="layout options/layout;
+  ds options/datastructure;
+  dm ds/getDataModel;
+  formaction options/formaction;
+  creation creation|nothing;
+  metadata metadata|nothing;
+  type_name request/type_name|nothing;
+  ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None);
+  cpsmcat nocall:here/translation_service;
+  apply request/apply_button|nothing;
+  widgets python:context.getRenderedWidgets(layout);
+  ">
+  <form action="" id="editForm" method="post" 
+        enctype="multipart/form-data" class="workflow"
+        tal:attributes="action formaction"
+        >
+  <table class="layoutDefault" summary="Form layout"
+         tal:condition="layout/rows">
+    <span tal:repeat="row python: layout['rows']" valign="top" >
+      <span tal:repeat="cell row">
+        <tr tal:define="widget cell/widget;
+              wid widget/getWidgetId;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              css_class python:test(err, 'row error','row')"
+              tal:condition="python: wid != 'passport'"
+              >
+          <div tal:attributes="class widget_css_class;
+          id python:widget.getHtmlWidgetId()+'_widget';"
+          >
+            <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+            </td>
+            <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+            </td>
+          </div>
+        </tr>
+      </span>
+    </span>
+    <tr tal:condition="widgets/passport|nothing" 
+        tal:define="cell widgets/passport|nothing;">
+      <tal:block tal:define="widget cell/widget;
+      wid widget/getWidgetId;
+      err python:ds.getError(wid);
+      err_mapping python:ds.getErrorMapping(wid);
+      is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+      tooltip_id python:wid + '_help';
+      widget_css_class widget/widget_css_class|nothing;
+      css_class python:test(err, 'row error','row')"
+      >
+        <div tal:attributes="class widget_css_class;
+        id python:widget.getHtmlWidgetId()+'_widget';"
+        >
+          <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+          </td>
+          <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+          </td>
+        </div>
+      </tal:block>
+    </tr>
+  </table>
+  <br />
+  <input type="submit" class="standalone" name="cpsdocument_edit_button"
+         value="Save" 
+         id="cpsdocument_edit_button"
+         tal:condition="not:creation" />
+  <input type="submit" class="standalone" name="apply_admission"
+         value="apply for admission"
+         id="cpsdocument_edit_and_view_button"
+         tal:condition="apply" 
+         tal:attributes="value apply"/>
+  <input type="submit" 
+         class="standalone" 
+         name="cpsdocument_create_button"
+         value="apply"
+         tal:attributes="value options/button"
+         tal:condition="creation" />
+
+</form>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_student_acco_edit.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_student_acco_edit.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_student_acco_edit.pt	(revision 2226)
@@ -0,0 +1,138 @@
+<tal:block define="global creation python:0;
+                   global formaction string:apply_admission" />
+<!-- a layout_lib macro -->
+<!-- $Id$ -->
+
+<metal:block define-macro="default_edit"
+  tal:define="layout options/layout;
+  ds options/datastructure;
+  dm ds/getDataModel;
+  formaction options/formaction;
+  creation creation|nothing;
+  metadata metadata|nothing;
+  type_name request/type_name|nothing;
+  ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None);
+  cpsmcat nocall:here/translation_service;
+  apply request/apply_button|nothing;
+  widgets python:context.getRenderedWidgets(layout);
+  ">
+  <form action="" id="editForm" method="post" 
+        enctype="multipart/form-data" class="workflow"
+        tal:attributes="action formaction"
+        >
+  <table class="layoutDefault" summary="Form layout"
+         tal:condition="layout/rows">
+    <span tal:repeat="row python: layout['rows']" valign="top" >
+      <span tal:repeat="cell row">
+        <tr tal:define="widget cell/widget;
+              wid widget/getWidgetId;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              css_class python:test(err, 'row error','row')"
+              tal:condition="python: wid != 'passport'"
+              >
+          <div tal:attributes="class widget_css_class;
+          id python:widget.getHtmlWidgetId()+'_widget';"
+          >
+            <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+            </td>
+            <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+            </td>
+          </div>
+        </tr>
+      </span>
+    </span>
+    <tr tal:condition="widgets/passport|nothing" 
+        tal:define="cell widgets/passport|nothing;">
+      <tal:block tal:define="widget cell/widget;
+      wid widget/getWidgetId;
+      err python:ds.getError(wid);
+      err_mapping python:ds.getErrorMapping(wid);
+      is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes);
+      tooltip_id python:wid + '_help';
+      widget_css_class widget/widget_css_class|nothing;
+      css_class python:test(err, 'row error','row')"
+      >
+        <div tal:attributes="class widget_css_class;
+        id python:widget.getHtmlWidgetId()+'_widget';"
+        >
+          <td>
+            <div class="label" tal:condition="widget/label_edit"
+                 tal:attributes="class python:test(is_required, 'label required','label')">
+              <label tal:content="widget/label_edit"
+                     tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
+            </div>
+            <button type="button" class="tooltipControl"
+                    tal:condition="widget/help"
+                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+          </td>
+          <td>
+            <span class="field">
+              <div tal:replace="structure cell/widget_rendered"/>
+            </span>
+            <div class="tooltipArea" style="visibility: hidden;"
+                 tal:condition="widget/help"
+                 tal:attributes="id tooltip_id;
+                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                 >
+              <tal:block tal:content="widget/help">This is the help for this field
+              </tal:block>
+            </div>
+            <tal:block condition="err">
+              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                <br /><em style="color: red"
+                          tal:content="msg">err</em>
+              </tal:block>
+            </tal:block>
+          </td>
+        </div>
+      </tal:block>
+    </tr>
+  </table>
+  <br />
+  <input type="submit" class="standalone" name="cpsdocument_edit_button"
+         value="Save" 
+         id="cpsdocument_edit_button"
+         tal:condition="not:creation" />
+  <input type="submit" class="standalone" name="apply_admission"
+         value="apply for admission"
+         id="cpsdocument_edit_and_view_button"
+         tal:condition="apply" 
+         tal:attributes="value apply"/>
+  <input type="submit" 
+         class="standalone" 
+         name="cpsdocument_create_button"
+         value="apply"
+         tal:attributes="value options/button"
+         tal:condition="creation" />
+
+</form>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_student_acco_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_student_acco_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_student_acco_view.pt	(revision 2226)
@@ -0,0 +1,1 @@
+<metal:block use-macro="here/layout_waeup_lib/macros/table_view" />
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_student_acco_view_slip.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_student_acco_view_slip.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_student_acco_view_slip.pt	(revision 2226)
@@ -0,0 +1,34 @@
+<!-- a layout_lib macro -->
+<!-- $Id$ -->
+<metal:block define-macro="default_view"
+  tal:define="layout options/layout;
+              dm options/datastructure/getDataModel;
+              widgets python:context.getRenderedWidgets(layout);
+              fields python:('bed',
+                                 'acco_res_sc_pin',
+                                 'acco_res_date',
+                                 'acco_maint_sc_pin', 
+                                 'acco_maint_date',
+                                 )"
+                                 >
+  <table width="" cellpadding="2" cellspacing="0" summary="Form layout">
+    <tr tal:repeat="field fields">
+      <tal:block tal:define="cell python: widgets[field]">
+        <tal:block define="widget cell/widget">
+          <div tal:attributes="class cell/widget_css_class|string:label;
+            id python:widget.getHtmlWidgetId()+'_widget';">
+            <td width="180px" valign="top">
+             <span class="dlabel"
+                    tal:condition="widget/label"
+                    tal:content="widget/label">label</span>:
+            </td>
+            <td> 
+               <span tal:condition="cell" tal:content="structure cell/widget_rendered"></span>
+               <span tal:condition="not:cell/widget_rendered"> none </span>
+            </td>
+          </div>
+        </tal:block>
+      </tal:block>
+    </tr>
+  </table>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_waeup_view_student_course.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_waeup_view_student_course.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/layout_waeup_view_student_course.pt	(revision 2226)
@@ -0,0 +1,32 @@
+<!-- $Id$ -->
+<metal:block define-macro="table_view"
+             tal:define="layout options/layout;
+             widgets python:context.getRenderedWidgets(layout);
+             fields python:(
+                            'title',
+                            'study_course',
+                            'faculty',
+                            'department',
+                            )"
+                                  >
+  <table>
+    <tr tal:repeat="field fields">
+      <tal:block tal:define="cell python: widgets[field]">
+        <tal:block define="widget cell/widget">
+          <div tal:attributes="class cell/widget_css_class|string:label;
+          id python:widget.getHtmlWidgetId()+'_widget';"
+          >
+            <td >
+              <span class="dlabel"
+                    tal:condition="widget/label"
+                    tal:content="widget/label">label</span>:
+            </td>
+            <td> 
+              <span tal:replace="structure cell/widget_rendered" />
+            </td>
+          </div>
+        </tal:block>
+      </tal:block>
+    </tr>
+  </table>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/level_delete.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/level_delete.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/level_delete.py	(revision 2226)
@@ -0,0 +1,57 @@
+## 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$
+"""
+delete a level, fix students review if necessary
+"""
+
+import logging
+logger = logging.getLogger('Skins.folder_delete')
+member_id = str(context.portal_membership.getAuthenticatedMember())
+
+from Products.CMFCore.utils import getToolByName
+here = context
+
+#if context.portal_type == "University":
+#    here = context.academics
+
+ti = getToolByName(here, 'portal_types').getTypeInfo(here.portal_type)
+meth_id = ti.queryMethodID('view', 'folder_contents')
+ret_url = here.absolute_url() + '/' + meth_id
+
+if ids:
+    current_level = getattr(context.getContent(),'current_level','')
+    current_level_deleted = (current_level in ids)
+    student_id = context.getStudentId()
+    student_state = context.getStudentReviewState(student_id=student_id)
+    if current_level_deleted and student_state != "school_fee_paid":
+        students_folder = context.portal_url.getPortalObject().campus.students
+        student = getattr(students_folder,student_id)
+        from Products.CMFCore.WorkflowCore import WorkflowException
+        wftool = context.portal_workflow
+        try:
+            wftool.doActionFor(student,'reject_courses')
+        except WorkflowException,E:
+            logger.info('%s WorkflowException %s for %s' % (member_id,E,student_id))
+            return request.RESPONSE.redirect("%s" % context.absolute_url())
+    # for id in ids:
+    #     XXX has to be called from here since the workflow doesn't handle the
+    #     deletion yet
+    #     ob = getattr(here, id)
+    #     from Products.CPSCore.EventServiceTool import getPublicEventService
+    #     evtool = getPublicEventService(here)
+    #     evtool.notifyEvent('workflow_delete', ob, {})
+    here.manage_delObjects(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_not_used/skins/waeup_student/list_students.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/list_students.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/list_students.py	(revision 2226)
@@ -0,0 +1,78 @@
+## Script (Python) "hall_allocation_list"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id$
+"""
+export student_list
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+from Products.AdvancedQuery import Eq, Between, Le,In,MatchRegexp
+try:
+    aq_portal = context.portal_catalog.evalAdvancedQuery
+except:
+    aq_portal = context.portal_catalog_real.evalAdvancedQuery
+aq_students = context.students_catalog.evalAdvancedQuery
+request = context.REQUEST
+setheader = request.RESPONSE.setHeader
+pa = context.portal_accommodation
+scat = context.students_catalog
+st_schema = context.students_catalog.schema()
+#fields = list(st_schema) + ["bed",]
+fields = ("id",
+          "name",
+          "matric_no",
+          "jamb_reg_no",
+          "sex",
+          "email",
+          "faculty",
+          "department",
+          "course",
+          "level",
+          )
+res_list = []
+lines = []
+lines.append(','.join(fields))
+format = '"%(' + ')s","%('.join(fields) + ')s"'
+#cleared = context.portal_catalog(review_state = "cleared_and_validated")
+query = In('review_state',('cleared_and_validated',
+                           'school_fee_paid',
+                           'courses_registered',
+                           'courses_validated'))
+cleared = aq_portal(query)
+newquery = Eq('portal_type','StudentApplication') & MatchRegexp('SearchableText',r'^6*')
+#newquery = MatchRegexp('SearchableText','^5*')
+#new_students = aq_portal(newquery)
+#set_trace()
+#new_sids = []
+#for ns in new_students:
+#    new_sids.append(ns.getPath().split('/')[-2])
+#set_trace()
+for student in cleared:
+##    if student.getId not in new_sids:
+##        continue
+    erg = scat(id=student.getId)
+    if not erg:
+        continue
+    if not erg[0].jamb_reg_no.startswith('6'):
+        continue
+    d = context.getFormattedStudentEntry(erg[0])
+    lines.append(format % d)
+#setheader('Content-type', 'text/x-cvs')
+#setheader('Content-type','application/vnd.ms-excel')
+setheader('Content-type','text/semicolon-seperated-values')
+setheader('Content-Disposition:', 'attachment; filename="cleared_students.csv"')
+setheader('Expires',  'Mon, 26 Jul 1997 05:00:00GMT') # Date in the past
+setheader('Cache-Control', 'no-store, no-cache,must-revalidate') # HTTP/1.1
+setheader('Cache-Control', 'post-check=0,pre-check=0')
+setheader('Pragma', 'no-cache') # HTTP/1.0
+return '\n'.join(lines)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/login_student.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/login_student.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/login_student.pt	(revision 2226)
@@ -0,0 +1,73 @@
+<metal:html>
+
+<metal:body use-macro="here/main_template/macros/master">
+
+<metal:main fill-slot="main"
+      tal:define="username request/username | request/__ac_name | nothing">
+
+  <h3 i18n:translate="">Student Login</h3>
+
+  <form id="" action="" method="post"
+        tal:attributes="action string:${base_url}logged_in">
+        
+
+  <p> To access the registration portal enter your Student Id  and Password. </p>
+  
+  <p>The <strong>Student Id</strong> (initial capital letter followed by 6 numbers) 
+  has been automatically assigned by the portal after creation of 
+  the student record. Do not confuse with your Registration or Matriculation Number! 
+  </p>
+  
+  <p>During the admission and clearance process the <strong>Password</strong> corresponds with the last 
+  10 digits of your Admission Checking PIN (prefix APP).</p>
+  
+  <br /> 
+
+  <table id="login" class="form"
+         summary="Table for entering login information">
+    <tbody>
+    <tr>
+    <th>
+        <label for="username"
+               i18n:translate="label_student_id">Student Id</label></th>
+    <td>
+        <input type="text" id="username" name="__ac_name"
+               class="focus" size="20" value=""
+               tal:attributes="value username" /></td>
+    </tr>
+    <tr>
+    <th>
+        <label for="password"
+               i18n:translate="label_password">Password</label></th>
+    <td>
+        <input type="password" id="password" name="__ac_password" size="20"
+               value="" /></td>
+    </tr>
+    </tbody>
+  </table>
+  
+  <p class="buttonArea">
+    <!-- ****** Enable the automatic redirect ***** -->
+    <input type="hidden" name="came_from" value=""
+           tal:condition="exists: request/came_from"
+           tal:attributes="value request/came_from" />
+    <!-- ****** Enable the automatic redirect ***** -->
+    <input i18n:attributes="value" class="standalone"
+           type="submit" name="submit" value="button_login" />
+  </p>
+
+  </form>
+
+  <br />
+
+  <p i18n:translate="help_login_aware_logout">
+    Don't forget to logout or exit your browser when you're done.
+  </p>
+  <p i18n:translate="help_login_troubles_cookies">
+    Having trouble logging in? Make sure to enable cookies in
+    your web browser.
+  </p>
+
+</metal:main>
+</metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/mail2student.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/mail2student.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/mail2student.py	(revision 2226)
@@ -0,0 +1,68 @@
+## Script (Python) "mail2student"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=co_name=None,co_email=None,student_email=None,probtype=None,commt=None, action=None
+##title=
+##
+# $Id: mail2admin.py 869 2006-11-15 13:46:49Z henrik $
+
+from urllib import urlencode
+
+mhost = context.MailHost
+prop = context.portal_properties
+
+# the message format, %s will be filled in from data
+
+message = """
+From: %s <%s>
+To: %s
+Cc: %s
+Bcc: %s
+Reply-To: %s
+Subject: %s
+%s
+"""
+
+#prop.email_from_address should be used for To:
+REQUEST = context.REQUEST
+
+#url_tuple = REQUEST.HTTP_REFERER.split('?')
+#if len(url_tuple) == 2:
+#    url_tuple[1] ='portal_status_message=Your message has been sent!'
+#else:
+#    url_tuple.append('portal_status_message=Your message has been sent!')
+#redirect_url = "?".join(url_tuple)
+#REQUEST.set('rurl', redirect_url) # to see the result in the error log
+
+msg = message % (
+     co_name,
+     co_email,
+     student_email,
+     co_email,
+     'waeup@saoas.org',
+#    'js@aixtraware.de',
+     co_email,
+     probtype,
+     commt,
+     )
+mhost.send(msg)
+
+
+#REQUEST = context.REQUEST
+#RESPONSE = REQUEST.RESPONSE
+#RESPONSE.redirect(redirect_url)
+
+args = {}
+psm = "Your message has been sent!"
+args['portal_status_message'] = psm
+if action:
+    url = context.absolute_url() + '/' + action + '?' + urlencode(args)
+else:
+    url = context.absolute_url() +'?' + urlencode(args)
+return REQUEST.RESPONSE.redirect(url)
+
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/mail_next_student.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/mail_next_student.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/mail_next_student.py	(revision 2226)
@@ -0,0 +1,16 @@
+## Script (Python) "go_to_student"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST, student_id=None
+##title=
+# $Id: clearance_edit.py 1217 2007-01-06 17:50:02Z henrik $
+"""
+"""
+
+
+if student_id != None:
+  url = context.portal_url() + '/campus/students/'  + str(student_id) + '/mail_password_form'
+  return REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/mail_password_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/mail_password_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/mail_password_form.pt	(revision 2226)
@@ -0,0 +1,85 @@
+<metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main"
+                tal:define="member python:context.portal_membership.getAuthenticatedMember();
+                            info context/getMemberInfo;
+                        ">
+      <span tal:condition="not: info">
+        <span tal:content="here/illegal_view" />
+      </span>                        
+    
+      <span tal:condition="info">
+      <h3>Send Mail to Student!</h3>
+      <br />
+
+      <form id="form1" name="form1" method="post" action="mail2student">
+
+      <input type="hidden" name="co_name" type="text" id="co_name"
+             tal:attributes="value python:member.getProperty('fullname',None)"/>
+      <input type="hidden" name="co_email" type="text" id="co_email"
+             tal:attributes="value python:member.getProperty('email',None)"/>             
+      <input type="hidden" name="student_email" type="text" id="student_email"
+             tal:attributes="value info/email"/>                   
+
+      <table width="100%" border="0" cellspacing="5" cellpadding="0">
+        <tr>
+          <td width="150px">
+             <strong>Student's Name: </strong>
+          </td>
+          <td>
+             <span tal:condition="info/student/Title" tal:content="info/student/Title" />
+             <span tal:condition="not:info/student/Title">N/A</span>
+          </td>
+        </tr>
+        <tr>
+          <td>
+             <strong>Student's Email: </strong>
+          </td>
+          <td>
+             <span tal:content="info/email" />
+          </td>
+        </tr>
+        <tr>
+          <td>
+             <strong>Subject: </strong>
+          </td>
+          <td>
+              <select name="probtype" class="boxgreen" id="probtype">
+                <option>Your SRP Authentication Data</option>
+                <option>Your Password</option>
+                <option>Your Application PIN</option>
+                <option>Your Student Id</option>
+                <option>Message from SRP Administrator</option>
+              </select>        
+          </td>
+        </tr>        
+        <tr>
+          <td valign="top">
+             <strong>Your Message:</strong>
+          </td>
+          <td>
+             <textarea name="commt" rows="10" cols="60" id="commt" tal:content="info/message"></textarea>
+          </td>
+        </tr>
+        <tr tal:condition="python: info['email'] and info['email']!='N/A'">
+          <td>&nbsp;</td>
+          <td><input name="Submit" type="submit" class="standalone" value="Submit" /><br /><br /></td>
+        </tr>
+
+        <tr tal:condition="not:info/email">
+          <td>&nbsp;</td>
+          <td><strong tal:condition="not:info/email"> 
+              The student did not provide an email address.
+              </strong>
+          </td>
+        </tr>        
+      </table>
+      </form>
+      </span>
+      <form action="mail_next_student" method="post" class="group"
+            tal:attributes="action string:${context/absolute_url}/mail_next_student">
+         <input type="submit" class="context" value="Next Student Id" />
+         <input name="student_id" type="text" size="8">
+      </form>      
+
+    </metal:main>
+</metal:body>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/no_booking_allowed.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/no_booking_allowed.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/no_booking_allowed.pt	(revision 2226)
@@ -0,0 +1,8 @@
+<metal:body use-macro="here/main_template/macros/master">
+  <metal:main fill-slot="main">
+
+    <h3>You are not eligible to book accommodation!</h3>
+
+  </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/objection_raised_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/objection_raised_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/objection_raised_form.pt	(revision 2226)
@@ -0,0 +1,73 @@
+<metal:html tal:define="info options/info|context/getApplicationInfo;
+                        review_state info/review_state">
+  <span tal:condition="not: info">
+    <span tal:content="here/illegal_view" />
+  </span>
+<metal:block tal:condition="info">                         
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main">
+    
+      <div style="text-align: right"
+           tal:condition="python:review_state in ('admitted', 'clearance_pin_entered', 'clearance_requested', 'cleared', 'objection_raised',)">
+      <a href="" target="slip" tal:attributes="href string:admission_slip"
+          onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+          <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+          Admission Slip
+      </a>
+      </div>        
+    
+      <h3>You raised an objection, please explain why!</h3>
+      
+      <br />      
+      
+      <form id="form1" name="form1" method="post" action="mail2admin">
+      <input type="hidden" name="regno" type="text" id="regno"
+             tal:attributes="value info/id"/>
+      <input type="hidden" name="probtype" type="text" id="regno"
+             tal:attributes="value string:Objection Raised"/>             
+      <table width="100%" border="0" cellspacing="5" cellpadding="0">
+        <tr>
+          <td width="150px">
+             <strong>Full Name: </strong>
+          </td>
+          <td>
+             <input name="fullname" type="text" id="fullname" size="30"
+                    tal:attributes="value info/student/Title"/>
+          </td>
+        </tr>
+        <tr>
+          <td>
+             <strong>Email: </strong>
+          </td>
+          <td>
+             <input name="email" type="text" id="email"  size="30"
+                    tal:attributes="value info/app_doc/app_email"/>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+             <strong>Reason: </strong>
+          </td>
+          <td>
+             <textarea name="descr" rows="10" cols="60" id="descr"></textarea>
+          </td>
+        </tr>
+      
+        <tr>
+          <td>&nbsp;</td>
+          <td><input name="Submit" type="submit" class="standalone" value="Submit" /><br /><br /></td>
+        </tr>
+      </table>
+      </form>
+      
+      
+      
+      
+      <form action="." method="post" class="group">
+            <input type="submit" name="application_edit:method"
+                       class="context" value="Continue" />
+       </form>      
+    </metal:main>
+  </metal:body>
+</metal:block>     
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/paid_transfer_list.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/paid_transfer_list.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/paid_transfer_list.py	(revision 2226)
@@ -0,0 +1,55 @@
+## Script (Python) "paid_transfer_list"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id: hall_allocation_list.py 1273 2007-01-11 18:28:49Z joachim $
+"""
+export students who paid for the transfer form
+"""
+request = context.REQUEST
+setheader = request.RESPONSE.setHeader
+scat = context.students_catalog
+fields = ("id",
+          "name",
+          "matric_no",
+          "jamb_reg_no",
+          "sex",
+          "email",
+          "phone",
+          "faculty",
+          "department",
+          "course",
+          "level",
+          )
+res_list = []
+lines = []
+lines.append(','.join(fields))
+format = '"%(' + ')s","%('.join(fields) + ')s"'
+
+payments = context.portal_catalog(portal_type='Payment')
+
+for payment in payments:
+    if not payment.id.startswith('transfer'):
+        continue
+    sid = payment.getPath().split('/')[-3]
+    erg = scat(id=sid)
+    if not erg:
+        continue
+    d = context.getFormattedStudentEntry(erg[0])
+    lines.append(format % d)
+
+#setheader('Content-type', 'text/x-cvs')
+#setheader('Content-type','application/vnd.ms-excel')
+setheader('Content-type','text/semicolon-seperated-values')
+setheader('Content-Disposition:', 'attachment; filename="transfer_list.csv"')
+setheader('Expires',  'Mon, 26 Jul 1997 05:00:00GMT') # Date in the past
+setheader('Cache-Control', 'no-store, no-cache,must-revalidate') # HTTP/1.1
+setheader('Cache-Control', 'post-check=0,pre-check=0')
+setheader('Pragma', 'no-cache') # HTTP/1.0
+return '\n'.join(lines)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/personal_edit.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/personal_edit.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/personal_edit.py	(revision 2226)
@@ -0,0 +1,66 @@
+## Script (Python) "personal_edit"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST, cpsdocument_edit_button=None, cpsdocument_edit_and_view_button=None, action=None
+##title=
+# $Id: application_edit.py 1071 2006-12-16 15:53:13Z joachim $
+"""
+"""
+wftool = context.portal_workflow
+from urllib import urlencode
+from Products.CPSDocument.utils import getFormUidUrlArg
+import DateTime
+current = DateTime.DateTime()
+import logging
+logger = logging.getLogger('Skins.personal_edit')
+
+info = context.getPersonalInfo()
+
+if info is None:
+    logger.info('Anonymous user tried to access %s' % REQUEST.get('URL0'))
+    return REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+student = info['student']
+per = info['per']
+per_doc = info['per_doc']
+state = info['review_state']
+is_valid, ds = per_doc.validate(request=REQUEST,
+                                schema_id = 'student_personal',
+                                layout_id = 'student_personal_fe',
+                                proxy=per,
+                                use_session=True)
+
+psm = ""
+args = {}
+action = "/personal_edit_form"
+base_url = per.absolute_url()
+
+if is_valid:
+    if cpsdocument_edit_button:
+        logger.info('%s edited personal data' % (info['id']))
+        # name = "%(firstname)s %(middlename)s %(lastname)s" % ds
+        # name = name.strip()
+        # name = name.replace('  ',' ')
+        # email = ds.get('email')
+        # phone = ds.get('phone')
+        # student_id = context.getStudentId()
+        # context.students_catalog.modifyRecord(id = student_id,
+        #                                       name = name,
+        #                                       email = email,
+        #                                       phone = phone,
+        #                                       sex = ds.get('sex'),
+        #                                      )
+        #action = ""
+        #base_url = student.absolute_url()
+        #url = base_url + action
+        psm = 'psm_content_changed'
+else:
+    psm = 'psm_content_error'
+    args = getFormUidUrlArg(REQUEST)
+
+args['portal_status_message'] = psm
+url = base_url + action + '?' + urlencode(args)
+REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/personal_edit_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/personal_edit_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/personal_edit_form.pt	(revision 2226)
@@ -0,0 +1,45 @@
+<metal:body use-macro="here/main_template/macros/master">
+
+    <metal:main fill-slot="main"
+                  tal:define="info context/getPersonalInfo;">
+      <metal:block tal:condition="not: info">
+        <span tal:content="here/illegal_view" />
+      </metal:block>
+      <metal:block tal:condition="info">
+      <metal:block tal:define="rendered_main python:info['per_doc'].render(
+                              layout_mode='edit',
+                              schema_id = 'student_personal',
+                              layout_id = 'student_personal_fe',
+                              request=request, 
+                              use_session=True,);
+           form_action string:personal_edit;
+           edition python:True;
+           metadata nothing;
+            ">
+    <a href=""
+       tal:attributes="href string:${here/academicsParent}">
+      <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+      Up one level
+    </a>
+    <h3>Update Your Personal Data!</h3>
+    <br />            
+            
+    <form action="ACTION" method="post" id="editForm"
+          enctype="multipart/form-data" class="workflow"
+          tal:attributes="action form_action">
+      <span tal:condition="not: info">
+        <metal:block use-macro="here/error_not_found/macros/not_found" />
+      </span>
+      <span tal:condition="info">
+        <span tal:omit-tag="" tal:replace="structure rendered_main"/>
+      </span>
+      <input type="submit" class="standalone" 
+             name="cpsdocument_edit_button"
+             value="Save" 
+             id="cpsdocument_edit_button"/>
+    </form>
+    </metal:block>
+    </metal:block>    
+    </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/personal_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/personal_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/personal_view.pt	(revision 2226)
@@ -0,0 +1,22 @@
+<metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main"
+                tal:define="info context/getPersonalInfo">
+      <span tal:condition="not: info">
+        <span tal:content="here/illegal_view" />
+      </span>
+      <span tal:condition="info">
+        <a href=""
+           tal:attributes="href string:${here/academicsParent}">
+          <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+          Up one level
+        </a>            
+        <h3>My Personal Record</h3>
+        <br />
+        <span tal:omit-tag=""
+              tal:content="structure python: info['per_doc'].render(
+              layout_mode='view', 
+              layout_id='student_personal_fe')" 
+              />
+      </span>
+    </metal:main>
+</metal:body>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/portlet_student_notice_display.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/portlet_student_notice_display.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/portlet_student_notice_display.pt	(revision 2226)
@@ -0,0 +1,6 @@
+<span tal:condition="python: getattr(context.campus.documents,'student_notice_doc',None)">
+<div style="margin: 5px; padding: 5px; background-color: black; color: white"
+     tal:define="doc python: context.campus.documents.student_notice_doc.getContent()"
+     tal:content="structure python:doc.wdrender()" />
+</span>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/portlet_student_workflow_display.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/portlet_student_workflow_display.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/portlet_student_workflow_display.pt	(revision 2226)
@@ -0,0 +1,158 @@
+<tal:block define="item nocall:options/context_obj;
+           info item/getStudentWorkflowInfo;"
+           condition="context/isStudent">       
+
+           
+<table>           
+<tr><td style="padding: 1em 0em 0.2em 0em;">
+   <strong>Registration Status:</strong>
+</td></tr>
+</table>
+
+<table class="registration" tal:condition="not:info/cr">
+  <span tal:condition="python:path('info/review_state')=='application_pin_entered'">
+  <tr><td class="active">
+    <a href="" tal:attributes="href string:${info/url}/application_edit_form">
+    Admission started
+    </a>
+  </td></tr>
+  </span>
+  <span tal:condition="python:path('info/review_state')!='application_pin_entered'">
+  <tr><td>
+    Admission started
+  </td></tr>
+  </span>
+  <span tal:condition="python:path('info/review_state')=='admission_applied'">
+  <tr><td class="active">
+    <a href="" tal:attributes="href string:${info/url}/application_view">
+    Admission requested
+    </a>
+  </td></tr>
+  </span>
+  <span tal:condition="python:path('info/review_state')!='admission_applied'">
+  <tr><td>
+    Admission requested
+  </td></tr>
+  </span>
+  <span tal:condition="python:path('info/review_state')=='pume_passed'">
+  <tr><td class="active">PUME passed</td></tr>
+  </span>
+  <span tal:condition="python:path('info/review_state')=='pume_failed'">
+  <tr><td class="stopped">PUME failed</td></tr>
+  </span>
+  <span tal:condition="python:not path('info/review_state') in ('pume_passed', 'pume_failed',)">
+  <tr><td>PUME passed</td></tr>
+  </span>  
+  <span tal:condition="python:path('info/review_state')=='admitted'">
+  <tr>
+    <td class="active">
+    <a href="" tal:attributes="href string:${info/url}/admission_form">
+    Admitted
+    </a>
+    </td>
+  </tr>
+  </span>
+  <span tal:condition="python:path('info/review_state')=='admission_rejected'">
+  <tr><td class="stopped">Admission rejected</td></tr>
+  </span>
+  <span tal:condition="python:path('info/review_state') in ('objection_raised','clearance_pin_entered','clearance_requested','cleared_and_validated',)">
+  <tr>
+    <td>
+    <a href="" tal:attributes="href string:${info/url}/admission_form">
+    Admitted
+    </a>
+    </td>
+  </tr>
+  </span>  
+  <span tal:condition="python:path('info/review_state')=='objection_raised'">
+  <tr>
+    <td class="stopped">
+    <a href="" tal:attributes="href string:${info/url}/admission_form">
+    Objection raised
+    </a>
+    </td>
+  </tr>
+  </span>
+  <span tal:condition="python:path('info/review_state')!='objection_raised'">
+  <tr><td>Objection raised</td></tr>
+  </span>  
+  <span tal:condition="python:path('info/review_state')=='clearance_pin_entered'">
+  <tr>
+    <td class="active">
+    <a href="" tal:attributes="href string:${info/url}/clearance_edit_form">
+    Clearance started
+    </a>    
+    </td>
+  </tr>
+  </span>
+  <span tal:condition="python:path('info/review_state')!='clearance_pin_entered'">
+  <tr><td>Clearance started</td></tr>
+  </span> 
+  <span tal:condition="python:path('info/review_state')=='clearance_requested'">
+  <tr><td class="active">Clearance requested</td></tr>
+  </span>
+  <span tal:condition="python:path('info/review_state')!='clearance_requested'">
+  <tr><td>Clearance requested</td></tr>
+  </span> 
+  <span tal:condition="python:path('info/review_state')=='cleared_and_validated'">
+  <tr><td class="active">Cleared</td></tr>
+  </span>
+  <span tal:condition="python:path('info/review_state')!='cleared_and_validated'">
+  <tr><td>Cleared</td></tr>
+  </span> 
+  <span tal:condition="python:path('info/review_state')=='deferred'">
+  <tr><td class="active">Admission deferred</td></tr>
+  </span>
+  <span tal:condition="python:path('info/review_state')!='deferred'">
+  <tr><td>Admission deferred</td></tr>
+  </span>   
+</table>
+
+<table class="registration" tal:condition="info/cr">
+  <span tal:condition="python:info['review_state']=='returning'">
+  <tr><td class="active">
+    <a href="" tal:attributes="href string:${info/url}/session_results_view">
+    Returning
+    </a>
+  </td></tr>
+  </span>
+  <span tal:condition="python:info['review_state']=='school_fee_paid'">
+  <tr><td class="active">
+    <a href="" tal:attributes="href string:${info/url}/student_view">
+    School fee paid
+    </a>
+  </td></tr>
+  </span>
+  <span tal:condition="python:info['review_state']!='school_fee_paid'">
+  <tr><td>
+    School fee paid
+  </td></tr>
+  </span>  
+  <span tal:condition="python:info['review_state']=='courses_registered'">
+  <tr><td class="active">
+    <a href="" tal:attributes="href string:${info/url}/student_view">
+    Courses registered
+    </a>
+  </td></tr>
+  </span>
+  <span tal:condition="python:info['review_state']!='courses_registered'">
+  <tr><td>
+    Courses registered
+  </td></tr>
+  </span>    
+  <span tal:condition="python:info['review_state']=='courses_validated'">
+  <tr><td class="active">
+    <a href="" tal:attributes="href string:${info/url}/student_view">
+    Courses vaildated
+    </a>
+  </td></tr>
+  </span>
+  <span tal:condition="python:info['review_state']!='courses_validated'">
+  <tr><td>
+    Courses vaildated
+  </td></tr>
+  </span>     
+</table>
+
+</tal:block>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/pume_slip.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/pume_slip.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/pume_slip.pt	(revision 2226)
@@ -0,0 +1,21 @@
+<metal:html tal:define="info context/getStudentInfo"> 
+  <metal:body use-macro="here/slip_template/macros/master">
+    <metal:main fill-slot="main">
+      <span tal:condition="not: info">
+        <metal:block use-macro="here/error_not_found/macros/not_found" />
+      </span>
+      <h3>PUME Result Slip</h3>
+      <br />
+      <span tal:omit-tag=""
+            tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'],
+            layout_mode='view_info', 
+            layout_id='student_application_fe')" 
+            />
+      <span tal:omit-tag=""
+            tal:content="structure python: info['pume_doc'].render(proxy=info['pume_doc'],
+            layout_mode='view_slip', 
+            layout_id='student_pume_fe')" 
+            />
+    </metal:main>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/pume_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/pume_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/pume_view.pt	(revision 2226)
@@ -0,0 +1,30 @@
+<metal:html tal:define="info context/getStudentInfo">
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main">
+      <span tal:condition="not: info">
+        <span tal:content="here/illegal_view" />
+      </span>
+      <span tal:condition="info"
+            tal:define="review_state info/review_state">
+            
+        <div style="text-align: right"
+            >
+        <a href="" target="slip" tal:attributes="href string:pume_slip"
+            onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+            PUME Result Slip
+        </a>
+        
+        </div>
+
+        <h3>My PUME Results</h3>
+        <br />
+        <span tal:omit-tag=""
+              tal:content="structure python: info['pume_doc'].render(proxy=info['pume_doc'],
+              layout_mode='view', 
+              layout_id='student_pume_fe')" 
+              />
+      </span>
+    </metal:main>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/raise_objection.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/raise_objection.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/raise_objection.py	(revision 2226)
@@ -0,0 +1,28 @@
+## Script (Python) "raise_objection"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id:defer_admission.py 486 2006-09-06 10:09:39Z joachim $
+"""
+raise an objection and print Info.
+"""
+import DateTime
+import logging
+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()))
+    return context.admission_form()
+current = DateTime.DateTime()
+info['app_doc'].edit(mapping={'objection_date':current,})
+if info['review_state'] == "admitted":
+    wf.doActionFor(info['student'],'raise_objection')
+    return context.objection_raised_form(info=info)
+return context.admission_form()
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/refresh_level.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/refresh_level.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/refresh_level.py	(revision 2226)
@@ -0,0 +1,112 @@
+## Script (Python) "refresh_level"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST=None, student=None, action_after_reject=None, action_after_validate=None
+# $Id$
+"""
+process the Application Form
+return html renderer + psm
+"""
+request = context.REQUEST
+import DateTime,logging
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+from Products.AdvancedQuery import Eq, Between, Le,In
+try:
+    aq_portal = context.portal_catalog.evalAdvancedQuery
+except:
+    aq_portal = context.portal_catalog_real.evalAdvancedQuery
+aq_courses = context.courses_catalog.evalAdvancedQuery
+
+import logging
+logger = logging.getLogger('Skins.refresh_level')
+
+from urllib import urlencode
+
+current = DateTime.DateTime()
+request = context.REQUEST
+#session = request.SESSION
+response = request.RESPONSE
+redirect = response.redirect
+logger = logging.getLogger('Skins.refresh_level')
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+wt = context.waeup_tool
+student = context.students_catalog(id=context.getStudentId())[0]
+cert_id = student.course
+current_level = student.level
+level = context
+#results = context.results_import(matric_no = student.matric_no)
+# results = False #skip carry overs
+# if results:
+#     #carry_overs = [brain for brain in results if brain.GRADE in ('D','E','F')]
+#     l = []
+#     carry_overs = results
+#     for co in carry_overs:
+#         carry_over = False
+#         query = Eq('code',co.CosCode)
+#         c_res = aq_courses(query)
+#         if not c_res:
+#             logger.info('%s, course %s not found in courses_catalog' % (student.id,co.CosCode))
+#             continue
+#         course_cat_entry = c_res[0]
+#         if not course_cat_entry.passmark:
+#             carry_over = co.GRADE in ('D','E','F')
+#         else:
+#             try:
+#                 score = int(co.Score)
+#             except:
+#                 logger.info('%s, course %s has invalid score %s' % (student.id,
+#                                                                     co.CosCode,
+#                                                                     co.Score))
+#                 continue
+#             if int(c_res[0].passmark) <= score:
+#                 continue
+#             carry_over = True
+#         if not carry_over:
+#             continue
+#         d = context.getCourseInfo(co.CosCode)
+#         d['grade'] = co.GRADE
+#         d['carry_level'] = co.CarryLevel
+#         course_id = "%s_co" % co.CosCode
+#         if not context.hasObject(course_id):
+#             cr_id = level.invokeFactory('StudentCourseResult',course_id)
+#             course_result = getattr(level,cr_id)
+#             context.portal_workflow.doActionFor(course_result,'open')
+#             course_result.getContent().edit(mapping=d)
+res = context.portal_catalog(portal_type="Certificate", id = cert_id)
+l = []
+if res:
+    cert = res[0]
+    path = cert.getPath()
+    query = Eq("path","%s/%s" % (path,student.level)) &\
+            Eq('portal_type','CertificateCourse')
+    courses = aq_portal(query)
+    course_ids = [c.getId  for c in courses if c.getId not in level.objectIds()]
+    for c_id in course_ids:
+        #set_trace()
+        d = context.getCourseInfo(c_id)
+        cr_id = level.invokeFactory('StudentCourseResult',c_id)
+        course_result = getattr(level,cr_id)
+        context.portal_workflow.doActionFor(course_result,'open')
+        d['core_or_elective'] = getattr(c.getObject().getContent(),'core_or_elective')
+        course_result.getContent().edit(mapping=d)
+        context.waeup_tool.doCommit()
+#session.set('in_progress','finished')
+logger.info('%s updated course list' % member)
+
+args = {}
+psm = "Course list updated!"
+args['portal_status_message'] = psm
+if action_after_validate:
+    url = context.absolute_url() + '/' + action_after_validate + '?' + urlencode(args)
+else:
+    url = context.absolute_url() + '?' + urlencode(args)
+return REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/register_courses.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/register_courses.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/register_courses.py	(revision 2226)
@@ -0,0 +1,56 @@
+## Script (Python) "register_courses"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST=None, student=None, action_after_reject=None, action_after_validate=None
+##title=
+##
+# $Id: getStudyCourseInfo.py 1504 2007-02-26 21:20:40Z henrik $
+"""
+close the Students StudyLevel
+"""
+from Products.CMFCore.WorkflowCore import WorkflowException
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+from urllib import urlencode
+
+request = context.REQUEST
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+import logging
+logger = logging.getLogger('Skins.register_courses')
+
+wftool = context.portal_workflow
+students_folder = context.portal_url.getPortalObject().campus.students
+student_id = context.getStudentId()
+student = getattr(students_folder,student_id)
+
+try:
+    wftool.doActionFor(student,'register_courses')
+except WorkflowException,E:
+    logger.info('%s WorkflowException %s for %s' % (member_id,E,student_id))
+    return request.RESPONSE.redirect("%s" % context.absolute_url())
+
+try:
+    wftool.doActionFor(context,'close')
+except WorkflowException,E:
+    #logger.info('%s WorkflowException %s for %s' % (member_id,E,student_id))
+    #return request.RESPONSE.redirect("%s" % context.absolute_url())
+    pass
+
+logger.info('%s registered course list of %s' % (member_id,student_id))
+args = {}
+psm = "You successfully submitted your course list!"
+args['portal_status_message'] = psm
+if action_after_validate:
+    url = context.absolute_url() + '/' + action_after_validate + '?' + urlencode(args)
+else:
+    url = context.absolute_url() + '?' + urlencode(args)
+return REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/reject_courses.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/reject_courses.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/reject_courses.py	(revision 2226)
@@ -0,0 +1,52 @@
+## Script (Python) "reject_courses"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST=None, student=None, action_after_reject=None, action_after_validate=None
+##title=
+##
+# $Id: getStudyCourseInfo.py 1504 2007-02-26 21:20:40Z henrik $
+"""
+close the Students StudyLevel
+"""
+from Products.CMFCore.WorkflowCore import WorkflowException
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+from urllib import urlencode
+request = context.REQUEST
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+import logging
+logger = logging.getLogger('Skins.reject_courses')
+
+wftool = context.portal_workflow
+wftool.doActionFor(context,'open')
+wftool.doActionFor(context,'close_for_edit')
+students_folder = context.portal_url.getPortalObject().campus.students
+student_id = context.getStudentId()
+student = getattr(students_folder,student_id)
+try:
+    wftool.doActionFor(student,'reject_courses')
+except WorkflowException,E:
+    logger.info('%s WorkflowException %s for %s' % (member_id,E,student_id))
+    return request.RESPONSE.redirect("%s" % context.absolute_url())
+logger.info('%s rejected course list of %s' % (member_id,student_id))
+
+args = {}
+
+psm = "Student's course list has been rejected! Please fill and submit the form below!"
+subject = "Course list rejected"
+args['subject'] = subject
+args['continue'] = action_after_validate
+args['portal_status_message'] = psm
+if action_after_reject:
+    url = context.absolute_url() + '/' + action_after_reject + '?' + urlencode(args)
+else:
+    url = context.absolute_url() + '?' + urlencode(args)
+return REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/request_transfer.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/request_transfer.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/request_transfer.py	(revision 2226)
@@ -0,0 +1,117 @@
+## Script (Python) "request_transfer"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+pay online
+"""
+import logging
+from urllib import urlencode
+logger = logging.getLogger('Skins_request_transfer')
+import DateTime
+lt = context.portal_layouts
+request = context.REQUEST
+students = context.portal_url.getPortalObject().campus.students
+
+mtool = context.portal_membership
+if mtool.isAnonymousUser():
+    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+requested_id = context.getStudentId()
+if requested_id and not context.isStaff() and 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
+else:
+    student_id = member_id
+if student_id is None:
+    return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+student = getattr(students,student_id)
+sbrain = context.students_catalog(id=student_id)[0]
+payments = getattr(student,'payments').objectIds()
+paid = False
+for payment in payments:
+    if payment.startswith('transfer'):
+        paid = True
+        break
+
+# for testing of transfer forms
+#paid = True
+
+if paid:
+    logger.info('%s opened (paid) request transfer form of %s' % (member_id,student_id))
+    return context.request_transfer_form(rendered = None,
+                                 psm = None,
+                                 paid = True,
+                                 )
+
+validate = request.has_key("cpsdocument_create_button")
+res,psm,ds = lt.renderLayout(layout_id= 'student_transfer',
+                      schema_id= 'epayment',
+                      context=context,
+                      mapping=validate and request,
+                      ob={},
+                      layout_mode="create",
+                      formaction = "request_transfer",
+                      button = 'Start'
+                      )
+if psm == 'invalid':
+    psm = 'Please correct your errors!'
+    return context.request_transfer_form(rendered = res,
+                                 psm = psm,
+                                 mode = 'edit',
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.request_transfer_form(rendered = res,
+                                 psm = None,
+                                 mode = 'edit',
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    pass
+if "payments" not in student.objectIds():
+    student.invokeFactory('PaymentsFolder','payments')
+    payments = getattr(student,'payments')
+    d = {}
+    d['Title'] = 'Payments'
+    payments.getContent().edit(mapping=d)
+    wftool.doActionFor(payments,'open')
+else:
+    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')
+p_id = "transfer_%s" % order_id
+now = DateTime.DateTime()
+info['date'] = now
+info['amount'] = "n/a"
+pin = info['order_id'] = ds.get('pin')
+info['type_code'] = "%s" % pin
+info['type_description'] = 'Transfer Form for Session 2006/2007'
+info['resp_code'] = "SC"
+info['resp_desc'] = "SC Payment Successful"
+payments.invokeFactory('Payment', p_id)
+payment = getattr(payments,p_id)
+wftool = context.portal_workflow
+wftool.doActionFor(payment,'open')
+payment.getContent().edit(mapping=info)
+wftool.doActionFor(payment,'close')
+return context.request_transfer_form(rendered = None,
+                                 psm = None,
+                                 paid = True,
+                                 )
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/request_transfer_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/request_transfer_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/request_transfer_form.pt	(revision 2226)
@@ -0,0 +1,31 @@
+<metal:block use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="header" />
+    <metal:main fill-slot="main"
+                    tal:define="rendered_main options/rendered;
+                            portal_status_message options/psm;
+                            paid options/paid|nothing;">
+
+
+        <span tal:condition="rendered_main">
+          <h3>Request a Transfer!</h3>
+          <br />
+          <div tal:replace="structure rendered_main" />
+        </span>          
+
+        <span tal:condition="paid">
+          <h3>Print Your Transfer Form!</h3>
+          <br />
+          
+          <div tal:replace="structure rendered_main" />
+          <a target="slip" href="intra_faculty_transfer_1"
+              onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+          Intra Faculty Transfer Form</a>
+          
+          <br />
+          <br />
+          <a target="slip" href="inter_faculty_transfer_1"
+              onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+              Inter Faculty Transfer Form</a>
+        </span>          
+    </metal:main>
+</metal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/search_students.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/search_students.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/search_students.py	(revision 2226)
@@ -0,0 +1,309 @@
+## Script (Python) "search_students"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST
+##title=
+##
+# $Id: search_students.py 911 2006-11-20 15:11:29Z henrik $
+"""
+list Students for ClearanceOfficers
+"""
+import logging
+logger = logging.getLogger('Skins.search_students')
+from DateTime import DateTime
+#
+#with_timer = True
+with_timer = False
+#
+request = REQUEST
+form = request.form
+fget = form.get
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+is_anon = mtool.isAnonymousUser()
+lt = context.portal_layouts
+path_info = request.get('PATH_INFO').split('/')
+
+allowed = True
+if is_anon:
+    allowed = False
+from Products.AdvancedQuery import Eq, Between, Le,In
+try:
+    aq_portal = context.portal_catalog.evalAdvancedQuery
+except:
+    aq_portal = context.portal_catalog_real.evalAdvancedQuery
+aq_students = context.students_catalog.evalAdvancedQuery
+
+def cmp_id(a,b):
+    if a.getId() > b.getId():
+        return 1
+    return -1
+
+student_subobjects = ("StudentApplication",
+                      "StudentPersonal",
+                      "StudentStudyCourse",
+                      "StudentAccommodation",
+                      "StudentStudyLevel",)
+
+#student_objects = student_subobjects + ("Student",)
+student_objects = ("Student",)
+
+user_info = {}
+items = []
+validate = request.has_key("cpsdocument_edit_button")
+
+state = "all"
+user_info['member'] = str(member)
+user_info['departments'] = []
+user_info['faculties'] = []
+co_view = False
+ca_view = False
+faculties =  fget('faculties')
+departments = fget('departments')
+certificate_level = fget('certificate_level')
+dep_str = fac_str = certificate_level_str = ''
+if "ClearanceOfficers" in member.getGroups():
+    state = "clearance_requested"
+    only_review = False
+    co_view = True
+    if faculties or departments:
+        #from Products.zdb import set_trace;set_trace()
+        if faculties:
+            fac_str = faculties
+            faculties = faculties.split()
+        if departments:
+            dep_str = departments
+            departments = departments.split()
+    else:
+        query = In('portal_type',('Faculty',)) &\
+                 In('localUsersWithRoles', ("user:%s" % member,))
+        res = aq_portal(query)
+        logger.info('ClearanceOfficer %s initiated student_search' % member)
+        faculties = []
+        if res:
+            faculties = [f.getId for f in res]
+        user_info['faculties'] = faculties
+        fac_str = " ".join(faculties)
+        query = In('portal_type',('Department',)) &\
+                 In('localUsersWithRoles', ("user:%s" % member,))
+        res = aq_portal(query)
+        departments = []
+        if res:
+            departments = [f.getId for f in res]
+        user_info['departments'] = departments
+        dep_str = " ".join(departments)
+elif "CourseAdvisers" in member.getGroups():
+    state = "courses_registered"
+    only_review = False
+    ca_view = True
+    if certificate_level:
+        #from Products.zdb import set_trace;set_trace()
+        certificate_level_str = certificate_level
+        certificate_level = certificate_level.split()
+    else:
+        query = In('portal_type',('StudyLevel',)) &\
+                 In('localUsersWithRoles', ("user:%s" % member,))
+        res = aq_portal(query)
+        logger.info('CourseAdviser %s initiated student_search' % member)
+        certificate_level = []
+        if res:
+            certificate_level = ['/'.join(f.getPath().split('/')[-2:]) for f in res]
+        user_info['certificate_level'] = certificate_level
+        certificate_level_str = " ".join(certificate_level)
+default = {'search_mode': 'student_id',
+        'review_state': state,
+        'search_string': ''
+        }
+rend,psm,ds = lt.renderLayout(layout_id= 'student_search',
+                      schema_id= 'student_search',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob=default,
+                      layout_mode='edit',
+                      formaction="search_students",
+                      faculties = fac_str,
+                      departments = dep_str,
+                      certificate_level = certificate_level_str,
+                      commit = False,
+                      )
+if psm == '':
+    return context.search_students_form(rendered = rend,
+                             psm = psm,
+                             #psm = "%s, %s" % (psm,ds),
+                             info = user_info,
+                             students = [],
+                             allowed = allowed,
+                             )
+what = ds.get('search_mode')
+state = ds.get('review_state')
+st = term = ds.get('search_string')
+err = False
+with_review = state != "all"
+only_review = with_review and not term
+bools = "with_review = %s<br\> only_review = %s<br\>" % (with_review,only_review)
+if not term and not with_review:
+    psm = "You must specify a search string when searching 'all states'!"
+    err = True
+elif '*' in term:
+    psm = "Wildcards are not supported!"
+    err = True
+if err:
+    return context.search_students_form(rendered = rend,
+                             psm = psm,
+                             #psm = "%s, %s" % (psm,ds),
+                             info = user_info,
+                             students = items,
+                             allowed = allowed,
+                             )
+#st_queries = ('jamb_reg_no','matric_no','name')
+review_res = None
+query = None
+items = []
+res = []
+review_set = []
+search_set = []
+if len(term) > 0:
+    if what == "student_id":
+        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,
+                             psm = "No student found!",
+                             students = [],
+                             allowed = allowed,
+                             )
+    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":
+        st_l = "%s" % term.strip().lower()
+        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 = aq_portal(query)
+        if res:
+            for r in res:
+                pl = r.getPath().split('/')
+                search_set.append(pl[pl.index('students') + 1])
+
+
+if only_review or with_review or co_view:
+    if with_timer:
+        start = DateTime().timeTime()
+        logger.info('"%s","start 100"' % member)
+    query = Eq('review_state',state)
+    review_res = aq_portal(query)
+
+    logger.info('%s searches for students in review_state %s' % (member,state))
+
+    if with_timer:
+        end = DateTime().timeTime()
+        logger.info('"%s","searchtime","%6.2f"' % (member,end-start))
+if co_view:
+    only_review = False
+    with_review = True
+    if with_timer:
+        start = DateTime().timeTime()
+        logger.info('"%s","start 200"' % member)
+    query = In('faculty',faculties) | In('department',departments)
+    res = aq_students(query)
+    if with_timer:
+        end = DateTime().timeTime()
+        logger.info('"%s","searchtime","%6.2f"' % (member,end-start))
+    start = DateTime().timeTime()
+    search_set = [r.id for r in res]
+    if with_timer:
+        end = DateTime().timeTime()
+        logger.info('"%s","searchtime","%6.2f"' % (member,end-start))
+elif ca_view:
+    only_review = False
+    with_review = True
+    if with_timer:
+        start = DateTime().timeTime()
+        logger.info('"%s","start 200"' % member)
+    courses = [cl.split('/')[0] for cl in certificate_level]
+    levels = [cl.split('/')[1] for cl in certificate_level]
+    query = In('course',courses) & In('level',levels)
+    res = aq_students(query)
+    if with_timer:
+        end = DateTime().timeTime()
+        logger.info('"%s","searchtime","%6.2f"' % (member,end-start))
+        start = DateTime().timeTime()
+    search_set = [r.id for r in res]
+    if with_timer:
+        end = DateTime().timeTime()
+        logger.info('"%s","searchtime","%6.2f"' % (member,end-start))
+if with_timer:
+    logger.info('"%s","start 300"' % member)
+    start = DateTime().timeTime()
+if review_res:
+    review_set = [r.getId for r in review_res]
+if with_timer:
+    end = DateTime().timeTime()
+    logger.info('"%s","searchtime","%6.2f"' % (member,end-start))
+    logger.info('"%s","start 400"' % member)
+    start = DateTime().timeTime()
+if only_review:
+    all = review_set
+elif with_review:
+    all = []
+    for i in search_set:
+        if i in review_set:
+            all.append(i)
+else:
+    all = search_set
+if with_timer:
+    end = DateTime().timeTime()
+    logger.info('"%s","searchtime","%6.2f"' % (member,end-start))
+items = all[:500]
+students = []
+if with_timer:
+    logger.info('"%s","start 500"' % member)
+    start = DateTime().timeTime()
+if items:
+    for item in items:
+        stcat = context.students_catalog
+        record = stcat(id = item)
+        if record:
+            record = record[0]
+        else:
+            return item+' not found in students_catalog'
+        info = {}
+        for field in stcat.schema() + stcat.indexes():
+            info[field] = getattr(record, field)
+        else:
+            students.append(info)
+    if with_timer:
+        end = DateTime().timeTime()
+        logger.info('"%s","searchtime","%6.2f"' % (member,end-start))
+
+    return context.search_students_form(rendered = rend,
+                             psm = "",
+                             info = user_info,
+                             students = students,
+                             allowed = allowed,
+                             co_view = co_view,
+                             ca_view = ca_view
+                             )
+return context.search_students_form(rendered = rend,
+                             psm = "No student found!",
+                             info = user_info,
+                             students = students,
+                             allowed = allowed,
+                             )
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/search_students_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/search_students_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/search_students_form.pt	(revision 2226)
@@ -0,0 +1,145 @@
+<metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main"
+            tal:define="rendered options/rendered;
+            portal_status_message options/psm;
+            students options/students;
+            info options/info|nothing;
+            is_so context/isSectionOfficer;
+            allowed options/allowed|nothing;"
+            >
+      <span tal:condition="not: allowed">
+        <span tal:content="here/illegal_view" />
+      </span>
+      <span tal:condition="allowed" tal:omit-tag="">
+      
+      <strong>
+      <nobr><a href="statistics_new_view">New Student Statistics</a>
+      &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
+      <nobr><a href="statistics_ret_view">Returning Student Statistics</a>
+      &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
+      <nobr><a href="statistics_simple_view">Basic Student Statistics</a>
+      &nbsp;&nbsp;&nbsp;&nbsp;</nobr>      
+      <nobr><a href="apply_pume_manage">Application Process</a>
+      &nbsp;&nbsp;&nbsp;&nbsp;</nobr>         
+      <span tal:condition="is_so">
+         <nobr><a href="view_logs">View Log Files</a>
+         &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
+         <nobr><a href="add_student">Add Student Record</a>        
+         &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
+         <nobr><a href="paid_transfer_list">Export Transfer Students</a>
+         &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
+         <nobr><a href="list_students">Cleared Student Export</a></nobr>             
+      </span>
+      </strong>
+    
+              
+        <h3> Search Student Section</h3><br />
+          You are logged in as member <span tal:replace="info/member|nothing" /> 
+          <span tal:condition="info/faculties|nothing" tal:omit-tag="">
+            who is ClearanceOfficer for Faculty 
+            <span tal:repeat="faculty info/faculties" tal:content="faculty" />
+          </span>
+          <span tal:condition="info/departments|nothing" tal:omit-tag="">
+            and <span tal:repeat="department info/departments|nothing" tal:content="department"/></span>.
+          <br /><br />
+        <span tal:replace="structure rendered" />
+        <span tal:condition="students">
+          <span
+              tal:define="items students;
+              columns python:3;
+              items_per_page python:40;
+              max_items python:300;
+              zoom python:0;
+              batches_all python:here.getBatchList(items,columns, items_per_page,zoom,max_items=400);
+              batches python:batches_all[0];
+              batch_info python:batches_all[1];
+              zoomed python:batches_all[2];
+              mq nocall:modules/ZTUtils/make_query;"
+              tal:omit-tag=""
+              >
+            <tal:block tal:condition="python: items and batch_info and batch_info['nb_pages'] > 1">
+              <div class="batchLayout">
+                <span i18n:translate="">
+                  Objects: 
+                  <strong>
+                    <tal:block replace="batch_info/start"
+                               i18n:name="batch_start" /> - <tal:block replace="batch_info/limit"
+                                                                       i18n:name="batch_limit" />
+                  </strong>
+                  of <tal:block replace="batch_info/length"
+                                i18n:name="batch_length" />
+                </span>
+              </div>
+              <br />
+            </tal:block>
+            <table class="contentListing" width="100%">
+              <span tal:repeat="rows batches" tal:omit-tag="">
+                <span tal:repeat="student rows">
+                  <tr tal:condition="student" 
+                      tal:attributes="class python:test(repeat['student'].even(), 'even ajaxtd', 'odd ajaxtd')">
+                    <td><a href="id" tal:attributes="href string:${context/portal_url}/campus/students/${student/id}"
+                           tal:content="student/id"></a></td>    
+                    <td>
+                      <span tal:replace="student/name" />
+                    </td>    
+                    <td><span tal:replace="student/matric_no" /></td>   
+                    <td><span tal:replace="student/jamb_reg_no" /></td>
+                    <td tal:condition="options/co_view|nothing">
+                      <a href="id" 
+                         tal:attributes="href string:${context/portal_url}/campus/students/${student/id}/clearance/external_clearance_edit_form"
+                         target="edit"
+                         onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')"
+                         >[view and change state]</a></td>
+                    <td tal:condition="options/ca_view|nothing">
+                      <a href="id" 
+                         tal:attributes="href string:${context/portal_url}/campus/students/${student/id}/study_course/study_course/${student/level}/external_study_level_view"
+                         target="edit"
+                         onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')"
+                         >[view and validate course list]</a></td>
+                  </tr>
+                </span>
+              </span>
+            </table>
+            <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
+              <div class="pageNavigationLayout">
+                <a tal:define="previous batch_info/previous"
+                   tal:condition="python:previous is not None"
+                   tal:attributes="href python:'%s?%s'%(request['URL'],
+                   mq(request.form, b_start=0))"
+                   >
+                (&lt;&lt;)</a>
+                <a tal:define="previous batch_info/previous"
+                   tal:condition="python:previous is not None"
+                   tal:attributes="href python:'%s?%s'%(request['URL'],
+                   mq(request.form, b_start=previous))"
+                   i18n:translate="batch_previous">Previous</a>
+                <tal:block repeat="page batch_info/pages">
+                  <tal:block condition="python:page != batch_info['start'] - 1">
+                    <a tal:attributes="href python:'%s?%s'%(request['URL'],
+                    mq(request.form, b_start=page))"
+                    tal:content="repeat/page/number">1</a>&nbsp;
+                  </tal:block>
+                  <tal:block condition="python:page == batch_info['start'] - 1">
+                    <span tal:content="string:${repeat/page/number}" />&nbsp;
+                  </tal:block>
+                </tal:block>
+                <a tal:define="next batch_info/next"
+                   tal:condition="python:next is not None"
+                   tal:attributes="href python:'%s?%s'%(request['URL'],
+                   mq(request.form, b_start=next))"
+                   i18n:translate="batch_next">Next</a>
+                <a tal:define="next batch_info/next;
+                last_page python:batch_info['pages'][-1]"
+                tal:condition="python:next is not None"
+                tal:attributes="href python:'%s?%s'%(request['URL'],
+                mq(request.form, b_start=last_page))"
+                >
+                (&gt;&gt;)</a>
+              </div>
+            </tal:block>
+          </span>
+        </span>
+      </span>
+    </metal:main>
+</metal:body>
+  
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/session_results_anon_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/session_results_anon_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/session_results_anon_view.pt	(revision 2226)
@@ -0,0 +1,78 @@
+<metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main"
+                tal:define="student options/student;
+                            results options/results;
+                            registered options/registered">
+      <h3>Session Results of <span tal:content="student/Firstname" />
+        <span tal:content="student/Middlename" />
+        <span tal:content="student/Lastname" />
+      </h3>
+      <br />
+      <table>
+        <tr>
+          <th width="150px">Matriculation Number:</th><td tal:content="student/matric_no" />                     
+        </tr>
+        <tr>
+          <th>Sex:</th><td tal:content="student/Sex" />                     
+        </tr>
+        <tr>
+          <th>Course of Study:</th><td tal:content="student/Coursemajor" />                     
+        </tr>
+        <tr>
+          <th>Level:</th><td tal:content="student/Level" />                     
+        </tr>
+      </table>
+        
+       <table>
+          <tr>
+            <th width="150px">Verdict:</th>
+          <td tal:content="student/verdict" /> 
+          </tr>
+          <tr>  
+            <th>Session:</th><td tal:content="student/session" /> 
+          </tr>        
+       </table>
+
+       <br />
+                     
+       <table>
+         <span tal:repeat="semester results">
+            <span tal:repeat="result semester">
+             <tr tal:condition="repeat/result/start">
+              <th colspan="5">
+                <span tal:replace="python: test(repeat['semester'].index,'Second','First')" /> Semester
+              </th>
+             </tr>
+            <tr>     
+            <td width="80px" tal:content="result/CosCode" />
+            <td tal:content="result/title" />
+            <td width="50px" align="center" tal:content="result/GRADE" />
+          </tr>
+        </span>
+        </span>
+      </table>
+      <br />
+      <div tal:condition="registered">
+        <span tal:condition="python: registered == 'no_student_object'">
+          Your student and member records have not yet been created, please check again later.
+        </span>
+        <font color="red">
+        <span tal:condition="python: registered != 'no_student_object'">
+          You have already set your password, please 
+          <a href="" tal:attributes="href string:${context/portal_url}/login_student">login</a> 
+          with your Student Id <span tal:replace="registered" />.
+        </span>
+        </font>
+      </div>
+      <form tal:condition="not: registered" action="" method="post"
+            tal:attributes="action string:${context/portal_url}/set_access_data">
+        <input type="hidden" name="name" tal:attributes="value options/name" />
+        <input type="hidden" name="matric_no" tal:attributes="value student/matric_no" />
+        <input type="submit" 
+               class="standalone" 
+               value="Continue to Login!"
+               name="submit" />
+      </form>
+    </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/session_results_slip.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/session_results_slip.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/session_results_slip.pt	(revision 2226)
@@ -0,0 +1,73 @@
+<metal:body use-macro="here/slip_template/macros/master">
+    <metal:main fill-slot="main"
+                tal:define="info context/getSessionResults">
+    <span tal:condition="not: info">
+      <span tal:content="here/illegal_view" />
+    </span>
+    <span tal:condition="info" tal:omit-tag="">
+      <h3>Session Results of <span tal:content="info/student/name" />
+      </h3>
+      <br />
+      <table>
+        <tr>
+          <th width="180px">Student ID:</th>
+          <td> 
+            <span tal:replace="info/s_id" />
+          </td>      
+        </tr>      
+     
+        <tr>
+          <th width="150px">Matriculation Number:</th><td tal:content="info/student/matric_no" />                     
+        </tr>
+        <tr>
+          <th>Sex:</th><td tal:content="info/sex" />                     
+        </tr>
+        <tr>
+          <th valign="top">Course of Study:</th><td tal:content="info/student_from_returning/Coursemajor" />                     
+        </tr>
+        <tr>
+          <th>Current Level:</th><td tal:content="info/level" />                     
+        </tr>
+      </table>
+        
+       <table>
+          <tr>
+            <th width="180px">Verdict:</th><td tal:content="info/verdict" /> 
+          </tr>
+          <tr>  
+            <th>Session:</th><td tal:content="info/session" /> 
+          </tr>
+          <tr>  
+            <th valign="top">GPA:</th><td> <span tal:content="info/gpa" /> (on the basis of the data below)  </td> 
+          </tr>                    
+       </table>
+
+       <br />
+                     
+       <table>
+         <span tal:repeat="semester info/results">
+            <span tal:repeat="result semester">
+             <tr tal:condition="repeat/result/start">
+                <th colspan="2">
+                   <span tal:replace="python: test(repeat['semester'].index,'Second','First')" /> Semester
+                </th>
+                <td>Grade</td>
+                <td>Weight</td>
+                <td>Credits</td>
+             </tr>             
+            <tr>     
+            <td valign="top" width="80px" tal:content="result/CosCode" />
+            <td valign="top" tal:content="result/title" />
+            <td valign="top" width="50px" align="center" tal:content="result/GRADE" />
+            <td valign="top" width="50px" align="center" tal:content="result/WEIGHT" />
+            <td valign="top" width="50px" align="center" tal:content="result/credits" />
+
+          </tr>
+        </span>
+        <tr><td colspan="5">&nbsp;</td></tr>
+        </span>
+      </table>
+    </span>
+    </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/session_results_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/session_results_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/session_results_view.pt	(revision 2226)
@@ -0,0 +1,80 @@
+<metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main"
+                tal:define="info context/getSessionResults">
+      <metal:block tal:condition="not: info">
+        <span tal:content="here/illegal_view" />
+      </metal:block>
+      <metal:block tal:condition="info">                
+      <div tal:condition="nothing" style="text-align: right">
+        <a href="" target="slip" tal:attributes="href string:session_results_slip?nr=${info/student/matric_no}"
+           onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+          <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+          Session Result Slip
+        </a>
+      </div>
+      <h3>Session Results of <span tal:content="info/student/name" />
+      </h3>
+      <br />
+      <table>
+        <tr>
+          <th width="180px">Student ID:</th>
+          <td> 
+            <span tal:replace="info/s_id" />
+          </td>      
+        </tr>      
+     
+        <tr>
+          <th width="150px">Matriculation Number:</th><td tal:content="info/student/matric_no" />                     
+        </tr>
+        <tr>
+          <th>Sex:</th><td tal:content="info/sex" />                     
+        </tr>
+        <tr>
+          <th valign="top">Course of Study:</th><td tal:content="info/student/course" />                     
+        </tr>
+        <tr>
+          <th>Current Level:</th><td tal:content="info/level" />                     
+        </tr>
+      </table>
+        
+       <table>
+          <tr>
+            <th width="180px">Verdict:</th><td tal:content="info/verdict" /> 
+          </tr>
+          <tr>  
+            <th>Session:</th><td tal:content="info/session" /> 
+          </tr>
+          <tr>  
+            <th valign="top">GPA:</th><td> <span tal:content="info/gpa" /> (on the basis of the data below)  </td> 
+          </tr>                    
+       </table>
+
+       <br />
+                     
+       <table>
+         <span tal:repeat="semester info/results">
+            <span tal:repeat="result semester">
+             <tr tal:condition="repeat/result/start">
+                <th colspan="2">
+                   <span tal:replace="python: test(repeat['semester'].index,'Second','First')" /> Semester
+                </th>
+                <td>Grade</td>
+                <td>Weight</td>
+                <td>Credits</td>
+             </tr>             
+            <tr>     
+            <td valign="top" width="80px" tal:content="result/CosCode" />
+            <td valign="top" tal:content="result/title" />
+            <td valign="top" width="50px" align="center" tal:content="result/GRADE" />
+            <td valign="top" width="50px" align="center" tal:content="result/WEIGHT" />
+            <td valign="top" width="50px" align="center" tal:content="result/credits" />
+
+          </tr>
+        </span>
+        <tr><td colspan="5">&nbsp;</td></tr>
+        </span>
+      </table>
+      </metal:block>
+    </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/set_access_data.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/set_access_data.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/set_access_data.py	(revision 2226)
@@ -0,0 +1,84 @@
+##parameters=REQUEST,matric_no=None
+# $Id$
+"""
+process the Application Form
+return html renderer + psm
+"""
+import DateTime,logging
+current = DateTime.DateTime()
+pr = context.portal_registration
+logger = logging.getLogger('Skins.set_access_data')
+validate = REQUEST.has_key("cpsdocument_edit_button")
+
+if matric_no is None:
+    logger.info('No matric_no in request')
+    return REQUEST.RESPONSE.redirect("%s" % context.portal_url())
+matric_no = matric_no.upper()
+lt = context.portal_layouts
+#pr = context.portal_registration
+default = {'matric_no':matric_no}
+st_res = context.students_catalog(matric_no = matric_no)
+if st_res:
+    sid = st_res[0].id
+else:
+    st_res = context.returning_import(matric_no = matric_no)
+    if st_res:
+        sid = st_res[0].id
+        logger.info('Student object with matric_no %s does not exist in students_catalog, Id taken from returning_import' % matric_no)
+    else:
+        logger.info('Student object with matric_no %s neither exists in students_catalog nor in returning_import' % matric_no)
+        return
+res,psm,ds = lt.renderLayout(layout_id= 'student_session_results_search',
+                      schema_id= 'student_returning',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob=default,
+                      layout_mode='edit',
+                      formaction = "set_access_data",
+                      button = "Search",
+                      matric_no = matric_no,
+                      commit = False,
+                      )
+if psm == '':
+    return context.set_access_data_form(rendered = res,
+                                 psm = None,
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 name = "%(name)s" % REQUEST.form
+                                 )
+elif psm == 'invalid':
+    psm = "Please correct your input!"
+elif psm == 'valid' and not REQUEST.form.has_key('acknowledge'):
+    psm = "You did not check the ackkowledge box!"
+else:
+    password = REQUEST.get('widget__password')
+    try:
+        context.waeup_tool.makeStudentMember(sid,password=password)
+        psm = ''
+    except KeyError:
+        #psm = "You are already registered please log in with your UserId %s" % sid
+        psm = ""
+        logger.info('%s repeatedly tried to set password' % sid)
+    except:
+        psm = "The system encountered an error. Please try again."
+        logger.info('%s, makeStudentMember error, password = %s' % (sid,password))
+if psm != '':
+    return context.set_access_data_form(rendered = res,
+                                 #psm = "%s, %s" % (psm,ds),
+                                 psm = psm,
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 name = "%(name)s" % REQUEST.form
+                                 )
+email = ds.get('email')
+args = {}
+args['__ac_name'] = sid
+args['__ac_password'] = password
+args['returning'] = '1'
+args['email'] = email
+args['phone_nr'] = ds.get('phone_nr')
+from urllib import urlencode
+url = "%s/logged_in?%s" % (context.absolute_url(),urlencode(args))
+return REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/set_access_data_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/set_access_data_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/set_access_data_form.pt	(revision 2226)
@@ -0,0 +1,24 @@
+<tal:block define="rendered_main options/rendered;
+           portal_status_message options/psm;
+           data_storage options/ds;
+           edition python:1;"
+           >
+  <metal:block define-macro="edit_form">
+    <metal:block use-macro="here/main_template/macros/master">
+      <metal:block fill-slot="header"
+                   tal:define="creation creation|nothing;
+                   edition edition|nothing;
+                   metadata metadata|nothing"
+                   >
+      </metal:block>
+      <metal:block fill-slot="main">
+        <h3><span tal:replace="options/name"/></h3>
+        <h3>Enter Your Authentication Details and Choose a Password!</h3>
+        <br />
+        <div tal:replace="structure rendered_main" />
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/start_clearance.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/start_clearance.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/start_clearance.py	(revision 2226)
@@ -0,0 +1,95 @@
+##parameters=REQUEST
+# $Id$
+"""
+request Clearance
+"""
+import DateTime
+current = DateTime.DateTime()
+pr = context.portal_registration
+import logging
+logger = logging.getLogger('Skins.start_clearance')
+
+#type_name = 'Student'
+#ti = context.portal_types[type_name]
+#request.set('type_name',type_name)
+wf = context.portal_workflow
+request=REQUEST
+redirect = request.RESPONSE.redirect
+validate = REQUEST.has_key("cpsdocument_create_button")
+lt = context.portal_layouts
+#pr = context.portal_registration
+
+info = context.getClearanceInfo()
+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]))
+    return redirect("%s/srp_invalid_access" % context.portal_url())
+app_doc = info['app_doc']
+review_state = info['review_state']
+#session = REQUEST.SESSION
+res,psm,ds = lt.renderLayout('student_clearance',
+                             'student_clearance',
+                             context,
+                             mapping=validate and REQUEST,
+                             layout_mode='create',
+                             ob={},
+                             commit = False,
+                             formaction = "start_clearance",
+                             button = "Start",
+                      )
+if psm == '':
+    return context.clearance_pin_form(rendered = res,
+                                 psm = None,
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 info = info,
+                                 )
+error = False
+
+##if session.get("clicked",None):
+##    psm = 'Please wait a moment until "Clearance started" turns green, then click on the green link!'
+##    error = True
+##    logger.info('"%s","repeatedly pressed the clearance button"' % (info['id']))
+
+if review_state == "clearance_pin_entered":
+    psm = "You have already entered a clearance pin!"
+    error = True
+    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']))
+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']))
+if error:
+    return context.clearance_pin_form(rendered = res,
+                                 psm = psm,
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 info = info,
+                                 )
+#session.set("clicked","clicked")
+pin = str(ds.get('clr_ac_pin'))
+logger.info('%s started clearance with pin %s' % (info['id'],pin))
+wf.doActionFor(info['student'],'enter_clearance_pin')
+wf.doActionFor(info['clear'],'open')
+dc = {}
+app_doc = info['app_doc']
+dc['lga_ident'] = app_doc.get('jamb_lga')
+dc['lga'] = app_doc.get('jamb_state','no state') + ' / ' + app_doc.get('jamb_lga','no lga')
+dc['clr_ac_pin'] = pin
+dc['clr_ac_date'] = current
+dc['entry_date'] = current
+#dc['entry_session'] = "2006/2007"
+wf.doActionFor(info['app'],'close')
+info['clear_doc'].edit(mapping = dc)
+
+if info['penalty']:
+    logger.info('%s started late clearance' % (info['id']))
+
+return redirect("%s/clearance_edit_form" % info['clear'].absolute_url())
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/statistics_new_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/statistics_new_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/statistics_new_view.pt	(revision 2226)
@@ -0,0 +1,159 @@
+<metal:body use-macro="here/main_template/macros/master">
+  <metal:main fill-slot="main">
+  <metal:block tal:define="faculties context/getNewStudentStatistics;
+                        mtool here/portal_membership;
+                        member mtool/getAuthenticatedMember;">       
+
+      <span tal:condition="not: faculties">
+        <span tal:content="here/illegal_view" />
+      </span>
+      <span tal:condition="faculties">
+  
+      <strong>
+      <nobr><a href="search_students">Search Students</a>
+      &nbsp;&nbsp;&nbsp;&nbsp;</nobr>      
+      <nobr><a href="statistics_ret_view">Returning Student Statistics</a>
+      &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
+      </strong>     
+
+      <h3>New Student Statistics</h3>
+      <br />      
+      <span tal:condition="not:isAnon">
+
+      <h3>Full-Time Students (UME, DE, UG, PG)</h3>
+      <br />      
+      
+        <table>
+          <tr class="odd ajaxtd">
+            <th >Faculty</th>
+            <th align="right">Total New</th>
+            <th align="right">AD</th>
+            <th align="right">OR</th>
+            <th align="right">CPE</th>
+            <th align="right">CR</th>
+            <th align="right">VC</th>
+            <th align="right">SFP</th>
+            <th align="right">CLR</th>
+            <th align="right">CLV</th>
+
+          </tr>
+          <tr tal:repeat="d faculties"
+              tal:attributes="class python:test(repeat['d'].even(), 'even ajaxtd', 'odd ajaxtd')">
+              <td width="80px"> <span tal:content="d/id" /> </td>
+              <td width="80px" align="right">
+                <span tal:content="d/total_ft" />
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/admitted_ft" />
+                (<span tal:content="d/admitted_ft_percent" />%)
+              </td>              
+              <td width="80px" align="right"> 
+                <span tal:content="d/objection_raised_ft" />
+                (<span tal:content="d/objection_raised_ft_percent" />%)
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/clearance_pin_entered_ft" />
+                (<span tal:content="d/clearance_pin_entered_ft_percent" />%)
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/clearance_requested_ft" />
+                (<span tal:content="d/clearance_requested_ft_percent" />%)
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/cleared_and_validated_ft" />
+                (<span tal:content="d/cleared_and_validated_ft_percent" />%)
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/school_fee_paid_ft" />
+                (<span tal:content="d/school_fee_paid_ft_percent" />%)
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/courses_registered_ft" />
+                (<span tal:content="d/courses_registered_ft_percent" />%)
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/courses_validated_ft" />
+                (<span tal:content="d/courses_validated_ft_percent" />%)
+              </td>                                          
+
+          </tr>
+        </table>
+
+      <h3>Part-Time Students (DE, UG, PG)</h3>
+      <br />      
+
+        <table>
+          <tr class="odd ajaxtd">
+            <th >Faculty</th>
+            <th align="right">Total New</th>
+            <th align="right">AD</th>
+            <th align="right">OR</th>
+            <th align="right">CPE</th>
+            <th align="right">CR</th>
+            <th align="right">VC</th>
+            <th align="right">SFP</th>
+            <th align="right">CLR</th>
+            <th align="right">CLV</th>
+
+          </tr>
+          <tr tal:repeat="d faculties"
+              tal:attributes="class python:test(repeat['d'].even(), 'even ajaxtd', 'odd ajaxtd')">
+              <td width="80px"> <span tal:content="d/id" /> </td>
+              <td width="80px" align="right">
+                <span tal:content="d/total_pt" />
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/admitted_pt" />
+                (<span tal:content="d/admitted_pt_percent" />%)
+              </td>              
+              <td width="80px" align="right"> 
+                <span tal:content="d/objection_raised_pt" />
+                (<span tal:content="d/objection_raised_pt_percent" />%)
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/clearance_pin_entered_pt" />
+                (<span tal:content="d/clearance_pin_entered_pt_percent" />%)
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/clearance_requested_pt" />
+                (<span tal:content="d/clearance_requested_pt_percent" />%)
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/cleared_and_validated_pt" />
+                (<span tal:content="d/cleared_and_validated_pt_percent" />%)
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/school_fee_paid_pt" />
+                (<span tal:content="d/school_fee_paid_pt_percent" />%)
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/courses_registered_pt" />
+                (<span tal:content="d/courses_registered_pt_percent" />%)
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/courses_validated_pt" />
+                (<span tal:content="d/courses_validated_pt_percent" />%)
+              </td>                                          
+
+          </tr>
+        </table>
+
+
+
+        <br />
+        <table>
+        <tr><td>AD:</td> <td>Admitted</td></tr>
+        <tr><td>OR:</td> <td>Objection raised</td></tr>
+        <tr><td>CPE:</td> <td>Clearance PIN entered</td></tr>
+        <tr><td>CR: </td> <td>Clearance requested</td></tr>
+        <tr><td>VC: </td> <td>Validated and cleared</td></tr>
+        <tr><td>SFP: </td> <td>School fee paid</td></tr>
+        <tr><td>CLR: </td> <td>Course list registered</td></tr>
+        <tr><td>CLV: </td> <td>Course list validated</td></tr>                
+        </table>
+      </span>
+      </span>
+  </metal:block>      
+  </metal:main>
+</metal:body>
+      
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/statistics_ret_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/statistics_ret_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/statistics_ret_view.pt	(revision 2226)
@@ -0,0 +1,115 @@
+<metal:body use-macro="here/main_template/macros/master">
+  <metal:main fill-slot="main">
+  <metal:block tal:define="faculties context/getRetStudentStatistics;
+                        mtool here/portal_membership;
+                        member mtool/getAuthenticatedMember;">       
+
+      <span tal:condition="not: faculties">
+        <span tal:content="here/illegal_view" />
+      </span>
+      <span tal:condition="faculties">
+  
+      <strong>
+      <nobr><a href="search_students">Search Students</a>
+      &nbsp;&nbsp;&nbsp;&nbsp;</nobr>        
+      <nobr><a href="statistics_new_view">New Student Statistics</a>
+      &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
+      </strong>     
+
+      <h3>Returning Student Statistics</h3>
+      <br />      
+      <span tal:condition="not:isAnon">
+
+      <h3>Full-Time Students (UME, DE, UG, PG)</h3>
+      <br />            
+      
+        <table>
+          <tr class="odd ajaxtd">
+            <th >Faculty</th>
+            <th align="right">Total</th>
+            <th align="right">RET</th>
+            <th align="right">SFP</th>
+            <th align="right">CLR</th>
+            <th align="right">CLV</th>
+
+          </tr>
+          <tr tal:repeat="d faculties"
+              tal:attributes="class python:test(repeat['d'].even(), 'even ajaxtd', 'odd ajaxtd')">
+              <td width="80px"> <span tal:content="d/id" /> </td>
+              <td width="80px" align="right">
+                <span tal:content="d/total_ft" />
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/returning_ft" />
+                (<span tal:content="d/returning_ft_percent" />%)
+              </td>              
+              <td width="80px" align="right"> 
+                <span tal:content="d/school_fee_paid_ft" />
+                (<span tal:content="d/school_fee_paid_ft_percent" />%)
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/courses_registered_ft" />
+                (<span tal:content="d/courses_registered_ft_percent" />%)
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/courses_validated_ft" />
+                (<span tal:content="d/courses_validated_ft_percent" />%)
+              </td>                                          
+
+          </tr>
+        </table>
+
+      <h3>Part-Time Students (DE, UG, PG)</h3>
+      <br />           
+
+        <table>
+          <tr class="odd ajaxtd">
+            <th >Faculty</th>
+            <th align="right">Total</th>
+            <th align="right">RET</th>
+            <th align="right">SFP</th>
+            <th align="right">CLR</th>
+            <th align="right">CLV</th>
+
+          </tr>
+          <tr tal:repeat="d faculties"
+              tal:attributes="class python:test(repeat['d'].even(), 'even ajaxtd', 'odd ajaxtd')">
+              <td width="80px"> <span tal:content="d/id" /> </td>
+              <td width="80px" align="right">
+                <span tal:content="d/total_pt" />
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/returning_pt" />
+                (<span tal:content="d/returning_pt_percent" />%)
+              </td>              
+              <td width="80px" align="right"> 
+                <span tal:content="d/school_fee_paid_pt" />
+                (<span tal:content="d/school_fee_paid_pt_percent" />%)
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/courses_registered_pt" />
+                (<span tal:content="d/courses_registered_pt_percent" />%)
+              </td>
+              <td width="80px" align="right"> 
+                <span tal:content="d/courses_validated_pt" />
+                (<span tal:content="d/courses_validated_pt_percent" />%)
+              </td>                                          
+
+          </tr>
+        </table>
+
+        
+        <br />
+        <table>
+        <tr><td>Total: </td> <td>Those who have logged in</td></tr>
+        <tr><td>RET: </td> <td>Returning</td></tr>
+        <tr><td>SFP: </td> <td>School fee paid</td></tr>
+        <tr><td>CLR: </td> <td>Course list registered</td></tr>
+        <tr><td>CLV: </td> <td>Course list validated</td></tr>                
+        </table>
+      </span>
+      </span>
+  </metal:block>      
+  </metal:main>
+</metal:body>
+      
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/statistics_simple_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/statistics_simple_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/statistics_simple_view.pt	(revision 2226)
@@ -0,0 +1,136 @@
+<metal:body use-macro="here/main_template/macros/master">
+  <metal:main fill-slot="main">
+  <metal:block tal:define="faculties context/getSimpleStudentStatistics;
+                        mtool here/portal_membership;
+                        member mtool/getAuthenticatedMember;">       
+
+      <span tal:condition="not: faculties">
+        <span tal:content="here/illegal_view" />
+      </span>
+      <span tal:condition="faculties">
+  
+      <strong>
+      <nobr><a href="search_students">Search Students</a>
+      &nbsp;&nbsp;&nbsp;&nbsp;</nobr>        
+      <nobr><a href="statistics_new_view">New Student Statistics</a>
+      &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
+      <nobr><a href="statistics_ret_view">Returning Student Statistics</a>
+      &nbsp;&nbsp;&nbsp;&nbsp;</nobr>      
+      </strong>     
+
+      <h3>Basic Student Statistics</h3>
+      <br />      
+      <span tal:condition="not:isAnon">
+      Student records imported: <span tal:content="python: faculties[0]['total_in_catalog']" />
+      <br />  <br />  
+        <table >  
+
+          <tr>
+            <th>&nbsp;</th>
+            
+            <th style="border-style:solid; border-width:1px; border-color:black" align="center" colspan="3">Total</th>
+            
+            <th style="border-style:solid; border-width:1px; border-color:black" align="center" colspan="3">Category A</th>
+
+            <th style="border-style:solid; border-width:1px; border-color:black" align="center" colspan="3">Category B</th>
+
+            <th style="border-style:solid; border-width:1px; border-color:black" align="center" colspan="3">Category C</th>
+
+
+          </tr>
+
+          <tr class="odd ajaxtd">
+            <th >Faculty</th>
+            <th align="right">FT</th>
+            <th align="right">PT</th>
+            <th align="right">DP</th>
+            <th align="right">FT</th>
+            <th align="right">PT</th>
+            <th align="right">DP</th>
+            <th align="right">FT</th>
+            <th align="right">PT</th>
+            <th align="right">DP</th>
+            <th align="right">FT</th>
+            <th align="right">PT</th>
+            <th align="right">DP</th>
+
+          </tr>
+          <tr tal:repeat="d faculties"
+              tal:attributes="class python:test(repeat['d'].even(), 'even ajaxtd', 'odd ajaxtd')">
+              <td width="80px"> <span tal:content="d/id" /> </td>
+
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_ft" />
+              </td>              
+
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_pt" />
+              </td>              
+
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_dp" />
+              </td>                 
+              
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_Aft" />
+              </td>              
+
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_Apt" />
+              </td>              
+
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_Adp" />
+              </td>              
+
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_Bft" />
+              </td>              
+
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_Bpt" />
+              </td>              
+              
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_Bdp" />
+              </td>      
+              
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_Cft" />
+              </td>      
+              
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_Cpt" />
+              </td>      
+              
+              <td width="60px" align="right"> 
+                <span tal:content="d/total_Cdp" />
+              </td>                                                
+
+                                       
+
+          </tr>
+        </table>
+
+        <br />
+        <table   border=0>
+
+        <tr><td>Category A: </td> <td>students who paid their school fee</td></tr>
+        <tr><td>Category B: </td> <td>students who registered their courses online (A contains B)</td></tr>
+        <tr><td>Category C: </td> <td>students who have not yet paid their school fee</td></tr>
+        <tr><td>&nbsp;</td><td>&nbsp;</td></tr>
+        <tr><td colspan="2"><strong>Notice:</strong> Category C is not complete. 
+                <span tal:content="python: faculties[0]['not_categorized']" /> returning full-time students have not yet logged in and are thus not categorized. 
+             </td>
+        </tr>
+          
+        </table>
+        
+        
+        
+      </span>
+      </span>
+  </metal:block>      
+  </metal:main>
+</metal:body>
+      
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/student_course_result_created.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/student_course_result_created.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/student_course_result_created.py	(revision 2226)
@@ -0,0 +1,32 @@
+## Script (Python) "cpsdocument_created"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=object=None
+##title=
+##
+"""
+Do the necessary rendering or redirection after an object has been
+successfully created and filled with the initial values by the user.
+
+In CPS, context is a proxy.
+
+May return a rendered document, or do a redirect.
+"""
+# $Id$
+if object is not None:
+    course = object
+else:
+    course = context
+real_course = context.findCourseById(course.getId())
+from_real_course = ('title','credits','passmark')
+d = {}
+for f in from_real_course:
+    d[f] = getattr(real_course,f)
+course.getContent().edit(mapping=d)
+psm = 'CourseResult created!'
+action_path = context.getTypeInfo().immediate_view
+context.REQUEST.RESPONSE.redirect('%s/%s?portal_status_message=%s' %
+                                  (context.absolute_url(), action_path, psm))
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/student_index.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/student_index.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/student_index.py	(revision 2226)
@@ -0,0 +1,56 @@
+## Script (Python) "student_index"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=batch=None
+##title=
+##
+# $Id$
+"""
+return the current student_index
+"""
+# from Products.AdvancedQuery import Eq, Between, Le,In
+# try:
+#     aq_portal = context.portal_catalog.evalAdvancedQuery
+# except:
+#     aq_portal = context.portal_catalog_real.evalAdvancedQuery
+
+request = context.REQUEST
+#session = request.SESSION
+response = request.RESPONSE
+redirect = response.redirect
+pm = context.portal_membership
+member = pm.getAuthenticatedMember()
+
+#from Products.zdb import set_trace;set_trace()
+if context.isStaff():
+    if context.portal_type == 'StudentStudyCourse':
+        return context.study_course_view()
+    elif context.portal_type == 'StudentStudyLevel':
+        return context.study_level_view()
+    elif context.portal_type == 'StudentClearance':
+        return context.clearance_view()
+    elif context.portal_type == 'PaymentsFolder':
+        return context.payments_view()
+    elif context.portal_type == 'Student':
+        return redirect("%s/student_view" % context.absolute_url())
+    elif context.portal_type == 'Payment':
+        return context.payment_receipt()
+    return redirect("%s/waeup_document_view" % context.absolute_url())
+if context.isStudent():
+    if context.portal_type == 'PaymentsFolder':
+        return context.payments_view()
+    elif context.portal_type == 'Payment':
+        return context.payment_receipt()
+    elif context.portal_type == 'StudentStudyLevel':
+        return context.study_level_view()
+    elif context.portal_type == 'StudentStudyCourse':
+        return context.study_course_view()
+    students_url = "%s/campus/students" % (context.portal_url())
+    id = str(member)
+    return redirect("%s/%s/student_view" % (students_url, id))
+
+return redirect("%s/srp_anonymous_view" % context.portal_url())
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/student_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/student_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/student_view.pt	(revision 2226)
@@ -0,0 +1,157 @@
+<metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main" 
+           tal:define="info context/getStudentFolderInfo;
+                       baseinfo context/getStudentBaseInfo">
+      <metal:block tal:condition="not: info">
+        <span tal:content="here/illegal_view" />
+      </metal:block>
+      <metal:block tal:condition="info">
+      <metal:block tal:define="review_state info/review_state;
+                        rows python: info['items'];
+                        is_so info/is_sectionofficer|nothing;
+                        is_staff info/is_staff|nothing;
+                        is_student info/is_student">
+
+      <a href="" tal:condition="is_staff"
+         tal:attributes="href string:${here/academicsParent}">
+        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+        Up one level
+      </a>
+        <h3 tal:content="info/name" />
+        <br />
+        
+        
+        
+      <table>
+        <tr>
+          <td width="220px">Registration Number:</td> 
+          <td><span tal:content="baseinfo/student/jamb_reg_no" /></td>
+        </tr>
+        <tr>
+          <td>Matriculation Number:</td> 
+          <td><span tal:content="baseinfo/student/matric_no" /></td>
+        </tr>      
+        <tr>
+          <td>Certificate Code:</td> 
+          <td><span tal:content="baseinfo/student/course" /></td>
+        </tr>
+        <tr>
+          <td>Faculty Id:</td>
+          <td tal:content="baseinfo/student/faculty" />
+        </tr>
+        <tr>
+          <td>Department Id:</td> 
+          <td><span tal:content="baseinfo/student/department" /></td>
+        </tr>
+        <tr>
+          <td>Current Session:</td> 
+          <td><span tal:content="python:context.portal_vocabularies.sessions.get(baseinfo['student']['session'])" /></td>
+        </tr>
+        <tr>
+          <td>Current Study Level:</td> 
+          <td><span tal:content="python:context.portal_vocabularies.levels.get(baseinfo['student']['level'])" /></td>
+        </tr>
+        <tr>
+          <td>Current Study Mode:</td> 
+          <td><span tal:content="python:context.portal_vocabularies.entry_modes.get(baseinfo['student']['mode'])" /></td>
+        </tr>        
+        <tr tal:define="verdict python:context.portal_vocabularies.verdicts.get(baseinfo['student']['verdict'])">
+          <td>Current Verdict:</td> 
+          <td><span tal:condition="verdict" tal:content="python:verdict.upper()" /></td>
+        </tr>
+      </table>           
+        
+      <br />
+      
+      <table tal:condition="is_staff" class="contentListing" width="100%" summary="content layout" id="folder_content">      
+        <tr tal:repeat="row rows"
+          tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+          <td><a href="view" tal:attributes="href string:${row/url}">
+            <strong tal:content="row/title" /></a> </td>
+          <td> 
+          <a tal:condition="python: row['is_editable'] and not row['type'] in ('StudentClearance','StudentAccommodation','PaymentsFolder')"
+              href="edit" tal:attributes="href string:${row/url}/external_edit_form"
+              target="edit"
+              onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
+              [edit]
+          </a> 
+          <a tal:condition="python: row['is_editable'] and row['type']=='StudentClearance'"
+              href="edit" tal:attributes="href string:${row/url}/external_clearance_edit_form"
+              target="edit"
+              onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
+              [edit and change state]
+          </a>  
+          <a tal:condition="python: context.isClearanceOfficer() and row['type']=='StudentClearance'"
+              href="edit" tal:attributes="href string:${row/url}/external_clearance_edit_form"
+              target="edit"
+              onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
+              [change state]
+          </a>                            
+          </td>
+          
+        </tr>
+        <tr tal:condition="info/session">
+          <td>
+              <a href="edit" tal:attributes="href string:session_results_view">
+              <strong>Session Results</strong>
+          </a>             
+          </td>
+          <td>
+             &nbsp;
+          </td>
+        </tr>
+      </table>
+      
+                
+      <span tal:condition="python:info['member'].id in 
+                         ('admin','joachim','kehindesamuel','med','isouaba','obadejo',
+                          'ehioaiks','despej','shinakale','igadoghe','benamechi','edafeohwo')">
+      <br />
+      <form action="mail_password_form" method="post" class="group"
+            tal:attributes="action string:${context/absolute_url}/mail_password_form">
+         <input type="submit" class="context" value="Send Email with Authentication Data" />
+      </form>
+      </span> 
+
+
+      
+
+      <table tal:condition="is_student" class="contentListing" width="" summary="content layout" id="folder_content">      
+        <span tal:repeat="row rows">
+          <tr tal:condition="row/display">
+            <td width="220px"><a href="view" tal:condition="row/s_view_link"
+                   tal:attributes="href string:${row/s_view_link}">
+                <strong tal:content="row/title" /></a>
+             <strong tal:condition="not:row/s_view_link" tal:content="row/title" />
+            </td>
+  
+            <td align="left"> 
+                <span tal:content="row/review_state" />
+            </td>          
+            
+            <td width="40px" align="center"> 
+              <a tal:condition="python: row['s_edit_link'] and row['is_editable']"
+                 href="edit" tal:attributes="href string:${row/s_edit_link}">
+                [edit]
+              </a>     
+            </td>                 
+            
+  
+          </tr>
+        </span>
+        <tr tal:condition="info/session">
+          <td>
+              <a href="edit" tal:attributes="href string:session_results_view">
+              <strong>Session Results</strong>
+          </a>             
+          </td>
+          <td>
+             &nbsp;
+          </td>
+        </tr>
+      </table>
+        
+    </metal:block>
+    </metal:block>
+    </metal:main>
+</metal:body>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/students_index.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/students_index.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/students_index.py	(revision 2226)
@@ -0,0 +1,34 @@
+## Script (Python) "students_index"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=batch=None
+##title=
+##
+# $Id$
+"""
+return the current students_index
+"""
+
+request = context.REQUEST
+redirect = request.RESPONSE.redirect
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+
+if mtool.isAnonymousUser():
+    return redirect("%s/srp_anonymous_view" % context.portal_url())
+
+students_url = "%s/campus/students" % (context.portal_url())
+
+if "ClearanceOfficers" in member.getGroups() or\
+   "CourseAdvisers" in member.getGroups():
+    return redirect("%s/campus/students/search_students" % context.portal_url())
+if context.isSectionOfficer():
+    return redirect("%s/campus/students/search_students" % context.portal_url())
+if context.isStudent():
+    id = str(member)
+    return redirect("%s/%s/student_view" % (students_url, id))
+    
+return redirect("%s/srp_invalid_access" % context.portal_url())
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/study_course_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/study_course_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/study_course_view.pt	(revision 2226)
@@ -0,0 +1,140 @@
+<metal:body use-macro="here/main_template/macros/master">
+  <metal:main fill-slot="main"
+              tal:define="global info context/getStudyCourseInfo;">
+    <span tal:condition="not: info">
+      <span tal:content="here/illegal_view" />
+    </span>
+    <span tal:condition="info">
+    <span tal:define="create_level info/create_level|nothing;
+                      is_so info/is_so;">               
+    <a href=""
+       tal:attributes="href string:${here/academicsParent}">
+      <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+      Up one level
+    </a>
+    <h3> 
+       <span tal:condition="python:is_so and info">
+         <span tal:content="info/student/name" />:
+       </span>
+      <span tal:content="here/title_or_id" />
+    </h3>
+    <br />  
+    <table tal:define="sc python: info['course_doc']">
+      <tr>
+        <td width="220px">Certificate Code:</td> 
+        <td><span tal:content="info/doc/study_course" /></td>
+      </tr>
+      <tr>
+        <td width="220px">Current Session:</td> 
+        <td><span tal:content="python:context.portal_vocabularies.sessions.get(info['doc'].current_session)" /></td>
+      </tr>
+      <tr>
+        <td width="220px">Current Study Level:</td> 
+        <td><span tal:content="python:context.portal_vocabularies.levels.get(info['doc'].current_level)" /></td>
+      </tr>
+      <tr>
+        <td width="220px">Current Study Mode:</td> 
+        <td><span tal:content="python:context.portal_vocabularies.entry_modes.get(info['doc'].current_mode)" /></td>
+      </tr>        
+      <tr>
+        <td width="220px">Current Verdict:</td> 
+        <td><span tal:content="info/verdict" /></td>
+      </tr>
+      <tr>
+        <td width="220px">Certificate:</td> 
+        <td><span tal:content="sc/title" /></td>
+      </tr>
+      <tr>
+        <td>Certificate Id:</td>
+        <td tal:content="sc/study_course" />
+      </tr>
+        <span tal:define="f_id sc/faculty;
+        d_id sc/department;
+        f_title context/academics/?f_id/Title|string:Faculty not yet in Prospectus;
+        d_title context/academics/?f_id/?d_id/Title|string:Department not yet in Prospectus"
+        >
+          <tr>
+            <td>Faculty:</td>
+            <td tal:content="f_title" />
+          </tr>
+          <tr>
+            <td>Department:</td> 
+            <td><span tal:content="d_title" /></td>
+          </tr>
+        </span>
+      </table>        
+    
+    <form action="" method="post" class="group" onsubmit="return submit_once()"
+          tal:attributes="action info/action"
+          tal:define="rows python: info['items'];"
+          >
+      <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">      
+        <tr tal:repeat="row rows"
+          tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+          <td align="left" valign="middle" style="width: 5px;" 
+              tal:condition="python:is_so">
+            <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                   tal:condition="is_so"
+                   tal:define="id row/id"
+                   tal:attributes="value id;
+                   id python:'cb_' + id;
+                   checked python:id in info['choosen_ids'];" 
+                   />
+          </td>
+          <td><a href="view"
+                 tal:attributes="href string:${row/url}">
+            <strong tal:content="row/title" /></a> 
+          </td>
+        </tr>
+      </table>
+      <table width="100%" cellspacing="0" cellpadding="2"
+             summary="contents of the folder"
+             class="folderButtons">
+        <tr tal:condition="python: is_so and info['items']">
+          <td align="left" valign="top" rowspan="3"></td>
+          <td align="left" valign="top">
+            <input type="button" value="button_select_all" class="context"
+                     onclick="someJavaScriptFunctionThatWillBeReplaced"
+                     i18n:attributes="value"
+                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                     />
+            <input type="submit" name="level_delete:method" value="button_delete"
+                   class="destructive" i18n:attributes="value"
+                   tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                   (cpsmcat('description_confirm_delete'), )" 
+                   />
+          </td>
+        </tr>
+      </table>
+    </form>
+    <form action="" method="post" class="group" onsubmit="return submit_once()"
+          tal:attributes="action string:${context/absolute_url}/create_level"
+          tal:define="rows python: info['items'];"
+          tal:condition="create_level"
+          >
+      <table width="100%" cellspacing="0" cellpadding="2"
+             summary="contents of the folder"
+             class="folderButtons">
+        <tr>
+          <td align="left" valign="top" rowspan="3"></td>
+          <td align="left" valign="top">
+            <input type="submit" name="create_level" 
+                     class="destructive" 
+                     tal:attributes="onclick python:'return window.confirm(\'Do you really want to register for Level %s?\')' % create_level;
+                     value string: Register Courses for Level ${create_level}" 
+                     />
+            <font color="red">
+            <br /><br />
+            Creating the course list may take several minutes. Please be patient, don't click twice!
+            </font>                       
+          </td>
+        </tr>
+      </table>
+    </form>          
+
+  </span>
+  </span>
+  </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/study_level_view.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/study_level_view.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/study_level_view.pt	(revision 2226)
@@ -0,0 +1,253 @@
+<metal:body use-macro="here/main_template/macros/master">
+  <metal:main fill-slot="main"
+          tal:define="info context/getStudyLevelInfo;">
+             
+    <span tal:condition="not: info">
+      <span tal:content="here/illegal_view" />
+    </span>
+    <span tal:condition="info">
+    <span tal:define= "is_so context/isSectionOfficer;
+                       is_ca info/is_ca;
+                       show_check_boxes info/show_check_boxes;
+                       is_student info/is_student;
+                       status_info info/status_info;
+                       review_state info/review_state;
+                       view_only info/view_only">       
+    <div style="text-align: right" 
+         tal:condition="python:review_state in ('courses_registered','courses_validated',)">
+    <a href="" target="slip" tal:attributes="href string:course_registration_slip"
+        onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+        <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+        Course Registration Slip
+    </a>
+    </div>
+
+          
+    <a href=""
+       tal:attributes="href string:${here/academicsParent}">
+      <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+      Up one level
+    </a>
+
+    <h3> 
+      <span tal:condition="python: is_so or is_ca">
+        <span tal:content="info/student/name" />:
+      </span>
+      <span tal:condition="is_student">My </span>
+      
+      Course Registration Form for <span tal:content="here/title_or_id" />
+    </h3>
+             
+    <form action="." method="post" class="group" onsubmit="return submit_once()">
+      <span tal:condition="info/carry_overs" tal:omit-tag="">
+      <h4>Carryover Courses</h4>
+      <br />
+      <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">
+        <tr tal:repeat="row info/carry_overs"
+            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+          <td align="left" valign="middle" style="width: 5px;"
+              tal:condition="show_check_boxes">
+            <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                   tal:define="id row/id"
+                   tal:attributes="value id;
+                   id python:'cb_' + id;
+                   checked python:id in info['choosen_ids'];" 
+                   />
+          </td>
+          <td width="78%" tal:content="row/title"></td>
+          <td align="center" width="10%" tal:content="row/code"></td>
+          <td align="center" width="2%">S<span tal:content="row/semester" /></td>
+          <td align="center" width="2%" tal:content="row/credits"></td>
+          <td align="center" width="8%" tal:content="row/grade|string:"></td>
+        </tr>
+      </table>
+      </span> 
+      <br />
+      <h4>Session Courses</h4>
+      <br />
+    <div class="" tal:condition="not: info/normal">
+      <font color="red">Your faculty has not yet provided the list of courses for your certificate. Please contact your faculty!</font>
+      <br /><br />
+    </div>
+      <table class="contentListing" width="100%" id="folder_content"
+             tal:condition="info/normal">      
+        <tr tal:repeat="row info/normal"
+            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+          <td align="left" valign="middle" style="width: 5px;"
+             tal:condition="show_check_boxes">
+            <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                   tal:define="id row/id"
+                   tal:attributes="value id;
+                   id python:'cb_' + id;
+                   checked python:id in info['choosen_ids'];" 
+                   />
+          </td>
+          <td width="78%" tal:content="row/title"></td>
+          <td align="center" width="10%" tal:content="row/code"></td>
+          <td align="center" width="2%">S<span tal:content="row/semester" /></td>
+          <td align="center" width="2%" tal:content="row/credits"></td>
+          <td align="center" width="8%" tal:content="row/coe|nothing"></td>
+          
+          
+
+
+          <td>
+          <a tal:condition="python:review_state == 'school_fee_paid'" href="edit" tal:attributes="href string:${row/code}/course_edit_form"
+          target="edit"
+          onclick="javascript:window.open('','edit','width=600, height=350, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
+          [edit]
+          </a> 
+          </td>          
+          
+          
+        </tr>
+        <tr>
+          <td tal:condition="show_check_boxes" colspan="1"></td>
+          <td colspan="1"></td>
+          <th colspan="2">Total Credits:</th>
+          <td align="center" width="2%" tal:content="info/credits_total"></td>
+        </tr>
+      </table>
+
+      
+    
+      
+      <table tal:condition="python: is_student and review_state == 'school_fee_paid'" width="100%" cellspacing="0" cellpadding="2"
+             class="folderButtons">
+        <tr>
+          <td align="left" valign="top" rowspan="3"></td>
+          <td align="left" valign="top">
+              <input type="submit" name="delete_course_result:method" value="Delete selected"
+                     class="destructive" i18n:attributes="value"
+                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                     ('Do you really want to delete selected courses?', )" 
+                     />
+              <input tal:condition="python: 1" type="submit" name="refresh_level:method"
+                     class="context" value="Update" 
+                     />
+                    
+                     
+              <br /><br />
+              <input tal:condition="info/submission_allowed" 
+                     type="submit" name="register_courses:method"
+                     class="context" value="Submit to Course Adviser" 
+                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                     ('Do you really want to submit the course list? You will not be able to edit your data after submission.', )" />
+              <span tal:condition="info/credits_exceeded">
+                  <font color="red"> <strong>Your total credits exceed 50!</strong></font>
+              </span>
+                     
+              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
+                     tal:attributes="value string:study_level_view"/>  
+                     
+              <br /><br />
+              
+              <span tal:condition="python: 1">
+              <strong>Note:</strong> 'Update' checks for all courses in your certificate and will add them to your course list irrespective of
+              prior deletion, i.e. already deleted courses will show up again. 
+              Please use this function only if you are sure that your faculty has added courses which are not yet on your course list.                                
+              </span>
+              <span tal:condition="python: 0">
+              <strong>Note:</strong> The 'Update' function has been temporarily disabled.                                 
+              </span>              
+                     
+          </td>
+        </tr>
+      </table>
+      <table tal:condition="python:is_so" width="100%" cellspacing="0" cellpadding="2"
+             class="folderButtons">
+        <tr>
+          <td align="left" valign="top" rowspan="3"></td>
+          <td align="left" valign="top">
+              <input type="button" value="Select all" class="context"
+                     onclick="someJavaScriptFunctionThatWillBeReplaced"
+                     i18n:attributes="value"
+                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                     />
+              <input type="submit" name="delete_course_result:method" value="Delete selected"
+                     class="destructive" i18n:attributes="value"
+                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                     ('Do you really want to delete the courses selected?', )" 
+                     />
+              <input 
+                     type="submit" name="refresh_level:method"
+                     class="context" value="Update" 
+                     />
+              <input tal:condition="python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method"
+                     class="context" value="Submit" />  
+              <input tal:condition="python: review_state == 'courses_registered'" type="submit" name="validate_courses:method"
+                     class="context" value="Validate" />
+              <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method"
+                     class="context" value="Reject" />
+                     
+              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
+                     tal:attributes="value string:study_level_view"/>                         
+              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
+                     tal:attributes="value string:contact_student_form"/>                         
+
+          </td>
+        </tr>
+      </table>
+      <table tal:condition="python:is_ca" width="100%" cellspacing="0" cellpadding="2"
+             class="folderButtons">
+        <tr>
+          <td align="left" valign="top" rowspan="3"></td>
+          <td align="left" valign="top">
+              <input tal:condition="python: review_state == 'school_fee_paid'"
+                     type="button" value="Select all" class="context"
+                     onclick="someJavaScriptFunctionThatWillBeReplaced"
+                     i18n:attributes="value"
+                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                     />
+              <input tal:condition="python: review_state == 'school_fee_paid'"
+                     type="submit" name="delete_course_result:method" value="Delete selected"
+                     class="destructive" i18n:attributes="value"
+                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                     ('Do you really want to delete the courses selected?', )" 
+                     />
+              <input tal:condition="python: review_state == 'school_fee_paid'"
+                     type="submit" name="refresh_level:method"
+                     class="context" value="Update" 
+                     />
+              <input tal:condition="python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method"
+                     class="context" value="Submit" />  
+              <input tal:condition="python: review_state == 'courses_registered'" type="submit" name="validate_courses:method"
+                     class="context" value="Validate" />
+              <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method"
+                     class="context" value="Reject" />
+                     
+              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
+                     tal:attributes="value string:study_level_view"/>                         
+              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
+                     tal:attributes="value string:contact_student_form"/>    
+                                           
+
+          </td>
+        </tr>
+      </table>
+
+    </form>
+    <br />
+      <form action="add_course_result" method="post" class="group" onsubmit="return submit_once()"
+          tal:condition="show_check_boxes">
+      <table>
+        <tr>
+          <th>Course Id</th>
+          <td><input type="text" name="course_id" 
+                     tal:attributes="value request/course_id|nothing"/></td>
+          <td colspan="2">
+            <input type="submit" name="add"
+                   class="context" value="Add Course" 
+                   />
+            <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
+                     tal:attributes="value string:study_level_view"/>                       
+          </td>                
+      </table>
+      </form>   
+  </span>
+  </span>          
+  </metal:main>
+</metal:body>
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/support_form.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/support_form.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/support_form.pt	(revision 2226)
@@ -0,0 +1,66 @@
+<metal:html tal:define="info context/getStudentBaseInfo;">
+  <span tal:condition="not: info">
+    <span tal:content="here/illegal_view" />
+  </span>
+  <metal:block tal:condition="info"> 
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main">
+      <h3>Support/Enquiries Form</h3>
+      <br />If you are having problems using the system please fill the form below with your correct details.<br /> <br /> 
+      <form id="form1" name="form1" method="post" action="mail2admin">
+      <input type="hidden" name="regno" type="text" id="regno"
+             tal:attributes="value info/id"/>
+      <table width="100%" border="0" cellspacing="5" cellpadding="0">
+        <tr>
+          <td width="150px">
+             <strong>Full Name: </strong>
+          </td>
+          <td>
+             <input name="fullname" type="text" id="fullname" 
+                    tal:attributes="value info/student/name"/>
+          </td>
+        </tr>
+        <tr>
+          <td>
+             <strong>Email: </strong>
+          </td>
+          <td>
+             <input name="email" type="text" id="email" 
+                    tal:attributes="value info/student/email"/>
+          </td>
+        </tr>
+        <tr>
+          <td>
+             <strong>Problem Type: </strong>
+          </td>
+          <td>
+              <select name="probtype" class="boxgreen" id="probtype">
+                <option>Payment</option>
+                <option>Application</option>
+                <option>Admission</option>
+                <option>Clearance</option>
+                <option>Course Registration</option>
+                <option>Hostel Reservation</option>                                
+                <option>Other</option>
+              </select>        
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+             <strong>Description: </strong>
+          </td>
+          <td>
+             <textarea name="descr" rows="10" cols="60" id="descr"></textarea>
+          </td>
+        </tr>
+      
+        <tr>
+          <td>&nbsp;</td>
+          <td><input name="Submit" type="submit" class="standalone" value="Submit" /><br /><br /></td>
+        </tr>
+      </table>
+      </form>
+    </metal:main>
+  </metal:body>
+  </metal:block>  
+</metal:html>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/validate_courses.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/validate_courses.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/validate_courses.py	(revision 2226)
@@ -0,0 +1,47 @@
+## Script (Python) "validate_courses"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None, action_after_reject=None, action_after_validate=''
+##title=
+##
+# $Id: getStudyCourseInfo.py 1504 2007-02-26 21:20:40Z henrik $
+"""
+close the Students StudyLevel
+"""
+from Products.CMFCore.WorkflowCore import WorkflowException
+import DateTime
+current = DateTime.DateTime()
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+request = context.REQUEST
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+import logging
+logger = logging.getLogger('Skins.validate_courses')
+
+wftool = context.portal_workflow
+students_folder = context.portal_url.getPortalObject().campus.students
+student_id = context.getStudentId()
+student = getattr(students_folder,student_id)
+level_doc = context.getContent()
+if level_doc.portal_type == 'StudentStudyLevel':
+    level_doc.edit(mapping={'validated_by': member_id,
+                            'validation_date': current,})
+try:
+    wftool.doActionFor(student,'validate_courses')
+except WorkflowException,E:
+    logger.info('%s WorkflowException %s for %s' % (member_id,E,student_id))
+    return request.RESPONSE.redirect("%s" % context.absolute_url())
+logger.info('%s validated course list of %s' % (member_id,student_id))
+
+psm = 'portal_status_message=Course list validated!'
+url = context.absolute_url() + '/' + action_after_validate +  '?' + psm
+return request.RESPONSE.redirect(url)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/view_logs.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/view_logs.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/view_logs.pt	(revision 2226)
@@ -0,0 +1,56 @@
+<metal:body use-macro="here/main_template/macros/master">
+  <metal:main fill-slot="main">
+  <metal:block tal:define="data context/getLogData;
+			mtool here/portal_membership;
+                        member mtool/getAuthenticatedMember;">       
+
+      <h3>Current Log Entries (<span tal:replace="data/filename"/>)</h3>
+      <br />      
+
+      <span tal:condition="not:isAnon">
+
+        <form method="post" action="view_logs">
+          Show last <input type="text" name="numlines" value="20"
+		           tal:attributes="value data/numlines" />
+	  lines of
+	  <select name="filename">
+	    <option 
+	       tal:attributes="selected python: data['filename']=='event.log'"
+	       value="event.log">Event Log</option>
+            <option 
+	       tal:attributes="selected python: data['filename']=='Z2.log'"
+               value="Z2.log">Access Log</option>
+          </select>
+          <input type="submit" value="Refresh" />
+        </form>
+
+	<hr />
+
+        <table>
+          <tr class="even ajaxtd" tal:repeat="line data/lines">
+	    <td><span tal:replace="line" /></td>
+          </tr>
+        </table>
+
+	<hr />
+
+        <form method="post" action="view_logs">
+          Show last <input type="text" name="numlines" value="20"
+		           tal:attributes="value data/numlines" />
+	  lines of
+	  <select name="filename">
+	    <option 
+	       tal:attributes="selected python: data['filename']=='event.log'"
+	       value="event.log">Event Log</option>
+            <option 
+	       tal:attributes="selected python: data['filename']=='Z2.log'"
+               value="Z2.log">Access Log</option>
+          </select>
+          <input type="submit" value="Refresh" />
+        </form>
+
+      </span> <!-- condition: not:isAnon -->
+  </metal:block>      
+  </metal:main>
+</metal:body>
+      
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/widget_scratch_card_pin_render.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/widget_scratch_card_pin_render.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/widget_scratch_card_pin_render.pt	(revision 2226)
@@ -0,0 +1,25 @@
+<tal:block define="mode options/mode;
+                   id here/getWidgetId;
+                   id_p string:${id}_p;
+                   id_b string:${id}_b;
+                   id_n string:${id}_n;
+                   prefix options/datastructure/?id_p;
+                   batch options/datastructure/?id_b;
+                   nr options/datastructure/?id_n;
+">
+<tal:block condition="python: mode == 'view'">
+<span tal:replace="prefix" />-<span tal:replace="batch" />-<span tal:replace="nr" />
+</tal:block>
+<tal:block define="name here/getHtmlWidgetId;"
+           condition="python: mode == 'edit'">
+  <span tal:replace="prefix" />-
+  <input type="text" size="2" maxlength="2"
+    tal:attributes="name string:${name}_b;
+                    id string:${name}_b;
+                    value batch" />-
+  <input type="text" size="10" maxlength="10"
+    tal:attributes="name string:${name}_n;
+                    id string:${name}_n;
+                    value nr" />
+</tal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/widget_waeup_multiline_result_render.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/widget_waeup_multiline_result_render.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/widget_waeup_multiline_result_render.pt	(revision 2226)
@@ -0,0 +1,80 @@
+<tal:block define="mode options/mode;
+                   id here/getWidgetId;
+                   id_s string:${id}_s;
+                   id_g string:${id}_g;
+                   results options/datastructure/?id;
+                   subject options/datastructure/?id_s;
+                   grade options/datastructure/?id_g;
+                   grade_voc context/portal_vocabularies/exam_grades;   
+                   subjects_voc context/portal_vocabularies/exam_subjects;   
+">
+<tal:block condition="python: mode == 'view'">
+    <div tal:repeat="res results">
+      <span tal:content="python:subjects_voc.get(res[0])" />: <span tal:content="python:grade_voc.get(res[1])" />
+    </div>
+</tal:block>
+<tal:block define="name here/getHtmlWidgetId;"
+           condition="python: mode == 'edit'">
+  <table border=0 cellpadding=0 cellspacing=0>
+    <tr><th>Subject</th><th>Grade</th>
+      <tr tal:repeat="res results">
+        <span tal:define="wnr python:'%02d' % (repeat['res'].number())">
+          <td><select size="1"
+                      tal:attributes="name string:${name}${wnr}_s;
+                      id string:${name}_s;"
+                      >
+              <option tal:repeat="sub subjects_voc/items"
+                      tal:attributes="value python:sub[0];
+                      selected python: res[0] == sub[0];"
+                      tal:content="python: sub[1]">
+              </option>
+            </select>
+          </td>
+          <td> 
+            <select size="1"
+                    tal:attributes="name string:${name}${wnr}_g;
+                    id string:${name}_g;"
+                    >
+              <option tal:repeat="sub grade_voc/items"
+                      tal:attributes="value python:sub[0];
+                      selected python: res[1] == sub[0]"
+                      tal:content="python: sub[1]">
+              </option>
+            </select>
+          </td>
+        </span>
+      </tr>
+      <tr>
+        <td colspan="2">
+          <hr />
+        </td>
+      </tr>
+    <tr>
+      <td><select size="1"
+                  tal:attributes="name string:${name}_s;
+                  id string:${name}_s;">
+              <option tal:repeat="sub subjects_voc/items"
+                      tal:attributes="value python:sub[0]"
+                      tal:content="python: sub[1]">
+              </option>
+            </select>
+      </td>
+      <td> 
+          <select size="1"
+                  tal:attributes="name string:${name}_g;
+                  id string:${name}_g;">
+                  <option tal:repeat="sub grade_voc/items"
+                          tal:attributes="value python:sub[0]"
+                          tal:content="python: sub[1]">
+          </option>
+        </select>
+      </td>
+      <td> 
+        <input type="submit" class="standalone" name="cpsdocument_edit_button"
+         value="Add/Modify" 
+         id="cpsdocument_edit_button" />
+      </td>
+    </tr>
+  </table>
+</tal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_student/widget_waeup_result_render.pt
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_student/widget_waeup_result_render.pt	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_student/widget_waeup_result_render.pt	(revision 2226)
@@ -0,0 +1,51 @@
+<tal:block define="mode options/mode;
+                   id here/getWidgetId;
+                   id_s string:${id}_s;
+                   id_g string:${id}_g;
+                   results options/datastructure/?id;
+                   subject options/datastructure/?id_s;
+                   grade options/datastructure/?id_g;
+                   grade_voc context/portal_vocabularies/exam_grades;   
+                   subjects_voc context/portal_vocabularies/exam_subjects;   
+">
+<tal:block condition="python: mode == 'view'">
+    <div tal:repeat="res results">
+      <span tal:content="python:subjects_voc.get(res[0])" />: <span tal:content="python:grade_voc.get(res[1])" />
+    </div>
+</tal:block>
+<tal:block define="name here/getHtmlWidgetId;"
+           condition="python: mode == 'edit'">
+  <table border=0 cellpadding=0 cellspacing=0>
+    <tr><th>Subject</th><th>Grade</th>
+    <tr tal:repeat="res results">
+      <td tal:content="python:subjects_voc.get(res[0])" /><td tal:content="python:grade_voc.get(res[1])" />
+    </tr>
+    <tr>
+      <td><select size="1"
+                  tal:attributes="name string:${name}_s;
+                  id string:${name}_s;">
+              <option tal:repeat="sub subjects_voc/items"
+                      tal:attributes="value python:sub[0]"
+                      tal:content="python: sub[1]">
+              </option>
+            </select>
+      </td>
+      <td> 
+          <select size="1"
+                  tal:attributes="name string:${name}_g;
+                  id string:${name}_g;">
+                  <option tal:repeat="sub grade_voc/items"
+                          tal:attributes="value python:sub[0]"
+                          tal:content="python: sub[1]">
+          </option>
+        </select>
+      </td>
+      <td> 
+        <input type="submit" class="standalone" name="cpsdocument_edit_button"
+         value="Add/Modify" 
+         id="cpsdocument_edit_button" />
+      </td>
+    </tr>
+  </table>
+</tal:block>
+</tal:block>
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/FixApplicantsStatus.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/FixApplicantsStatus.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/FixApplicantsStatus.py	(revision 2226)
@@ -0,0 +1,60 @@
+## Script (Python) "fixApplicantsStatus"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: fix_applicants_status.py 2145 2007-08-22 09:48:40Z joachim $
+"""
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+import logging
+logger = logging.getLogger('skins.fixApplicantsStatus')
+from Products.AdvancedQuery import Eq, Between, Le,In
+applicants = context.applicants_catalog
+aq_applicants = applicants.evalAdvancedQuery
+
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+#from string import Template
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write("%s" % s)
+def rwrite_ln(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write("%s<br>\n\r" % s)
+
+#logger.info('')
+brains = applicants()
+total = len(brains)
+logger.info('%d applicants' % total)
+count = 0
+to_change = []
+for brain in brains:
+    count += 1
+    if brain.pin and not brain.status:
+        to_change.append(brain.reg_no)
+    if count and not count % 200:
+        rwrite_ln('.')
+        rwrite('%d: ' % (count / 200))
+    else:
+        rwrite('.')
+logger.info('%d to change' % len(to_change))
+data = {'status': 'entered'}
+for reg_no in to_change:
+    data['reg_no'] = reg_no
+    applicants.modifyRecord(**data)
+    rwrite_ln('%s status set to entered' % reg_no)
+    logger.info('%s status set to entered' % reg_no)
+logger.info('%d changed' % len(to_change))
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/addId2ReturningImport.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/addId2ReturningImport.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/addId2ReturningImport.py	(revision 2226)
@@ -0,0 +1,60 @@
+## Script (Python) "search_pins"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+list Students for ClearanceOfficers
+"""
+
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write('%s <br />\r\n' % s)
+
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+roles = member.getRolesInContext(context)
+if str(member) not in ('admin','joachim'):
+    return
+count = 0
+icount = 0
+mcount = 0
+self = context
+students = self.students_catalog()
+num_objects = len(students)
+for student_brain in students:
+    data = {}
+    sid = data['id'] = student_brain.id
+    matric_no = data['matric_no'] = student_brain.matric_no
+    if matric_no:
+        import_res = self.returning_import(matric_no = matric_no)
+        if not import_res:
+            mcount += 1
+            data['mcount'] = mcount
+            rwrite("%(mcount)d : %(matric_no)s not found in returning_import" % data)
+            continue
+        try:
+            self.returning_import.modifyRecord(**data)
+        except:
+            mcount += 1
+            data['mcount'] = mcount
+            rwrite("%(mcount)d : %(matric_no)s not unique in returning_import" % data)
+            continue
+    else:
+        continue
+    count += 1
+    data['count'] = count
+    rwrite("%(count)d : added %(id)s to %(matric_no)s" % data)
+rwrite("<br />\n Done" )
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/changeRegState.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/changeRegState.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/changeRegState.py	(revision 2226)
@@ -0,0 +1,40 @@
+## Script (Python) "changeRegState"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST,transition=None
+##title=
+##
+# $Id: epayment_cb.py 1348 2007-01-25 17:06:21Z henrik $
+"""
+execute transition
+"""
+
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+if str(member) not in ('admin','joachim') or transition is None:
+    return
+
+import logging
+logger = logging.getLogger('Skins.changeRegState')
+
+pm = context.portal_membership
+member = pm.getAuthenticatedMember()
+
+request = context.REQUEST
+students = context.portal_url.getPortalObject().campus.students
+wftool = context.portal_workflow
+student_id = context.getStudentId()
+if student_id is None:
+    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+student = getattr(students,student_id)
+try:
+    wftool.doActionFor(student,transition)
+    logger.info('%s executes transition %s for %s' % (member,transition,student_id))
+except:
+    logger.info('%s tried to execute transition %s for %s, transition not allowed' % (member,transition,student_id))
+
+return request.RESPONSE.redirect("%s" % context.absolute_url())
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/createReturningStudent.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/createReturningStudent.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/createReturningStudent.py	(revision 2226)
@@ -0,0 +1,66 @@
+## Script (Python) "createReturningStudent"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=matric_no=None
+##title=
+##
+# $Id: createReturningStudent.py 1151 2006-12-29 22:05:53Z joachim $
+''' create the Studentbase folder'''
+
+
+pm = context.portal_membership
+member = pm.getAuthenticatedMember()
+wftool = context.portal_workflow
+students_folder = context.portal_url.getPortalObject().campus.students
+import logging
+logger = logging.getLogger('Skins.createReturningStudent')
+
+if not matric_no:
+    return "No MatricNo"
+
+if matric_no != 'All':
+    if context.students_catalog(matric_no=matric_no):
+        return "Student with %s already exists" % matric_no
+    res = context.returning_import(matric_no = matric_no)
+    if len(res) != 1:
+        return "MatricNo %s not found in Returning Table" % matric_no
+    student_brain = res[0]
+    sid,jamb_reg_no = context.waeup_tool.createOne(students_folder,student_brain,'?')
+    logger.info('%s creates student %s %s' % (member,sid,matric_no))
+    return "Student MatricNo %s, StudentId %s (JAMBRegNo %s) created" % (matric_no,sid,jamb_reg_no)
+
+matric_nos = context.returning_import.uniqueValuesFor('matric_no')
+count = 1
+total = 0
+logger.info('%s started createReturningStudent"' % (member))
+letters = ('ABCDEFGHKLMNPQRSTUVWXYZ')
+lc = 0
+for matric_no in matric_nos:
+    res = context.students_catalog(matric_no = matric_no)
+    if len(res) == 1:
+        continue
+    elif len(res) > 1:
+        logger.info('Student %s with multiple entries (%s)' % (matric_no,len(res)))
+        # fix at the beginning
+        ids = [r.id for r in res if not r.id.startswith('A')]
+        for id in ids:
+            context.students_catalog.deleteRecord(id)
+        students_folder.manage_delObjects(ids)
+        logger.info('Student objects deleted: %s' % " ".join(ids))
+        continue
+    student = context.returning_import(matric_no=matric_no)[0]
+    letter = letters[lc]
+    lc += 1
+    if lc == len(letters):
+        lc = 0
+    context.waeup_tool.createOne(students_folder,student,letter)
+    logger.info('Student created: %s' % (matric_no))
+    count += 1
+    if count > 10:
+        logger.info('%s committed students %s, %s' % (member,count,total))
+        total += count
+        count = 1
+logger.info('createReturningStudent finished (%s)' % (total))
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/deleteResultByKey.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/deleteResultByKey.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/deleteResultByKey.py	(revision 2226)
@@ -0,0 +1,47 @@
+## Script (Python) "deleteResultByKey"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST,key=None
+##title=
+##
+# $Id: deleteStudentByMatricNo.py 1567 2007-03-17 08:34:51Z henrik $
+"""
+"""
+import logging
+logger = logging.getLogger('Skins.deleteResultByKey')
+
+request = REQUEST
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+roles = member.getRolesInContext(context)
+stdir = context.portal_directories.students
+st_cat = context.students_catalog
+ret_imp = context.returning_import
+res_imp = context.results_import
+students = context.portal_url.getPortalObject().campus.students
+if str(member) not in ('admin','joachim','med','despej') or key is None:
+    return
+
+output = []
+
+# remove from results_import
+
+res_deleted = []
+res_res = res_imp(key=key)
+if len(res_res) > 0:
+    for r in res_res:
+        res_imp.deleteRecord(r.key)
+        res_deleted.append(r.key)
+    msg = "%s deleted result %s from results_import" % (member,',\n'.join(res_deleted))
+else:
+    msg = "No results %s to delete from results_import" % key
+output.append(msg)
+logger.info(msg)
+
+
+return "\n".join(output)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/deleteStudentByMatricNo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/deleteStudentByMatricNo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/deleteStudentByMatricNo.py	(revision 2226)
@@ -0,0 +1,94 @@
+## Script (Python) "deleteStudentByMatricNo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST,matric_no=None
+##title=
+##
+# $Id$
+"""
+"""
+import logging
+logger = logging.getLogger('Skins.deleteStudentByMatricNo')
+
+request = REQUEST
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+roles = member.getRolesInContext(context)
+stdir = context.portal_directories.students
+st_cat = context.students_catalog
+ret_imp = context.returning_import
+res_imp = context.results_import
+students = context.portal_url.getPortalObject().campus.students
+if str(member) not in ('admin','joachim') or matric_no is None:
+    return
+
+
+# remove from students_catalog
+
+res = st_cat(matric_no=matric_no)
+if len(res) != 1:
+    msg = "Student with matric_no %s not found in students_catalog" % matric_no
+    logger.info(msg)
+    return msg
+else:
+    stbrain = res[0]
+    student_id = stbrain.id
+    st_cat.deleteRecord(student_id)
+    msg = "Student with matric_no %s and student_id %s removed from students_catalog" % (matric_no,student_id)
+    output = []
+    logger.info(msg)
+    output.append(msg)
+
+# remove from returning_import
+
+res_ret = ret_imp(matric_no=matric_no)
+if len(res_ret) != 1:
+    msg = "Student with matric_no %s not found in returning_import" % matric_no
+    logger.info(msg)
+else:
+    ret_imp.deleteRecord(matric_no)
+    msg = "Student with matric_no %s removed from returning_import" % matric_no
+logger.info(msg)
+output.append(msg)
+
+# remove from results_import
+
+res_deleted = []
+res_res = res_imp(matric_no=matric_no)
+if len(res_res) > 0:
+    for r in res_res:
+        res_imp.deleteRecord(r.key)
+        res_deleted.append(r.key)
+    msg = "%s results deleted from results_import" % (',\n'.join(res_deleted))
+else:
+    msg = "No results to delete for %s from results_import" % matric_no
+output.append(msg)
+logger.info(msg)
+
+# remove objects
+
+if hasattr(students,student_id):
+    students.manage_delObjects((student_id),)
+    msg = "Student object for %s deleted" % student_id
+else:
+    msg = "No students object for %s" % student_id
+output.append(msg)
+logger.info(msg)
+
+# remove from directory
+
+if hasattr(stdir, student_id):
+    stdir.deleteEntry(student_id)
+    msg = "Student directory entry for %s deleted" % student_id
+else:
+    msg = "No Student directory entry for %s" % student_id
+output.append(msg)
+logger.info(msg)
+
+
+return "\n".join(output)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/deleteStudentByRegNo.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/deleteStudentByRegNo.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/deleteStudentByRegNo.py	(revision 2226)
@@ -0,0 +1,68 @@
+## Script (Python) "deleteStudentByMatricNo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST,jamb_reg_no=None
+##title=
+##
+# $Id: deleteStudentByMatricNo.py 1567 2007-03-17 08:34:51Z henrik $
+"""
+"""
+import logging
+logger = logging.getLogger('Skins.deleteStudentByRegNo')
+
+request = REQUEST
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+roles = member.getRolesInContext(context)
+stdir = context.portal_directories.students
+st_cat = context.students_catalog
+ret_imp = context.returning_import
+res_imp = context.results_import
+students = context.portal_url.getPortalObject().campus.students
+if str(member) not in ('admin','joachim') or jamb_reg_no is None:
+    return
+
+
+# remove from students_catalog
+
+res = st_cat(jamb_reg_no=jamb_reg_no)
+if len(res) != 1:
+    msg = "Student with jamb_reg_no %s not found in students_catalog" % jamb_reg_no
+    logger.info(msg)
+    return msg
+else:
+    stbrain = res[0]
+    student_id = stbrain.id
+    st_cat.deleteRecord(student_id)
+    msg = "Student with jamb_reg_no %s and student_id %s removed from students_catalog" % (jamb_reg_no,student_id)
+    output = []
+    logger.info(msg)
+    output.append(msg)
+
+# remove objects
+
+if hasattr(students,student_id):
+    students.manage_delObjects((student_id),)
+    msg = "Student object for %s deleted" % student_id
+else:
+    msg = "No students object for %s" % student_id
+output.append(msg)
+logger.info(msg)
+
+# remove from directory
+
+if hasattr(stdir, student_id):
+    stdir.deleteEntry(student_id)
+    msg = "Student directory entry for %s deleted" % student_id
+else:
+    msg = "No Student directory entry for %s" % student_id
+output.append(msg)
+logger.info(msg)
+
+
+return "\n".join(output)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/delete_student_from_catalog.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/delete_student_from_catalog.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/delete_student_from_catalog.py	(revision 2226)
@@ -0,0 +1,28 @@
+## Script (Python) "delete_student_from_catalog"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=id=None, REQUEST=None
+##title=
+##
+# $Id: delete_student_from_catalog.py 805 2006-11-09 09:38:29Z henrik $
+"""
+FIXME: add docstring.
+"""
+
+scat = context.students_catalog
+
+if id:
+   stud = scat(id=id)
+   if stud:
+     scat.deleteRecord(stud[0].id)
+     message = '%s (%s) removed from catalog' % (stud[0].name, id)
+   else:
+     message = 'Id not found'
+else:
+   message = 'no Id in request'
+return message
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixEntryModeFromRegno.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixEntryModeFromRegno.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixEntryModeFromRegno.py	(revision 2226)
@@ -0,0 +1,70 @@
+## Script (Python) "reindex_entry_mode"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: reindex_entry_mode.py 1328 2007-01-19 18:16:32Z joachim $
+"""
+reindex students_catalog entry_mode index
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+students = context.portal_url.getPortalObject().campus.students
+
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write(s)
+
+cat = context.students_catalog
+
+ems = cat.uniqueValuesFor('entry_mode')
+##rwrite("entry_mode values: %s<br />\n" % (str(ems)))
+##for em in ems:
+##    res = cat(entry_mode = em)
+##    rwrite("entry_mode: %s = %d<br />\n" % (em,len(res)))
+
+sbrains = cat()
+count = 0
+lines = []
+#set_trace()
+for sb in sbrains:
+    em = context.getFromData_entry_mode(sb.id)
+    level_cat = sb.level
+    new_em = context.getEntryMode(sb.jamb_reg_no)
+    app_found = False
+    if students.hasObject(sb.id):
+        student_obj = getattr(students,sb.id)
+        if student_obj.hasObject('application'):
+            app = getattr(student_obj,'application')
+            app.getContent().edit(mapping={'entry_mode': new_em})
+            cat.modifyRecord(id = sb.id,entry_mode = new_em)
+            app_found = True
+    if not app_found:
+        cat.modifyRecord(id = sb.id,entry_mode = "")
+    s = '"%s","%s","%s","%s","%s","%s","%s"' % (app_found,sb.id,sb.matric_no,em,
+                                                sb.jamb_reg_no,new_em,level_cat)
+    #lines.append('"%s","%s","%s","%s"' % (sb.id,sb.matric_no,moe,new_em))
+    rwrite("%s<br />" %s)
+
+#setheader('Content-type','text/semicolon-seperated-values')
+#setheader('Content-Disposition:', 'attachment; filename="fixLevelExport.csv"')
+#setheader('Expires',  'Mon, 26 Jul 1997 05:00:00GMT') # Date in the past
+#setheader('Cache-Control', 'no-store, no-cache,must-revalidate') # HTTP/1.1
+#setheader('Cache-Control', 'post-check=0,pre-check=0')
+#setheader('Pragma', 'no-cache') # HTTP/1.0
+#return '\n'.join(lines)
+
+rwrite("<br />\n Done" )
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixLevel.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixLevel.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixLevel.py	(revision 2226)
@@ -0,0 +1,68 @@
+## Script (Python) "search_pins"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST
+##title=
+##
+# $Id: fixLevel.py 1250 2007-01-09 17:19:20Z joachim $
+"""
+list Students for ClearanceOfficers
+"""
+
+request = REQUEST
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+roles = member.getRolesInContext(context)
+retcat = context.returning_import
+rcat = context.results_import
+scat = context.students_catalog
+from Products.AdvancedQuery import Eq, Between, Le,In
+aq_students = context.students_catalog.evalAdvancedQuery
+
+if str(member) not in ('admin','joachim'):
+    return 
+count = 0
+#from Products.zdb import set_trace;set_trace()
+values = scat.uniqueValuesFor('level')
+#query = ~ In("level",('100', '200', '300', '400', '500', '600'))
+#query = In("level",('',))
+#res = aq_students(query)
+#from Products.zdb import set_trace;set_trace()
+modified = []
+modified.append("%d to change" % len(res))
+list = []
+dbrains = {}
+for sbrain in res:
+    list.append((sbrain.id,sbrain.matric_no,sbrain.course))
+for id,m,c in list:
+    erg = context.results_import(matric_no=m)
+    if erg and erg[0].Level:
+        context.students_catalog.modifyRecord(id = id, level=erg[0].Level)
+        modified.append("%s, %s" % (id,m))
+    else:
+        pres = context.portal_catalog(id=sbrain.id)
+        if not pres:
+            modified.append("no results for %s, %s" % (id,m))
+            continue
+        review_state = pres[0].review_state
+        if review_state not in ('admitted',
+                                'clearance_pin_entered',
+                                'clearance_requested',
+                                'cleared_and_validated',
+                                ):
+            modified.append("no new student %s" % (id))
+            continue
+        cres = context.portal_catalog(id = c)
+        if not cres:
+            modified.append("no certificate %s for %s" % (id,c))
+        cert_doc = cres[0].getObject().getContent()
+        level = getattr(cert_doc,'start_level',None)
+        if level is None:
+            modified.append("no start_level in certificate %s for %s" % (id,c))
+        context.students_catalog.modifyRecord(id=id, level=level)
+        modified.append("%s, %s" % (id,c))
+return '\n'.join(modified)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixLevelForNewStudents.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixLevelForNewStudents.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixLevelForNewStudents.py	(revision 2226)
@@ -0,0 +1,100 @@
+## Script (Python) "fixLevelForNewStudents"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST
+##title=
+##
+# $Id$
+"""
+list Students for ClearanceOfficers
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+import logging
+logger = logging.getLogger('Skins.fixLevelForNewStudents')
+
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write(s)
+
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+retcat = context.returning_import
+rcat = context.results_import
+students_cat = context.students_catalog
+from Products.AdvancedQuery import Eq, Between, Le,In
+aq_students = students_cat.evalAdvancedQuery
+aq_portal = context.portal_catalog.evalAdvancedQuery
+students = context.portal_url.getPortalObject().campus.students
+
+count = 0
+##query = Eq('portal_type','Student') & In('review_state',('admitted',
+##                                                         'clearance_requested',
+##                                                         'cleared_and_validated',
+##                                                         'objection_raised',
+##                                                         )
+##res = aq_portal(query)
+query = Eq('level','100')
+#res = aq_students(query)
+res = students_cat(level='100')
+#set_trace()
+count = 0
+count_full = 0
+commit_count = 0
+logger.info("Started for %s students" % len(res))
+to_change = {}
+for sbrain in res:
+    #count_full += 1
+    #rwrite("%s: %s %s %s <br />" % (count_full,sbrain.id,sbrain.entry_mode,sbrain.level))
+    student_obj = getattr(students,sbrain.id)
+    changed = False
+    if sbrain.entry_mode == "":
+        if not student_obj.hasObject('application'):
+            rwrite("%s %s %s application not found <br />" % (sbrain.id,sbrain.entry_mode,level))
+            continue
+        changed = True
+        app_doc = student_obj.application.getContent()
+        entry_mode = app_doc.entry_mode
+    else:
+        entry_mode = sbrain.entry_mode
+    if entry_mode == "DE":
+        changed = True
+        level = "200"
+    else:
+        level = "100"
+    if changed:
+        d = {}
+        d['id'] = sbrain.id
+        d['level'] = level
+        d['entry_mode'] = entry_mode
+        to_change[sbrain.id] = d
+##    students_cat.modifyRecord(id=sbrain.id,
+##                              level=level,
+##                              entry_mode=entry_mode)
+    if not student_obj.hasObject('study_course'):
+        rwrite("%s %s %s study_course not found <br />" % (sbrain.id,sbrain.entry_mode,level))
+        continue
+    student_obj.study_course.getContent().edit(mapping={'current_level': level,
+                                                        'current_verdict': 'N/A'})
+    count += 1
+    commit_count += 1
+    if commit_count > 1000:
+        context.waeup_tool.doCommit()
+        logger.info("Committing %s transactions, total %s" % (commit_count,count))
+        commit_count = 0
+    rwrite("%s: %s %s %s <br />" % (count,sbrain.id,entry_mode,level))
+for entry in to_change.keys():
+    students_cat.modifyRecord(**to_change[entry])
+rwrite("finished")
+logger.info("Finished  %s students" % count)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixLevelFromResults.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixLevelFromResults.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixLevelFromResults.py	(revision 2226)
@@ -0,0 +1,106 @@
+## Script (Python) "search_pins"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+list Students for ClearanceOfficers
+"""
+
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write(s)
+
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+roles = member.getRolesInContext(context)
+retcat = context.returning_import
+rcat = context.results_import
+scat = context.students_catalog
+from Products.AdvancedQuery import Eq, Between, Le,In
+aq_students = context.students_catalog.evalAdvancedQuery
+students = context.portal_url.getPortalObject().campus.students
+
+
+if str(member) not in ('admin','joachim'):
+    return
+count = 0
+line_count = 0
+lines = []
+res = scat()
+for sbrain in res:
+    if str(sbrain.level) == '100':
+        ec = "new"
+    else:
+        ec = "nor"
+    erg = context.results_import(matric_no=sbrain.matric_no)
+    if erg and erg[0].Level:
+        level_res = erg[0].Level
+        everdict = erg[0].Verdict
+        level_cc = context.getLevelFromResultsCosCode(erg)
+        #if level_cc == 0:
+            #lc = "-"
+        lc = 100*level_cc - int(level_res)
+        verdict,elegible = context.getVerdict(everdict)
+        if elegible:
+            level = "%d00" % (level_cc + 1)
+        context.students_catalog.modifyRecord(id = sbrain.id,
+                                              level="",
+                                              verdict = "")
+        while True:
+            ec = "nos"
+            if not students.hasObject(sbrain.id):
+                break
+            student = getattr(students,sbrain.id)
+            ec = "nyr"
+            if not student.hasObject("study_course"):
+                break
+            study_course = getattr(student,"study_course")
+            study_course.getContent().edit(mapping = {'current_level':level,
+                                                      'current_verdict':verdict})
+            context.students_catalog.modifyRecord(id = sbrain.id,
+                                                  level=level,
+                                                  verdict=verdict)
+            ec = "reg"
+            break
+
+        s = '"%s","%s","%s","%s","%s","%s","%s","%s"' % (str(lc),ec,
+                                                           sbrain.id,
+                                                           sbrain.matric_no,
+                                                           level_res,
+                                                           level_cc,
+                                                           everdict,
+                                                           verdict)
+        #lines.append(s)
+    else:
+        s = '"","%s","%s","%s","",""' % (ec,sbrain.id,sbrain.matric_no)
+        #lines.append(s)
+
+    rwrite("%s<br />" %s)
+#    count += 1
+#    if count > 60:
+#        line_count += 1
+#        rwrite("<br />\n%3d " % line_count)
+#        count = 0
+
+rwrite("<br />\n Done" )
+
+##setheader('Content-type','text/semicolon-seperated-values')
+##setheader('Content-Disposition:', 'attachment; filename="fixLevelExport.csv"')
+##setheader('Expires',  'Mon, 26 Jul 1997 05:00:00GMT') # Date in the past
+##setheader('Cache-Control', 'no-store, no-cache,must-revalidate') # HTTP/1.1
+##setheader('Cache-Control', 'post-check=0,pre-check=0')
+##setheader('Pragma', 'no-cache') # HTTP/1.0
+##return '\n'.join(lines)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixPaymentPins.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixPaymentPins.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixPaymentPins.py	(revision 2226)
@@ -0,0 +1,38 @@
+## Script (Python) "fixPins"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST
+##title=
+##
+# $Id: fixScratchCardPayments.py 1371 2007-01-28 21:36:52Z henrik $
+"""
+
+"""
+
+request = REQUEST
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+roles = member.getRolesInContext(context)
+scat = context.students_catalog
+from Products.AdvancedQuery import Eq, Between, Le,In
+aq_students = context.students_catalog.evalAdvancedQuery
+students = context.portal_url.getPortalObject().campus.students
+payments = context.portal_catalog(portal_type='Payment')
+
+list = []
+for brain in payments:
+    d = {}
+    payment = brain.getObject()
+    pay_doc = payment.getContent()
+    if pay_doc.resp_code == 'SC':
+        old = pay_doc.type_code
+        pin = old.replace('-','')
+        d['type_code'] = pin[:3]+'-'+pin[3:4]+'-'+pin[4:]
+        pay_doc.edit(mapping=d)
+        list.append('%s changed to %s' % (old,d['type_code']))
+return '\n'.join(list)
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixPermAddress.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixPermAddress.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixPermAddress.py	(revision 2226)
@@ -0,0 +1,41 @@
+## Script (Python) "search_pins"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST
+##title=
+##
+# $Id$
+"""
+list Students for ClearanceOfficers
+"""
+
+request = REQUEST
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+roles = member.getRolesInContext(context)
+retcat = context.returning_import
+scat = context.students_catalog
+students_folder = context.portal_url.getPortalObject().campus.students
+if str(member) not in ('admin','joachim'):
+    return 
+count = 0
+students = retcat()
+#from Products.zdb import set_trace;set_trace()
+for sbrain in students:
+    sres = scat(matric_no=sbrain.matric_no)
+    if not sres:
+        continue
+    student = getattr(students_folder,sres[0].id,None)
+    if student is None:
+        continue
+    per = getattr(student,'personal',None)
+    if per is None:
+        continue
+    per.getContent().edit(mapping={'perm_address':sbrain.Permanent_Address})
+    
+    
+    
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixReservedBeds.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixReservedBeds.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixReservedBeds.py	(revision 2226)
@@ -0,0 +1,45 @@
+##parameters=REQUEST
+# $Id: fixReservedBeds.py 1447 2007-02-20 13:41:26Z joachim $
+"""
+process the the accommodation reservation
+"""
+import DateTime
+current = DateTime.DateTime()
+request = context.REQUEST
+pr = context.portal_registration
+wftool = context.portal_workflow
+lt = context.portal_layouts
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+acco_cat = context.portal_accommodation
+import logging
+logger = logging.getLogger('Skins.fixReservedBed')
+students = context.portal_url.getPortalObject().campus.students
+hostels = context.portal_url.getPortalObject().campus.accommodation.objectItems()
+acco_id = "accommodation_%s" % context.getSessionId()
+logger.info('%s starts fixReservedBeds' % (member))
+#from Products.zdb import set_trace;set_trace()
+for h_id,h in hostels:
+    h_doc = h.getContent()
+    reserved = context.reservedRoomsVoc(doc=h_doc)
+    for hr,hrv in reserved:
+        for k,v in context.getAccoHallBeds(doc=h_doc):
+            bid = "%s_%s_%s" % (h_id,hr,k)
+            res = acco_cat(bed = bid)
+            if not res:
+                continue
+            bed = res[0]
+            if not bed.student:
+                continue
+            student_obj = getattr(students,bed.student)
+            if acco_id in student_obj.objectIds():
+                acco_doc = getattr(student_obj, acco_id).getContent()
+                if acco_doc.bed != bid:
+                    acco_cat.modifyRecord(bed=bid,student = '')
+                    logger.info('"%s","removed allocation of %s for","%s"' % (member,bid,bed.student))
+logger.info('%s finishes fixReservedBeds' % (member))
+return request.RESPONSE.redirect("%s" % context.absolute_url())
+
+
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixScratchCardPayments.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixScratchCardPayments.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/fixScratchCardPayments.py	(revision 2226)
@@ -0,0 +1,45 @@
+## Script (Python) "fixScratchCardPayments"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST
+##title=
+##
+# $Id: fixScratchCardPayments.py 1371 2007-01-28 21:36:52Z henrik $
+"""
+
+"""
+
+request = REQUEST
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+roles = member.getRolesInContext(context)
+retcat = context.returning_import
+rcat = context.results_import
+scat = context.students_catalog
+from Products.AdvancedQuery import Eq, Between, Le,In
+aq_students = context.students_catalog.evalAdvancedQuery
+students = context.portal_url.getPortalObject().campus.students
+payments = context.portal_catalog(portal_type='Payment')
+
+list = []
+for brain in payments:
+    d = {}
+#    d['resp_code'] = "SC"
+#    d['resp_desc'] = "SC Payment Successful"
+    payment = brain.getObject()
+    pay_doc = payment.getContent()
+#    if pay_doc.type_description.startswith('School Fee'):
+#        d['type_description'] = 'School Fee for Session 2006/2007'
+#        pay_doc.edit(mapping=d)
+#        list.append('%s changed' % pay_doc.type_description)
+    if pay_doc.type_code.startswith('transfer'):
+#        d['type_description'] = 'Transfer Form for Session 2006/2007'
+        old = pay_doc.type_code
+        d['type_code'] = old.replace('transfer_','')
+        pay_doc.edit(mapping=d)
+        list.append('%s changed to %s' % (old,d['type_code']))
+return '\n'.join(list)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/getFromData_entry_mode.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/getFromData_entry_mode.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/getFromData_entry_mode.py	(revision 2226)
@@ -0,0 +1,26 @@
+## Script (Python) "get_entry_mode"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=sid
+##title=
+##
+# $Id: getFromData_entry_mode.py 1328 2007-01-19 18:16:32Z joachim $
+"""
+return entry_mode from application-object.
+"""
+students = context.portal_url.getPortalObject().campus.students
+student = getattr(students,sid,None)
+if student is None:
+    return None
+app = getattr(student,'application',None)
+if app is None:
+    return "nyr"
+#from Products.zdb import set_trace;set_trace()
+em = app.getContent().entry_mode
+if em:
+    return em
+return "none"
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/increaseReturningLevels.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/increaseReturningLevels.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/increaseReturningLevels.py	(revision 2226)
@@ -0,0 +1,40 @@
+## Script (Python) "search_pins"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST
+##title=
+##
+# $Id$
+"""
+increase the Level for returning Students
+"""
+
+request = REQUEST
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+retcat = context.returning_import
+rcat = context.results_import
+scat = context.students_catalog
+from Products.AdvancedQuery import Eq, Between, Le,In
+aq_students = context.students_catalog.evalAdvancedQuery
+
+if str(member) not in ('admin','joachim'):
+    return 
+count = 0
+#from Products.zdb import set_trace;set_trace()
+returning = retcat(email='')
+l = []
+for sb in returning:
+    s = context.students_catalog(matric_no=sb.matric_no)
+    if s and s[0].level:
+        level = "%s" % (int(s[0].level) + 100)
+        context.students_catalog.modifyRecord(id = s[0].id,
+                                              level=level)
+        l.append("%s old/new %s/%s" % (s[0].id,s[0].level,level))
+return "\n".join(l)
+
+        
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/readOnlinePaymentsFromLog.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/readOnlinePaymentsFromLog.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/readOnlinePaymentsFromLog.py	(revision 2226)
@@ -0,0 +1,117 @@
+## Script (Python) "search_pins"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+read the successfull epayments from an extract of Z2.log
+this extract must be created with
+
+cat /zope/instances/uniben1/log/Z2.log.1 | grep epayment_cb | grep RespCode=00 
+> /zope/instances/uniben1/import/successfullepaymentsDDMMYY.log
+
+in /zope/instances/uniben1/import/ are already all files from 25.3.07
+
+"""
+import logging
+logger = logging.getLogger('Skins.readOnlinePaymentsFromLog')
+
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+import DateTime
+
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write('%s<br>\r\n' % s)
+
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+roles = member.getRolesInContext(context)
+retcat = context.returning_import
+rcat = context.results_import
+scat = context.students_catalog
+from Products.AdvancedQuery import Eq, Between, Le,In
+aq_students = context.students_catalog.evalAdvancedQuery
+students_folder = context.portal_url.getPortalObject().campus.students
+resp_codes = (("x_RespDesc","resp_desc"),
+      ("x_RespPayRef","resp_pay_reference"),
+      ("x_RespCode","resp_code"),
+      ("x_CardNum","resp_card_num"),
+      ("x_ApprAmt","resp_approved_amount"),
+      )
+count = 0
+correct = 0
+approved = 0
+tas = context.waeup_tool.getCallbacksFromLog('successfullepayments260307.log')
+for ta in tas:
+    count += 1
+    student_id = ta['student_id']
+    payment_id = ta['payment_id']
+    qs_dict = ta['qs_dict']
+    if not students_folder.hasObject(student_id):
+        rwrite("no student %s" % student_id)
+        continue
+    student_obj = getattr(students_folder,student_id)
+    if not student_obj.hasObject('payments'):
+        rwrite("no payments for student %s" % student_id)
+        continue
+    payments = getattr(student_obj,'payments')
+    if not payments.hasObject(payment_id):
+        rwrite("no payment %s for student %s" % (payment_id,student_id))
+        continue
+    payment_obj = getattr(payments,payment_id)
+    payment_doc = payment_obj.getContent()
+    pdoc = {}
+    for rc,key in resp_codes:
+        pdoc[key] = getattr(payment_doc,key)
+    readin = {}
+    for rc,pdk in resp_codes:
+        readin[pdk] = qs_dict.get(rc)[0]
+    response_code = readin['resp_code']
+    if payment_doc.resp_code != response_code:
+        rwrite('"%d","%d","%s","%s","%s","%s"' % (
+                                                  count,correct,
+                                                  student_id,
+                                                  payment_id,
+                                                  response_code,
+                                                  payment_doc.resp_code
+                                                  ))
+    elif payment_doc.resp_code == response_code:
+        correct +=1
+        rwrite('"%d","%d","%s","%s","%s","%s"' % (
+                                                  count,correct,
+                                                  student_id,
+                                                  payment_id,
+                                                  response_code,
+                                                  payment_doc.resp_code
+                                                  ))
+    if payment_doc.resp_code == "" and response_code == "00":
+        review_state = wftool.getInfoFor(payment_obj,'review_state',None)
+        if review_state != "opened":
+            logger.info('payment object of %s closed' % (student_id))
+            continue
+        review_state = wftool.getInfoFor(student_obj,'review_state',None)
+        if review_state != "cleared_and_validated":
+            logger.info('%s review_state = %s' % (student_id,review_state))
+            continue
+        readin['resp_code'] = 'IP ' + readin['resp_code']
+        readin['resp_desc'] = 'Payment approved by logfile import, %s. ' % (DateTime.DateTime()) \
+                              + readin['resp_desc']
+        payment_doc.edit(mapping=readin)
+        if payment_doc.type_description.startswith('School Fee'):
+            wftool.doActionFor(student_obj,'pay_school_fee')
+        logger.info('%s approves epayment for %s by logfile import' % (member,student_id))
+        wftool.doActionFor(payment_obj,'close')
+        approved += 1
+        if approved > 50:
+            context.waeup_tool.doCommit()
+            logger.info('%s transactions commited' % (approved))
+            approved = 0
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/refresh_certificate_info.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/refresh_certificate_info.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/refresh_certificate_info.py	(revision 2226)
@@ -0,0 +1,33 @@
+##parameters=REQUEST, certid=None
+# $Id: refresh_certificate_info.py 1094 2006-12-19 12:11:44Z henrik $
+"""
+refresh the certificate info in the students_catalog
+"""
+request = context.REQUEST
+if not certid:
+    return "Certificate not specified"
+
+course = request.get('certid')
+res = context.portal_catalog(portal_type='Certificate',id = course)
+if not res:
+    return "Certificate %s not found"
+c_brain = res[0]
+c_path = c_brain.getPath().split('/')
+faculty = c_path[-4]
+department = c_path[-3]
+s_cat = context.students_catalog
+s_res = s_cat(course = certid)
+#from Products.zdb import set_trace
+#set_trace()
+if not s_res:
+    return "No students for %s not found"
+refreshed = []
+refreshed.append("Record started")
+for student_id in [st.id  for st in s_res]:
+    s_cat.modifyRecord(id = student_id,
+                       course = course,
+                       faculty = faculty,
+                       department = department,
+                       )
+    refreshed.append("Record %s refreshed" % student_id)
+return '\r'.join(refreshed)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/reindexCoursesCatalog.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/reindexCoursesCatalog.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/reindexCoursesCatalog.py	(revision 2226)
@@ -0,0 +1,78 @@
+## Script (Python) "reindexCourseCatalog"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST
+##title=
+##
+# $Id$
+"""
+list Students for ClearanceOfficers
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+import logging
+logger = logging.getLogger('Skins.reindexCourseCatalog')
+
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write(s)
+
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+#students_cat = context.students_catalog
+courses_cat = context.courses_catalog
+from Products.AdvancedQuery import Eq, Between, Le,In
+#aq_students = students_cat.evalAdvancedQuery
+aq_portal = context.portal_catalog.evalAdvancedQuery
+students = context.portal_url.getPortalObject().campus.students
+
+count = 0
+##query = Eq('portal_type','Student') & In('review_state',('admitted',
+##                                                         'clearance_requested',
+##                                                         'cleared_and_validated',
+##                                                         'objection_raised',
+##                                                         )
+##res = aq_portal(query)
+query = Eq('portal_type','Course')
+courses = aq_portal(query)
+#set_trace()
+count = 0
+count_full = 0
+commit_count = 0
+logger.info("Reindexing of courses_catalog started for %s courses" % len(courses))
+for course_brain in courses:
+    course_doc = course_brain.getObject().getContent()
+    d = {}
+    d['code'] = getattr(course_doc,'code')
+    d['credits'] = getattr(course_doc,'credits')
+    d['level'] = getattr(course_doc,'level')
+    d['passmark'] = getattr(course_doc,'passmark')
+    d['semester'] = getattr(course_doc,'semester')
+    d['title'] = getattr(course_doc,'title')
+    pl = course_brain.getPath().split('/')
+    d['faculty'] = pl[-4]
+    d['department'] = pl[-3]
+    try:
+        courses_cat.modifyRecord(**d)
+    except KeyError:
+        courses_cat.addRecord(**d)
+    count += 1
+    commit_count += 1
+    if commit_count > 1000:
+        context.waeup_tool.doCommit()
+        logger.info("Committing %s transactions, total %s" % (commit_count,count))
+        rwrite("%s: committed %s <br />" % (count,commit_count))
+        commit_count = 0
+rwrite("finished")
+logger.info("Reindexing finished (%s courses)" % count)
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/reindexStudentsCatFacultyDepartment.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/reindexStudentsCatFacultyDepartment.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/reindexStudentsCatFacultyDepartment.py	(revision 2226)
@@ -0,0 +1,94 @@
+## Script (Python) "reindex_entry_mode"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+reindex students_catalog entry_mode index
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+students_folder = context.portal_url.getPortalObject().campus.students
+
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write(s)
+
+students_cat = context.students_catalog
+from Products.AdvancedQuery import Eq, Between, Le,In
+aq_portal = context.portal_catalog.evalAdvancedQuery
+
+students = students_cat()
+count = 0
+certificates = {}
+d = {}
+d['faculty'] = 'n/a'
+d['department'] = 'n/a'
+certificates['na'] = d
+count = 0
+ch_count = 0
+to_delete = []
+for student in students:
+    sc_found = False
+    student_found = False
+    changed = False
+    if students_folder.hasObject(student.id):
+        student_found = True
+        student_obj = getattr(students_folder,student.id)
+        if student_obj.hasObject('study_course'):
+            sc = getattr(student_obj,'study_course')
+            cert_id = sc.getContent().study_course
+            if certificates.has_key(cert_id):
+                d = certificates[cert_id]
+            else:
+                query = Eq('portal_type','Certificate') &\
+                        Eq('id',cert_id)
+                #set_trace()
+                cert_brain = aq_portal(query)[0]
+                d = {}
+                d['faculty'] = cert_brain.getPath().split('/')[-4]
+                d['department'] = cert_brain.getPath().split('/')[-3]
+                certificates[cert_id] = d
+            sc_found = True
+            if student.faculty != d['faculty'] or student.department != d['department']:
+                ch_count += 1
+                changed = True
+                d['id'] = student.id
+                students_cat.modifyRecord(**d)
+        else:
+            d = certificates['na']
+    else:
+        d = certificates['na']
+        to_delete.append(student.id)
+    count +=1    
+    s = '"%s ","%s","%s","%s","%s","%s","%s","%s"' % (count,student_found,sc_found,
+                                                changed,ch_count,
+                                                student.id,
+                                                d['faculty'],
+                                                d['department'],
+                                                )
+    rwrite("%s<br />" %s)
+
+#setheader('Content-type','text/semicolon-seperated-values')
+#setheader('Content-Disposition:', 'attachment; filename="fixLevelExport.csv"')
+#setheader('Expires',  'Mon, 26 Jul 1997 05:00:00GMT') # Date in the past
+#setheader('Cache-Control', 'no-store, no-cache,must-revalidate') # HTTP/1.1
+#setheader('Cache-Control', 'post-check=0,pre-check=0')
+#setheader('Pragma', 'no-cache') # HTTP/1.0
+#return '\n'.join(lines)
+
+rwrite("<br />\n Done" )
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/removeResults.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/removeResults.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/removeResults.py	(revision 2226)
@@ -0,0 +1,84 @@
+## Script (Python) "search_pins"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST
+##title=
+##
+# $Id: removeResults.py 1216 2007-01-06 17:40:50Z joachim $
+"""
+list Students for ClearanceOfficers
+"""
+
+request = REQUEST
+response = request.RESPONSE
+
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    #response.setHeader('Content-length','%d' % (len(s)))
+    #response.setStatus('OK')
+    response.write(s)
+
+res_to_del = ('ART0206832', 
+    'ART0206156',
+    'ART0206812',
+    'ART0206841',
+    'ART0206813',
+    'ART0206816',
+    'ART0206614',
+    'ART0206817',
+    'ART0206830',
+    'ART0205970',
+    'ART0206158',
+    'ART0206811',
+    'ART0206815',
+    'ART0301351',
+    'ART0301319',
+    'ART0301310',
+    'ART0308340',
+    'ART0206157',
+    'ART0206833',
+    'ART0206831',
+    'ART0206964',
+    'ART0206838',
+    'ART0206821',
+    'ART0206844',
+    'ART0206828',
+    'ART0206820',
+    'ART0206842',
+    'ART0206834',
+    'ART0206839',
+    'ART0206819',
+    'ART0206825',
+    'ART0206818',
+    'ART0206840',
+    'ART0206836',
+    'ART0206829')
+
+
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+roles = member.getRolesInContext(context)
+rcat = context.results_import
+scat = context.students_catalog
+#from Products.zdb import set_trace;set_trace()
+if str(member) not in ('admin','joachim'):
+    return
+rwrite("start")
+#for m in rcat.uniqueValuesFor('matric_no'):
+for m in res_to_del:
+    #if m.startswith('ART'):
+    res_r = rcat(matric_no = m)
+    #res_s = scat(matric_no = m)
+    #if res_s and res_s[0].course == 'BARTTHR' and res_s[0].level =="500":
+    to_del = []
+    for r in res_r:
+        to_del.append(r.key)
+        rwrite(m+" "+r.Level +"  " + r.CosCode + "<br />")
+    for uid in to_del:
+        rcat.deleteRecord(uid)
+rwrite("Done")
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/removeResults2.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/removeResults2.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/removeResults2.py	(revision 2226)
@@ -0,0 +1,50 @@
+## Script (Python) "removeResults2"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST
+##title=
+##
+# $Id$
+"""
+remove results according to faculty-prefix
+"""
+import logging
+logger = logging.getLogger('Skins.removeResults2')
+
+request = REQUEST
+response = request.RESPONSE
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    #response.setHeader('Content-length','%d' % (len(s)))
+    #response.setStatus('OK')
+    response.write(s)
+
+faculties_to_del = ('SCN','LSC','PSC','PHA')
+
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+rcat = context.results_import
+scat = context.students_catalog
+if str(member) not in ('admin','joachim'):
+    return
+rwrite("start")
+to_del = []
+for r in rcat():
+    if r.matric_no[:3] in faculties_to_del:
+        to_del.append(r.key)
+        rwrite(r.matric_no + " " + r.Level +"  " + r.CosCode + "<br />")
+logger.info('%s starts to delete %s results' % (member,len(to_del)))
+for uid in to_del:
+    rcat.deleteRecord(uid)
+logger.info('%s finished deletion of %s results' % (member,len(to_del)))
+rwrite("Done")
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/setCurrentSession.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/setCurrentSession.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/setCurrentSession.py	(revision 2226)
@@ -0,0 +1,69 @@
+## Script (Python) "setCurrentSession"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST
+##title=
+##
+# $Id: set_current_session.py 1757 2007-05-08 17:22:45Z joachim $
+"""
+set current_session of all students
+"""
+import logging
+logger = logging.getLogger('Skins.setCurrentSession')
+
+request = REQUEST
+response = request.RESPONSE
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    #response.setHeader('Content-length','%d' % (len(s)))
+    #response.setStatus('OK')
+    response.write("%s <br/>\n\r" % s)
+    return
+
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+students_catalog = context.students_catalog
+students_folder = context.portal_url.getPortalObject().campus.students
+
+#rwrite("start")
+if str(member) not in ('admin','joachim'):
+    return
+all = students_catalog()
+logger.info('%s starts to set %s ' % (member,len(all)))
+c = 0
+count = 0
+not_count = 0
+not_count2 = 0
+#set_trace()
+for student in all:
+    c += 1
+    if c > 1000:
+        logger.info('%s set %d, not found %d, session fields already set %d' % (member,count,not_count,not_count2))
+        c = 0
+        context.waeup_tool.doCommit()
+    if not student.session:
+        try:
+            study_course_doc = getattr(getattr(students_folder,student.id),'study_course').getContent()
+            study_course_doc.edit(mapping = {'current_session': '06'})
+            count += 1
+            data = {'session':'06'}
+            data['id'] = student.id
+            students_catalog.modifyRecord(**data)
+        except:
+            not_count += 1
+            #rwrite("%s/study_course not found" % student.id)
+    else:
+        not_count2 +=1
+
+logger.info('%s finished to set %d of %d ' % (member,count,len(all)))
+return
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/setEntryModeNewUME.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/setEntryModeNewUME.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/setEntryModeNewUME.py	(revision 2226)
@@ -0,0 +1,54 @@
+## Script (Python) "reindex_entry_mode"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+reindex students_catalog entry_mode index
+"""
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+students = context.portal_url.getPortalObject().campus.students
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    #response.setHeader('Content-length','%d' % (len(s)))
+    #response.setStatus('OK')
+    response.write(s)
+    
+cat = context.students_catalog
+ems = cat.uniqueValuesFor('entry_mode')
+rwrite("entry_mode values: %s<br />\n" % (str(ems)))
+for em in ems:
+    res = cat(entry_mode = em)
+    rwrite("entry_mode: %s = %d<br />\n" % (em,len(res)))
+
+ume_100 = cat(entry_mode = 'None', level = '100')
+rwrite("entry_mode (100): %s = %d<br />\n" % ('None',len(ume_100)))
+de_100 = cat(entry_mode = 'DE', level = '100')
+rwrite("entry_mode (100): %s = %d<br />\n" % ('DE',len(de_100)))
+##from Products.zdb import set_trace;set_trace()
+count = 0
+lc = 1
+for s in ume_100:
+    student = getattr(students,s.id,None)
+    if s is None:
+        rwrite('X')
+        continue
+    cat.modifyRecord(id = s.id, entry_mode='UME')
+    ec = 'C'
+    app = getattr(student,'application',None)
+    if app is not None:
+        app.getContent().edit(mapping={'entry_mode': "UME"})
+        ec = 'A'
+    rwrite(ec)
+    count += 1
+    if count > 60:
+        lc += 1
+        rwrite("<br />\n%3d " % lc)
+        count = 0
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/setNewEntryMode.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/setNewEntryMode.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/setNewEntryMode.py	(revision 2226)
@@ -0,0 +1,91 @@
+## Script (Python) "setNewEntryMode"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+reindex students_catalog entry_mode index
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+from Products.AdvancedQuery import Eq, Between, Le,In
+aq_students = context.students_catalog.evalAdvancedQuery
+
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+#students = context.portal_url.getPortalObject().campus.students
+import logging
+logger = logging.getLogger('Skins.setNewEntryMode')
+
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write("%s<br />\r\n" % s)
+
+brains = context.portal_catalog(portal_type = 'Student')
+count = 0
+commit_count = 0
+logger.info('setNewEntryMode start')
+#progress_log = context.waeup_tool.openLog('test')
+#context.waeup_tool.writeLog(progress_log,"Start \n")
+umede = aq_students(In('entry_mode',('DE','UME')))
+umede_ids = [r.id for r in umede]
+#set_trace()
+for brain in brains:
+    if brain.getId not in umede_ids:
+        continue
+    stud_obj = brain.getObject()
+    try:
+        app_doc = stud_obj.application.getContent()
+    except:
+        continue
+    em = getattr(app_doc,'entry_mode',None)
+    if em not in ('UME','DE'):
+        continue
+    try:
+        sc_doc = stud_obj.study_course.getContent()
+    except:
+        sc_doc = None
+    if em in ('ume_ft','de_ft'):
+        new_em = em
+    else:
+        new_em = "%s_ft" % em.lower()
+    if em in ('ume_ft','UME'):
+        el = "100"
+    elif em in ('de_ft','DE'):
+        el = "200"
+    app_doc.edit(mapping={'entry_mode': new_em,
+                          'entry_level': el})
+    sid = brain.getId
+    if sc_doc:
+        sc_doc.edit(mapping={'current_mode': new_em})
+        context.students_catalog.modifyRecord(id = sid,
+                                              mode=new_em,
+                                              entry_mode=new_em,
+                                              entry_level=el)
+    else:
+        context.students_catalog.modifyRecord(id = sid,
+                                              entry_mode=new_em,
+                                              entry_level=el)
+
+    count += 1
+    commit_count += 1
+    if commit_count > 1000:
+        context.waeup_tool.doCommit()
+        logger.info('committing %d total %d' % (commit_count,count))
+        commit_count = 0
+    s = "%d: %s %s -> %s" % (count,brain.getPath(),em,new_em)
+    rwrite(s)
+rwrite('Done')
+logger.info('setNewEntryMode finish')
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_151_resolve.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_151_resolve.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_151_resolve.py	(revision 2226)
@@ -0,0 +1,114 @@
+## Script (Python) "ti_151_resolve"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+resolve ticket #151
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+import logging
+#>>>>>>>>>>>>>>>><
+logger = logging.getLogger('Skins.ti_151_resolve')
+logger.info('already done on 26.3.07 by joachim')
+return
+#<<<<<<<<<<<<<<<<<
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+students = context.portal_url.getPortalObject().campus.students
+#from string import Template
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write(s)
+def getObject(outer,object):
+    if outer.hasObject(object):
+        return getattr(outer,object)
+    return None
+
+try:
+    from Products.AdvancedQuery import Eq, Between, Le,In
+    aq_students = context.students_catalog.evalAdvancedQuery
+except:
+    evalAdvancedQuery = None
+
+students_cat = context.students_catalog
+query = Eq('faculty','PSC') & Eq('department','PHY') & In('level',('300','400'))
+brains = aq_students(query)
+#brains = students_cat(faculty = 'PSC',department='PHY', level='400')
+total = 0
+count_ok = 0
+count_nosc = 0
+count_nolevel = 0
+count_level = 0
+count_renamed = 0
+#set_trace()
+#template = Template('"$count","$id","$course"')
+to_rename = []
+for student in brains:
+    student_dict = {}
+    for field in students_cat.schema():
+        student_dict[field] = getattr(student,field)
+    #s = template.substitute(student_dict,count=count,)
+    student_dict['total'] = total
+    while True:
+        if student.course == "BSCINP":
+            student_dict['message'] = "OK"
+            count_ok += 1
+            student_dict['sp_count'] = count_ok
+            s = '"%(total)d","%(sp_count)s","%(id)s","%(course)s","%(message)s",' % student_dict
+            break
+        student_dict['message'] = ""
+        student_obj = getObject(students,student.id)
+        if student_obj is None:
+            student_dict['message'] = "No student object"
+            break
+        study_course_obj = getObject(student_obj,'study_course')
+        if study_course_obj is None:
+            student_dict['message'] = "No study_course object"
+            count_nosc += 1
+            student_dict['sp_count'] = count_nosc
+            break
+        level_obj = getObject(student_obj,student.level)
+        if level_obj:
+            count_level += 1
+            study_course.manage_delObjects((student.level,))
+            student_dict['message'] = "Level deleted"
+            student_dict['sp_count'] = count_level
+        count_renamed += 1
+        to_rename.append(student.id)
+        student_dict['sp_count'] = count_renamed
+        student_dict['message'] = student_dict['message'] + "renamed to BSCINP"
+        study_course_doc = study_course_obj.getContent()
+        study_course_obj.edit(mapping = {'study_course': "BSCINP"})
+        total += 1
+        s = '"%(total)d","%(sp_count)s","%(id)s","%(course)s","%(message)s",' % student_dict
+        rwrite("%s<br />\r\n" %s)
+        break
+    total += 1
+    s = '"%(total)d","%(sp_count)s","%(id)s","%(course)s","%(message)s",' % student_dict
+    rwrite("%s<br />\r\n" %s)
+for sid in to_rename:
+    students_cat.modifyRecord(id = sid,course="BSCINP")
+sum = count_ok + count_nosc + count_nolevel + count_level    
+rwrite("total=%d,sum of below=%d,<br>\r\n correct study_course=%d<br>\r\n no study_course=%d<br>\r\n no level=%d<br>\r\n with level =%d,<br />\n Done" %
+        (total,
+         sum,
+         count_ok,
+         count_nosc,
+         count_nolevel,
+         count_level)
+         )
+
+logger.info("total=%d,sum=%d,ok=%d,no study_course=%d,no level=%d,with level =%d,\n Done" %
+             (total,sum,count_ok,count_nosc,count_nolevel,count_level))
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_165_resolve.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_165_resolve.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_165_resolve.py	(revision 2226)
@@ -0,0 +1,110 @@
+## Script (Python) "ti_151_resolve"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+resolve ticket #151
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+import logging
+#>>>>>>>>>>>>>>>><
+logger = logging.getLogger('Skins.ti_165_resolve')
+#logger.info('already done on 26.3.07 by joachim')
+#return
+#<<<<<<<<<<<<<<<<<
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+students = context.portal_url.getPortalObject().campus.students
+#from string import Template
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write("%s<br>\n\r" % s)
+def getObject(outer,object):
+    if outer.hasObject(object):
+        return getattr(outer,object)
+    return None
+
+try:
+    from Products.AdvancedQuery import Eq, Between, Le,In
+    aq_students = context.students_catalog.evalAdvancedQuery
+except:
+    evalAdvancedQuery = None
+
+students_cat = context.students_catalog
+pumeresults = context.portal_pumeresults
+de_students = students_cat(entry_mode = 'de_ft')
+found = 0
+not_found = 0
+for des in de_students:
+    if not des.jamb_reg_no.startswith('6'):
+        continue
+    pres = pumeresults(jamb_reg_no = des.jamb_reg_no)
+    if not pres:
+        student_obj = getObject(students,des.id)
+        if student_obj is None:
+            rwrite('%s with jamb_reg_no %s %s/%s/%s student object not found' % (des.id,
+                                                                            des.jamb_reg_no,
+                                                                            des.faculty,
+                                                                            des.department,
+                                                                            des.course,
+                                                                            ))
+            continue
+        pume_obj = getObject(student_obj,'pume')
+        study_course_obj = getObject(student_obj,'study_course')
+        if pume_obj is None:
+            rwrite('%s with jamb_reg_no %s %s/%s/%s pume object not found' % (des.id,
+                                                                            des.jamb_reg_no,
+                                                                            des.faculty,
+                                                                            des.department,
+                                                                            des.course,
+                                                                            ))
+            continue
+            
+        dict = {}
+            
+        pume_doc = pume_obj.getContent()
+        if study_course_obj:
+            study_course_doc = study_course_obj.getContent()
+            course_code = study_course_doc.study_course 
+            dict['course'] = course_code
+            dict['course_code_org'] = course_code
+            
+        score = pume_doc.pume_tot_score
+
+        dict['student_id'] = des.id
+        dict['jamb_reg_no'] = des.jamb_reg_no
+        dict['course_code'] = des.course
+        dict['department'] = des.department
+        dict['faculty'] = des.faculty
+        dict['name'] = des.name
+        dict['score'] = score
+        dict['result_type'] = 'de_ft'
+        dict['sex'] = 'M'
+        dict['status'] = 'Admitted'
+        if des.sex:
+            dict['sex'] = 'F'
+        s = '%(jamb_reg_no)s with student_id %(student_id)s not in pumeresults and is recreated<br>\r\n'
+        #s += 'Sex:%(sex)s,Name: %(name)s,Type:%(result_type)s<br>\n\r'
+        #s += 'Studycourse: %(course_code)s,Faculty: %(faculty)s,Department: %(department)s,Score: %(score)s'
+        rwrite(s % (dict))
+        pumeresults.addRecord(**dict)
+
+        not_found += 1
+        continue
+    found += 1
+    #rwrite('%s with jamb_reg_no %s found in pumeresults' % (des.id,des.jamb_reg_no))
+rwrite('%d found in pumeresults <br>%d not found in pumeresults<br>total in portal_pumeresults %d <br>'
+        % (found,not_found,len(pumeresults())))
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_167_resolve.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_167_resolve.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_167_resolve.py	(revision 2226)
@@ -0,0 +1,73 @@
+## Script (Python) "ti_167_resolve"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+import logging
+logger = logging.getLogger('Skins.ti_167_resolve')
+from Products.AdvancedQuery import Eq, Between, Le,In,MatchGlob
+aq_pins = context.portal_pins.evalAdvancedQuery
+aq_portal = context.portal_catalog_real.evalAdvancedQuery
+
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+students = context.portal_url.getPortalObject().campus.students
+
+#from string import Template
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write("%s<br>\n\r" % s)
+
+batches = context.portal_catalog(portal_type = "ScratchCardBatch")
+logger.info("starting to insert cost property into pins-catatlog")
+batch_cost = {}
+for batch in batches:
+    prefix_batch = ''.join(batch.getId.split('_'))
+    cost = batch.getObject().getContent().cost
+    batch_cost[prefix_batch] = cost
+    query = Eq('prefix_batch',prefix_batch)
+    pins = aq_pins(query)
+    for pin in pins:
+        context.portal_pins.modifyRecord(pin=pin.pin,cost=cost)
+    #rwrite("%s, %s" % (prefix_batch,cost))
+    logger.info("Cost %s (for %s) in portal_pins replaced" % (cost,prefix_batch))
+query = Eq('portal_type',"Payment")
+payments = aq_portal(query)
+count = 0
+no_cost = 0
+commit_after = 100
+for payment in payments:
+    if payment.Title.find('n/a') > -1:
+        #set_trace()
+        payment_doc = payment.getObject().getContent()
+        prefix_batch = ''.join(str(payment_doc.order_id).split('-')[:2])
+        if batch_cost.has_key(prefix_batch):
+            count += 1
+            payment_doc.edit(mapping = {'amount':
+                                        batch_cost[prefix_batch]})
+            #rwrite("%s: %s:%s" % (count,prefix_batch,payment_doc.order_id))
+            logger.info("Cost in payment object %s (%s) replaced (#%s)" % (payment.id,payment_doc.order_id,count))
+        else:
+            #rwrite("cost %s:%s not found" % (prefix_batch,payment_doc.order_id))
+            logger.info("Prefix %s (%s) not found" % (prefix_batch,payment_doc.order_id))
+            no_cost +=1
+    if count and not count % commit_after:
+        context.waeup_tool.doCommit()
+        logger.info("Committing %s transactions, total %s" % (commit_after,count))
+logger.info("updated %d payment amounts, %d costs not found" % (count,no_cost))
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_182_resolve.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_182_resolve.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_182_resolve.py	(revision 2226)
@@ -0,0 +1,126 @@
+## Script (Python) "getNewStudentStatistics"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+resolve ticket #182
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+import logging
+#>>>>>>>>>>>>>>>><
+logger = logging.getLogger('Skins.ti_182_resolve')
+#logger.info('already done on 26.3.07 by joachim')
+#return
+#<<<<<<<<<<<<<<<<<
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+students = context.portal_url.getPortalObject().campus.students
+#from string import Template
+def intersect(m,n):
+    return [i for i in m if i in n]
+
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write("%s<br>\n\r" % s)
+def getObject(outer,object):
+    if outer.hasObject(object):
+        return getattr(outer,object)
+    return None
+try:
+    from Products.AdvancedQuery import Eq, Between, Le,In, Ge,MatchRegexp
+    aq_portal = context.portal_catalog.evalAdvancedQuery
+    aq_students = context.students_catalog.evalAdvancedQuery
+except:
+    evalAdvancedQuery = None
+
+
+#freshquery = Eq('level','100') | (Eq('level','200') & Eq('entry_mode','DE'))
+#total_new = aq_students(freshquery)
+##query = In('review_state',('cleared_and_validated',
+##                           'school_fee_paid',
+##                           'courses_registered',
+##                           'courses_validated'))
+##cleared = aq_portal(query)
+##rwrite("Cleared and beyond students: %d" % len(cleared))
+##cleared_ids = [s.getId for s in cleared]
+newquery = Eq('portal_type','StudentApplication') & MatchRegexp('SearchableText',r'^6*')
+new_students = aq_portal(newquery)
+new_ids = [r.getPath().split('/')[-2] for r in new_students]
+rwrite("New students: %d" % len(new_ids))
+#diff_new_cleared = [i for i in new_ids if i not in cleared_ids]  
+#diff_cleared_new = [i for i in cleared_ids if i not in new_ids]  
+##special_states =  ('admitted',
+##                   'clearance_pin_entered',
+##                   'clearance_requested',
+##                   'cleared_and_validated',
+##                   'objection_raised',
+##                   )
+##special_query = In('review_state',special_states)
+##special = aq_portal(special_query)
+##special_ids = [s.getId for s in special]
+##rwrite("New special students: %d" % len(special_ids))
+admitted_query = Eq('review_state','admitted')
+admitted = aq_portal(admitted_query)
+admitted_ids = [s.getId for s in admitted]
+rwrite("Admitted students: %d" % len(admitted_ids))
+##faculties = context.portal_catalog(portal_type="Faculty")
+##fac_ids = [f.getId for f in faculties]
+##fac_query = In('faculty',fac_ids)
+##faculties_students = aq_students(fac_query)
+##faculties_student_ids = [s.id for s in faculties_students]
+##set_trace()
+count = 0
+for sid in admitted_ids:
+    if sid not in new_ids:
+        if not count:
+            rwrite('Students with review_state admitted and jamb_reg_no not beginning with 6') 
+        count += 1
+        erg = context.students_catalog(id=sid)
+        if not erg:
+            set_trace()
+            continue
+        student = erg[0]
+        dict = context.getFormattedStudentEntry(student)
+        dict['count'] = count
+        dict['review_state'] = 'admitted'
+        rwrite('"%(count)d","%(id)s","%(name)s","%(jamb_reg_no)s","%(faculty)s","%(entry_mode)s,"%(review_state)s,"%(level)s",' % dict)
+        
+##retcount = 0
+##count = 0
+##newc = 0
+###set_trace()
+##for student in cleared:
+##    erg = context.students_catalog(id=student.getId)
+##    if not erg:
+##        set_trace()
+##        continue
+##    if not erg[0].jamb_reg_no.startswith('6'):
+##        retcount += 1
+##        continue
+##    newc += 1
+##    if not student.getId in special_ids:
+##        count += 1
+####        dict = context.getFormattedStudentEntry(student)
+####        dict['review_state'] = 'unknown'
+####        dict['count'] = count
+####        res = context.portal_catalog(portal_type='Student',id = student.getId)
+####        if res:
+####            rs = dict['review_state'] = res[0].review_state
+####            rwrite('"%(count)d","%(id)s","%(name)s","%(jamb_reg_no)s","%(matric_no)s","%(entry_mode)s,"%(level)s","%(review_state)s"' % dict)
+##rwrite("Cleared not in special: %d" % count)
+##rwrite("Returning students: %d" % retcount)
+##rwrite("New cleared students: %d" % newc)
+rwrite("Finished")
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_188_resolve.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_188_resolve.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_188_resolve.py	(revision 2226)
@@ -0,0 +1,119 @@
+## Script (Python) "ti_188_resolve"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+resolve ticket #188
+"""
+
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+
+def getObject(outer,object):
+    if outer and outer.hasObject(object):
+        return getattr(outer,object)
+    return None
+
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write("%s<br>\n\r" % s)
+
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+roles = member.getRolesInContext(context)
+retcat = context.returning_import
+rcat = context.results_import
+scat = context.students_catalog
+from Products.AdvancedQuery import Eq, Between, Le,In
+aq_students = context.students_catalog.evalAdvancedQuery
+students = context.portal_url.getPortalObject().campus.students
+
+
+if str(member) not in ('admin','joachim'):
+    return
+count = 0
+ok_count = 0
+reg_count = 0
+nyl_count = 0
+wrong_count = 0
+cr_count = 0
+res = scat()
+for sbrain in res:
+    if not sbrain.matric_no:
+        continue
+    if str(sbrain.level) == '100':
+        ec = "new"
+    else:
+        ec = "nor"
+    erg = context.results_import(matric_no=sbrain.matric_no)
+    if erg and erg[0].Level:
+        level_res = erg[0].Level
+        #everdict = erg[0].Verdict
+        level_cc = context.getLevelFromResultsCosCode(erg)
+        #if level_cc == 0:
+            #lc = "-"
+        lc = "%s00" % level_cc
+
+        #verdict,elegible = context.getVerdict(everdict)
+        #if elegible:
+        #    continue
+
+        verdict =  sbrain.verdict
+        if verdict in ('A','B','',):
+            continue
+
+        dict = context.getFormattedStudentEntry(sbrain)
+        dict['level_res'] = lc
+        count += 1
+        dict['count'] = count
+        code = 'xxx'
+        comment = ""
+        dict['review_state'] = ''
+        sres = context.portal_catalog(id = sbrain.id)
+        if sres:
+            dict['review_state'] = sres[0].review_state
+
+        #if sbrain.level == '':
+        #    code = 'nyl'
+        #    nyl_count += 1
+
+        if sbrain.level != lc:
+            code = 'nok'
+            wrong_count += 1
+            student = getObject(students,sbrain.id)
+            study_course = getObject(student,'study_course')
+            level = getObject(study_course,sbrain.level)
+            if level is not None:
+                cr_count += 1
+                if dict['review_state'] in ('courses_registered', 'courses_validated'):
+                    code = 'nok_cr'
+                    reg_count += 1
+                else:
+                    comment = "level %(level)s deleted" % dict
+                    comment = comment + ", level in students_catalog modified to %s" % lc
+                    ##study_course.manage_delObjects((sbrain.level,))
+                    ##context.students_catalog.modifyRecord(id = sbrain.id,level=lc,)
+        else:
+            ok_count += 1
+            code = 'ok'
+        dict['nyl_count'] = nyl_count
+        dict['ok_count'] = ok_count
+        dict['cr_count'] = cr_count
+        dict['reg_count'] = reg_count
+        dict['wrong_count'] = wrong_count
+        dict['code'] = code
+        dict['comment'] = comment
+        rwrite('"%(count)d:%(ok_count)d:%(nyl_count)d:%(wrong_count)d:%(cr_count)d:%(reg_count)d","%(code)s","%(id)s","%(matric_no)s","%(name)s","%(level)s","%(level_res)s","%(review_state)s","%(comment)s"' % dict)
+
+rwrite("total: %(count)d<br> correct: %(ok_count)d<br> wrong: %(wrong_count)d<br> level created: %(cr_count)d<br> courses registered: %(reg_count)d" % dict )
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_229_resolve.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_229_resolve.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_229_resolve.py	(revision 2226)
@@ -0,0 +1,78 @@
+## Script (Python) "ti_229_resolve"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+resolve ticket #229
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+import logging
+#>>>>>>>>>>>>>>>><
+logger = logging.getLogger('Skins.ti_229_resolve')
+# logger.info('already done on  by joachim')
+# return
+#<<<<<<<<<<<<<<<<<
+from Products.AdvancedQuery import Eq, Between, Le,In
+aq_students = context.students_catalog.evalAdvancedQuery
+
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+students = context.portal_url.getPortalObject().campus.students
+#from string import Template
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write("%s<br>\n\r" % s)
+
+logger.info('ti_229 started')
+
+query = In('level',(0,''))
+brains = aq_students(query)
+total = len(brains)
+logger.info('found %d students' % total)
+count = 0
+commit_after = 5
+for brain in brains:
+    try:
+        study_course = getattr(getattr(students,brain.id),'study_course')
+    except:
+        logger.info('study_course of %s not found' % brain.id)
+        continue
+    s_results = context.results_import(matric_no = brain.matric_no)
+    if s_results:
+        lnr = context.getLevelFromResultsCosCode(s_results)
+        level = "%d00" % lnr
+        verdict,eligible = context.getVerdict(s_results[0].Verdict)
+        if eligible:
+            level = "%d00" % (lnr + 1)
+    else:
+        logger.info('matric_no %s not found in results_import' % brain.matric_no)
+        continue
+    count += 1
+
+    study_course.getContent().edit(mapping={'current_level': level,
+                                            'current_verdict': verdict,
+                                           }
+                                  )
+    logger.info('%d of %d changed level/verdict of %s to %s/%s'  % (count,
+                                                                    total,
+                                                                    brain.id,
+                                                                    level,
+                                                                    verdict,
+                                                                   ))
+    if not count % commit_after:
+        context.waeup_tool.doCommit()
+        logger.info("committed %d transactions" % commit_after)
+logger.info('ti_229 finished for %d of %d' % (count,total))
+return
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_231_resolve.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_231_resolve.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_231_resolve.py	(revision 2226)
@@ -0,0 +1,69 @@
+## Script (Python) "ti_231_resolve"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+resolve ticket #231
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+import logging
+#>>>>>>>>>>>>>>>><
+logger = logging.getLogger('Skins.ti_231_resolve')
+# logger.info('already done on  by joachim')
+# return
+#<<<<<<<<<<<<<<<<<
+from Products.AdvancedQuery import Eq, Between, Le,In
+aq_students = context.students_catalog.evalAdvancedQuery
+
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+students = context.portal_url.getPortalObject().campus.students
+#from string import Template
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write("%s<br>\n\r" % s)
+
+logger.info('ti_231 started')
+
+query = In('entry_mode',('DE','UME'))
+brains = aq_students(query)
+total = len(brains)
+logger.info('found %d students' % total)
+count = 0
+commit_after = 5
+for brain in brains:
+    try:
+        application = getattr(getattr(students,brain.id),'application')
+    except:
+        logger.info('application of %s not found' % brain.id)
+        continue
+    count += 1
+    application.getContent().edit(mapping={'entry_mode': '%s_ft' % brain.entry_mode.lower()})
+    try:
+        study_course = getattr(getattr(students,brain.id),'study_course')
+    except:
+        logger.info('study_course of %s not found' % brain.id)
+        continue
+    study_course.getContent().edit(mapping={'current_mode': '%s_ft' % brain.entry_mode.lower()})
+    logger.info('%d of %d changed  modes of %s from %s to %s_ft' % (count,
+                                                                    total,
+                                                                    brain.id,
+                                                                    brain.entry_mode,
+                                                                    brain.entry_mode.lower()
+                                                                   ))
+    if not count % commit_after:
+        context.waeup_tool.doCommit()
+        logger.info("committed %d transactions" % commit_after)
+logger.info('ti_231 finished for %d of %d' % (count,total))
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_294_resolve.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_294_resolve.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_294_resolve.py	(revision 2226)
@@ -0,0 +1,77 @@
+## Script (Python) "findStudentsWithCourses"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+import logging
+logger = logging.getLogger('Skins.ti_294_resolve')
+from Products.AdvancedQuery import Eq, Between, Le,In
+aq_students = context.students_catalog.evalAdvancedQuery
+
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+students = context.portal_url.getPortalObject().campus.students
+#from string import Template
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write("%s<br>\n\r" % s)
+
+#logger.info('')
+
+query = In('registered_courses',('',))
+brains = aq_students(query)
+total = len(brains)
+logger.info('found %d students with empty course_result id' % total)
+count = 0
+commit_after = 5000
+todelete = []
+for brain in brains:
+    level_object = None
+    #
+    #set_trace()
+    try:
+        level_object = getattr(getattr(getattr(students,brain.id),'study_course'),brain.level)
+    except:
+        continue
+    ids = level_object.objectIds()
+    logger.info('ids of %s: %s#%s' % (brain.id,list(ids),brain.registered_courses))
+    if '' in ids:
+        todelete.append((brain.id,level_object))
+        rwrite("appended %s" % (brain.id))
+    else:
+        registered_courses = brain.registered_courses
+        registered_courses.remove('')
+        logger.info('object not found, %s' % registered_courses)
+        # the following line is critical (modifying the catalog in a for brain in brains loop)
+        context.students_catalog.modifyRecord(id=brain.id,registered_courses=registered_courses)
+logger.info('todelete %d' % (len(todelete)))
+for brain_id,level_object in todelete:
+    count += 1
+    #set_trace()
+    try:
+        level_object.manage_delObjects(['',])
+        logger.info('deleted course with empty id of %s' % (brain_id))
+        rwrite("%d: deleted empty id in %s" % (count, level_object.absolute_url()))
+    except:
+        logger.info('could not delete course with empty in of %s' % (level_object.absolute_url()))
+        rwrite("%d: could not delete empty id in %s" % (count, level_object.absolute_url()))
+    if count and not count % commit_after:
+        context.waeup_tool.doCommit()
+        logger.info("committed %d transactions" % commit_after)
+logger.info('finished for %d of %d' % (count,total))
+return
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_306_resolve.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_306_resolve.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_306_resolve.py	(revision 2226)
@@ -0,0 +1,73 @@
+## Script (Python) "ti_306_resolve"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: ti_306_resolve.py 1983 2007-07-04 07:32:36Z henrik $
+"""
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+import logging
+logger = logging.getLogger('Skins.ti_306_resolve')
+from Products.AdvancedQuery import Eq, Between, Le,In,MatchGlob
+aq_pins = context.portal_pins.evalAdvancedQuery
+pins = context.portal_pins()
+scat = context.students_catalog
+
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+students = context.portal_url.getPortalObject().campus.students
+
+#query = Eq('pin','APP')
+#brains = aq_pins(query)
+#total = len(brains)
+#logger.info('found %d APP PINs' % total)
+
+count = 0
+commit_after = 100
+todelete = []
+
+total = len(pins)
+logger.info('started, %d PINs found' % total)
+
+for brain in pins:
+    if not brain.pin.startswith('APP') or not brain.student:
+        continue
+
+    application = None
+    sbrains = scat(jamb_reg_no = brain.student.upper())
+    if len(sbrains)>0:
+        sbrain = sbrains[0]
+    else:
+        logger.info('%s %s' % (brain.pin,brain.student))
+        continue
+    try:
+        application = getattr(getattr(students,sbrain.id),'application')
+    except:
+        logger.info('%s, application does not exist' % (brain.student))
+        continue
+    prefix,batch_no,number = brain.pin[:3],brain.pin[3:-10],brain.pin[-10:]
+    app_doc = application.getContent()
+    if app_doc.app_ac_pin.startswith('APP'):
+        logger.info('%s, %s, %s already shows correct PIN %s (reason: check_admission failed the first time)' % (count, brain.student,sbrain.id,app_doc.app_ac_pin))
+        continue
+    app_doc.edit(mapping={'app_ac_pin' : '%s-%s-%s' % (prefix,batch_no,number)})
+    logger.info('%s, %s, %s, %s-%s-%s replaced' % (count, brain.student,sbrain.id,prefix,batch_no,number))
+    count += 1
+    if count and not count % commit_after:
+        context.waeup_tool.doCommit()
+        logger.info("committed %d transactions" % commit_after)
+logger.info('finished for %d of %d' % (count,total))
+return
+
+
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_311_resolve.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_311_resolve.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_311_resolve.py	(revision 2226)
@@ -0,0 +1,41 @@
+## Script (Python) "findStudentsWithCourses"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+import logging
+logger = logging.getLogger('Skins.ti_311_resolve')
+from Products.AdvancedQuery import Eq, Between, Le,In
+aq_students = context.students_catalog.evalAdvancedQuery
+
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+students = context.portal_url.getPortalObject().campus.students
+#from string import Template
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write("%s<br>\n\r" % s)
+
+#logger.info('')
+
+query = Eq('review_state','courses_registered') & Eq('session','05')
+brains = aq_students(query)
+total = len(brains)
+logger.info('found %d students with session 05 and courses_registered' % total)
+count = 0
+for brain in brains:
+    rwrite('%s , %s ,%s, %s' % (brain.id,brain.jamb_reg_no,brain.matric_no,brain.name))
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_339_resolve.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_339_resolve.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/ti_339_resolve.py	(revision 2226)
@@ -0,0 +1,58 @@
+## Script (Python) "ti_339_resolve"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+        
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+if str(member) not in ('admin','joachim'):
+    return
+    
+            
+import logging
+import DateTime
+logger = logging.getLogger('Skins.ti_339_resolve')
+from Products.AdvancedQuery import Eq, Between, Le,In
+applicants = context.applicants_catalog
+
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write("%s<br>\n\r" % s)
+
+#logger.info('')
+
+brains = applicants()
+total = len(brains)
+course = "BARTMAS"
+edited = 0
+for brain in brains:
+    if brain.course1 == course:
+        data = {}
+        data['reg_no'] = brain.reg_no
+        data['screening_date'] = DateTime.DateTime('2007/09/21')
+        applicants.modifyRecord(**data)
+        edited += 1
+        rwrite('%d: %s,%s,%s,%s' % (edited,
+                                    brain.reg_no,
+                                    brain.course1,
+                                    brain.status,
+                                    brain.email)
+              )
+logger.info("edited %d %s students" % (edited,course))
Index: WAeUP_SRP/trunk_not_used/skins/waeup_utilities/viewimage.py
===================================================================
--- WAeUP_SRP/trunk_not_used/skins/waeup_utilities/viewimage.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/skins/waeup_utilities/viewimage.py	(revision 2226)
@@ -0,0 +1,20 @@
+## Script (Python) "viewimage"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=path
+##title=
+##
+# $Id$
+"""
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+return context.waeup_tool.showFsPicture(path)
+#import logging
+#logger = logging.getLogger('Skins.viewimage')
Index: WAeUP_SRP/trunk_not_used/tests/__init__.py
===================================================================
--- WAeUP_SRP/trunk_not_used/tests/__init__.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/tests/__init__.py	(revision 2226)
@@ -0,0 +1,3 @@
+from Testing.ZopeTestCase import installProduct
+
+installProduct('WAeUP_SRP')
Index: WAeUP_SRP/trunk_not_used/tests/test_tables.py
===================================================================
--- WAeUP_SRP/trunk_not_used/tests/test_tables.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/tests/test_tables.py	(revision 2226)
@@ -0,0 +1,57 @@
+# (C) Copyright 2006 AixtraWare <http://aixtraware.de>
+# Author: Joachim Schmitz <js@aixtraware.de>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# $Id$
+import unittest
+
+from waeuptest import WAeUP_SRPTest
+
+class TestTables(WAeUP_SRPTest):
+    
+    # Test that data does not go away on reinstall
+    def test_install(self):
+        # Make sure the table got installed properly
+        patool = self.portal.portal_accommodation
+        self.failUnlessEqual(patool.meta_type, 'WAeUP Accommodation Tool')
+        self.failUnlessEqual(patool.schema(), ['bed', 'student'])
+        self.failUnlessEqual(patool.indexes(), ['bed', 'student'])
+        
+    def test_add_change_delete(self):
+        patool = self.portal.portal_accommodation
+        
+        # Add
+        uid = patool.addRecord(bed='bed', student='student')
+        result = patool.searchResults({'bed':'bed'})
+        self.failUnlessEqual(len(result), 1)
+        self.failUnlessEqual(result[0].student, 'student')
+        
+        # Change
+        patool.modifyRecord(uid, student='newstudent')
+        result = patool.searchResults({'bed':'bed'})
+        self.failUnlessEqual(len(result), 1)
+        self.failUnlessEqual(result[0].student, 'newstudent')
+        
+        # Delete
+        patool.deleteRecord(uid)
+        result = patool.searchResults({'bed':'bed'})
+        self.failUnlessEqual(len(result), 0)
+    
+
+def test_suite():
+    return unittest.TestSuite((
+        unittest.makeSuite(TestTables),
+        ))
Index: WAeUP_SRP/trunk_not_used/tests/test_test.py
===================================================================
--- WAeUP_SRP/trunk_not_used/tests/test_test.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/tests/test_test.py	(revision 2226)
@@ -0,0 +1,18 @@
+# -*- coding: ISO-8859-15 -*-
+#
+# $Id$
+import unittest
+
+from waeuptest import WAeUP_SRPTest
+
+class TestTesting(WAeUP_SRPTest):
+        
+    def testTest(self):
+        self.failUnless('AcademicsFolder' in 
+            self.portal.portal_types.objectIds(),
+            "No AcademicsFolder type")
+
+def test_suite():
+    return unittest.TestSuite((
+        unittest.makeSuite(TestTesting),
+        ))
Index: WAeUP_SRP/trunk_not_used/tests/test_vocabularies.py
===================================================================
--- WAeUP_SRP/trunk_not_used/tests/test_vocabularies.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/tests/test_vocabularies.py	(revision 2226)
@@ -0,0 +1,27 @@
+# -*- coding: ISO-8859-15 -*-
+#
+# $Id$
+import unittest
+
+from waeuptest import WAeUP_SRPTest
+
+from Products.CMFCore.utils import getToolByName
+
+class TestVocabularies(WAeUP_SRPTest):
+    
+    def afterSetUp(self):
+        wftool = getToolByName(self.portal, 'portal_workflow')
+        af = self.portal.campus.academics
+        wftool.invokeFactoryFor(af, 'Faculty', 'fac1')
+        fac1 = af.fac1
+        wftool.invokeFactoryFor(fac1, 'Department', 'dep1')
+        
+    
+    def test_departmentVoc(self):
+        deps = self.portal.get_departments_voc()
+        
+
+def test_suite():
+    return unittest.TestSuite((
+        unittest.makeSuite(TestVocabularies),
+        ))
Index: WAeUP_SRP/trunk_not_used/tests/waeuptest.py
===================================================================
--- WAeUP_SRP/trunk_not_used/tests/waeuptest.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/tests/waeuptest.py	(revision 2226)
@@ -0,0 +1,14 @@
+# -*- coding: ISO-8859-15 -*-
+#
+# $Id$
+
+from Products.CPSDefault.tests.CPSTestCase import CPSTestCase
+from Products.CPSDefault.tests.CPSTestCase import ExtensionProfileLayerClass
+
+class LayerClass(ExtensionProfileLayerClass):
+    extension_ids = ('WAeUP_SRP:default',)
+
+WAeUP_SRPLayer = LayerClass(__name__, 'WAeUP_SRPLayer')
+
+class WAeUP_SRPTest(CPSTestCase):
+    layer = WAeUP_SRPLayer
Index: WAeUP_SRP/trunk_not_used/upgrade.py
===================================================================
--- WAeUP_SRP/trunk_not_used/upgrade.py	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/upgrade.py	(revision 2226)
@@ -0,0 +1,20 @@
+# $Id$
+
+# Upgrade steps
+
+old_tool_id = 'portal_accomodation'
+
+def rename_accommodation_tool(portal):
+    required = portal.portal_setup._toolset_registry._required
+    if required.has_key(old_tool_id):
+        del required[old_tool_id]
+    if old_tool_id in portal.objectIds():
+        portal.manage_delObjects([old_tool_id])
+        
+def check_accommodation_tool(portal):
+    required = portal.portal_setup._toolset_registry._required
+    key = 'Products.WAeUP_SRP.WAeUPTables.AccomodationTable'
+    if required.has_key(old_tool_id) or old_tool_id in portal.objectIds():
+        return True
+    return False
+ 
Index: WAeUP_SRP/trunk_not_used/upgrade.zcml
===================================================================
--- WAeUP_SRP/trunk_not_used/upgrade.zcml	(revision 2226)
+++ WAeUP_SRP/trunk_not_used/upgrade.zcml	(revision 2226)
@@ -0,0 +1,11 @@
+<configure
+    xmlns="http://namespaces.zope.org/zope"
+    xmlns:cps="http://namespaces.nuxeo.org/cps">
+
+  <cps:upgradeStep
+      title="Rename Accommodation tool"
+      handler=".upgrade.rename_accommodation_tool"
+      checker=".upgrade.check_accommodation_tool"
+      />
+
+</configure>
