Index: /waeup_product/trunk/Accommodation.py
===================================================================
--- /waeup_product/trunk/Accommodation.py	(revision 151)
+++ /waeup_product/trunk/Accommodation.py	(revision 152)
@@ -33,4 +33,5 @@
     security = ClassSecurityInfo()
     
+
 InitializeClass(AccoFolder)
 
@@ -63,9 +64,12 @@
     security = ClassSecurityInfo()
     
-##    security.declareProtected(View,"Title")
-##    def Title(self):
-##        """ the Title """
-##        return self.heading
-        
+    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(Accommodation)
Index: /waeup_product/trunk/Extensions/install.py
===================================================================
--- /waeup_product/trunk/Extensions/install.py	(revision 151)
+++ /waeup_product/trunk/Extensions/install.py	(revision 152)
@@ -110,4 +110,5 @@
         waeup_ptypes = "'University','StudentsFolder','Student','Jamb','Faculty','Department','Course'"
         waeup_ptypes += ",'AccoFolder','Accommodation','StudentPersonal','AcademicsFolder'"
+        waeup_ptypes += ",'StudyLevel','Semester','CourseTicket'"
         if CPSSubscriptions: ###(
 
@@ -349,5 +350,63 @@
 
 
-    def installCustomWorkflows(self):
+    def verifyPortlets(self, portlets=(), object=None): ###(
+        """Verify the existence of given portet in the object's portlet
+        container. If not found, a portlet is instantiated.
+        Existing portlets are not affected.
+
+        'portlets' is a tuple with the dictionaries given by the export tab
+        as entries.
+        The default object is the portal itself.
+
+        return the list a new portlet ids.
+        """
+
+        if object is None:
+            object = self.portal
+
+        self.log('Verifying portlets on %s' % object.absolute_url(relative=1))
+
+        portlet_container = self.getPortletContainer(object, create=1)
+
+        ttool = self.getTool('portal_types')
+
+        returned = []
+        for new_portlet in portlets:
+            existing_portlets = portlet_container.listPortlets()
+            updated = 0
+
+            # Check if the portlet needs an update
+            identifier = new_portlet.get('identifier')
+            if identifier:
+                for portlet in existing_portlets:
+                    if identifier == portlet.identifier:
+                        self.log(" Update of portlet: %s" % portlet)
+                        portlet.edit(**new_portlet)
+                        portlet_id = portlet.getId()
+                        updated = 1
+                        continue
+            slot = new_portlet.get('slot')
+            if slot:
+                for portlet in existing_portlets:
+                    if slot == portlet.slot:
+                        self.log(" Update of portlet: %s" % portlet)
+                        portlet.edit(**new_portlet)
+                        portlet_id = portlet.getId()
+                        updated = 1
+                        continue
+
+            if not updated:
+                self.log("   Creation of portlet: %s" % new_portlet)
+                portlet_id = self.portal.portal_cpsportlets.createPortlet(
+                    ptype_id=new_portlet['type'],
+                    context=object,
+                    **new_portlet)
+            if portlet_id not in returned:
+                returned.append(portlet_id)
+        return returned
+
+###)
+
+    def installCustomWorkflows(self): ###(
         """Installs custom workflows
         """
@@ -357,6 +416,7 @@
         waeupWorkflowsInstall(self.context)
 
-
-    def verifyWorkflowAssociation(self):
+###)
+
+    def verifyWorkflowAssociation(self): ###(
         """Verify workflow association
         """
@@ -368,7 +428,7 @@
         se_chains = { 'University': 'waeup_section_wf',
                       'AcademicsFolder': 'waeup_section_wf',
-                      'StudentsFolder': 'waeup_section_wf',
-                      'Student': 'waeup_section_wf',
-                      'StudentPersonal': 'waeup_section_wf',
+                      'StudentsFolder': 'waeup_student_wf',
+                      'Student': 'waeup_student_wf',
+                      'StudentPersonal': 'waeup_student_wf',
                       'Jamb': 'waeup_section_wf',
                       'ScratchCard': 'waeup_section_wf',
@@ -376,4 +436,7 @@
                       'Department': 'waeup_section_wf',
                       'Course': 'waeup_section_wf',
+                      'StudyLevel': 'waeup_student_wf',
+                      'Semester': 'waeup_student_wf',
+                      'CourseTicket': 'waeup_student_wf',
                       'AccoFolder': 'waeup_section_wf',
                       'Accommodation': 'waeup_section_wf',
@@ -387,6 +450,8 @@
                                        destructive=1)
 
-
-def install(self):
+###)
+
+
+def install(self): ###(
     installer = WAeUPInstaller(self)
     installer.install(self)
@@ -447,8 +512,8 @@
 ##              'Title': 'main tabs',
 ##              },
-              {'identifier': 'waeup_breadcrumbs',
+              {#'identifier': 'waeup_breadcrumbs',
               'type': 'Breadcrumbs Portlet',
               'slot': 'waeup_breadcrumbs',
-              'first_item': 2,
+              'first_item': 0,
               'display_site_root': 0,
               'Title': 'waeup_breadcrumbs',
@@ -457,5 +522,5 @@
               'order': 0,
               },
-              {'identifier': 'waeup_main_tab_actions',
+              {#'identifier': 'waeup_main_tab_actions',
               'type': 'Actions Portlet',
               'slot': 'main_tabs',
@@ -464,5 +529,5 @@
               'Title': 'waep_main_tab_actions',
               },
-              {'identifier': 'waeup_object_actions',
+              {#'identifier': 'waeup_object_actions',
               'type': 'Actions Portlet',
               'slot': 'waeup_object_actions',
@@ -471,5 +536,5 @@
               'Title': 'waep_manager_actions',
               },
-              {'identifier': 'waeup_left_top',
+              {#'identifier': 'waeup_left_top',
               'type': 'Custom Portlet',
               'slot': 'left_top',
@@ -483,8 +548,8 @@
 
 ###)
-
     return installer.logResult()
-
-def migrate(self):
+    ###)
+
+def migrate(self): ###(
     "update data"
     log = []
@@ -519,2 +584,4 @@
     return '\n'.join(log)
                 
+###)
+
Index: /waeup_product/trunk/Faculty.py
===================================================================
--- /waeup_product/trunk/Faculty.py	(revision 151)
+++ /waeup_product/trunk/Faculty.py	(revision 152)
@@ -141,4 +141,13 @@
     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(Course)
Index: /waeup_product/trunk/Students.py
===================================================================
--- /waeup_product/trunk/Students.py	(revision 151)
+++ /waeup_product/trunk/Students.py	(revision 152)
@@ -10,5 +10,4 @@
 from Products.CPSDocument.CPSDocument import CPSDocument 
 from Products.CPSCore.CPSBase import CPSBaseBTreeFolder as BaseBTreeFolder 
-
 class StudentsFolder(BaseBTreeFolder): ###(
     """
@@ -51,9 +50,22 @@
     security = ClassSecurityInfo()
     
-##    security.declareProtected(View,"Title")
-##    def Title(self):
-##        """compose title"""
-##        content = self.PERSONAL.getContent()
-##        return "%s %s" % (content.firstname,content.lastname)
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        
+        data = getattr(self,'PERSONAL',None)
+        if data is None:
+            data = getattr(self,'JAMB',None)
+        if data:
+            content = data.getContent()
+            return "%s %s" % (content.firstname,content.lastname)
+        return self.title
+
+    security.declareProtected(View,"setOwnership")
+    def setOwnership(self,member_id):
+        """set ownership"""
+        pm = getattr(self,'portal_membership')
+        member = pm.getMemberById(member_id)
+        self.changeOwnership(member)
         
 InitializeClass(Student)
@@ -88,4 +100,11 @@
     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)
+
     
 InitializeClass(StudentPersonal)
@@ -120,4 +139,17 @@
     security = ClassSecurityInfo()
     
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        content = self.getContent()
+        return "JAMB Data for %s %s" % (content.firstname,content.lastname)
+
+    security.declareProtected(View,"setOwnership")
+    def setOwnership(self,member_id):
+        """set ownership"""
+        pm = getattr(self,'portal_membership')
+        member = pm.getMemberById(member_id)
+        self.changeOwnership(member)
+
 InitializeClass(Jamb)
 
Index: /waeup_product/trunk/WAeUPPermissions.py
===================================================================
--- /waeup_product/trunk/WAeUPPermissions.py	(revision 151)
+++ /waeup_product/trunk/WAeUPPermissions.py	(revision 152)
@@ -38,4 +38,6 @@
 StudentManage = "Student Manage"
 setDefaultRoles(StudentManage, ('Manager', 
+                                'UniversityManager', 
+                                'StudentManager', 
                                 'FacultyManager', 
                                 'Owner',))
@@ -45,6 +47,7 @@
 FacultyManage = "Faculty Manage"
 setDefaultRoles(FacultyManage, ('Manager', 
+                                'UniversityManager', 
                                 'FacultyManager', 
-                                'Owner',))
+                                ))
 #  - 'Department Manage' : Permission you need to manage a Department
 #
@@ -52,7 +55,8 @@
 DepartmentManage = "Department Manage"
 setDefaultRoles(DepartmentManage, ('Manager', 
+                                   'UniversityManager', 
                                    'FacultyManager', 
-                                   'Department', 
-                                   'Owner',))
+                                   'DepartmentManager', 
+                                   ))
 #  - 'Course Manage' : Permission you need to manage a Department
 #
@@ -60,7 +64,8 @@
 CourseManage = "Course Manage"
 setDefaultRoles(CourseManage, ('Manager', 
-                                   'FacultyManager', 
-                                   'DepartmentManager', 
-                                   'CourseManager', 
-                                   'Owner',))
+                               'UniversityManager', 
+                               'FacultyManager', 
+                               'DepartmentManager', 
+                               'CourseManager', 
+                               ))
 
Index: /waeup_product/trunk/Workflows/WAeUPWorkflow.py
===================================================================
--- /waeup_product/trunk/Workflows/WAeUPWorkflow.py	(revision 151)
+++ /waeup_product/trunk/Workflows/WAeUPWorkflow.py	(revision 152)
@@ -1,2 +1,3 @@
+#-*- mode: python; mode: fold -*-
 """ WAeUP Workflfow
 """
@@ -29,5 +30,5 @@
 
     wfids = wftool.objectIds()
-    wfid = 'waeup_section_wf'
+    wfid = 'waeup_section_wf' ###(
 
     if wfid in wfids:
@@ -41,5 +42,4 @@
     for p in (View,
               ModifyPortalContent,
-              
              ):
         wf.addManagedPermission(p)
@@ -63,5 +63,5 @@
     s = wf.states.get('work')
 
-    s.setPermission(View, 1, ('Students',))
+    s.setPermission(View, 1, ('Student',))
     s.setPermission(ModifyPortalContent, 1, ('StudentManager','UniversityManager',))
 
@@ -74,5 +74,5 @@
 
     ##########################################################################
-    #                                  CLOSED
+    #                                  CLOSED ###(
     ##########################################################################
 
@@ -92,4 +92,5 @@
     ###########################################################################
     ###########################################################################
+###)
 
     #                               TRANSITIONS
@@ -117,5 +118,5 @@
                     actbox_name='', actbox_category='workflow', actbox_url='',
                     props={'guard_permissions':'',
-                           'guard_roles':'Manager; StudentManager ; UniversityManager',
+                           'guard_roles':'Manager; StudentManager; UniversityManager',
                            'guard_expr':''},)
 
@@ -158,5 +159,5 @@
 
     ##########################################################################
-    #                                  CLOSE
+    #                                  CLOSE ###(
     ##########################################################################
 
@@ -191,4 +192,6 @@
 ##                           'guard_expr':''},)
 
+###)
+
     ################################################################
     #                 VARIABLES
@@ -243,5 +246,226 @@
     ######################################################################################
     ######################################################################################
-    wfid = 'waeup_workspace_wf'
+###)
+
+    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:
@@ -457,2 +681,4 @@
                        default_expr="python:state_change.kwargs.get('dest_container', '')",
                        for_status=1, update_always=1)
+
+###)
Index: /waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py
===================================================================
--- /waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py	(revision 151)
+++ /waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py	(revision 152)
@@ -1021,4 +1021,5 @@
         'rows': [
             [{'widget_id': 'Title', 'ncols': 1},],
+            #[{'widget_id': 'Year', 'ncols': 1},],
         ]
     },
Index: /waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py
===================================================================
--- /waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py	(revision 151)
+++ /waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py	(revision 152)
@@ -105,4 +105,9 @@
         },
     },
+}
+#
+###)
+
+studylevel = { ###(
 }
 #
@@ -486,4 +491,5 @@
 schemas['students'] = students_folder_schema
 schemas['student'] = student_schema
+schemas['studylevel'] = studylevel
 schemas['course_results'] = course_results_schema
 schemas['student_personal'] = student_personal_schema
Index: /waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py
===================================================================
--- /waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py	(revision 151)
+++ /waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py	(revision 152)
@@ -131,6 +131,6 @@
                  'name': 'delegate',
                  'action': 'folder_localrole_form',
-                 'permissions': (ModifyPortalContent),
-                 'visible' : 0,
+                 'permissions': (ModifyPortalContent,UniversityManage),
+                 'visible' : 1,
                 },
 ##                {'id': 'contents',
@@ -319,7 +319,7 @@
     'description': 'The data from JAMB',
     'content_icon': '',
-    'content_meta_type': 'CPS Document',
-    'product': 'CPSDocument',
-    'factory': 'addCPSDocument',
+    'content_meta_type': 'Jamb',
+    'product': 'WAeUP',
+    'factory': 'addJamb',
     'immediate_view': 'cpsdocument_view',
     'global_allow': True,
@@ -426,5 +426,5 @@
     'content_meta_type': 'Level',
     'product': 'WAeUP',
-    'factory': 'addLevelFolder',
+    'factory': 'addStudyLevel',
     'immediate_view': 'folder_view',
     'global_allow': True,
@@ -477,5 +477,5 @@
     'content_meta_type': 'Semester',
     'product': 'WAeUP',
-    'factory': 'addLevelFolder',
+    'factory': 'addSemester',
     'immediate_view': 'folder_view',
     'global_allow': True,
@@ -505,17 +505,15 @@
           {'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,)},
+          'permissions': (ModifyPortalContent,UniversityManage,StudentManage)},
          {'id': 'metadata',
           'name': 'action_metadata',
           'action': 'cpsdocument_metadata',
-          'condition': "python:member and 'Manager' in member.getRoles()",
-          'permissions': (UniversityManage,)},
+          'permissions': (ModifyPortalContent,UniversityManage,)},
           {'id': 'localroles',
           'name': 'delegate',
           'action': 'folder_localrole_form',
-          'permissions': (UniversityManage,),
+          'permissions': (ModifyPortalContent,UniversityManage,StudentManage),
           'visible': 0,
           },
@@ -531,5 +529,5 @@
     'product': 'WAeUP',
     'factory': 'addCourseTicket',
-    'immediate_view': 'folder_view',
+    'immediate_view': 'cpsdocument_view',
     'global_allow': True,
     'filter_content_types': True,
@@ -791,5 +789,5 @@
           {'id': 'add_accommodation',
           'name': 'Add Accommodation Hall',
-          'condition': "python:member and 'UniversityManager'in member.getRoles()",
+          #'condition': "python:member and 'UniversityManager'in member.getRoles()",
           'action'    : 'add_accommodation',
           #'action': 'folder_factories',
Index: /waeup_product/trunk/skins/waeup_student/create_jamb.py
===================================================================
--- /waeup_product/trunk/skins/waeup_student/create_jamb.py	(revision 151)
+++ /waeup_product/trunk/skins/waeup_student/create_jamb.py	(revision 152)
@@ -37,6 +37,5 @@
 elif psm == 'valid':
     s_id = "s%s" % ds.get('reg_nr')
-    name = ds.get('name')
-    skw = {'title': name}
+    skw = {'title': "%(firstname)s %(lastname)s" % ds}
     context.invokeFactory('Student',s_id) 
     student = getattr(context,s_id)    
@@ -46,5 +45,5 @@
     student.invokeFactory('Jamb',jamb_id) 
     jamb = getattr(student,jamb_id)    
-    ds.set('title', name)
+    ds.set('title', "%(reg_nr)s (%(lastname)s)" % ds)
     jamb.getContent().edit(mapping=ds)
     context.notifyCPSDocumentCreation(ob=jamb)
@@ -57,4 +56,8 @@
     if noCPSMember:
         pr.addMember(s_id, 'UnSeT',roles=('Member','Student','Contributor'))
+    student.manage_setLocalRoles(s_id, ['Owner'])
+    jamb.manage_setLocalRoles(s_id, ['Owner'])
+##    student.getContent().setOwnership(s_id)
+##    jamb.getContent().setOwnership(s_id)
 ##    groups = context.portal_directories.groups
 ##    gm = list(groups.getEntry('Students')['members'])
@@ -63,9 +66,3 @@
 ##                      'members': gm})  
     return context.students_folder_view_manager(psm=psm)
-##    return context.create_jamb_form(rendered = res,
-##                                 psm = psm,
-##                                 ds = ds,
-##                                 )
-    
-return res,psm,ds
 
Index: /waeup_product/trunk/skins/waeup_student/process_waeup_login.py
===================================================================
--- /waeup_product/trunk/skins/waeup_student/process_waeup_login.py	(revision 151)
+++ /waeup_product/trunk/skins/waeup_student/process_waeup_login.py	(revision 152)
@@ -25,14 +25,15 @@
 pd = getattr(ma,pdid)
 pkw = {}
-pkw['sex'] = getattr(jamb,'sex')
-pkw['firstname'] = getattr(jamb,'firstname')
-pkw['middlename'] = getattr(jamb,'middlename')
-pkw['lastname'] = getattr(jamb,'lastname')
-pkw['aggregate'] = getattr(jamb,'aggregate')
-pkw['faculty'] = getattr(jamb,'faculty')
-pkw['age'] = getattr(jamb,'age')
-pkw['state'] = getattr(jamb,'state')
+jc = jamb.getContent()
+pkw['sex'] = getattr(jc,'sex')
+pkw['firstname'] = getattr(jc,'firstname')
+pkw['middlename'] = getattr(jc,'middlename')
+pkw['lastname'] = getattr(jc,'lastname')
+pkw['aggregate'] = getattr(jc,'aggregate')
+pkw['faculty'] = getattr(jc,'faculty')
+pkw['age'] = getattr(jc,'age')
+pkw['state'] = getattr(jc,'state')
 
-pd.edit(mapping=pkw)
+pd.getContent().edit(mapping=pkw)
 context.notifyCPSDocumentCreation(ob=pd)
 return response.redirect(ma.absolute_url())
Index: /waeup_product/trunk/skins/waeup_student/register_level.py
===================================================================
--- /waeup_product/trunk/skins/waeup_student/register_level.py	(revision 151)
+++ /waeup_product/trunk/skins/waeup_student/register_level.py	(revision 152)
@@ -28,6 +28,6 @@
                                  create = 1,
                                  type_name = type_name,
-                                 psm = 'Not yet active',
-                                 #psm = 'Please correct your errors',
+                                 #psm = 'Not yet active',
+                                 psm = 'Please correct your errors',
                                  )
 elif psm == '':
@@ -42,39 +42,26 @@
     psm = (ds)
     oid = ds.get('Title')
-    return context.common_edit_form(rendered = res,
+    if hasattr(context,oid):
+        return context.common_edit_form(rendered = res,
                                  create = 1,
                                  type_name = type_name,
-                                 psm = 'Not yet active',
-                                 #psm = 'Please correct your errors',
+                                 psm = 'You already registered for that level',
                                  )
-    
-    halls = getattr(context,'accommodation').contentValues()
-    beds = []
-    student = context.PERSONAL.getContent()
-    sf = context.getContent()
-    for hall in halls:
-        h = hall.getContent()
-        ba = int(getattr(h,'beds_assigned',0))
-        bal = getattr(h,'beds_assigned_list',[])
-        nr_of_beds = int(h.nr_of_blocks) * int(h.nr_of_floors) * int(h.rooms_per_floor) * int(h.beds_per_room)
-        if h.which_sex == student.sex and nr_of_beds > len(bal):
-            break
-    dict = {'heading': h.heading,
-            'text': h.text,
-            'which_sex': h.which_sex,
-            'nr_of_blocks': h.nr_of_blocks,
-            'nr_of_floors': h.nr_of_floors,
-            'rooms_per_floor': h.rooms_per_floor,
-            'beds_per_room': h.beds_per_room,
-            'nr_of_free': nr_of_beds,
-            'beds_assigned': ba,
-             }
-    ba += 1
-    dict['beds_assigned'] = ba
-    bal.append(('%s:%d' % (pm.getAuthenticatedMember(),ba)))
-    dict['beds_assigned_list'] = bal
-    psm = "h:%(heading)s free:%(nr_of_free)s %(beds_assigned)s" % dict
-    sf.edit(mapping = ds)
-    h.edit(mapping = dict)
-    #psm = "Your not admitted"
-    return context.booked_accommodation(v=dict)
+    context.invokeFactory(type_name,oid) 
+    object = getattr(context,oid)
+    voc = pv.courselevel
+    ds.set('Title',voc.get(oid))
+    object.getContent().edit(mapping=ds,proxy=object)
+    context.notifyCPSDocumentCreation(ob=object)
+    psm = 'new %s created' % oid
+    semester_id = 'Semester_1_%s_%s' % (oid,context.getId())
+    object.invokeFactory('Semester',semester_id)
+    semester = getattr(object,semester_id)
+    semester.getContent().edit(mapping={'Title': 'First Semester'})
+    semester_id = 'Semester_2_%s_%s' % (oid,context.getId())
+    object.invokeFactory('Semester',semester_id)
+    semester = getattr(object,semester_id)
+    semester.getContent().edit(mapping={'Title': 'Second Semester'})
+    context_ti = context.portal_types[context.portal_type] 
+    index = context_ti.getActionById('view','university_view')
+    return getattr(context,index)(psm=psm)
