Index: waeup_product/trunk/Extensions/install.py
===================================================================
--- waeup_product/trunk/Extensions/install.py	(revision 138)
+++ waeup_product/trunk/Extensions/install.py	(revision 139)
@@ -1,6 +1,7 @@
 #-*- mode: python; mode: fold -*-
 # $Id$
+from Products.ExternalMethod.ExternalMethod import ExternalMethod
 from Products.CPSInstaller.CPSInstaller import CPSInstaller
-from Products.CMFCore.CMFCorePermissions import View, ModifyPortalContent
+from Products.CMFCore.CMFCorePermissions import View, ModifyPortalContent,AccessContentsInformation
 from Products.WAeUP.WAeUPPermissions import UniversityManage, StudentManage,FacultyManage,\
                                             DepartmentManage,CourseManage
@@ -18,4 +19,7 @@
 from Products.WAeUP.Students import addStudentsFolder
 
+SRPP_ID = "demouni"
+SRPP_TITLE = "Demo University"
+
 class WAeUPInstaller(CPSInstaller):
     """
@@ -26,7 +30,12 @@
     def install(self,portal):
         "install"
+        log = []
+        prlog = log.append
+        
+        def pr(msg, prlog=prlog):
+            prlog('%s<br>' % msg)
 
         product_name = self.product_name
-        self.log("Starting %(product_name)s install" % vars() )
+        pr("Starting %(product_name)s install" % vars() )
 
         # Roles and Permissions ###(
@@ -64,6 +73,35 @@
         }
         self.setupPortalPermissions(waeup_perms)
-
-###)
+        ###)
+
+        # external methods ###(
+        #
+        ext_methods = ( { 'id': 'waeup_migrate',
+                          'title': 'WAeUP (migrate from an earlier version)',
+                          'script': 'WAeUP.install',
+                          'method': 'migrate',
+                          'protected': 1,
+                        },
+                      )
+        portal_objectIds = portal.objectIds()
+        for meth in ext_methods:
+            method = meth['id']
+            if method in portal_objectIds:
+                portal._delObject(method)
+            pr('Creating %s External Method' % method)
+            ext_method = ExternalMethod(method,
+                                        meth['title'],
+                                        meth['script'],
+                                        meth['method'])
+            portal._setObject(method, ext_method)
+            if method in portal_objectIds:
+                manage_perms = portal[method].manage_permission
+                if meth['protected']:
+                    pr("Protecting %s" % method)
+                    manage_perms(View, roles=['Manager'], acquire=0)
+                    manage_perms(AccessContentsInformation, roles=['Manager'], acquire=0)
+                else:
+                    manage_perms(View, roles=['Manager'], acquire=1)
+        ###)
 
         ##########################################
@@ -142,8 +180,10 @@
         # main_tab actions ###(
         ##########################################
+        path = "/sections/%(SRPP_ID)s" % globals()  
         actions = ( { 'tool'      : 'portal_actions',
                         'id'        : 'student_administration',
                         'name'      : 'Students',
-                        'action'    : 'string:$folder_url/students',
+                        #'action'    : 'string:$folder_url/students',
+                        'action'    : 'string:$portal_url%(path)s/students' % vars(),
                         'permission': (View, ),
                         'category'  : 'main_tabs',
@@ -153,6 +193,7 @@
                         'id'        : 'Academics',
                         'name'      : 'Academics',
-                        #'action'    : 'string:${portal_url}/sections/waeup/academics/academics_view',
-                        'action'    : 'string:$folder_url/academics',
+                        'action'    : 'string:$portal_url%(path)s/academics' % vars(),
+                        #'action'    : 'string:${portal_url}/sections/unidemo',
+                        #'action'    : 'string:$folder_url/academics',
                         'permission': (View ),
                         'category'  : 'main_tabs',
@@ -162,6 +203,6 @@
                         'id'        : 'accomodation',
                         'name'      : 'Accommodation',
+                        'action'    : 'string:$portal_url%(path)s/accommodation' % vars(),
                         #'action'    : 'string:${portal_url}/sections/waeup/accommodation/accommodation_index_html',
-                        'action'    : 'string:$folder_url/accommodation',
                         'permissions': (View),
                         #'permissions': (ModifyPortalContent,UniversityManage,StudentManage),
@@ -230,5 +271,5 @@
         # skins
         ##########################################
-        self.log("Verifying %(product_name)s skinss" % vars())
+        pr("Verifying %(product_name)s skinss" % vars())
         wskins = { 'waeup_default' : 'Products/WAeUP/skins/waeup_default',
                    'waeup_faculty' : 'Products/WAeUP/skins/waeup_faculty',
@@ -238,4 +279,35 @@
         self.resetSkinCache()
 
+        # Themes ###(
+        #
+        # Importing portal themes
+##        theme_container = getattr(portal, 'portal_themes')
+##            # the first theme in each category is the default theme.
+##        themes_list = {'WAeUP':    ({'id': 'waeup_plain_theme',
+##                                  'file': 'waeup_plain_theme.zexp',
+##                                  },
+##                                  {'id': 'waeup_management_theme',
+##                                   'file': 'waeup_management_theme.zexp',
+##                                  },
+##                                 ),
+##                      }
+##    
+##
+##        theme_ids = theme_container.objectIds()
+##        theme_container.manage_delObjects(theme_ids)
+##        target_themes = themes_list[Target]
+##        for theme in target_themes:
+##            pr(" Importing %s theme" % theme['id'])
+##            zexppath = os.path.join(zexpdir, theme['file'])
+##            try:
+##                theme_container._importObjectFromFile(zexppath)
+##            except:
+##                pr("    Could not import theme  %s" % theme['id'])
+##
+##        # set the first theme in the list as the default one.
+##        theme_container.setDefaultTheme(target_themes[0]['id'])
+###)
+    
+        
         ##########################################
         # portal types
@@ -247,20 +319,20 @@
         # Schemas
         ##########################################
-        self.log("Verifying %(product_name)s schemas" % vars())
+        pr("Verifying %(product_name)s schemas" % vars())
         self.verifySchemas(portal.getWAeUPSchemas())
         ##########################################
         # widgets
         ##########################################
-        self.log("Verifying %(product_name)s widgets" % vars())
+        pr("Verifying %(product_name)s widgets" % vars())
         self.verifyWidgets(portal.getWAeUPWidgets())
         ##########################################
         # layouts
         ##########################################
-        self.log("Verifying %(product_name)s layouts" % vars())
+        pr("Verifying %(product_name)s layouts" % vars())
         self.verifyLayouts(portal.getWAeUPLayouts())
         ##########################################
         # Vocabularies
         ##########################################
-        self.log("Verifying %(product_name)s vocabularies" % vars())
+        pr("Verifying %(product_name)s vocabularies" % vars())
         self.verifyVocabularies(portal.getWAeUPVocabularies())
         ##########################################
@@ -271,5 +343,6 @@
         self.verifyWorkflowAssociation()
 
-        self.log("End of specific %(product_name)s install" % vars())
+        pr("End of specific %(product_name)s install" % vars())
+        #return '\n'.join(log)
         self.finalize()
 
@@ -329,22 +402,38 @@
     #groups.manage_setLocalGroupRoles(groupid = 'Students',roles=('Contributor',))
     sections = getattr(self,'sections')
-    waeup = getattr(sections,'waeup',None)
+    waeup = getattr(sections,SRPP_ID,None)
     if not waeup:
-        sections.content_create(type_name='University',title='waeup')
-        sections.waeup.folder_localrole_add(member_ids=('group:Students',),
+        sections.invokeFactory('University',SRPP_ID)
+        waeup = getattr(sections,SRPP_ID)
+        waeup.getContent().edit(mapping={'Title':SRPP_TITLE})
+        waeup.folder_localrole_add(member_ids=('group:Students',),
                                             member_role='SectionReviewer',
                                             )
-        sections.waeup.content_create(type_name='StudentsFolder',title='students')
-        sections.waeup.folder_localrole_add(member_ids=('group:Students',),
+        waeup.invokeFactory('StudentsFolder','students')
+        students = getattr(waeup,'students').getContent()
+        students.edit(mapping={'Title':'Students'})
+        waeup.folder_localrole_add(member_ids=('group:Students',),
                                             member_role='SectionReviewer',
                                             )
-        sections.waeup.content_create(type_name='AcademicsFolder',title='academics')
+##        waeup.content_create(type_name='AcademicsFolder',title='academics')
 ##        sections.waeup.folder_localrole_add(member_ids=('group:StudentManager',),
 ##                                            member_role='SectionManager',
 ##                                            )
-        sections.waeup.students.manage_setLocalGroupRoles(groupid = 'Students',roles=('Contributor',))
-    elif not hasattr(waeup,'academics'):
-        waeup.content_create(type_name='AcademicsFolder',title='academics')
-    sections.waeup.manage_setLocalGroupRoles(groupid = 'role:Anonymous',roles=('SectionReader',))
+        waeup.students.manage_setLocalGroupRoles(groupid = 'Students',roles=('Contributor',))
+        waeup.invokeFactory('AcademicsFolder','academics', title='Academics')
+        academics = getattr(waeup,'academics').getContent()
+        academics.edit(mapping={'Title':'Academics'})
+        waeup.invokeFactory('AccoFolder','accommodation', title='Accommodation')
+        accommodation = getattr(waeup,'accommodation').getContent()
+        accommodation.edit(mapping={'Title':'Accommodation'})
+    if not hasattr(waeup,'academics'):
+        waeup.invokeFactory('AcademicsFolder','academics')
+        academics = getattr(waeup,'academics').getContent()
+        academics.edit(mapping={'Title':'Academics'})
+    if not hasattr(waeup,'accommodation'):
+        waeup.invokeFactory('AccoFolder','accommodation')
+        accommodation = getattr(waeup,'accommodation').getContent()
+        accommodation.edit(mapping={'Title':'Accommodation'})
+    waeup.manage_setLocalGroupRoles(groupid = 'role:Anonymous',roles=('SectionReader',))
     # portlets ###(
     #
@@ -395,2 +484,35 @@
 
     return installer.logResult()
+
+def migrate(self):
+    "update data"
+    log = []
+    prlog = log.append
+
+    def pr(msg, prlog=prlog):
+        prlog('%s<br>' % msg)
+
+    sections = getattr(self,'sections')
+    waeup = getattr(sections,'waeup',None)
+    pr( "Start migrate")
+    pr("migrating courses")
+    for fac in [getattr(waeup,f.id) for f in waeup.contentValues(filter={'portal_type': ('Faculty',)})]:
+        pr("Faculty: %s" % fac.title_or_id())
+        for dep in [getattr(fac,d.id) for d in fac.contentValues(filter={'portal_type': ('Department',)})]:
+            pr("Department: %s" % dep.title_or_id())
+            for course in [getattr(dep,c.id) for c in dep.contentValues(filter={'portal_type': ('Course',)})]:
+                pr("Course: %s" % course.title_or_id())
+                content = course.getContent()
+                heading = getattr(content,'heading',course.id)
+                pr("heading = %(heading)s" % vars())
+                content.edit(mapping={'Title': heading})
+    pr("migrating halls")
+    for ac in [getattr(waeup,a.id) for a in waeup.contentValues(filter={'portal_type': ('AccoFolder',)})]:
+        for hall in [getattr(ac,h.id) for h in ac.contentValues(filter={'portal_type': ('Accommodation',)})]:
+            pr("Hall: %s" % hall.title_or_id())
+            content = hall.getContent()
+            heading = getattr(content,'heading',hall.id)
+            pr("heading = %(heading)s" % vars())
+            content.edit(mapping={'Title': heading})
+    return '\n'.join(log)
+                
Index: waeup_product/trunk/Faculty.py
===================================================================
--- waeup_product/trunk/Faculty.py	(revision 138)
+++ waeup_product/trunk/Faculty.py	(revision 139)
@@ -101,34 +101,4 @@
     'allowed_content_types': ('Course',),
     'allow_discussion': False,
-##    'actions': (
-##         {'id': 'view',
-##          'name': 'action_view',
-##          'action': 'string:${object_url}/department_index_html',
-##          'condition': '',
-##          'permission': ('View',),
-##          'category': 'object',
-##          'visible': True,},
-##         {'id': 'new_content',
-##          'name': 'Add Data',
-##          'action': 'string:${object_url}/folder_factories',
-##          'condition': "python:1 or len(object.contentItems()) == 0 ",
-##          'permission': ('Modify portal content',),
-##          'category': 'object',
-##          'visible': True,},
-##         {'id': 'contents',
-##          'name': 'action_folder_contents',
-##          'action': 'string:${object_url}/folder_contents',
-##          'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",
-##          'permission': ('Modify portal content',),
-##          'category': 'object',
-##          'visible': True,},
-##         {'id': 'edit',
-##          'name': 'action_edit',
-##          'action': 'string:${object_url}/cpsdocument_edit_form',
-##          'condition': '',
-##          'permission': ('Modify portal content',),
-##          'category': 'object',
-##          'visible': True,},
-##    )
 }
 ###)
@@ -161,34 +131,4 @@
     'allowed_content_types': (),
     'allow_discussion': False,
-##    'actions': (
-##         {'id': 'view',
-##          'name': 'action_view',
-##          'action': 'string:${object_url}/course_index_html',
-##          'condition': '',
-##          'permission': ('View',),
-##          'category': 'object',
-##          'visible': True,},
-##         {'id': 'new_content',
-##          'name': 'Add Data',
-##          'action': 'string:${object_url}/folder_factories',
-##          'condition': "python:1 or len(object.contentItems()) == 0 ",
-##          'permission': ('Modify portal content',),
-##          'category': 'object',
-##          'visible': True,},
-##         {'id': 'contents',
-##          'name': 'action_folder_contents',
-##          'action': 'string:${object_url}/folder_contents',
-##          'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",
-##          'permission': ('Modify portal content',),
-##          'category': 'object',
-##          'visible': True,},
-##         {'id': 'edit',
-##          'name': 'action_edit',
-##          'action': 'string:${object_url}/cpsdocument_edit_form',
-##          'condition': '',
-##          'permission': ('Modify portal content',),
-##          'category': 'object',
-##          'visible': True,},
-##    )
 }
 ###)
@@ -209,2 +149,32 @@
     return CPSBase_adder(container, ob, REQUEST=REQUEST)
 ###)
+
+course_ticket_fti = { ###(
+    'title': 'WAeUP CourseTicket',
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'CourseTicket',
+    'factory': 'addCourseTicket',
+    'immediate_view': 'cpsdocument_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': (),
+    'allow_discussion': False,
+}
+###)
+
+class CourseTicket(CPSDocument): ###(
+    """
+    WAeUP CourseTicket  
+    """
+    meta_type = 'CourseTicket'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+    
+InitializeClass(CourseTicket)
+
+def addCourseTicket(container, id, REQUEST=None, **kw):
+    """Add a CourseTicket."""
+    ob = CourseTicket(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+###)
Index: waeup_product/trunk/Students.py
===================================================================
--- waeup_product/trunk/Students.py	(revision 138)
+++ waeup_product/trunk/Students.py	(revision 139)
@@ -39,35 +39,4 @@
     'allowed_content_types': ('Jamb','StudentPersonal'),
     'allow_discussion': False,
-##    'actions': (
-##         {'id': 'view',
-##          'name': 'action_view',
-##          'action': 'string:${object_url}/student_index_html',
-##          #'action': 'string:${object_url}/cpsdocument_view',
-##          'condition': '',
-##          'permission': ('View',),
-##          'category': 'object',
-##          'visible': True,},
-##         {'id': 'new_content',
-##          'name': 'Add Data',
-##          'action': 'string:${object_url}/folder_factories',
-##          'condition': "python:1 or len(object.contentItems()) == 0 ",
-##          'permission': ('Modify portal content',),
-##          'category': 'object',
-##          'visible': True,},
-##         {'id': 'contents',
-##          'name': 'action_folder_contents',
-##          'action': 'string:${object_url}/folder_contents',
-##          'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",
-##          'permission': ('Modify portal content',),
-##          'category': 'object',
-##          'visible': True,},
-##         {'id': 'edit',
-##          'name': 'action_edit',
-##          'action': 'string:${object_url}/cpsdocument_edit_form',
-##          'condition': '',
-##          'permission': ('Modify portal content',),
-##          'category': 'object',
-##          'visible': True,},
-##    )
 }
 
@@ -82,4 +51,10 @@
     security = ClassSecurityInfo()
     
+    security.declareProtected(View,"getTitle")
+    def getTitle(self):
+        """compose title"""
+        content = self.PERSONAL.getContent()
+        return "%s %s" % (content.firstname,content.lastname)
+        
 InitializeClass(Student)
 
@@ -102,35 +77,4 @@
     'allowed_content_types': (),
     'allow_discussion': False,
-##    'actions': (
-##         {'id': 'view',
-##          'name': 'action_view',
-##          'action': 'string:${object_url}/student_index_html',
-##          #'action': 'string:${object_url}/cpsdocument_view',
-##          'condition': '',
-##          'permission': ('View',),
-##          'category': 'object',
-##          'visible': True,},
-##         {'id': 'new_content',
-##          'name': 'Add Data',
-##          'action': 'string:${object_url}/folder_factories',
-##          'condition': "python:1 or len(object.contentItems()) == 0 ",
-##          'permission': ('Modify portal content',),
-##          'category': 'object',
-##          'visible': True,},
-##         {'id': 'contents',
-##          'name': 'action_folder_contents',
-##          'action': 'string:${object_url}/folder_contents',
-##          'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",
-##          'permission': ('Modify portal content',),
-##          'category': 'object',
-##          'visible': True,},
-##         {'id': 'edit',
-##          'name': 'action_edit',
-##          'action': 'string:${object_url}/cpsdocument_edit_form',
-##          'condition': '',
-##          'permission': ('Modify portal content',),
-##          'category': 'object',
-##          'visible': True,},
-##    )
 }
 
@@ -165,34 +109,4 @@
     'allowed_content_types': ('Course',),
     'allow_discussion': False,
-##    'actions': (
-##         {'id': 'view',
-##          'name': 'action_view',
-##          'action': 'string:${object_url}/jamb_index_html',
-##          'condition': '',
-##          'permission': ('View',),
-##          'category': 'object',
-##          'visible': True,},
-##         {'id': 'new_content',
-##          'name': 'Add Data',
-##          'action': 'string:${object_url}/folder_factories',
-##          'condition': "python:1 or len(object.contentItems()) == 0 ",
-##          'permission': ('Modify portal content',),
-##          'category': 'object',
-##          'visible': True,},
-##         {'id': 'contents',
-##          'name': 'action_folder_contents',
-##          'action': 'string:${object_url}/folder_contents',
-##          'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",
-##          'permission': ('Modify portal content',),
-##          'category': 'object',
-##          'visible': True,},
-##         {'id': 'edit',
-##          'name': 'action_edit',
-##          'action': 'string:${object_url}/cpsdocument_edit_form',
-##          'condition': '',
-##          'permission': ('Modify portal content',),
-##          'category': 'object',
-##          'visible': True,},
-##    )
 }
 ###)
@@ -214,2 +128,62 @@
 ###)
 
+study_level_fti = { ###(
+    'title': 'WAeUP StudyLevel',
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'StudyLevel',
+    'factory': 'addStudyLevel',
+    'immediate_view': 'cpsdocument_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': ('Course',),
+    'allow_discussion': False,
+}
+###)
+
+class StudyLevel(CPSDocument): ###(
+    """
+    WAeUP StudyLevel containing the courses and students
+    """
+    meta_type = 'StudyLevel'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+    
+InitializeClass(StudyLevel)
+
+def addStudyLevel(container, id, REQUEST=None, **kw):
+    """Add a StudyLevel."""
+    ob = StudyLevel(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+###)
+
+semester_fti = { ###(
+    'title': 'WAeUP Semester',
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'Semester',
+    'factory': 'addSemester',
+    'immediate_view': 'cpsdocument_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': ('Course',),
+    'allow_discussion': False,
+}
+###)
+
+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)
+###)
+
Index: waeup_product/trunk/University.py
===================================================================
--- waeup_product/trunk/University.py	(revision 138)
+++ waeup_product/trunk/University.py	(revision 139)
@@ -14,5 +14,5 @@
 #
 
-class University(BaseBTreeFolder):
+class University(CPSDocument):
     """
     Container for the various WAeUP containers 
@@ -22,4 +22,10 @@
     security = ClassSecurityInfo()
         
+    security.declarePublic('waeup_url')
+    def waeup_url(self):
+        """ return the base_url"""
+        return "%s/sections/waeup" % self.portal_url
+        return self.REQUEST
+    
 InitializeClass(University)
 
Index: waeup_product/trunk/__init__.py
===================================================================
--- waeup_product/trunk/__init__.py	(revision 138)
+++ waeup_product/trunk/__init__.py	(revision 139)
@@ -15,4 +15,6 @@
        Students.studentpersonal_fti,
        Students.jamb_fti,
+       Students.study_level_fti,
+       Students.semester_fti,
        Accommodation.accofolder_fti,
        Accommodation.accommodation_fti,
@@ -20,4 +22,5 @@
        Faculty.department_fti,
        Faculty.course_fti,
+       Faculty.course_ticket_fti,
       )
 
@@ -27,4 +30,6 @@
                   Students.StudentPersonal,
                   Students.Jamb,
+                  Students.StudyLevel,
+                  Students.Semester,
                   Accommodation.AccoFolder,
                   Accommodation.Accommodation,
@@ -32,4 +37,5 @@
                   Faculty.Department,
                   Faculty.Course,
+                  Faculty.CourseTicket,
                  )
 
@@ -38,10 +44,13 @@
                        Students.addStudent,
                        Students.addStudentPersonal,
+                       Students.addJamb,
+                       Students.addStudyLevel,
+                       Students.addSemester,
                        Accommodation.addAccommodation,
                        Accommodation.addAccoFolder,
-                       Students.addJamb,
                        Faculty.addFaculty,
                        Faculty.addDepartment,
                        Faculty.addCourse,
+                       Faculty.addCourseTicket,
                        )
 
Index: waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py
===================================================================
--- waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py	(revision 138)
+++ waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py	(revision 139)
@@ -178,26 +178,4 @@
 ##            },
 ##        },
-##        'jamb_pin_usage': {
-##            'type': 'Int Widget',
-##            'data': {
-##                'title': 'Jamb Pin usage',
-##                'fields': ('jamb_pin_usage',),
-##                'is_required': False,
-##                'label': 'Nr of Cardusage',
-##                'label_edit': 'Nr of Cardusage',
-##                'description': '',
-##                'help': 'How many times has the scratchcard been used',
-##                'is_i18n': False,
-##                'readonly_layout_modes': (),
-##                'hidden_layout_modes': (),
-##                'hidden_readonly_layout_modes': (),
-##                'hidden_empty': False,
-##                'hidden_if_expr': '',
-##                'css_class': '',
-##                'widget_mode_expr': '',
-##                'display_width': 2,
-##                'size_max': 2,
-##            },
-##        },
         'faculty': {
             'type': 'String Widget',
@@ -228,8 +206,8 @@
         'ncols': 1,
         'rows': [
-            [{'widget_id': 'jamb_is_admitted', 'ncols': 1},],
+            #[{'widget_id': 'jamb_is_admitted', 'ncols': 1},],
             #[{'widget_id': 'jamb_where_admitted', 'ncols': 1},],
             #[{'widget_id': 'jamb_pin_usage', 'ncols': 1},],
-            [{'widget_id': 'faculty', 'ncols': 1},],
+            #[{'widget_id': 'faculty', 'ncols': 1},],
         ]
     },
@@ -508,63 +486,4 @@
             [{'widget_id': 'sc_pin', 'ncols': 1},],
             [{'widget_id': 'jamb_id', 'ncols': 1},],
-        ]
-    },
-}
-###)
-
-accobook = { ###(
-    'widgets': {
-        'sc_id': {
-            'type': 'String Widget',
-            'data': {
-                'title': 'SC ID',
-                'fields': ('accommodation_sc_id',),
-                'is_required': False,
-                'label': 'Card Serial Number ',
-                'label_edit': 'Card Serial Number',
-                'description': 'Card Serial Number ',
-                'help': 'This can be found on the bottom right of the reverse side of your Scratch Card',
-                'is_i18n': False,
-                'readonly_layout_modes': (),
-                'hidden_layout_modes': (),
-                'hidden_readonly_layout_modes': (),
-                'hidden_empty': False,
-                'hidden_if_expr': 'python:1',
-                'css_class': '',
-                'widget_mode_expr': '',
-                'display_width': 10,
-                'size_max': 0,
-            },
-        },
-        'sc_pin': {
-            'type': 'Scratchcard Pin Widget',
-            'data': {
-                'title': 'SC Pin',
-                'fields': ('accommodation_sc_pin'),
-                'is_required': True,
-                'label': 'enter an Accommodation PIN',
-                'label_edit': 'enter an Accommodation PIN',
-                'description': '',
-                'help': 'Please enter a PIN valid for Accomodation booking',
-                'is_i18n': False,
-                'readonly_layout_modes': (),
-                'hidden_layout_modes': (),
-                'hidden_readonly_layout_modes': (),
-                'hidden_empty': False,
-                'hidden_if_expr': '',
-                'css_class': '',
-                'widget_mode_expr': '',
-                'display_width': 10,
-                'size_max': 10,
-            },
-        },
-    },
-   'layout': {
-        'style_prefix': 'layout_accobook_',
-        'flexible_widgets': (),
-        'ncols': 1,
-        'rows': [
-            #[{'widget_id': 'sc_id', 'ncols': 1},],
-            [{'widget_id': 'sc_pin', 'ncols': 1},],
         ]
     },
@@ -905,7 +824,8 @@
          'data': {
                 'fields': ['heading'],
-                'level': 1,
+                'level': 2,
                 'is_i18n': 0,
                 'is_required': 1,
+                'label': 'Title',
                 'label_edit': 'Title',
                 'help': 'Course Title',
@@ -914,4 +834,5 @@
             },
         },
+        'title': Title,
         'text': Text,
         'level': {
@@ -1000,4 +921,5 @@
         'rows': [
             [{'widget_id': 'heading', 'ncols': 1},],
+            [{'widget_id': 'title', 'ncols': 1},],
             [{'widget_id': 'text', 'ncols': 1},],
             [{'widget_id': 'level', 'ncols': 1},],
@@ -1011,4 +933,63 @@
 ###)
 
+course_results = { ###(
+    'widgets': {
+        'points': {
+            'type': 'Int Widget',
+            'data': {
+                'title': '',
+                'fields': ('points',),
+                'is_required': False,
+                'label': 'Points',
+                'label_edit': 'Points',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': '',
+                'css_class': '',
+                'widget_mode_expr': '',
+                'display_width': 3,
+                'size_max': 3,
+            },
+        },
+        'grade': {
+            'type': 'String Widget',
+            'data': {
+                'title': '',
+                'fields': ('grade'),
+                'is_required': False,
+                'label': 'Grade',
+                'label_edit': 'Grade',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': '',
+                'css_class': '',
+                'widget_mode_expr': '',
+                'display_width': 2,
+                'size_max': 1,
+            },
+        },
+    },
+   'layout': {
+        'style_prefix': 'layout_default_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            [{'widget_id': 'points', 'ncols': 1},],
+            [{'widget_id': 'grade', 'ncols': 1},],
+        ]
+    },
+}
+###)
+
 accommodation = { ###(
     'widgets': {
@@ -1017,7 +998,8 @@
          'data': {
                 'fields': ['heading'],
-                'level': 1,
+                'level': 2,
                 'is_i18n': 0,
                 'is_required': 1,
+                'label': 'Hall Name',
                 'label_edit': 'Hall Name',
                 'help': '',
@@ -1026,4 +1008,5 @@
             },
         },
+        'title': Title,
         'text': Text,
         'which_sex': {
@@ -1118,4 +1101,5 @@
         'rows': [
             [{'widget_id': 'heading', 'ncols': 1},],
+            [{'widget_id': 'title', 'ncols': 1},],
             [{'widget_id': 'text', 'ncols': 1},],
             [{'widget_id': 'which_sex', 'ncols': 1},],
@@ -1125,4 +1109,63 @@
             [{'widget_id': 'beds_per_room', 'ncols': 1},],
             [{'widget_id': 'beds_assigned', 'ncols': 1},],
+        ]
+    },
+}
+###)
+
+accobook = { ###(
+    'widgets': {
+        'sc_id': {
+            'type': 'String Widget',
+            'data': {
+                'title': 'SC ID',
+                'fields': ('accommodation_sc_id',),
+                'is_required': False,
+                'label': 'Card Serial Number ',
+                'label_edit': 'Card Serial Number',
+                'description': 'Card Serial Number ',
+                'help': 'This can be found on the bottom right of the reverse side of your Scratch Card',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': 'python:1',
+                'css_class': '',
+                'widget_mode_expr': '',
+                'display_width': 10,
+                'size_max': 0,
+            },
+        },
+        'sc_pin': {
+            'type': 'Scratchcard Pin Widget',
+            'data': {
+                'title': 'SC Pin',
+                'fields': ('accommodation_sc_pin'),
+                'is_required': True,
+                'label': 'enter an Accommodation PIN',
+                'label_edit': 'enter an Accommodation PIN',
+                'description': '',
+                'help': 'Please enter a PIN valid for Accomodation booking',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': '',
+                'css_class': '',
+                'widget_mode_expr': '',
+                'display_width': 10,
+                'size_max': 10,
+            },
+        },
+    },
+   'layout': {
+        'style_prefix': 'layout_accobook_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            #[{'widget_id': 'sc_id', 'ncols': 1},],
+            [{'widget_id': 'sc_pin', 'ncols': 1},],
         ]
     },
Index: waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py
===================================================================
--- waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py	(revision 138)
+++ waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py	(revision 139)
@@ -295,4 +295,21 @@
 
 
+###)
+
+course_results_schema = { ###(
+     'points': {
+        'type': 'CPS Int Field',
+        'data': {
+            'is_searchabletext': 0,
+        },
+    },
+     'grade': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': 0,
+        },
+    },
+}
+#
 ###)
 
@@ -464,4 +481,5 @@
 schemas['students'] = students_folder_schema
 schemas['student'] = student_schema
+schemas['course_results'] = course_results_schema
 schemas['student_personal'] = student_personal_schema
 schemas['accommodation'] = accommodation
Index: waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py
===================================================================
--- waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py	(revision 138)
+++ waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py	(revision 139)
@@ -26,5 +26,5 @@
     'cps_proxy_type': 'folder',
     'schemas': ['metadata', 'common', 'folder'],
-    'layouts': ['common', 'university'],
+    'layouts': ['waeup_common'],
     'layout_clusters': ['metadata:metadata'],
     'cps_section_wf': 'waeup_section_wf',
@@ -90,5 +90,5 @@
     'cps_proxy_type': 'folder',
     'schemas': ['metadata', 'common', 'folder'],
-    'layouts': ['waeup_common','folder'],
+    'layouts': ['waeup_common',],
     'layout_clusters': ['metadata:metadata'],
     'cps_section_wf': 'waeup_section_wf',
@@ -122,4 +122,9 @@
                 'condition':  'object/portal_membership/isAnonymousUser',
                 'permission': (View,)},
+                {'id': 'edit',
+                 'name': 'action_edit',
+                 'action': 'cpsdocument_edit_form',
+                 'condition': "python:member and 'Manager' in member.getRoles()",
+                 'permissions': (ModifyPortalContent,UniversityManage,)},
                 {
                 'id': 'localroles',
@@ -196,11 +201,11 @@
     'product': 'WAeUP',
     'factory': 'addStudent',
-    'immediate_view': 'cpsdocument_view',
-    'global_allow': True,
-    'filter_content_types': True,
-    'allowed_content_types': ('Jamb','StudentPersonal'),
-    'allow_discussion': False,
-    'cps_is_searchable': True,
-    'cps_proxy_type': 'document',
+    'immediate_view': 'folder_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': ('Jamb','StudentPersonal','StudyLevel'),
+    'allow_discussion': False,
+    'cps_is_searchable': True,
+    'cps_proxy_type': 'folder',
     'cps_display_as_document_in_listing': True,
     'schemas': ['metadata','common','student'],
@@ -239,4 +244,10 @@
           'name'      : 'Personal Data',
           'action'    : 'string:${object/absolute_url}/PERSONAL',
+          'condition':  '',
+          'permission': (ModifyPortalContent,)},
+          {
+          'id'        : 'study_level',
+          'name'      : 'Register for next Level',
+          'action'    : 'string:${object/absolute_url}/register_level',
           'condition':  '',
           'permission': (ModifyPortalContent,)},
@@ -409,4 +420,153 @@
 ###)
 
+study_level_folder = { ###(
+    'title': 'WAeUP Study Level Folder',
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'Level',
+    'product': 'WAeUP',
+    'factory': 'addLevelFolder',
+    'immediate_view': 'folder_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': ('Semester',),
+    'allow_discussion': False,
+    'cps_is_searchable': True,
+    'cps_proxy_type': 'folder',
+    'cps_display_as_document_in_listing': True,
+    'schemas': ['metadata','common',],
+    'layouts': ['waeup_common',],
+    'flexible_layouts': (),
+    'layout_clusters': ['metadata:metadata'],
+    'cps_section_wf': 'waeup_section_wf',
+    'use_content_status_history': 0,
+    'actions': (
+         {'id': 'view',
+          'name': 'Standard View',
+          #'action': 'accommodation_index_html',
+          'action': 'temporary_view_all',
+          'condition': '',
+          'permission': (View,),
+          'category': 'object',
+          'visible': True,},
+          {'id': 'add_level',
+          'name': 'Register for next year',
+          'condition': "python:member and 'Student'in member.getRoles()",
+          'action'    : 'register_level',
+          #'action': 'folder_factories',
+          'permissions': (StudentManage,)},
+         {'id': 'metadata',
+          'name': 'action_metadata',
+          'action': 'cpsdocument_metadata',
+          'condition': "python:member and 'Manager' in member.getRoles()",
+          'permissions': (UniversityManage,)},
+          {'id': 'localroles',
+          'name': 'delegate',
+          'action': 'folder_localrole_form',
+          'permissions': (UniversityManage,),
+          'visible': 0,
+          },
+          )
+}
+###)
+
+semester_folder = { ###(
+    'title': 'WAeUP Semester Folder',
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'Semester',
+    'product': 'WAeUP',
+    'factory': 'addLevelFolder',
+    'immediate_view': 'folder_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': ('CourseTicket',),
+    'allow_discussion': False,
+    'cps_is_searchable': True,
+    'cps_proxy_type': 'folder',
+    'cps_display_as_document_in_listing': True,
+    #'schemas': ['metadata','common','course','course_results'],
+    #'layouts': ['waeup_common','course','course_results'],
+    'schemas': ['metadata','common',],
+    'layouts': ['waeup_common',],
+    'flexible_layouts': (),
+    'layout_clusters': ['metadata:metadata'],
+    'cps_section_wf': 'waeup_section_wf',
+    'use_content_status_history': 0,
+    'actions': (
+         {'id': 'view',
+          'name': 'Standard View',
+          #'action': 'accommodation_index_html',
+          'action': 'temporary_view_all',
+          'condition': '',
+          'permission': (View,),
+          'category': 'object',
+          'visible': True,},
+          {'id': 'add_course_ticket',
+          'name': 'Add Course Ticket',
+          'condition': "python:member and 'Student'in member.getRoles()",
+          'action'    : 'add_course_ticket',
+          #'action': 'folder_factories',
+          'permissions': (StudentManage,)},
+         {'id': 'metadata',
+          'name': 'action_metadata',
+          'action': 'cpsdocument_metadata',
+          'condition': "python:member and 'Manager' in member.getRoles()",
+          'permissions': (UniversityManage,)},
+          {'id': 'localroles',
+          'name': 'delegate',
+          'action': 'folder_localrole_form',
+          'permissions': (UniversityManage,),
+          'visible': 0,
+          },
+          )
+}
+###)
+
+course_ticket = { ###(
+    'title': 'WAeUP Course Ticket',
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'CourseTicket',
+    'product': 'WAeUP',
+    'factory': 'addCourseTicket',
+    'immediate_view': 'folder_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': (),
+    'allow_discussion': False,
+    'cps_is_searchable': True,
+    'cps_proxy_type': 'cpsdocument',
+    'cps_display_as_document_in_listing': True,
+    'schemas': ['metadata','common','course','course_results'],
+    'layouts': ['waeup_common','course','course_results'],
+    'flexible_layouts': (),
+    'layout_clusters': ['metadata:metadata'],
+    'cps_section_wf': 'waeup_section_wf',
+    'use_content_status_history': 0,
+    'actions': (
+         {'id': 'view',
+          'name': 'Standard View',
+          #'action': 'accommodation_index_html',
+          'action': 'temporary_view_all',
+          'condition': '',
+          'permission': (View,),
+          'category': 'object',
+          'visible': True,},
+         {'id': 'metadata',
+          'name': 'action_metadata',
+          'action': 'cpsdocument_metadata',
+          'condition': "python:member and 'Manager' in member.getRoles()",
+          'permissions': (UniversityManage,)},
+          {'id': 'localroles',
+          'name': 'delegate',
+          'action': 'folder_localrole_form',
+          'permissions': (UniversityManage,),
+          'visible': 0,
+          },
+          )
+}
+###)
+
 faculty_type = { ###(
     'title': 'WAeUP Faculty',
@@ -612,5 +772,5 @@
     'allow_discussion': False,
     'cps_is_searchable': True,
-    'cps_proxy_type': 'cpsdocument',
+    'cps_proxy_type': 'folder',
     'cps_display_as_document_in_listing': True,
     'schemas': ['metadata','common',],
@@ -640,4 +800,9 @@
           'condition': "python:member and 'Manager' in member.getRoles()",
           'permissions': (UniversityManage,)},
+          {'id': 'edit',
+          'name': 'action_edit',
+          'action': 'cpsdocument_edit_form',
+          'condition': "python:member and 'Manager' in member.getRoles()",
+          'permissions': (ModifyPortalContent,UniversityManage,)},
           {'id': 'localroles',
           'name': 'delegate',
@@ -663,5 +828,5 @@
     'allow_discussion': False,
     'cps_is_searchable': True,
-    'cps_proxy_type': 'document',
+    'cps_proxy_type': 'cpsdocument',
     'cps_display_as_document_in_listing': True,
     'schemas': ['metadata','common','accommodation'],
@@ -707,4 +872,7 @@
 types['Student'] = student_type
 types['StudentPersonal'] = student_personal_type
+types['StudyLevel'] = study_level_folder
+types['Semester'] = semester_folder 
+types['CourseTicket'] = course_ticket 
 types['AccoFolder'] = acco_folder
 types['Accommodation'] = accommodation
Index: waeup_product/trunk/skins/waeup_student/add_accommodation.py
===================================================================
--- waeup_product/trunk/skins/waeup_student/add_accommodation.py	(revision 138)
+++ waeup_product/trunk/skins/waeup_student/add_accommodation.py	(revision 139)
@@ -37,5 +37,5 @@
                                  )
 elif psm == 'valid':
-    oid = "%s" % ds.get('heading').replace(' ','')
+    oid = "%s" % ds.get('Title').replace(' ','')
     context.invokeFactory(type_name,oid)
     object = getattr(context,oid)
