Index: /waeup_product/branches/srpp_branch/Accommodation.py
===================================================================
--- /waeup_product/branches/srpp_branch/Accommodation.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/Accommodation.py	(revision 196)
@@ -0,0 +1,81 @@
+#-*- 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 
+
+accofolder_fti = { ###(
+    'title': 'WAeUP AccoFolder',
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'AccoFolder',
+    'factory': 'addAccoFolder',
+    'immediate_view': 'cpsdocument_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': ('Accommodation',),
+    'allow_discussion': False,
+}
+###)
+
+class AccoFolder(CPSDocument): ###(
+    """
+    WAeUP AccoFolder containing Accommodation halls 
+    """
+    meta_type = 'AccoFolder'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+    
+
+InitializeClass(AccoFolder)
+
+def addAccoFolder(container, id, REQUEST=None, **kw):
+    """Add a AccoFolder."""
+    ob = AccoFolder(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+###)
+
+accommodation_fti = { ###(
+    'title': 'WAeUP Accommodation',
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'Accommodation',
+    'factory': 'addAccommodation',
+    'immediate_view': 'cpsdocument_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': (),
+    'allow_discussion': False,
+}
+###)
+
+class Accommodation(CPSDocument): ###(
+    """
+    WAeUP Accommodation containing Departments 
+    """
+    meta_type = 'Accommodation'
+    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(Accommodation)
+
+def addAccommodation(container, id, REQUEST=None, **kw):
+    """Add a Accommodation."""
+    ob = Accommodation(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+###)
Index: /waeup_product/branches/srpp_branch/CHANGES
===================================================================
--- /waeup_product/branches/srpp_branch/CHANGES	(revision 196)
+++ /waeup_product/branches/srpp_branch/CHANGES	(revision 196)
@@ -0,0 +1,12 @@
+Requires:
+~~~~~~~~~
+-
+New features:
+~~~~~~~~~~~~~
+-
+Bug fixes:
+~~~~~~~~~~
+-
+New internal features:
+~~~~~~~~~~~~~~~~~~~~~~
+-
Index: /waeup_product/branches/srpp_branch/Extensions/install.py
===================================================================
--- /waeup_product/branches/srpp_branch/Extensions/install.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/Extensions/install.py	(revision 196)
@@ -0,0 +1,671 @@
+#-*- mode: python; mode: fold -*-
+# $Id$
+from Products.ExternalMethod.ExternalMethod import ExternalMethod
+from Products.CPSInstaller.CPSInstaller import CPSInstaller
+from Products.CMFCore.CMFCorePermissions import View, ModifyPortalContent,AccessContentsInformation
+from Products.WAeUP.WAeUPPermissions import UniversityManage, StudentManage,FacultyManage,\
+                                            DepartmentManage,CourseManage
+try:
+  from Products.CPSSubscriptions.permissions import CanNotifyContent
+  CPSSubscriptions = True
+except ImportError:
+  CPSSubscriptions = False
+try:
+  from Products.CPSForum.CPSForumPermissions import ForumManageComments
+  CPSForum = True
+except ImportError:
+  CPSForum = False
+
+from Products.WAeUP.Students import addStudentsFolder
+
+SRPP_ID = "demouni"
+SRPP_TITLE = "Demo University"
+
+class WAeUPInstaller(CPSInstaller):
+    """
+    WAeUP Installer
+    """
+    product_name = "WAeUP"
+
+    def install(self,portal):
+        "install"
+        log = []
+        prlog = log.append
+
+        def pr(msg, prlog=prlog):
+            prlog('%s<br>' % msg)
+
+        product_name = self.product_name
+        pr("Starting %(product_name)s install" % vars() )
+
+        # Roles and Permissions ###(
+        #
+        self.verifyRoles((
+            # A role that can manage the University.
+            'UniversityManager',
+            # A role that can manage the StudentsRecords.
+            'StudentManager',
+            # A role that can manage a Faculty.
+            'FacultyManager',
+            # A role that can manage a department.
+            'DepartmentManager',
+            # A role that can manage a Course.
+            'CourseManager',
+            # The Student Role
+            'Student',
+        ))
+        waeup_perms = {
+            UniversityManage:
+                ('Manager', 'SectionManager','UniversityManager',
+                 ),
+            StudentManage:
+                ('Manager', 'SectionManager','UniversityManager', 'StudentManager'
+                 ),
+            FacultyManage:
+                ('Manager', 'SectionManager','UniversityManager', 'FacultyManager'
+                 ),
+            DepartmentManage:
+                ('Manager', 'SectionManager','UniversityManager', 'DepartmentManager'
+                 ),
+            CourseManage:
+                ('Manager', 'SectionManager','UniversityManager', 'CourseManager'
+                 ),
+        }
+        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)
+        ###)
+
+        ##########################################
+        # Actions
+        ##########################################
+        waeup_ptypes = "'University','StudentsFolder','Student','Jamb','Faculty','Department','Course'"
+        waeup_ptypes += ",'AccoFolder','Accommodation','StudentPersonal','AcademicsFolder'"
+        waeup_ptypes += ",'StudyLevel','Semester','CourseTicket','StudentDocuments','StudentEligibility'"
+        if CPSSubscriptions: ###(
+
+            ptypes = "('Portal', 'CPSMailAccess Message', 'CPSMailAccess Box', 'CPSMailAccess Folder',"\
+                     + waeup_ptypes + ")"
+            condition = "object.portal_type not in %s" % ptypes
+
+            action = {'id' : 'notify_content',
+                      'name' : 'action_notify_content',
+                      'action' : 'string:${object_url}/content_notify_email_form',
+                      'condition' : 'python:%s' % condition,
+                      'permission' :  (CanNotifyContent,),
+                      'category' : 'object',
+                      }
+            self.deleteActions({'portal_subscriptions': ['notify_content',]})
+            self.verifyAction('portal_subscriptions', **action)
+        if CPSForum:
+            condition = "object.portal_type not in (%s)" % waeup_ptypes
+
+            action = {'id' : 'activate_comments',
+                      'name': 'action_activate_comments',
+                      'action': 'string:${object/absolute_url}/set_comment_mode?mode=1',
+                      'condition' : 'python:%s' % condition,
+                      'permission': (ForumManageComments,),
+                      'category' : 'object',
+                      }
+            self.deleteActions({'portal_subscriptions': ['activate_comments',]})
+            self.verifyAction('portal_subscriptions', **action)
+            # now portal_discussion
+            self.deleteActions({'portal_discussion': ['comment',
+                                                      'activate_comments',
+                                                      'deactivate_comments',
+                                                      'manage_comments']})
+            action = {'id' : 'comment',
+                      'name': 'action_comment',
+                      'action': "string:${object/absolute_url}/post_comment",
+                      'condition' : "python:getattr(object.getContent(), 'allow_discussion' , None) and object.hasCommentAction()",
+                      'permission': (View,),
+                      'category' : 'object',
+                      }
+            self.verifyAction('portal_discussion', **action)
+            action = {'id' : 'activate_comments',
+                      'name': 'action_activate_comments',
+                      'action': "string:${object/absolute_url}/set_comment_mode?mode=1",
+                      'condition' : "python:getattr(object.getTypeInfo(),'cps_proxy_type','') in ('document', 'folderishdocument') and getattr(object.getContent(), 'allow_discussion' , None) == 1",
+                      'permission': (ForumManageComments,),
+                      'category' : 'object',
+                      }
+            self.verifyAction('portal_discussion', **action)
+            action = {'id' : 'deactivate_comments',
+                      'name': 'action_deactivate_comments',
+                      'action': "string:${object/absolute_url}/set_comment_mode?mode=0",
+                      'condition' : "python:getattr(object.getTypeInfo(),'cps_proxy_type','') in ('document', 'folderishdocument') and getattr(object.getContent(), 'allow_discussion' , None) == 1",
+                      'permission': (ForumManageComments,),
+                      'category' : 'object',
+                      }
+            self.verifyAction('portal_discussion', **action)
+            action = {'id' : 'manage_comments',
+                      'name': 'action_manage_comments',
+                      'action': "string:${object/absolute_url}/manage_comment",
+                      'condition' : "python:getattr(object.getTypeInfo(),'cps_proxy_type','') in ('document', 'folderishdocument') and getattr(object.getContent(), 'allow_discussion' , None) == 1",
+                      'permission': (ForumManageComments,),
+                      'category' : 'object',
+                      }
+            self.verifyAction('portal_discussion', **action)
+
+###)
+
+        ##########################################
+        # main_tab actions ###(
+        ##########################################
+        path = "/sections/%(SRPP_ID)s" % globals()
+        actions = ( { 'tool'      : 'portal_actions',
+                        'id'        : 'student_administration',
+                        'name'      : 'Students',
+                        'action'    : "python: portal.portal_url.getUrlFromRpath('sections/demouni/students')",
+                        #'action'    : 'string:$portal_url%(path)s/students' % vars(),
+                        'permission': (View, ),
+                        'category'  : 'main_tabs',
+                        'visible'   : 1,
+                      },
+                      { 'tool'      : 'portal_actions',
+                        'id'        : 'academics',
+                        'name'      : 'Academics',
+                        'action'    : "python: portal.portal_url.getUrlFromRpath('sections/demouni/academics')",
+                        #'action'    : 'string:${portal_url}/academics',
+                        'permission': (UniversityManage),
+                        'category'  : 'main_tabs',
+                        'visible'   : 1,
+                      },
+                      { 'tool'      : 'portal_actions',
+                        'id'        : 'accomodation',
+                        'name'      : 'Accommodation',
+                        'action'    : "python: portal.portal_url.getUrlFromRpath('sections/demouni/accommodation')",
+                        #'action'    : 'string:${portal_url}/accommodation',
+                        'permissions': (UniversityManage),
+                        #'permissions': (ModifyPortalContent,UniversityManage,StudentManage),
+                        'category'  : 'main_tabs',
+                        'visible'   : 1,
+                      },
+                      { 'tool'      : 'portal_actions',
+                        'id'        : 'chat',
+                        'name'      : 'Chat',
+                        'action'    : "python: portal.portal_url.getUrlFromRpath('sections/demouni/chat')",
+                        #'action'    : 'string:${portal_url}/accommodation',
+                        'permissions': (View),
+                        #'permissions': (ModifyPortalContent,UniversityManage,StudentManage),
+                        'category'  : 'main_tabs',
+                        'visible'   : 1,
+                      },
+##                      { 'tool'      : 'portal_actions', ###(
+##                        'id'        : 'add_jamb',
+##                        'name'      : 'Add Student JAMB',
+##                        'action'    : 'string:${object/absolute_url}/create_jamb',
+##                        'permission': (),
+##                        'condition' : 'python: member and here.portal_type in ("StudentsFolder",) and "StudentManager" in member.getGroups()',
+##                        'category'  : 'student',
+##                        'visible'   : 1,
+##                      },
+##                      { 'tool'      : 'portal_actions',
+##                        'id'        : 'add_faculty',
+##                        'name'      : 'Add New Faculty',
+##                        'action'    : 'string:${object/absolute_url}/addFaculty',
+##                        'permission': (),
+##                        'condition' : 'python: member and here.portal_type in ("University",) and "StudentManager" in member.getGroups()',
+##                        'category'  : 'student',
+##                        'visible'   : 1,
+##                      },
+##                      { 'tool'      : 'portal_actions',
+##                        'id'        : 'add_department',
+##                        'name'      : 'Add New Department',
+##                        'action'    : 'string:${object/absolute_url}/addDepartment',
+##                        'permission': (),
+##                        'condition' : 'python: member and here.portal_type in ("Faculty",) and "StudentManager" in member.getGroups()',
+##                        'category'  : 'student',
+##                        'visible'   : 1,
+##                      },
+##                      { 'tool'      : 'portal_actions',
+##                        'id'        : 'add_course',
+##                        'name'      : 'Add New Course',
+##                        'action'    : 'string:${object/absolute_url}/addCourse',
+##                        'permission': (),
+##                        'condition' : 'python: member and here.portal_type in ("Department",) and "StudentManager" in member.getGroups()',
+##                        'category'  : 'student',
+##                        'visible'   : 1,
+##                      },
+##                      { 'tool'      : 'portal_actions',
+##                        'id'        : 'add_personal',
+##                        'name'      : 'Add personal Data',
+##                        'action'    : 'string:${object/absolute_url}/create_personal_form',
+##                        'permission': (),
+##                        'condition' : 'python: 0 and member and not here.portal_type in ("Jamb","StudentsFolder") and not "StudentManager" in member.getGroups()',
+##                        'category'  : 'student',
+##                        'visible'   : 1,
+##                      },
+##                      { 'tool'      : 'portal_actions',
+##                        'id'        : 'edit_jamb',
+##                        'name'      : 'Edit Jamb Data',
+##                        'action'    : 'cpsdocument_edit_form',
+##                        'permission': ( ),
+##                        'condition' : 'python: member and here.portal_type in ("Student",) and "StudentManager" in member.getGroups()',
+##                        'category'  : 'student',
+##                        'visible'   : 1,
+##                      },
+###)
+
+                    )
+        self.deleteActions({'portal_actions': [action['id'] for action in actions]})
+        self.verifyActions(actions)
+        ##########################################
+###)
+
+        # skins
+        ##########################################
+        pr("Verifying %(product_name)s skinss" % vars())
+        wskins = { 'waeup_default' : 'Products/WAeUP/skins/waeup_default',
+                   'waeup_faculty' : 'Products/WAeUP/skins/waeup_faculty',
+                   'waeup_student' : 'Products/WAeUP/skins/waeup_student',
+                 }
+        self.verifySkins(wskins)
+        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
+        ##########################################
+        dtypes = portal.getWAeUPTypes()
+        self.verifyFlexibleTypes(dtypes)
+        self.allowContentTypes('University', ('Workspace','Section',))
+        ##########################################
+        # Schemas
+        ##########################################
+        pr("Verifying %(product_name)s schemas" % vars())
+        self.verifySchemas(portal.getWAeUPSchemas())
+        ##########################################
+        # widgets
+        ##########################################
+        pr("Verifying %(product_name)s widgets" % vars())
+        self.verifyWidgets(portal.getWAeUPWidgets())
+        ##########################################
+        # layouts
+        ##########################################
+        pr("Verifying %(product_name)s layouts" % vars())
+        self.verifyLayouts(portal.getWAeUPLayouts())
+        ##########################################
+        # Vocabularies
+        ##########################################
+        pr("Verifying %(product_name)s vocabularies" % vars())
+        self.verifyVocabularies(portal.getWAeUPVocabularies())
+        ##########################################
+        # Groups
+        ##########################################
+
+        self.installCustomWorkflows()
+        self.verifyWorkflowAssociation()
+
+        pr("End of specific %(product_name)s install" % vars())
+        #return '\n'.join(log)
+        self.finalize()
+
+
+    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
+        """
+        from Products.WAeUP.Workflows.WAeUPWorkflow import \
+             waeupWorkflowsInstall
+
+        waeupWorkflowsInstall(self.context)
+
+###)
+
+    def verifyWorkflowAssociation(self): ###(
+        """Verify workflow association
+        """
+        ws_chains = {
+                      'Student': 'waeup_workspace_wf',
+                      'Jamb': 'waeup_workspace_wf',
+                      }
+
+        se_chains = { 'University': 'waeup_section_wf',
+                      'AcademicsFolder': 'waeup_section_wf',
+                      'StudentsFolder': 'waeup_student_wf',
+                      'Student': 'waeup_student_wf',
+                      'StudentPersonal': 'waeup_student_wf',
+                      'StudentEligibility': 'waeup_student_wf',
+                      'StudentDocuments': 'waeup_student_wf',
+                      'Jamb': 'waeup_section_wf',
+                      'ScratchCard': 'waeup_section_wf',
+                      'Faculty': 'waeup_section_wf',
+                      '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',
+                      }
+
+        self.verifyLocalWorkflowChains(self.portal['workspaces'],
+                                       ws_chains,
+                                       destructive=1)
+        self.verifyLocalWorkflowChains(self.portal['sections'],
+                                       se_chains,
+                                       destructive=1)
+    ###)
+
+    def verifyFaculties(self, academics): ###(
+        """install Universityspecific Faculies with Departments"""
+        faculties = [
+##                     {'id': 'agri', ###(
+##                      'Title': 'Agriculture',
+##                      'departments': [
+##                                     { 'id': 'dep1', ###(
+##                                       'Title': 'One',
+##                                     },
+##                                     ],
+##                      },###)
+                      { 'id': 'science',
+                      'Title': 'Science',
+                      'departments': [
+                                     { 'id': 'bio', ###(
+                                       'Title': 'Biochemistry',
+                                     },
+                                     { 'id': 'bot',
+                                       'Title': 'Botany',
+                                     },
+                                     { 'id': 'che',
+                                       'Title': 'Chemistry',
+                                     },
+                                     { 'id': 'com',
+                                       'Title': 'Computer Science',
+                                     },
+                                     { 'id': 'geo',
+                                       'Title': 'Geologie',
+                                     },
+                                     { 'id': 'mat',
+                                       'Title': 'Mathematics',
+                                     },
+                                     { 'id': 'mic',
+                                       'Title': 'Microbiology',
+                                     },
+                                     { 'id': 'opt',
+                                       'Title': 'Optometry',
+                                     },
+                                     { 'id': 'phy',
+                                       'Title': 'Physics',
+                                     },
+                                     { 'id': 'zoo',
+                                       'Title': 'Zoology',
+                                     },
+                                     ],
+                      },###)
+                     ]###)
+        self.log('Verifying Faculties in %s' % academics.absolute_url(relative=1))
+        for faculty in faculties:
+            fid = faculty['id']
+            f = getattr(academics,fid,None)
+            self.log('Checking Faculty %(id)s = %(Title)s' % faculty)
+            if f is None:
+                self.log('Creating Faculty %(id)s = %(Title)s' % faculty)
+                academics.invokeFactory('Faculty', fid)
+                f = getattr(academics,fid)
+                f.getContent().edit(mapping=faculty)
+            for department in faculty['departments']:
+                self.log('Checking Department %(id)s = %(Title)s' % department)
+                did = department['id']
+                d = getattr(f,did,None)
+                if d is None:
+                    self.log('Creating Department %(id)s = %(Title)s' % department)
+                    f.invokeFactory('Department', did)
+                    d = getattr(f,did)
+                    d.getContent().edit(mapping=department)
+    ###)
+
+
+
+def install(self): ###(
+    installer = WAeUPInstaller(self)
+    installer.install(self)
+    dirtool = getattr(self,'portal_directories')
+    groups = dirtool.groups
+    for delEntry in ('StudentManager',):
+        if delEntry in groups.listEntryIds():
+            groups.deleteEntry(delEntry)
+    for newEntry in ('Students',):
+        if newEntry not in groups.listEntryIds():
+            groups.createEntry({'group': newEntry,
+                                'members': []})
+    #groups.manage_setLocalGroupRoles(groupid = 'StudentManager',roles=('Manager',))
+    #groups.manage_setLocalGroupRoles(groupid = 'Students',roles=('Contributor',))
+    sections = getattr(self,'sections')
+    waeup = getattr(sections,SRPP_ID,None)
+    if not waeup:
+        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',
+                                            )
+        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',
+                                            )
+##        waeup.content_create(type_name='AcademicsFolder',title='academics')
+##        sections.waeup.folder_localrole_add(member_ids=('group:StudentManager',),
+##                                            member_role='SectionManager',
+##                                            )
+        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'})
+    academics = getattr(waeup,'academics',None)
+    if academics is None:
+        waeup.invokeFactory('AcademicsFolder','academics')
+        academics = getattr(waeup,'academics')
+        academics.getContent().edit(mapping={'Title':'Academics'})
+    installer.verifyFaculties(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 ###(
+    #
+    portlets = (
+##              {'identifier': 'waeup_main_tabs',
+##              'type': 'Custom Portlet',
+##              'slot': 'main_tabs',
+##              'order': 0,
+##              'render_method': 'portlet_main_navigation',
+##              'Title': 'main tabs',
+##              },
+              {#'identifier': 'waeup_breadcrumbs',
+              'type': 'Breadcrumbs Portlet',
+              'slot': 'waeup_breadcrumbs',
+              'first_item': 0,
+              'display_site_root': 0,
+              'Title': 'waeup_breadcrumbs',
+              'display': 'horizontal_trail',
+              'display_hidden_folders': 0,
+              'order': 0,
+              },
+              {#'identifier': 'waeup_main_tab_actions',
+              'type': 'Actions Portlet',
+              'slot': 'main_tabs',
+              'order': 0,
+              'categories': ['main_tabs',],
+              'Title': 'waep_main_tab_actions',
+              },
+              {#'identifier': 'waeup_object_actions',
+              'type': 'Actions Portlet',
+              'slot': 'waeup_object_actions',
+              'order': 0,
+              'categories': ['object',],
+              'Title': 'waep_manager_actions',
+              },
+              {#'identifier': 'waeup_left_top',
+              'type': 'Custom Portlet',
+              'slot': 'left_top',
+              'order': 0,
+              'render_method': 'portlet_session_info',
+              'Title': 'Session Info',
+              },
+            )
+    installer.verifyPortletContainer(waeup)
+    installer.verifyPortlets(portlets,waeup)
+
+###)
+    return installer.logResult()
+    ###)
+
+def migrate(self): ###(
+    "update data"
+    log = []
+    prlog = log.append
+
+    def pr(msg, prlog=prlog):
+        prlog('%s' % msg)
+
+    sections = getattr(self,'sections')
+    waeup = getattr(sections,SRPP_ID,None)
+    pr( "Start migrate")
+    pr("migrating Students")
+    students = getattr(waeup,'students')
+    pr("migrating courses")
+    academics = getattr(waeup,'academics')
+    for fac in [getattr(academics,f.id) for f in academics.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/branches/srpp_branch/Extensions/install.py.260905
===================================================================
--- /waeup_product/branches/srpp_branch/Extensions/install.py.260905	(revision 196)
+++ /waeup_product/branches/srpp_branch/Extensions/install.py.260905	(revision 196)
@@ -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_product/branches/srpp_branch/Extensions/updateDirectories.py
===================================================================
--- /waeup_product/branches/srpp_branch/Extensions/updateDirectories.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/Extensions/updateDirectories.py	(revision 196)
@@ -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_product/branches/srpp_branch/Faculty.py
===================================================================
--- /waeup_product/branches/srpp_branch/Faculty.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/Faculty.py	(revision 196)
@@ -0,0 +1,201 @@
+#-*- 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 
+
+##class FacultyFolder(BaseBTreeFolder): ###(
+##    """
+##    WAeUP container for the various WAeUP containers data 
+##    """
+##    meta_type = 'Faculty Folder'
+##    portal_type = meta_type
+##    security = ClassSecurityInfo()
+##    
+##        
+##InitializeClass(FacultyFolder)
+##
+##def addFacultyFolder(container, id, REQUEST=None, **kw):
+##    """Add a Student."""
+##    ob = StudentsFolder(id, **kw)
+##    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+#####
+#####)
+
+faculty_fti = { ###(
+    'title': 'WAeUP Faculty',
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'Faculty',
+    'factory': 'addFaculty',
+    'immediate_view': 'cpsdocument_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': ('Department',),
+    'allow_discussion': False,
+##    'actions': (
+##         {'id': 'view',
+##          'name': 'action_view',
+##          'action': 'string:${object_url}/faculty_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,},
+##    )
+}
+###)
+
+class Faculty(CPSDocument): ###(
+    """
+    WAeUP Faculty containing Departments 
+    """
+    meta_type = 'Faculty'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+    
+##    security.declareProtected(View,"Title")
+##    def Title(self):
+##        """compose title"""
+##        reg_nr = self.getId()[1:]
+##        return "Faculty of %s" % (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)
+###)
+
+department_fti = { ###(
+    'title': 'WAeUP Department',
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'Department',
+    'factory': 'addDepartment',
+    'immediate_view': 'cpsdocument_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': ('Course',),
+    'allow_discussion': False,
+}
+###)
+
+class Department(CPSDocument): ###(
+    """
+    WAeUP Department containing the courses and students
+    """
+    meta_type = 'Department'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+##    security.declareProtected(View,"Title")
+##    def Title(self):
+##        """compose title"""
+##        reg_nr = self.getId()[1:]
+##        return "Department of %s" % (self.title)
+
+InitializeClass(Department)
+
+def addDepartment(container, id, REQUEST=None, **kw):
+    """Add a Department."""
+    ob = Department(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+###)
+
+course_fti = { ###(
+    'title': 'WAeUP Course',
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'Course',
+    'factory': 'addCourse',
+    'immediate_view': 'cpsdocument_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': (),
+    'allow_discussion': False,
+}
+###)
+
+class Course(CPSDocument): ###(
+    """
+    WAeUP Course  
+    """
+    meta_type = 'Course'
+    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)
+
+def addCourse(container, id, REQUEST=None, **kw):
+    """Add a Course."""
+    ob = Course(id, **kw)
+    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/branches/srpp_branch/LICENSE.GPL
===================================================================
--- /waeup_product/branches/srpp_branch/LICENSE.GPL	(revision 196)
+++ /waeup_product/branches/srpp_branch/LICENSE.GPL	(revision 196)
@@ -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_product/branches/srpp_branch/LICENSE.txt
===================================================================
--- /waeup_product/branches/srpp_branch/LICENSE.txt	(revision 196)
+++ /waeup_product/branches/srpp_branch/LICENSE.txt	(revision 196)
@@ -0,0 +1,17 @@
+ 
+  SACustom
+  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_product/branches/srpp_branch/README.txt
===================================================================
--- /waeup_product/branches/srpp_branch/README.txt	(revision 196)
+++ /waeup_product/branches/srpp_branch/README.txt	(revision 196)
@@ -0,0 +1,1 @@
+This is the Student Product for the WAeUP.
Index: /waeup_product/branches/srpp_branch/Students.py
===================================================================
--- /waeup_product/branches/srpp_branch/Students.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/Students.py	(revision 196)
@@ -0,0 +1,353 @@
+#-*- mode: python; mode: fold -*-
+from Globals import InitializeClass
+from AccessControl import ClassSecurityInfo
+from AccessControl.SecurityManagement import newSecurityManager
+
+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
+class StudentsFolder(BaseBTreeFolder): ###(
+    """
+    WAeUP container for the various WAeUP containers data
+    """
+    meta_type = 'Students Folder'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+
+InitializeClass(StudentsFolder)
+
+def addStudentsFolder(container, id, REQUEST=None, **kw):
+    """Add a Student."""
+    ob = StudentsFolder(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+###)
+
+student_fti = { ###(
+    'title': 'WAeUP Student',
+    'description': '',
+    'content_icon': 'student.gif',
+    'content_meta_type': 'Student',
+    'factory': 'addStudent',
+    'immediate_view': 'cpsdocument_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': ('Jamb','StudentPersonal'),
+    'allow_discussion': False,
+}
+
+###)
+
+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 is None:
+            data = getattr(self,'JAMB',None)
+        if data:
+            content = data.getContent()
+            return "%s %s" % (content.firstname,content.lastname)
+        return self.title
+
+    def Description(self):
+        """compose description"""
+        data = getattr(self,'PERSONAL',None)
+        if data is None:
+            return "none"
+        if data:
+            content = data.getContent()
+            return "%s" % (content.description)
+        return self.description
+
+    security.declareProtected(View,"setScratchCardData")
+    def setScratchCardData(self,ident,ds):
+        """set this data """
+        dict = {'%s_sc_pin' % ident : ds.get('sc_pin'),
+                '%s_sc_id' % ident : ds.get('sc_id'),
+                '%s_sc_value' % ident : ds.get('sc_value'),
+                '%s_date' % ident : ds.get('sc_date'),
+                }
+
+        old_user = self.portal_membership.getAuthenticatedMember()
+        if self.portal_membership.isAnonymousUser():
+            tmp_user = CPSUnrestrictedUser('s%(jamb_id)s' % ds, '',
+                                       ['StudentManager'], '')
+            tmp_user = tmp_user.__of__(self.acl_users)
+            newSecurityManager(None, tmp_user)
+        #print str(dict)
+        self.edit(mapping=dict)
+        newSecurityManager(None, old_user)
+
+    security.declareProtected(View,"memberIsOwner")
+    def memberIsOwner(self):
+        """is the current user the owner"""
+        member = self.portal_membership.getAuthenticatedMember()
+        #print member, self.getId(),self.aq_parent.getId()
+        if self.aq_parent.getId() == str(member):
+            return True
+        return False
+
+    security.declareProtected(View,"accommodationIsBooked")
+    def accommodationIsBooked(self):
+        """is the accommodation booked"""
+        if self.accommodation_sc_pin != '':
+            return True
+        return False
+
+    security.declareProtected(View,"accommodationIsPayed")
+    def accommodationIsPayed(self):
+        """is the accommodation payed"""
+        if self.hostel_fee_sc_pin != '':
+            return True
+        return False
+
+    security.declareProtected(View,"isRegisteredForCurrentLevel")
+    def isRegisteredForCurrentLevel(self):
+        """is the student registered for the current level"""
+        for l in  self.aq_parent.objectValues():
+            if l.portal_type == 'StudyLevel':
+                return True
+        return False
+
+InitializeClass(Student)
+
+def addStudent(container, id, REQUEST=None, **kw):
+    """Add a Student."""
+    ob = Student(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
+###)
+
+studentpersonal_fti = { ###(
+    'title': 'WAeUP StudentPersonal',
+    'description': '',
+    'content_icon': 'student.gif',
+    'content_meta_type': 'StudentPersonal',
+    'factory': 'addStudent',
+    'immediate_view': 'student_personal_index_html',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': (),
+    'allow_discussion': False,
+}
+
+###)
+
+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)
+
+
+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)
+
+###)
+
+studenteligibility_fti = { ###(
+    'title': 'WAeUP StudentEligibility',
+    'description': '',
+    'content_icon': 'student.gif',
+    'content_meta_type': 'StudentEligibility',
+    'factory': 'addStudent',
+    'immediate_view': 'student_eligibility_index_html',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': (),
+    'allow_discussion': False,
+}
+
+###)
+
+class StudentEligibility(CPSDocument): ###(
+    """
+    WAeUP Student container for the various student data
+    """
+    meta_type = 'StudentEligibility'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        return "Eligibility Data"
+
+
+InitializeClass(StudentEligibility)
+
+def addStudentEligibility(container, id, REQUEST=None, **kw):
+    """Add a Students eligibility data."""
+    ob = StudentEligibility(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
+###)
+
+studentdocuments_fti = { ###(
+    'title': 'WAeUP StudentDocuments',
+    'description': '',
+    'content_icon': 'student.gif',
+    'content_meta_type': 'StudentDocuments',
+    'factory': 'addStudent',
+    'immediate_view': 'temporary_view_all',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': (),
+    'allow_discussion': False,
+}
+
+###)
+
+class StudentDocuments(CPSDocument): ###(
+    """
+    WAeUP Student container for the various student data
+    """
+    meta_type = 'StudentDocuments'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+    security.declareProtected(View,"Title")
+    def Title(self):
+        """compose title"""
+        content = self.getContent()
+        return "Scanned Documents"
+
+
+InitializeClass(StudentDocuments)
+
+def addStudentDocuments(container, id, REQUEST=None, **kw):
+    """Add a Students documents"""
+    ob = StudentDocuments(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
+###)
+
+jamb_fti = { ###(
+    'title': 'WAeUP Jamb',
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'Jamb',
+    'factory': 'addJamb',
+    'immediate_view': 'cpsdocument_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': ('Course',),
+    'allow_discussion': False,
+}
+###)
+
+class Jamb(CPSDocument): ###(
+    """
+    WAeUP Jamb containing the courses and students
+    """
+    meta_type = 'Jamb'
+    portal_type = meta_type
+    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)
+
+def addJamb(container, id, REQUEST=None, **kw):
+    """Add a Jamb."""
+    ob = Jamb(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+###)
+
+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/branches/srpp_branch/University.py
===================================================================
--- /waeup_product/branches/srpp_branch/University.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/University.py	(revision 196)
@@ -0,0 +1,59 @@
+from Globals import InitializeClass
+from AccessControl import ClassSecurityInfo
+
+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('waeup_url')
+    def waeup_url(self):
+        """ return the base_url"""
+        return "%s/sections/waeup" % self.portal_url
+        return self.REQUEST
+    
+    
+##    security.declarePublic('backEnd')
+##    def backEnd(self):
+##        """ are we in back-end mode"""
+##        mtool = self.portal_membership
+##        member = mtool.getAuthenticatedMember()
+##        roles = member.getRoles()
+##        if 'UniversityManager' in roles or 'StudentManager' in roles:
+##            return True
+##        return False
+##
+##    security.declarePublic('frontEnd')
+##    def frontEnd(self):
+##        """ are we in front-end mode"""
+##        mtool = self.portal_membership
+##        member = mtool.getAuthenticatedMember()
+##        roles = member.getRoles()
+##        if 'Student' in roles:
+##            return True
+##        return False
+    
+        
+InitializeClass(University)
+
+
+def addUniversity(container, id, REQUEST=None, **kw):
+    """Add a WAeUP"""
+    ob = University(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+
Index: /waeup_product/branches/srpp_branch/VERSION
===================================================================
--- /waeup_product/branches/srpp_branch/VERSION	(revision 196)
+++ /waeup_product/branches/srpp_branch/VERSION	(revision 196)
@@ -0,0 +1,1 @@
+0.3-devel (SVN/Unreleased)
Index: /waeup_product/branches/srpp_branch/WAeUPPermissions.py
===================================================================
--- /waeup_product/branches/srpp_branch/WAeUPPermissions.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/WAeUPPermissions.py	(revision 196)
@@ -0,0 +1,71 @@
+# (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 Student Permissions
+"""
+
+from AccessControl import ModuleSecurityInfo
+from Products.CMFCore.permissions import setDefaultRoles
+security = ModuleSecurityInfo('Products.WAeUP.WAeUPPermissions')
+
+#  - 'University Manage' : Permission you need to manage a University
+#
+security.declarePublic('UniversityManage')
+UniversityManage = "University Manage"
+setDefaultRoles(UniversityManage, ('Manager', 
+                                   ))
+#  - 'Student Manage' : Permission you need to manage Students
+#
+security.declarePublic('StudentManage')
+StudentManage = "Student Manage"
+setDefaultRoles(StudentManage, ('Manager', 
+                                'UniversityManager', 
+                                'StudentManager', 
+                                'FacultyManager', 
+                                'Owner',))
+#  - 'Faculty Manage' : Permission you need to manage a Faculty
+#
+security.declarePublic('FacultyManage')
+FacultyManage = "Faculty Manage"
+setDefaultRoles(FacultyManage, ('Manager', 
+                                'UniversityManager', 
+                                'FacultyManager', 
+                                ))
+#  - 'Department Manage' : Permission you need to manage a Department
+#
+security.declarePublic('DepartmentManage')
+DepartmentManage = "Department Manage"
+setDefaultRoles(DepartmentManage, ('Manager', 
+                                   'UniversityManager', 
+                                   'FacultyManager', 
+                                   'DepartmentManager', 
+                                   ))
+#  - 'Course Manage' : Permission you need to manage a Department
+#
+security.declarePublic('CourseManage')
+CourseManage = "Course Manage"
+setDefaultRoles(CourseManage, ('Manager', 
+                               'UniversityManager', 
+                               'FacultyManager', 
+                               'DepartmentManager', 
+                               'CourseManager', 
+                               ))
+
Index: /waeup_product/branches/srpp_branch/WAeUPStudentWidgets.py
===================================================================
--- /waeup_product/branches/srpp_branch/WAeUPStudentWidgets.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/WAeUPStudentWidgets.py	(revision 196)
@@ -0,0 +1,156 @@
+from Globals import InitializeClass
+from Products.CPSSchemas.Widget import CPSWidgetType
+from Products.CPSSchemas.BasicWidgets import CPSStringWidget, CPSEmailWidget
+from Products.CPSSchemas.ExtendedWidgets import CPSDateTimeWidget
+from Products.CPSSchemas.WidgetTypesTool import WidgetTypeRegistry
+from AccessControl import getSecurityManager
+
+from re import compile
+
+from zLOG import LOG, DEBUG
+
+class MyProjectWeekDateTimeWidget(CPSDateTimeWidget):
+    """ """
+    meta_type = "MyProject Week Date Time Widget"
+    
+    def validate(self, datastructure, **kw):
+        """Validate datastructure and update datamodel."""
+        
+        valid = CPSDateTimeWidget.validate(self, datastructure, **kw)
+        if not valid:
+            return 0
+        else:
+            widget_id = self.getWidgetId()
+            value = datastructure[widget_id]
+            err = 0
+            if value.dow() in (6, 0):
+                err = 'Cette date ne correspond pas à un jour de semaine'
+
+            if err:
+                datastructure.setError(widget_id, err)
+
+            return not err
+
+InitializeClass(MyProjectWeekDateTimeWidget)
+
+class MyProjectWeekDateTimeWidgetType(CPSWidgetType):
+    """MyProject Week DateTime widget type."""
+    meta_type = "MyProject Week Date Time Widget Type"
+    cls = MyProjectWeekDateTimeWidget
+
+InitializeClass(MyProjectWeekDateTimeWidgetType)
+
+class MyProjectRestrictedStringWidget(CPSStringWidget):
+    """ """
+    meta_type = "MyProject Restricted String 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]
+            err = 0
+            if not (len(value) == 5 and value.isupper() and value.isalpha()):
+                err = 'Cette chaîne ne correspond pas au format imposé'
+
+            if err:
+                datastructure.setError(widget_id, err)
+            else:
+                datamodel = datastructure.getDataModel()
+                datamodel[self.fields[0]] = value
+            
+            return not err
+
+InitializeClass(MyProjectRestrictedStringWidget)
+
+class MyProjectRestrictedStringWidgetType(CPSWidgetType):
+    """MyProject Restricted String widget type."""
+    meta_type = "MyProject Restricted String Widget Type"
+    cls = MyProjectRestrictedStringWidget
+
+InitializeClass(MyProjectRestrictedStringWidgetType)
+
+
+class MyProjectRestrictedEmailWidget(CPSEmailWidget):
+    """ """
+    meta_type = "MyProject Restricted Email Widget"
+
+    email_myproject_pat = compile(r"^([-\w_+])+\.([-\w_+])+@myproject\.fr$")
+
+    def validate(self, datastructure, **kw):
+        """Validate datastructure and update datamodel."""
+        
+        valid = CPSEmailWidget.validate(self, datastructure, **kw)
+        if not valid:
+            return 0
+        else:
+            widget_id = self.getWidgetId()
+            err, v = self._extractValue(datastructure[widget_id])
+            LOG('MyProject: MyProjectWidgets.py', DEBUG, "Valeur de v : %s" % v)
+            if not err and kw.get('layout_mode') != 'search' and \
+              v and not self.email_myproject_pat.match(v):
+                err = 'cpsschemas_err_email'
+
+            if err:
+                datastructure.setError(widget_id, err)
+            else:
+                datamodel = datastructure.getDataModel()
+                datamodel[self.fields[0]] = v
+            
+            return not err
+
+    def render(self, mode, datastructure, **kw):
+        """Render in mode from datastructure."""
+        return CPSStringWidget.render(self, mode, datastructure, **kw)
+
+InitializeClass(MyProjectRestrictedEmailWidget)
+
+class MyProjectRestrictedEmailWidgetType(CPSWidgetType):
+    """MyProject Restricted String widget type."""
+    meta_type = "MyProject Restricted Email Widget Type"
+    cls = MyProjectRestrictedEmailWidget
+
+InitializeClass(MyProjectRestrictedEmailWidgetType)
+
+class MyProjectVisitTitleWidget(CPSStringWidget):
+    """ """
+    meta_type = "MyProject Visit Title Widget"
+    
+    def validate(self, datastructure, **kw):
+        """Validate datastructure and update datamodel."""
+        
+        widget_id = self.getWidgetId()
+        err = 0
+        curr_date = DateTime()
+        date = "%d.%d.%d" % (curr_date.day(), curr_date.month(), curr_date.year())
+        user = getSecurityManager().getUser()
+        value = 'Demande de visite du %s par %s' % (date, 
+             self.portal_directories.members.getEntry(user.getId()).get('fullname'))
+        datamodel = datastructure.getDataModel()
+        datamodel[self.fields[0]] = value
+            
+        return not err
+
+    def render(self, mode, datastructure, **kw):
+        return ''
+
+InitializeClass(MyProjectVisitTitleWidget)
+
+class MyProjectVisitTitleWidgetType(CPSWidgetType):
+    """MyProject Visit Title widget type."""
+    meta_type = "MyProject Visit Title Widget Type"
+    cls = MyProjectVisitTitleWidget
+
+InitializeClass(MyProjectVisitTitleWidgetType)
+
+#####################################################################################
+
+WidgetTypeRegistry.register(MyProjectWeekDateTimeWidgetType)
+WidgetTypeRegistry.register(MyProjectRestrictedStringWidgetType)
+WidgetTypeRegistry.register(MyProjectRestrictedEmailWidgetType)
+WidgetTypeRegistry.register(MyProjectVisitTitleWidgetType)
+
Index: /waeup_product/branches/srpp_branch/Widgets.py
===================================================================
--- /waeup_product/branches/srpp_branch/Widgets.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/Widgets.py	(revision 196)
@@ -0,0 +1,238 @@
+#-*- mode: python; mode: fold -*-
+from Globals import InitializeClass
+from Products.CPSSchemas.Widget import CPSWidgetType
+from Products.CPSSchemas.BasicWidgets import CPSStringWidget, CPSEmailWidget
+from Products.CPSSchemas.ExtendedWidgets import CPSDateTimeWidget
+from Products.CPSSchemas.WidgetTypesTool import WidgetTypeRegistry
+from DateTime.DateTime import DateTime
+from AccessControl import getSecurityManager
+
+from re import compile
+
+from zLOG import LOG, DEBUG
+
+class StudentIdWidget(CPSStringWidget): ###(
+    """ StudentId Widget"""
+    meta_type = "StudentId Widget"
+    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)
+        if not valid:
+            return 0
+        else:
+            widget_id = self.getWidgetId()
+            value = datastructure[widget_id]
+            err = 0
+            if not (len(value) == self.digits + self.letters and value[:self.digits].isdigit() and value[self.digits:].isalpha()):
+                err = 'invalid Student Id in the format: %s%s with N = Number, L = Letter' % (self.digits_str,self.letters_str) 
+            if err:
+                datastructure.setError(widget_id, err)
+            else:
+                datamodel = datastructure.getDataModel()
+                datamodel[self.fields[0]] = value
+            
+            return not err
+
+InitializeClass(StudentIdWidget)
+
+class StudentIdWidgetType(CPSWidgetType):
+    """Student Id String widget type."""
+    meta_type = "StudentId  Widget Type"
+    cls = StudentIdWidget
+
+###)
+
+class ScratchcardPinWidget(CPSStringWidget): ###(
+    """ ScratchcardPin Widget"""
+    meta_type = "ScratchcardPin Widget"
+    valid_pins = ['123456',
+                  '234567',
+                  '345678',
+                  '456789',
+                  ]
+    
+    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]
+            err = 0
+            if not value in self.valid_pins: 
+                err = 'invalid Pin'
+            if err:
+                datastructure.setError(widget_id, err)
+            else:
+                datamodel = datastructure.getDataModel()
+                datamodel[self.fields[0]] = value
+            return not err
+
+InitializeClass(ScratchcardPinWidget)
+
+class ScratchcardPinWidgetType(CPSWidgetType):
+    """Scratchcard Pin widget type."""
+    meta_type = "Scratchcard Pin Widget Type"
+    cls = ScratchcardPinWidget
+
+###)
+
+###########
+
+WidgetTypeRegistry.register(StudentIdWidgetType)
+WidgetTypeRegistry.register(ScratchcardPinWidgetType)
+
+##class MyProjectWeekDateTimeWidget(CPSDateTimeWidget): ###(
+##    """ """
+##    meta_type = "MyProject Week Date Time Widget"
+##    
+##    def validate(self, datastructure, **kw):
+##        """Validate datastructure and update datamodel."""
+##        
+##        valid = CPSDateTimeWidget.validate(self, datastructure, **kw)
+##        if not valid:
+##            return 0
+##        else:
+##            widget_id = self.getWidgetId()
+##            value = datastructure[widget_id]
+##            err = 0
+##            if value.dow() in (6, 0):
+##                err = 'Cette date ne correspond pas à un jour de semaine'
+##
+##            if err:
+##                datastructure.setError(widget_id, err)
+##
+##            return not err
+##
+##InitializeClass(MyProjectWeekDateTimeWidget)
+
+##class MyProjectWeekDateTimeWidgetType(CPSWidgetType):
+##    """MyProject Week DateTime widget type."""
+##    meta_type = "MyProject Week Date Time Widget Type"
+##    cls = MyProjectWeekDateTimeWidget
+##
+##InitializeClass(MyProjectWeekDateTimeWidgetType)
+##class MyProjectRestrictedStringWidget(CPSStringWidget):
+##    """ """
+##    meta_type = "MyProject Restricted String 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]
+##            err = 0
+##            if not (len(value) == 5 and value.isupper() and value.isalpha()):
+##                err = 'Cette chaîne ne correspond pas au format imposé'
+##
+##            if err:
+##                datastructure.setError(widget_id, err)
+##            else:
+##                datamodel = datastructure.getDataModel()
+##                datamodel[self.fields[0]] = value
+##            
+##            return not err
+##
+##InitializeClass(MyProjectRestrictedStringWidget)
+##
+##class MyProjectRestrictedStringWidgetType(CPSWidgetType):
+##    """MyProject Restricted String widget type."""
+##    meta_type = "MyProject Restricted String Widget Type"
+##    cls = MyProjectRestrictedStringWidget
+##
+##InitializeClass(MyProjectRestrictedStringWidgetType)
+##
+##
+##class MyProjectRestrictedEmailWidget(CPSEmailWidget):
+##    """ """
+##    meta_type = "MyProject Restricted Email Widget"
+##
+##    email_myproject_pat = compile(r"^([-\w_+])+\.([-\w_+])+@myproject\.fr$")
+##
+##    def validate(self, datastructure, **kw):
+##        """Validate datastructure and update datamodel."""
+##        
+##        valid = CPSEmailWidget.validate(self, datastructure, **kw)
+##        if not valid:
+##            return 0
+##        else:
+##            widget_id = self.getWidgetId()
+##            err, v = self._extractValue(datastructure[widget_id])
+##            LOG('MyProject: MyProjectWidgets.py', DEBUG, "Valeur de v : %s" % v)
+##            if not err and kw.get('layout_mode') != 'search' and \
+##              v and not self.email_myproject_pat.match(v):
+##                err = 'cpsschemas_err_email'
+##
+##            if err:
+##                datastructure.setError(widget_id, err)
+##            else:
+##                datamodel = datastructure.getDataModel()
+##                datamodel[self.fields[0]] = v
+##            
+##            return not err
+##
+##    def render(self, mode, datastructure, **kw):
+##        """Render in mode from datastructure."""
+##        return CPSStringWidget.render(self, mode, datastructure, **kw)
+##
+##InitializeClass(MyProjectRestrictedEmailWidget)
+##
+##class MyProjectRestrictedEmailWidgetType(CPSWidgetType):
+##    """MyProject Restricted String widget type."""
+##    meta_type = "MyProject Restricted Email Widget Type"
+##    cls = MyProjectRestrictedEmailWidget
+##
+##InitializeClass(MyProjectRestrictedEmailWidgetType)
+##
+##class MyProjectVisitTitleWidget(CPSStringWidget):
+##    """ """
+##    meta_type = "MyProject Visit Title Widget"
+##    
+##    def validate(self, datastructure, **kw):
+##        """Validate datastructure and update datamodel."""
+##        
+##        widget_id = self.getWidgetId()
+##        err = 0
+##        curr_date = DateTime()
+##        date = "%d.%d.%d" % (curr_date.day(), curr_date.month(), curr_date.year())
+##        user = getSecurityManager().getUser()
+##        value = 'Demande de visite du %s par %s' % (date, 
+##             self.portal_directories.members.getEntry(user.getId()).get('fullname'))
+##        datamodel = datastructure.getDataModel()
+##        datamodel[self.fields[0]] = value
+##            
+##        return not err
+##
+##    def render(self, mode, datastructure, **kw):
+##        return ''
+##
+##InitializeClass(MyProjectVisitTitleWidget)
+##
+##class MyProjectVisitTitleWidgetType(CPSWidgetType):
+##    """MyProject Visit Title widget type."""
+##    meta_type = "MyProject Visit Title Widget Type"
+##    cls = MyProjectVisitTitleWidget
+##
+##InitializeClass(MyProjectVisitTitleWidgetType)
+
+#####################################################################################
+
+##WidgetTypeRegistry.register(MyProjectWeekDateTimeWidgetType)
+##WidgetTypeRegistry.register(MyProjectRestrictedStringWidgetType)
+##WidgetTypeRegistry.register(MyProjectRestrictedEmailWidgetType)
+##WidgetTypeRegistry.register(MyProjectVisitTitleWidgetType)
+##
+
+###)
Index: /waeup_product/branches/srpp_branch/Workflows/WAeUPWorkflow.py
===================================================================
--- /waeup_product/branches/srpp_branch/Workflows/WAeUPWorkflow.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/Workflows/WAeUPWorkflow.py	(revision 196)
@@ -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_product/branches/srpp_branch/Workflows/__init__.py
===================================================================
--- /waeup_product/branches/srpp_branch/Workflows/__init__.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/Workflows/__init__.py	(revision 196)
@@ -0,0 +1,1 @@
+# Make this a module
Index: /waeup_product/branches/srpp_branch/__init__.py
===================================================================
--- /waeup_product/branches/srpp_branch/__init__.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/__init__.py	(revision 196)
@@ -0,0 +1,71 @@
+from Products.CMFCore.DirectoryView import registerDirectory
+from Products.CMFCore import utils as cmfutils
+from Products.CMFCore.CMFCorePermissions import AddPortalContent
+
+registerDirectory('skins', globals())
+
+import University
+import Students
+import Accommodation
+import Faculty
+import Widgets
+import WAeUPPermissions
+
+fti = (Students.student_fti,
+       Students.studentdocuments_fti,
+       Students.studentpersonal_fti,
+       Students.studenteligibility_fti,
+       Students.jamb_fti,
+       Students.study_level_fti,
+       Students.semester_fti,
+       Accommodation.accofolder_fti,
+       Accommodation.accommodation_fti,
+       Faculty.faculty_fti,
+       Faculty.department_fti,
+       Faculty.course_fti,
+       Faculty.course_ticket_fti,
+      )
+
+contentClasses = (University.University,
+                  Students.StudentsFolder,
+                  Students.Student,
+                  Students.StudentDocuments,
+                  Students.StudentPersonal,
+                  Students.StudentEligibility,
+                  Students.Jamb,
+                  Students.StudyLevel,
+                  Students.Semester,
+                  Accommodation.AccoFolder,
+                  Accommodation.Accommodation,
+                  Faculty.Faculty,
+                  Faculty.Department,
+                  Faculty.Course,
+                  Faculty.CourseTicket,
+                 )
+
+contentConstructors = (University.addUniversity,
+                       Students.addStudentsFolder,
+                       Students.addStudent,
+                       Students.addStudentDocuments,
+                       Students.addStudentPersonal,
+                       Students.addStudentEligibility,
+                       Students.addJamb,
+                       Students.addStudyLevel,
+                       Students.addSemester,
+                       Accommodation.addAccommodation,
+                       Accommodation.addAccoFolder,
+                       Faculty.addFaculty,
+                       Faculty.addDepartment,
+                       Faculty.addCourse,
+                       Faculty.addCourseTicket,
+                       )
+
+def initialize(registrar):
+    cmfutils.ContentInit(
+        'WAeUP',
+        content_types=contentClasses,
+        permission=AddPortalContent,
+        extra_constructors=contentConstructors,
+        fti=fti,
+        
+    ).initialize(registrar)
Index: /waeup_product/branches/srpp_branch/i18n/.config.pot
===================================================================
--- /waeup_product/branches/srpp_branch/i18n/.config.pot	(revision 196)
+++ /waeup_product/branches/srpp_branch/i18n/.config.pot	(revision 196)
@@ -0,0 +1,1 @@
+/var/lib/zope2.7/instance/test_madarche_HEAD/Products/MyProject/i18n/myproject.pot
Index: /waeup_product/branches/srpp_branch/i18n/custom.pot
===================================================================
--- /waeup_product/branches/srpp_branch/i18n/custom.pot	(revision 196)
+++ /waeup_product/branches/srpp_branch/i18n/custom.pot	(revision 196)
@@ -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_product/branches/srpp_branch/i18n/en.po
===================================================================
--- /waeup_product/branches/srpp_branch/i18n/en.po	(revision 196)
+++ /waeup_product/branches/srpp_branch/i18n/en.po	(revision 196)
@@ -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_product/branches/srpp_branch/i18n/fr.po
===================================================================
--- /waeup_product/branches/srpp_branch/i18n/fr.po	(revision 196)
+++ /waeup_product/branches/srpp_branch/i18n/fr.po	(revision 196)
@@ -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_product/branches/srpp_branch/i18n/myproject.pot
===================================================================
--- /waeup_product/branches/srpp_branch/i18n/myproject.pot	(revision 196)
+++ /waeup_product/branches/srpp_branch/i18n/myproject.pot	(revision 196)
@@ -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_product/branches/srpp_branch/skins/waeup_default/common_edit_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/common_edit_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/common_edit_form.pt	(revision 196)
@@ -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/content_lib_master/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_product/branches/srpp_branch/skins/waeup_default/cpsdocument_edit_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/cpsdocument_edit_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/cpsdocument_edit_form.pt	(revision 196)
@@ -0,0 +1,69 @@
+<tal:block define="res python:here.editCPSDocument(REQUEST=request);
+                   rendered_main python: res[0];
+                   portal_status_message python: res[1];
+                   edition python:1;
+  ">
+<metal:block define-macro="edit_form">
+<metal:block use-macro="here/content_lib_master/macros/master">
+  <metal:block fill-slot="css_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">
+    <!--
+     function popup_rte(input_id, label_edit) {
+       var args, value
+       value = document.getElementById(input_id).value;
+       args='?input_id='+input_id+'&label_edit='+escape(label_edit);
+       popup = window.open('popup_rte_form'+args, input_id, 'toolbar=0, scrollbars=0, location=0, statusbar=0, menubar=0, resizable=1, dependent=1, width=640, height=480')
+       if(!popup.opener)
+         popup.opener = window;
+       return false;
+   }
+   //-->
+   </script>
+   </metal:block>
+  </metal:block>
+
+  <metal:block fill-slot="header"
+    tal:define="creation creation|nothing;
+                edition edition|nothing;
+                metadata metadata|nothing">
+    <h1 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>
+    </h1>
+    <h1 tal:condition="not:creation">
+      <img tal:replace="structure python:here.getImgTag('/'+here.getIcon(), base_url='')">
+      <tal:block condition="edition"
+        i18n:translate="">Edit <span i18n:name="title"
+        tal:content="here/title_or_id">Page Title</span></tal:block>
+      <tal:block tal:condition="metadata"
+        i18n:translate="">heading_metadata_edit</tal:block>
+    </h1>
+  </metal:block>
+
+  <metal:block fill-slot="main">
+    <div tal:replace="structure rendered_main" />
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+
+</metal:block>
+</metal:block>
+</tal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/create_common.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/create_common.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/create_common.py	(revision 196)
@@ -0,0 +1,47 @@
+##parameters=REQUEST=None
+# $Id$
+"""
+Create a Faculty
+
+"""
+type_name = REQUEST.get('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= type_name.lower(),
+                      schema_id= 'metadata',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      )
+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('Title').replace(' ','')
+    context.invokeFactory(type_name,oid) 
+    object = getattr(context,oid)    
+    object.getContent().edit(mapping=ds)
+    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_product/branches/srpp_branch/skins/waeup_default/create_common_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/create_common_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/create_common_form.pt	(revision 196)
@@ -0,0 +1,22 @@
+<tal:block define="rendered_main options/rendered;
+                   portal_status_message options/psm;"
+                   >
+<metal:block define-macro="edit_form">
+<metal:block use-macro="here/content_lib_master/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>Enter the Data for 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_product/branches/srpp_branch/skins/waeup_default/faculties.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/faculties.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/faculties.pt	(revision 196)
@@ -0,0 +1,36 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+  <metal:block fill-slot="head_slot">
+    <tal:block tal:define="student here/getContent">
+    </tal:block>
+  </metal:block>
+
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="items context/contentValues"
+               >
+    <span> 
+      <h2>The Faculties</h2>
+      <table cellspacing="0" cellpadding="0">
+        <tal:block condition="python: len(items)">
+          <span tal:repeat="item items">
+            <tr tal:condition="python:item.portal_type == 'Faculty'">
+              <td colspan="1">
+                <a href="faculty" tal:attributes="href item/absolute_url" tal:content="item/title_or_id"></a>
+              </td>
+            </tr>
+          </span>
+        </tal:block>
+        <tr tal:condition="python:not len(items)">
+          <td>
+            nothing yet !
+          </td>
+        </tr>
+      </table>
+    </span>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/getWAeUPLayouts.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/getWAeUPLayouts.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/getWAeUPLayouts.py	(revision 196)
@@ -0,0 +1,2430 @@
+#-*- mode: python; mode: fold -*-
+##parameters=
+# $Id$
+"""Return custom layouts types."""
+
+##def widget(type = 'String Widget',
+##            'data': {
+##                'title': '',
+##                'fields': ('nr_of_floors',),
+##                'is_required': True,
+##                'label': 'Nr of Floors ',
+##                'label_edit': 'Nr of Floors',
+##                'description': '',
+##                'help': 'Number of floors per block',
+##                'is_i18n': False,
+##                'readonly_layout_modes': [],
+##                'hidden_layout_modes': [],
+##                'hidden_readonly_layout_modes': [],
+##                'hidden_empty': 0,
+##                'hidden_if_expr': '',
+##                'widget_mode_expr': '',
+##                'css_class': '',
+##                'css_class_expr': '',
+##                'javascript_expr': '',
+##                'vocabulary': 'range5',
+##                'translated': False,
+##            },
+##        },
+
+Heading = { ###(
+         'type': 'Heading Widget',
+         'data': {
+                'fields': ['heading'],
+                'level': 1,
+                'is_i18n': 0,
+                'is_required': 1,
+                'label_edit': 'Headline',
+                'help': 'Short Headline',
+                'display_width': 40,
+                'size_max': 200,
+            },
+        }###)
+
+Text = { ###(
+            'type': 'Text Widget',
+            'data': {
+                'fields': ['text'],
+                'is_i18n': 1,
+                'label_edit': 'Text',
+                'label': 'Text',
+                'help': 'Short Description',
+                'css_class': 'description',
+                'width': 72,
+                'height': 5,
+                'render_format': 'text',
+                'hidden_layout_modes': (),
+            },
+        }###)
+
+Title = { ###(
+         'type': 'String Widget',
+         'data': {
+                'fields': ['Title'],
+                'is_i18n': 0,
+                'is_required': 1,
+                'label': 'Title',
+                'label_edit': 'Title',
+                'display_width': 40,
+                'size_max': 200,
+            },
+        }###)
+
+sc_id = { ###(
+        'type': 'String Widget',
+        'data': {
+                'title': 'SC ID',
+                'fields': ('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': ('sc_pin'),
+                'is_required': True,
+                'label': 'enter  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,
+            },
+        }
+###)
+
+sc_value = { ###(
+         'type': 'Float Widget',
+         'data': {
+                'title': 'Scratch card value',
+                'fields': ('sc_value',),
+                'is_required': True,
+                'label': 'SC Value',
+                'label_edit': 'Scratcard Value',
+                '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': 10,
+                'size_max': 10,
+            },
+        }
+###)
+
+Description = { ###(
+            'type': 'Text Widget',
+            'data': {
+                'fields': ['Description'],
+                'is_i18n': 1,
+                'label_edit': 'Description',
+                'label': 'Description',
+                'css_class': 'description',
+                'width': 72,
+                'height': 5,
+                'render_format': 'text',
+                'hidden_layout_modes': (),
+            },
+        }###)
+
+common_layout = {###(
+    'widgets': {
+        'LanguageSelector': {
+            'type': 'Document Language Select Widget',
+            'data': {
+                'fields': ['Language'],
+            },
+        },
+        'Title': Title,
+        'Description': Description,
+        'LanguageSelectorCreation': {
+            'type': 'Select Widget',
+            'data': {
+                'title': 'Language',
+                'fields': ('Language',),
+                'is_required': 0,
+                'label': 'label_language',
+                'label_edit': 'label_language',
+                'description': '',
+                'help': '',
+                'is_i18n': 0,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': ('create','edit', 'view'),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': 0,
+                'hidden_if_expr': '',
+                'css_class': '',
+                'vocabulary': 'language_voc',
+            },
+        },
+    },
+    'layout': {
+        'style_prefix': 'layout_waeup_',
+        'rows': [
+            #[{'widget_id': 'LanguageSelector'}],
+            [{'widget_id': 'Title'},],
+            [{'widget_id': 'Description'},],
+            #[{'widget_id': 'LanguageSelectorCreation'}],
+            ],
+        },
+    }
+#
+###)
+
+firstname = { ###(
+            'type': 'String Widget',
+            'data': {
+                'title': 'First Name',
+                'fields': ('firstname',),
+                'is_required': False,
+                'label': 'First Name',
+                'label_edit': 'First Name',
+                'description': 'First Name',
+                'help': '',
+                'is_i18n': False,
+                'display_width': 40,
+                },
+            }
+
+###)
+
+middlename = { ###(
+            'type': 'String Widget',
+            'data': {
+                'title': '',
+                'fields': ('middlename',),
+                'is_required': False,
+                'label': 'Middle Name',
+                'label_edit': 'Middle Name',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': True,
+                'hidden_if_expr': '',
+                'css_class': '',
+                'widget_mode_expr': '',
+                'display_width': 40,
+                'size_max': 0,
+                },
+            }
+
+###)
+
+lastname = { ###(
+            'type': 'String Widget',
+            'data': {
+                'title': '',
+                'fields': ('lastname',),
+                'is_required': False,
+                'label': 'Surname',
+                'label_edit': 'Surname',
+                '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': 40,
+                'size_max': 0,
+            },
+        }
+
+###)
+
+email = { ###(
+            'type': 'Email Widget',
+            'data': {
+                'title': 'Email',
+                'fields': ('email',),
+                'is_required': True,
+                'label': 'Email',
+                'label_edit': 'Email',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'display_width': 40,
+                },
+            }
+###)
+
+sex = { ###(
+            'type': 'Boolean Widget',
+            'data': {
+                'title': '',
+                'fields': ('sex',),
+                'is_required': False,
+                'label': 'Sex',
+                'label_edit': 'Sex',
+                'label_false': 'male',
+                'label_true': 'female',
+                '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': 20,
+                'size_max': 0,
+            }
+        }
+
+###)
+
+pw = { ###(
+            'type': 'Password Widget',
+            'data': {
+                'title': 'Password',
+                'fields': ('pw',),
+                'is_required': False,
+                'label': 'New Password',
+                'label_edit': 'New Password',
+                'description': '',
+                'help': 'Enter a New Password',
+                'is_i18n': 0,
+                'readonly_layout_modes': [],
+                'hidden_layout_modes': [],
+                'hidden_readonly_layout_modes': [],
+                'hidden_empty': 0,
+                'hidden_if_expr': '',
+                'widget_mode_expr': '',
+                'css_class': '',
+                'css_class_expr': '',
+                'javascript_expr': '',
+                'display_width': 12,
+                'size_max': 8,
+                'password_widget': '',
+                'check_lower': 0,
+                'check_upper': 0,
+                'check_digit': 0,
+                'check_extra': 0,
+                'size_min': 5,
+            },
+        }###)
+
+rpw = { ###(
+            'type': 'Password Widget',
+            'data': {
+                'title': 'confirm Password',
+                'fields': ('rpw',),
+                'is_required': False,
+                'label': 'Confirm Password',
+                'label_edit': 'Confirm Password',
+                'description': '',
+                'help': 'Confirm the New Password',
+                'is_i18n': False,
+                'display_width': 12,
+                'size_max': 8,
+                'password_widget': 'pw',
+                'check_lower': 0,
+                'check_upper': 0,
+                'check_digit': 0,
+                'check_extra': 0,
+                'size_min': 5,
+                },
+            }###)
+
+username_hidden = { ###(
+            'type': 'String Widget',
+            'data': {
+                'title': 'Username',
+                'fields': ('username',),
+                'hidden_layout_modes': ['create',],
+                },
+            }
+
+###)
+
+student_layout = { ###(
+    'widgets': {
+        'jamb_is_admitted': {
+            'type': 'Boolean Widget',
+            'data': {
+                'title': 'JAMB Admission',
+                'fields': ('jamb_is_admitted',),
+                'is_required': False,
+                'label': 'JAMB Admission',
+                'label_edit': 'JAMB Admission',
+                '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': 10,
+                'size_max': 0,
+            },
+        },
+
+        'faculty': {
+            'type': 'String Widget',
+            'data': {
+                'title': 'Faculty',
+                'fields': ('faculty',),
+                'is_required': False,
+                'label': 'Faculty',
+                'label_edit': 'Faculty',
+                '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': 10,
+                'size_max': 0,
+            },
+        },
+        'accommodation': {
+            'type': 'String Widget',
+            'data': {
+                'title': 'Accommodation',
+                'fields': ('accommodation',),
+                'is_required': False,
+                'label': 'Accommodation',
+                'label_edit': 'Accommodation',
+                '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': 10,
+                'size_max': 0,
+            },
+        },
+        'accommodation_sc_id': { ###(
+            'type': 'String Widget',
+            'data': {
+                'title': 'Accommodation SC ID',
+                'fields': ('accommodation_sc_id',),
+                'is_required': False,
+                'label': 'Accommodation SC ID',
+                'label_edit': 'Accommodation SC ID',
+                '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': 10,
+                'size_max': 0,
+            },
+        },###)
+        'accommodation_sc_pin': { ###(
+            'type': 'String Widget',
+            'data': {
+                'title': 'Accommodation SC PIN',
+                'fields': ('accommodation_sc_pin',),
+                'is_required': False,
+                'label': 'Accommodation SC PIN',
+                'label_edit': 'Accommodation SC PIN',
+                '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': 10,
+                'size_max': 0,
+            },
+        },###)
+        'accommodation_sc_value': { ###(
+            'type': 'Float Widget',
+            'data': {
+                'title': 'Accommodation SC Value',
+                'fields': ('accommodation_sc_value',),
+                'is_required': False,
+                'label': 'Accommodation SC Value',
+                'label_edit': 'Accommodation SC Value',
+                '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': 10,
+                'size_max': 0,
+            },
+        },###)
+        'accommodation_date': { ###(
+            'type': 'DateTime Widget',
+            'data': {
+                'title': 'Accommodation SC PIN',
+                'fields': ('accommodation_date',),
+                'is_required': False,
+                'label': 'Accommodation SC Date',
+                'label_edit': 'Accommodation SC Date',
+                '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': 10,
+                'size_max': 0,
+            },
+        },###)
+        'hostel_fee_sc_id': { ###(
+            'type': 'String Widget',
+            'data': {
+                'title': 'hostel_fee SC ID',
+                'fields': ('hostel_fee_sc_id',),
+                'is_required': False,
+                'label': 'Hostel Fee SC ID',
+                'label_edit': 'Hostel Fee SC ID',
+                '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': 10,
+                'size_max': 0,
+            },
+        },###)
+        'hostel_fee_sc_pin': { ###(
+            'type': 'String Widget',
+            'data': {
+                'title': 'hostel_fee SC PIN',
+                'fields': ('hostel_fee_sc_pin',),
+                'is_required': False,
+                'label': 'Hostel Fee SC PIN',
+                'label_edit': 'Hostel Fee SC PIN',
+                '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': 10,
+                'size_max': 0,
+            },
+        },###)
+        'hostel_fee_sc_value': { ###(
+            'type': 'Float Widget',
+            'data': {
+                'title': 'hostel_fee SC Value',
+                'fields': ('hostel_fee_sc_value',),
+                'is_required': False,
+                'label': 'Hostel Fee SC Value',
+                'label_edit': 'Hostel Fee SC Value',
+                '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': 10,
+                'size_max': 0,
+            },
+        },###)
+        'hostel_fee_date': { ###(
+            'type': 'DateTime Widget',
+            'data': {
+                'title': 'hostel_fee SC PIN',
+                'fields': ('hostel_fee_date',),
+                'is_required': False,
+                'label': 'Hostel Fee SC Date',
+                'label_edit': 'Hostel Fee SC Date',
+                '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': 10,
+                'size_max': 0,
+            },
+        },###)
+        'adm_check_sc_id': { ###(
+            'type': 'String Widget',
+            'data': {
+                'title': 'Admission check SC ID',
+                'fields': ('adm_check_sc_id',),
+                'is_required': False,
+                'label': 'Admission check SC ID',
+                'label_edit': 'Admission check SC ID',
+                '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': 10,
+                'size_max': 0,
+            },
+        },###)
+        'adm_check_sc_pin': { ###(
+            'type': 'String Widget',
+            'data': {
+                'title': 'Admission check SC PIN',
+                'fields': ('adm_check_sc_pin',),
+                'is_required': False,
+                'label': 'Admission check SC PIN',
+                'label_edit': 'Admission check SC PIN',
+                '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': 10,
+                'size_max': 0,
+            },
+        },###)
+        'adm_check_sc_value': { ###(
+            'type': 'Float Widget',
+            'data': {
+                'title': 'Admission check SC Value',
+                'fields': ('adm_check_sc_value',),
+                'is_required': False,
+                'label': 'Admission check SC Value',
+                'label_edit': 'Admission check SC Value',
+                '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': 10,
+                'size_max': 0,
+            },
+        },###)
+        'adm_check_date': { ###(
+            'type': 'DateTime Widget',
+            'data': {
+                'title': 'Admission check SC PIN',
+                'fields': ('adm_check_date',),
+                'is_required': False,
+                'label': 'Admission check SC Date',
+                'label_edit': 'Admission check SC Date',
+                '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': 10,
+                'size_max': 0,
+            },
+        },###)
+        'clearance_sc_id': { ###(
+            'type': 'String Widget',
+            'data': {
+                'title': 'Clearance SC ID',
+                'fields': ('clearance_sc_id',),
+                'is_required': False,
+                'label': 'Clearance SC ID',
+                'label_edit': 'Clearance SC ID',
+                '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': 10,
+                'size_max': 0,
+            },
+        },###)
+        'clearance_sc_pin': { ###(
+            'type': 'String Widget',
+            'data': {
+                'title': 'clearance SC PIN',
+                'fields': ('clearance_sc_pin',),
+                'is_required': False,
+                'label': 'Clearance SC PIN',
+                'label_edit': 'Clearance SC PIN',
+                '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': 10,
+                'size_max': 0,
+            },
+        },###)
+        'clearance_sc_value': { ###(
+            'type': 'Float Widget',
+            'data': {
+                'title': 'clearance SC Value',
+                'fields': ('clearance_sc_value',),
+                'is_required': False,
+                'label': 'Clearance SC Value',
+                'label_edit': 'Clearance SC Value',
+                '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': 10,
+                'size_max': 0,
+            },
+        },###)
+        'clearance_date': { ###(
+            'type': 'DateTime Widget',
+            'data': {
+                'title': 'clearance SC PIN',
+                'fields': ('clearance_date',),
+                'is_required': False,
+                'label': 'Clearance SC Date',
+                'label_edit': 'Clearance SC Date',
+                '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': 10,
+                'size_max': 0,
+            },
+        },###)
+    },
+    'layout': {
+        'style_prefix': 'layout_waeup_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            [{'widget_id': 'adm_check_sc_id', 'ncols': 1},],
+            [{'widget_id': 'adm_check_sc_pin', 'ncols': 1},],
+            [{'widget_id': 'adm_check_sc_value', 'ncols': 1},],
+            [{'widget_id': 'adm_check_date', 'ncols': 1},],
+            [{'widget_id': 'clearance_sc_id', 'ncols': 1},],
+            [{'widget_id': 'clearance_sc_pin', 'ncols': 1},],
+            [{'widget_id': 'clearance_sc_value', 'ncols': 1},],
+            [{'widget_id': 'clearance_date', 'ncols': 1},],
+            [{'widget_id': 'accommodation', 'ncols': 1},],
+            [{'widget_id': 'accommodation_sc_id', 'ncols': 1},],
+            [{'widget_id': 'accommodation_sc_pin', 'ncols': 1},],
+            [{'widget_id': 'accommodation_sc_value', 'ncols': 1},],
+            [{'widget_id': 'accommodation_date', 'ncols': 1},],
+            [{'widget_id': 'hostel_fee_sc_id', 'ncols': 1},],
+            [{'widget_id': 'hostel_fee_sc_pin', 'ncols': 1},],
+            [{'widget_id': 'hostel_fee_sc_value', 'ncols': 1},],
+            [{'widget_id': 'hostel_fee_date', 'ncols': 1},],
+        ]
+    },
+}###)
+
+student_personal_layout = { ###(
+    'widgets': {
+        'firstname': firstname,
+        'middlename': middlename,
+        'lastname': lastname,
+        'email': email,
+        'sex': sex,
+        'birthday': {
+            'type': 'Date Widget',
+            'data': {
+                'title': '',
+                'fields': ('birthday',),
+                'is_required': False,
+                'label': 'Day of birth',
+                'label_edit': 'Day of birth',
+                'description': 'Day of birth',
+                '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': 10,
+                'size_max': 0,
+            },
+        },
+    },
+    'layout': {
+        'style_prefix': 'layout_personal_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            [{'widget_id': 'firstname', 'ncols': 1},],
+            [{'widget_id': 'middlename', 'ncols': 1},],
+            [{'widget_id': 'lastname', 'ncols': 1},],
+            [{'widget_id': 'email', 'ncols': 1},],
+            [{'widget_id': 'sex', 'ncols': 1},],
+            [{'widget_id': 'birthday', 'ncols': 1},],
+        ]
+    },
+}###)
+
+student_personal_addon = { ###(
+    'widgets': {
+        'firstname': middlename,
+        'middlename': middlename,
+        'lastname': lastname,
+        'sex': sex,
+        'email': email,
+        'username': username_hidden,
+        'pw': pw,
+        'rpw': rpw,
+    },
+    'layout': {
+        'style_prefix': 'layout_eligibility_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            #[{'widget_id': 'firstname', 'ncols': 1},],
+            #[{'widget_id': 'middlename', 'ncols': 1},],
+            #[{'widget_id': 'lastname', 'ncols': 1},],
+            #[{'widget_id': 'username', 'ncols': 1},],
+            [{'widget_id': 'email', 'ncols': 1},],
+            #[{'widget_id': 'pw', 'ncols': 1},],
+            #[{'widget_id': 'rpw', 'ncols': 1},],
+        ]
+    },
+}###)
+
+schoolresults = { ###(
+            'type': 'Ordered List Widget',
+            'data': {
+                'title': '',
+                'fields': ['schoolresults'],
+                'is_required': 0,
+                'label': 'School Results',
+                'label_edit': 'School Results',
+                'description': '',
+                'help': '',
+                'is_i18n': 0,
+                'readonly_layout_modes': [],
+                'hidden_layout_modes': ['create','edit'],
+                'hidden_readonly_layout_modes': [],
+                'hidden_empty': 0,
+                'hidden_if_expr': '',
+                'widget_mode_expr': '',
+                'css_class': '',
+                'css_class_expr': '',
+                'javascript_expr': '',
+                'width': 40,
+                'height': 5,
+                'format_empty': '',
+            },
+        }###)
+
+eli_widgets = { ###(
+        'jamb_results': {
+            'type': 'String Widget',
+            'data': {
+                'title': '',
+                'fields': ('jamb_results',),
+                'is_required': False,
+                'label': 'JAMB Results',
+                'label_edit': 'JAMB Results',
+                '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': 20,
+                'size_max': 0,
+            },
+        },
+        'jamb_aggregate': {
+            'type': 'String Widget',
+            'data': {
+                'title': 'Aggregate',
+                'fields': ('jamb_aggregate',),
+                'is_required': False,
+                'label': 'JAMB Score',
+                'label_edit': 'JAMB Score',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+            },
+        },
+        'jamb_listing_date': {
+            'type': 'Date Widget',
+            'data': {
+                'title': 'Listing Date',
+                'fields': ('jamb_listing_date',),
+                'is_required': False,
+                'label': 'Listing Date',
+                'label_edit': 'Listing Date',
+                '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': 0,
+            },
+        },
+        'faculty': {
+            'type': 'Select Widget',
+            'data': {
+                'title': 'Faculty',
+                'fields': ('faculty',),
+                'is_required': True,
+                'label': 'Faculty',
+                'label_edit': 'Faculty',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'vocabulary': 'get_faculties_voc',
+            },
+        },
+        'course': {
+            'type': 'Select Widget',
+            'data': {
+                'title': 'Study Course',
+                'fields': ('course',),
+                'is_required': True,
+                'label': 'Study Course',
+                'label_edit': 'Study Course',
+                'description': '',
+                'help': 'The course to study',
+                'vocabulary': 'get_departments_voc',
+                'is_i18n': False,
+            },
+        },
+        'schoolresults': schoolresults,
+    }###)
+
+student_eligibility = { ###(
+    'widgets': eli_widgets,
+    'layout': {
+        'style_prefix': 'layout_waeup_',
+        'layout_edit_method': 'layout_eligibility_create',
+        'layout_create_method': 'layout_eligibility_create',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            #[{'widget_id': 'jamb_results', 'ncols': 1},],
+            [{'widget_id': 'jamb_aggregate', 'ncols': 1},],
+            #[{'widget_id': 'jamb_listing_date', 'ncols': 1},],
+            [{'widget_id': 'faculty', 'ncols': 1},],
+            [{'widget_id': 'course', 'ncols': 1},],
+            [{'widget_id': 'schoolresults', 'ncols': 1},],
+        ]
+    },
+}###)
+
+student_eligibility_edit = { ###(
+    'widgets': eli_widgets,
+    'layout': {
+        'style_prefix': 'layout_eligibility_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            #[{'widget_id': 'jamb_results', 'ncols': 1},],
+            [{'widget_id': 'jamb_aggregate', 'ncols': 1},],
+            #[{'widget_id': 'jamb_listing_date', 'ncols': 1},],
+            [{'widget_id': 'faculty', 'ncols': 1},],
+            [{'widget_id': 'course', 'ncols': 1},],
+            [{'widget_id': 'schoolresults', 'ncols': 1},],
+        ]
+    },
+}###)
+
+student_schoolresults = { ###(
+    'widgets': {
+        'schoolresults': schoolresults,
+    },
+    'layout': {
+        'style_prefix': 'layout_results_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            #[{'widget_id': 'jamb_results', 'ncols': 1},],
+            #[{'widget_id': 'jamb_aggregate', 'ncols': 1},],
+            #[{'widget_id': 'jamb_listing_date', 'ncols': 1},],
+            #[{'widget_id': 'faculty', 'ncols': 1},],
+            #[{'widget_id': 'course', 'ncols': 1},],
+            [{'widget_id': 'schoolresults', 'ncols': 1},],
+        ]
+    },
+}###)
+
+student_documents = { ###(
+    'widgets': {
+        'photo': { ###(
+            'type': 'Photo Widget',
+            'data': {
+                'title': '',
+                'fields': ('photo',),
+                'is_required': False,
+                'label': 'Personal Picture',
+                'label_edit': 'Personal Picture',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': '',
+                'widget_mode_expr': '',
+                'css_class': '',
+                'css_class_expr': '',
+                'javascript_expr': '',
+                'deletable': True,
+                'size_max': 204800,
+                'display_width': 90,
+                'display_height': 180,
+                'allow_resize': True,
+                'render_position': 'left',
+                'configurable': 'nothing',
+                'keep_original': 1,
+            },
+        },###)
+        'birth_certificate': { ###(
+            'type': 'Image Widget',
+            'data': {
+                'title': '',
+                'fields': ('birth_certificate',),
+                'is_required': False,
+                'label': 'Birth Certificate',
+                'label_edit': 'Birth Certificate',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': '',
+                'widget_mode_expr': '',
+                'css_class': '',
+                'css_class_expr': '',
+                'javascript_expr': '',
+                'deletable': True,
+                'size_max': 204800,
+                'display_width': 300,
+                'display_height':600,
+                'allow_resize': True,
+            },
+        },###)
+        'passport': { ###(
+            'type': 'Image Widget',
+            'data': {
+                'title': '',
+                'fields': ('passport',),
+                'is_required': False,
+                'label': 'Scanned Passport',
+                'label_edit': 'Scanned Passport',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': '',
+                'widget_mode_expr': '',
+                'css_class': '',
+                'css_class_expr': '',
+                'javascript_expr': '',
+                'deletable': True,
+                'size_max': 204800,
+                'display_width': 300,
+                'display_height':600,
+                'allow_resize': True,
+            },
+        },###)
+        'results_first': { ###(
+            'type': 'Image Widget',
+            'data': {
+                'title': '',
+                'fields': ('results_first',),
+                'is_required': False,
+                'label': '1st Sitting Results',
+                'label_edit': '1st Sitting Results',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': '',
+                'widget_mode_expr': '',
+                'css_class': '',
+                'css_class_expr': '',
+                'javascript_expr': '',
+                'deletable': True,
+                'size_max': 204800,
+                'display_width': 300,
+                'display_height':600,
+                'allow_resize': True,
+            },
+        },###)
+        'results_second': { ###(
+            'type': 'Image Widget',
+            'data': {
+                'title': '',
+                'fields': ('results_second',),
+                'is_required': False,
+                'label': '2nd Sitting Results',
+                'label_edit': '2nd Sitting Results',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': '',
+                'widget_mode_expr': '',
+                'css_class': '',
+                'css_class_expr': '',
+                'javascript_expr': '',
+                'deletable': True,
+                'size_max': 40960,
+                'display_width': 300,
+                'display_height':600,
+                'allow_resize': True,
+            },
+        },###)
+    },
+    'layout': {
+        'style_prefix': 'layout_personal_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            [{'widget_id': 'photo', 'ncols': 1},],
+            [{'widget_id': 'birth_certificate', 'ncols': 1},],
+            [{'widget_id': 'passport', 'ncols': 1},],
+            [{'widget_id': 'results_first', 'ncols': 1},],
+            [{'widget_id': 'results_second', 'ncols': 1},],
+        ]
+    },
+}
+
+###)
+
+scratch_card = { ###(
+    'widgets': {
+        'sc_id': {
+            'type': 'String Widget',
+            'data': {
+                'title': 'SC ID',
+                'fields': ('sc_id',),
+                'is_required': True,
+                'label': 'Scratch card ID',
+                'label_edit': 'Scratch card ID',
+                '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': 10,
+                'size_max': 0,
+            },
+        },
+        'sc_pin': {
+            'type': 'Scratchcard Pin Widget',
+            'data': {
+                'title': 'SC PIN',
+                'fields': ('sc_pin'),
+                'is_required': True,
+                'label': 'Scratchcard Pin',
+                'label_edit': 'Scratchcard Pin',
+                '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': 10,
+                'size_max': 10,
+            },
+        },
+    },
+   'layout': {
+        'style_prefix': 'layout_waeup_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            [{'widget_id': 'reg_nr', 'ncols': 1},],
+            [{'widget_id': 'sc_pin', 'ncols': 1},],
+        ]
+    },
+}
+###)
+
+jamb_id = { ###(
+           'type': 'StudentId Widget',
+           'data': {
+                'title': 'Registration Number',
+                'fields': ('reg_nr'),
+                'is_required': True,
+                'label': 'Registration Number',
+                'label_edit': 'Registration Number',
+                'description': '',
+                'help': 'This is the combination of 8 digits and 2 letters you are assigned when you purchase an examination form.',
+                '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,
+                 },
+           }
+
+###)
+
+admission = { ###(
+    'widgets': {
+        'sc_id': {
+            'type': 'String Widget',
+            'data': {
+                'title': 'SC ID',
+                'fields': ('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': '',
+                'css_class': '',
+                'widget_mode_expr': '',
+                'display_width': 10,
+                'size_max': 0,
+            },
+        },
+        'sc_value': { ###(
+         'type': 'Float Widget',
+         'data': {
+                'title': 'Scratch card value',
+                'fields': ('sc_value',),
+                'is_required': False,
+                'label': 'SC Value',
+                'label_edit': 'Scratcard Value',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': ('create'),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': '',
+                'css_class': '',
+                'widget_mode_expr': '',
+                'display_width': 10,
+                'size_max': 10,
+            },
+        },###)
+        'sc_pin': {
+            'type': 'Scratchcard Pin Widget',
+            'data': {
+                'title': 'SC PIN',
+                'fields': ('sc_pin'),
+                'is_required': True,
+                'label': 'PIN',
+                'label_edit': 'PIN',
+                'description': '',
+                'help': 'PIN-(Personal Identification Number) is an 8 or 12 digit number on the reverse side of the scratch card which you can purchase from many Banks',
+                '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,
+            },
+        },
+        'jamb_id' : jamb_id,
+    },
+   'layout': {
+        'style_prefix': 'layout_sc_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            #[{'widget_id': 'sc_id', 'ncols': 1},],
+            [{'widget_id': 'sc_value', 'ncols': 1},],
+            [{'widget_id': 'sc_pin', 'ncols': 1},],
+            [{'widget_id': 'jamb_id', 'ncols': 1},],
+        ]
+    },
+}
+###)
+
+clearance = { ###(
+    'widgets': {
+        'sc_id': {
+            'type': 'String Widget',
+            'data': {
+                'title': 'SC ID',
+                'fields': ('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': ('sc_pin'),
+                'is_required': True,
+                'label': 'PIN',
+                'label_edit': 'PIN',
+                'description': '',
+                'help': 'PIN-(Personal Identification Number) is an 8 or 12 digit number on the reverse side of the scratch card which you can purchase from many Banks',
+                '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,
+            },
+        },
+        'sc_value': { ###(
+         'type': 'Float Widget',
+         'data': {
+                'title': 'Scratch card value',
+                'fields': ('sc_value',),
+                'is_required': False,
+                'label': 'SC Value',
+                'label_edit': 'Scratcard Value',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': ('create'),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': '',
+                'css_class': '',
+                'widget_mode_expr': '',
+                'display_width': 10,
+                'size_max': 10,
+            },
+        },###)
+        'lastname': { ###(
+         'type': 'String Widget',
+         'data': {
+                'title': 'Scratch card value',
+                'fields': ('lastname',),
+                'is_required': False,
+                'label': 'Surname',
+                'label_edit': 'Surname',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': ('create'),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': '',
+                'css_class': '',
+                'widget_mode_expr': '',
+                'display_width': 10,
+                'size_max': 10,
+            },
+        },###)
+        'jamb_id' : jamb_id,
+    },
+   'layout': {
+        'style_prefix': 'layout_sc_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            #[{'widget_id': 'sc_id', 'ncols': 1},],
+            [{'widget_id': 'sc_value', 'ncols': 1},],
+            [{'widget_id': 'sc_pin', 'ncols': 1},],
+            [{'widget_id': 'jamb_id', 'ncols': 1},],
+            #[{'widget_id': 'lastname', 'ncols': 1},],
+        ]
+    },
+}
+###)
+
+admission_status = { ###(
+    'widgets': {
+       'quick_search': {
+            'type': 'String Widget',
+            'data': {
+                'title': 'A search string',
+                'fields': ('admission_sc_id',),
+                'is_required': False,
+                'label': 'Quick Search',
+                'label_edit': 'Quick Search',
+                'description': 'Search',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': 'python:0',
+                'css_class': '',
+                'widget_mode_expr': '',
+                'display_width': 20,
+                'size_max': 0,
+            },
+        },
+
+    },
+   'layout': {
+        'style_prefix': 'layout_admission_status_',
+        'flexible_widgets': (),
+        'ncols': 2,
+        'rows': [
+            [{'widget_id': 'quick_search', 'ncols': 2},],
+        ]
+    },
+}
+###)
+
+jamb_widgets = { ###(
+        'reg_nr': {
+            'type': 'StudentId Widget',
+            'data': {
+                'title': 'registration nr',
+                'fields': ('reg_nr',),
+                'is_required': True,
+                'label': 'Registration Nr',
+                'label_edit': 'Registration Nr',
+                'description': 'The student id from JAMB',
+                'help': 'The Student ID from JAMB',
+                'is_i18n': False,
+                'display_width': 10,
+                'size_max': 10,
+            },
+        },
+        'firstname': firstname,
+        'middlename': middlename,
+        'lastname': lastname,
+        'age': {
+            'type': 'Int Widget',
+            'data': {
+                'title': '',
+                'fields': ('age',),
+                'is_required': False,
+                'label': 'Age',
+                'label_edit': 'Age',
+                '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': 2,
+            },
+        },
+        'sex': sex,
+        'state': {
+            'type': 'Select Widget',
+            'data': {
+                'title': '',
+                'fields': ('state',),
+                'is_required': False,
+                'label': 'State of Origin',
+                'label_edit': 'State of Origin',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'vocabulary': 'nigerian_states',
+            },
+        },
+        'exam_results': {
+            'type': 'String Widget',
+            'data': {
+                'title': '',
+                'fields': ('exam_results',),
+                'is_required': False,
+                'label': 'JAMB Results',
+                'label_edit': 'JAMB Results',
+                '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': 20,
+                'size_max': 0,
+            },
+        },
+        'aggregate': {
+            'type': 'String Widget',
+            'data': {
+                'title': 'Agregate',
+                'fields': ('aggregate',),
+                'is_required': False,
+                'label': 'JAMB Score',
+                'label_edit': 'JAMB Score',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+            },
+        },
+        'faculty': {
+            'type': 'Select Widget',
+            'data': {
+                'title': 'Faculty',
+                'fields': ('faculty',),
+                'is_required': True,
+                'label': 'Faculty',
+                'label_edit': 'Faculty',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'vocabulary': 'get_faculties_voc',
+            },
+        },
+        'course': {
+            'type': 'Select Widget',
+            'data': {
+                'title': 'Study Course',
+                'fields': ('course',),
+                'is_required': True,
+                'label': 'Study Course',
+                'label_edit': 'Study Course',
+                'description': '',
+                'help': '',
+                'vocabulary': 'get_departments_voc',
+                'is_i18n': False,
+            },
+        },
+        'listing_date': {
+            'type': 'Date Widget',
+            'data': {
+                'title': 'Listing Date',
+                'fields': ('listing_date',),
+                'is_required': False,
+                'label': 'Listing Date',
+                'label_edit': 'Listing Date',
+                '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': 0,
+            },
+        },
+##        '2nd_choice': { ###(
+##            'type': 'String Widget',
+##            'data': {
+##                'title': 'Second choice',
+##                'fields': ('2nd_choice',),
+##                'is_required': False,
+##                'label': 'Second choice',
+##                'label_edit': 'Second choice',
+##                'description': '',
+##                'help': 'second_choice',
+##                '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': 20,
+##                'size_max': 0,
+##            },
+##        },
+##
+##        '3rd_choice': {
+##            'type': 'String Widget',
+##            'data': {
+##                'title': 'Third_choice',
+##                'fields': ('3rd_choice',),
+##                'is_required': False,
+##                'label': 'Third choice',
+##                'label_edit': 'Third choice',
+##                'description': 'third_choice',
+##                'help': 'third_choice',
+##                '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': 20,
+##                'size_max': 0,
+##            },
+##        },
+###)
+
+        'sc_id': {
+            'type': 'String Widget',
+            'data': {
+                'title': '',
+                'fields': ('admission_sc_id',),
+                'is_required': False,
+                'label': 'Scratch card ID used',
+                'label_edit': 'Scratch card ID used',
+                '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': 20,
+                'size_max': 0,
+            },
+        },
+        'sc_pin': {
+            'type': 'String Widget',
+            'data': {
+                'title': '',
+                'fields': ('admission_sc_pin',),
+                'is_required': False,
+                'label': 'Scratch Card PIN',
+                'label_edit': 'Scratch Card PIN',
+                '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': 20,
+                'size_max': 0,
+            },
+        },
+    }
+###)
+
+jamb_layoutcreate = { ###(
+    'widgets': jamb_widgets,
+    'layout': {
+        'style_prefix': 'layout_jambcreate_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            [{'widget_id': 'reg_nr', 'ncols': 1},],
+            [{'widget_id': 'firstname', 'ncols': 1},],
+            [{'widget_id': 'middlename', 'ncols': 1},],
+            [{'widget_id': 'lastname', 'ncols': 1},],
+            #[{'widget_id': 'sc_id', 'ncols': 1},],
+            #[{'widget_id': 'sc_pin', 'ncols': 1},],
+            [{'widget_id': 'age', 'ncols': 1},],
+            [{'widget_id': 'sex', 'ncols': 1},],
+            [{'widget_id': 'state', 'ncols': 1},],
+            #[{'widget_id': 'exam_results', 'ncols': 1},],
+            [{'widget_id': 'aggregate', 'ncols': 1},],
+            [{'widget_id': 'faculty', 'ncols': 1},],
+            [{'widget_id': 'course', 'ncols': 1},],
+            [{'widget_id': 'listing_date', 'ncols': 1},],
+            #[{'widget_id': '2nd_choice', 'ncols': 1},],
+            #[{'widget_id': '3rd_choice', 'ncols': 1},],
+        ]
+    },
+}
+###)
+
+jamb_layout = { ###(
+    'widgets': jamb_widgets,
+    'layout': {
+        'style_prefix': 'layout_waeup_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            [{'widget_id': 'reg_nr', 'ncols': 1},],
+            [{'widget_id': 'firstname', 'ncols': 1},],
+            [{'widget_id': 'middlename', 'ncols': 1},],
+            [{'widget_id': 'lastname', 'ncols': 1},],
+            #[{'widget_id': 'sc_id', 'ncols': 1},],
+            [{'widget_id': 'sc_pin', 'ncols': 1},],
+            [{'widget_id': 'age', 'ncols': 1},],
+            [{'widget_id': 'sex', 'ncols': 1},],
+            [{'widget_id': 'state', 'ncols': 1},],
+            #[{'widget_id': 'exam_results', 'ncols': 1},],
+            [{'widget_id': 'aggregate', 'ncols': 1},],
+            [{'widget_id': 'faculty', 'ncols': 1},],
+            [{'widget_id': 'course', 'ncols': 1},],
+            [{'widget_id': 'listing_date', 'ncols': 1},],
+            #[{'widget_id': '2nd_choice', 'ncols': 1},],
+            #[{'widget_id': '3rd_choice', 'ncols': 1},],
+        ]
+    },
+}
+###)
+
+admission_slip = { ###(
+    'widgets': jamb_widgets,
+    'layout': {
+        'style_prefix': 'layout_waeup_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            [{'widget_id': 'reg_nr', 'ncols': 1},],
+            [{'widget_id': 'firstname', 'ncols': 1},],
+            [{'widget_id': 'middlename', 'ncols': 1},],
+            [{'widget_id': 'lastname', 'ncols': 1},],
+            #[{'widget_id': 'sc_id', 'ncols': 1},],
+            #[{'widget_id': 'sc_pin', 'ncols': 1},],
+            [{'widget_id': 'age', 'ncols': 1},],
+            [{'widget_id': 'sex', 'ncols': 1},],
+            [{'widget_id': 'state', 'ncols': 1},],
+            #[{'widget_id': 'exam_results', 'ncols': 1},],
+            [{'widget_id': 'aggregate', 'ncols': 1},],
+            [{'widget_id': 'faculty', 'ncols': 1},],
+            [{'widget_id': 'course', 'ncols': 1},],
+            [{'widget_id': 'listing_date', 'ncols': 1},],
+            #[{'widget_id': '2nd_choice', 'ncols': 1},],
+            #[{'widget_id': '3rd_choice', 'ncols': 1},],
+        ]
+    },
+}
+###)
+
+course = { ###(
+    'widgets': {
+        'heading': {
+         'type': 'String Widget',
+         'data': {
+                'fields': ['heading'],
+                'is_i18n': 0,
+                'is_required': 1,
+                'label': 'Title',
+                'label_edit': 'Title',
+                'help': 'Course Title',
+                'display_width': 40,
+                'size_max': 40,
+            },
+        },
+        'text': Text,
+        'level': {
+            'type': 'Select Widget',
+            'data': {
+                'title': '',
+                'fields': ('level',),
+                'is_required': True,
+                'label': 'Level',
+                'label_edit': 'Level',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'vocabulary': 'courselevel',
+            },
+        },
+        'code': {
+            'type': 'String Widget',
+            'data': {
+                'title': 'Code',
+                'fields': ('code',),
+                'is_required': True,
+                'label': 'Code',
+                'label_edit': 'Code',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'display_width': 10,
+                'size_max': 0,
+            },
+        },
+        'semester': {
+            'type': 'Boolean Widget',
+            'data': {
+                'title': '',
+                'fields': ('semester',),
+                'is_required': True,
+                'label': 'Semester',
+                'label_edit': 'Semester',
+                'label_false': 'Second Semester',
+                'label_true': 'First Semester',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'display_width': 10,
+                'size_max': 0,
+            },
+        },
+        'credit': {
+            'type': 'Int Widget',
+            'data': {
+                'title': '',
+                'fields': ('credit',),
+                'is_required': True,
+                'label': 'Credit',
+                'label_edit': 'Credit',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'display_width': 2,
+                'size_max': 0,
+            },
+        },
+        'core_elective': {
+            'type': 'Boolean Widget',
+            'data': {
+                'title': '',
+                'fields': ('core_elective',),
+                'is_required': True,
+                'label': 'Core or elective',
+                'label_edit': 'Core or elective',
+                'label_true': 'Core Course',
+                'label_false': 'Elective Course',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'display_width': 10,
+                'size_max': 0,
+            },
+        },
+    },
+   'layout': {
+        'style_prefix': 'layout_waeup_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            [{'widget_id': 'heading', 'ncols': 1},],
+            #[{'widget_id': 'Title', 'ncols': 1},],
+            [{'widget_id': 'text', 'ncols': 1},],
+            [{'widget_id': 'level', 'ncols': 1},],
+            [{'widget_id': 'code', 'ncols': 1},],
+            [{'widget_id': 'semester', 'ncols': 1},],
+            [{'widget_id': 'credit', 'ncols': 1},],
+            [{'widget_id': 'core_elective', 'ncols': 1},],
+        ]
+    },
+}
+###)
+
+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_waeup_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            [{'widget_id': 'points', 'ncols': 1},],
+            [{'widget_id': 'grade', 'ncols': 1},],
+        ]
+    },
+}
+###)
+
+accommodation = { ###(
+    'widgets': {
+        'heading': {
+         'type': 'String Widget',
+         'data': {
+                'fields': ['heading'],
+                'level': 2,
+                'is_i18n': 0,
+                'is_required': 1,
+                'label': 'Hall Name',
+                'label_edit': 'Hall Name',
+                'help': '',
+                'display_width': 40,
+                'size_max': 40,
+            },
+        },
+        'text': Text,
+        'which_sex': {
+            'type': 'Boolean Widget',
+            'data': {
+                'title': '',
+                'fields': ('which_sex',),
+                'is_required': False,
+                'label': 'Sex',
+                'label_edit': 'Sex',
+                'label_false': 'male',
+                'label_true': 'female',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+            },
+        },
+        'nr_of_blocks': {
+            'type': 'Select Widget',
+            'data': {
+                'title': '',
+                'fields': ('nr_of_blocks',),
+                'is_required': True,
+                'label': 'Nr of Blocks',
+                'label_edit': 'Nr of Blocks',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'vocabulary': 'range10',
+            },
+        },
+        'nr_of_floors': {
+            'type': 'Select Widget',
+            'data': {
+                'title': '',
+                'fields': ('nr_of_floors',),
+                'is_required': True,
+                'label': 'Nr of Floors ',
+                'label_edit': 'Nr of Floors',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'vocabulary': 'range5',
+            },
+        },
+        'rooms_per_floor': {
+            'type': 'Select Widget',
+            'data': {
+                'title': '',
+                'fields': ('rooms_per_floor',),
+                'is_required': True,
+                'label': 'Rooms per Floor',
+                'label_edit': 'Rooms per Floor',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'vocabulary': 'range50',
+            },
+        },
+        'beds_per_room': {
+            'type': 'Select Widget',
+            'data': {
+                'title': '',
+                'fields': ('beds_per_room',),
+                'is_required': True,
+                'label': 'Beds per Room',
+                'label_edit': 'Beds per Room',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'vocabulary': 'range10',
+            },
+        },
+        'beds_assigned': {
+            'type': 'Int Widget',
+            'data': {
+                'title': '',
+                'fields': ('beds_assigned',),
+                'is_required': True,
+                'label': 'Nr. of Assigned Beds',
+                'label_edit': 'Nr. of Assigned Beds',
+                'description': '',
+                'help': 'Number of beds already assigned to students',
+                'is_i18n': False,
+            },
+        },
+        'beds_assigned_list': {
+            'type': 'Ordered List Widget',
+            'data': {
+                'title': '',
+                'fields': ('beds_assigned_list',),
+                'label': 'Assigned Beds',
+                'label_edit': 'Assigned Beds',
+                'description': '',
+                'help': 'List of beds already assigned to students',
+                'is_i18n': False,
+            },
+        },
+    },
+   'layout': {
+        'style_prefix': 'layout_waeup_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            [{'widget_id': 'heading', 'ncols': 1},],
+            #[{'widget_id': 'Title', 'ncols': 1},],
+            [{'widget_id': 'text', 'ncols': 1},],
+            [{'widget_id': 'which_sex', 'ncols': 1},],
+            [{'widget_id': 'nr_of_blocks', 'ncols': 1},],
+            [{'widget_id': 'nr_of_floors', 'ncols': 1},],
+            [{'widget_id': 'rooms_per_floor', 'ncols': 1},],
+            [{'widget_id': 'beds_per_room', 'ncols': 1},],
+            [{'widget_id': 'beds_assigned', 'ncols': 1},],
+            [{'widget_id': 'beds_assigned_list', 'ncols': 1},],
+        ]
+    },
+}
+###)
+
+study_level = { ###(
+    'widgets': {
+      'sc_id': { ###(
+        'type': 'String Widget',
+        'data': {
+                'title': 'SC ID',
+                'fields': ('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': ('sc_pin'),
+                'is_required': True,
+                'label': 'Enter  PIN',
+                'label_edit': 'Enter Scratchcard Pin with the value above',
+                'description': '',
+                'help': 'Please enter a Scratchcard Pin valid for Registration of Next Level',
+                '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,
+            },
+        },###)
+      'sc_value': { ###(
+         'type': 'Float Widget',
+         'data': {
+                'title': 'Scratch card value',
+                'fields': ('sc_value',),
+                'is_required': False,
+                'label': 'Scratcard Value',
+                'label_edit': 'Scratcard Value',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': ('create'),
+                '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_slregister_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            #[{'widget_id': 'sc_id', 'ncols': 1},],
+            [{'widget_id': 'sc_value', 'ncols': 1},],
+            [{'widget_id': 'sc_pin', 'ncols': 1},],
+        ]
+    },
+}###)
+
+accobook = { ###(
+    'widgets': {
+     'sc_id': { ###(
+        'type': 'String Widget',
+        'data': {
+                'title': 'SC ID',
+                'fields': ('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': ('sc_pin'),
+                'is_required': True,
+                'label': 'enter  PIN',
+                'label_edit': 'Enter an Accommodation PIN',
+                'description': '',
+                'help': '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,
+            },
+        },###)
+    'sc_value': { ###(
+         'type': 'Float Widget',
+         'data': {
+                'title': 'Scratch card value',
+                'fields': ('sc_value',),
+                'is_required': False,
+                'label': 'SC Value',
+                'label_edit': 'Scratcard Value',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': ('create'),
+                '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_sc_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            #[{'widget_id': 'sc_id', 'ncols': 1},],
+            [{'widget_id': 'sc_value', 'ncols': 1},],
+            [{'widget_id': 'sc_pin', 'ncols': 1},],
+        ]
+    },
+}
+###)
+
+accopay = { ###(
+    'widgets': {
+     'sc_id': { ###(
+        'type': 'String Widget',
+        'data': {
+                'title': 'SC ID',
+                'fields': ('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': ('sc_pin'),
+                'is_required': True,
+                'label': 'enter  PIN',
+                'label_edit': 'Enter Hostel Payment PIN',
+                'description': '',
+                'help': 'Enter PIN valid for Paying Hostel Fee',
+                '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,
+            },
+        },###)
+    'sc_value': { ###(
+         'type': 'Float Widget',
+         'data': {
+                'title': 'Scratch card value',
+                'fields': ('sc_value',),
+                'is_required': False,
+                'label': 'SC Value',
+                'label_edit': 'Scratcard Value',
+                'description': '',
+                'help': '',
+                'is_i18n': False,
+                'readonly_layout_modes': ('create'),
+                '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_sc_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            #[{'widget_id': 'sc_id', 'ncols': 1},],
+            [{'widget_id': 'sc_value', 'ncols': 1},],
+            [{'widget_id': 'sc_pin', 'ncols': 1},],
+        ]
+    },
+}###)
+
+layouts = {}
+layouts['university'] = common_layout
+layouts['waeup_common'] = common_layout
+layouts['student'] = student_layout
+layouts['study_level'] = study_level
+layouts['student_documents'] = student_documents
+layouts['student_personal'] = student_personal_layout
+layouts['student_personal_addon'] = student_personal_addon
+layouts['student_eligibility'] = student_eligibility
+layouts['student_eligibility_edit'] = student_eligibility_edit
+layouts['student_schoolresults'] = student_schoolresults
+layouts['accommodation'] = accommodation
+layouts['accobook'] = accobook
+layouts['accopay'] = accopay
+layouts['scratch_card'] = scratch_card
+layouts['admission'] = admission
+layouts['clearance'] = clearance
+layouts['admission_slip'] = admission_slip
+layouts['jambcreate'] = jamb_layoutcreate
+layouts['jamb'] = jamb_layout
+layouts['faculty'] = common_layout
+layouts['department'] = common_layout
+layouts['course'] = course
+layouts['admission_status'] = admission_status
+return layouts
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/getWAeUPSchemas.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/getWAeUPSchemas.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/getWAeUPSchemas.py	(revision 196)
@@ -0,0 +1,884 @@
+#-*- mode: python; mode: fold -*-
+# $Id$
+
+sc_id = { ###(
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': True,
+            'acl_read_permissions': '',
+            'acl_read_roles': '',
+            'acl_read_expr': '',
+            'acl_write_permissions': '',
+            'acl_write_roles': 'SectionReader',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+            },
+        }
+###)
+
+sc_pin = { ###(
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': True,
+            'acl_read_permissions': '',
+            'acl_read_roles': '',
+            'acl_read_expr': '',
+            'acl_write_permissions': '',
+            'acl_write_roles': 'SectionReader',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+            },
+        }
+        
+###)
+
+sc_value = { ###(
+        'type': 'CPS Float Field',
+        'data': {
+            'default_expr': 'python:0.',
+            'is_searchabletext': True,
+            'acl_read_permissions': '',
+            'acl_read_roles': '',
+            'acl_read_expr': '',
+            'acl_write_permissions': '',
+            'acl_write_roles': '',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+            },
+        }
+###)
+sc_date = { ###(
+        'type': 'CPS DateTime Field',
+        'data': {
+            'default_expr': 'python:500.',
+            'is_searchabletext': True,
+            'acl_read_permissions': '',
+            'acl_read_roles': '',
+            'acl_read_expr': '',
+            'acl_write_permissions': '',
+            'acl_write_roles': '',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+            },
+        }
+###)
+
+university_schema = { ###(
+}
+###)
+
+students_folder_schema = { ###(
+}
+###)
+
+academics_folder_schema = { ###(
+}
+###)
+
+student_schema = { ###(
+     'jamb_is_admitted': {
+        'type': 'CPS Boolean Field',
+        'data': {
+            'default_expr': 'python:False',
+            'is_searchabletext': 0,
+            'acl_read_permissions': '',
+            'acl_read_roles': '',
+            'acl_read_expr': '',
+            'acl_write_permissions': '',
+            'acl_write_roles': '',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+        },
+    },
+    'faculty': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': True,
+            'acl_read_permissions': '',
+            'acl_read_roles': '',
+            'acl_read_expr': '',
+            'acl_write_permissions': '',
+            'acl_write_roles': '',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+        },
+    },
+    'course': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': True,
+            'acl_read_permissions': '',
+            'acl_read_roles': '',
+            'acl_read_expr': '',
+            'acl_write_permissions': '',
+            'acl_write_roles': '',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+             },
+        },
+    'adm_check_sc_id' : sc_id, 
+    'adm_check_sc_pin' : sc_pin, 
+    'adm_check_sc_value' : sc_value, 
+    'adm_check_date' : {
+        'type': 'CPS DateTime Field',
+        'data': {
+            'is_searchabletext': 0,
+        },
+    }, 
+    'clearance_sc_id' : sc_id, 
+    'clearance_sc_pin' : sc_pin, 
+    'clearance_sc_value' : sc_value, 
+    'clearance_date' : {
+        'type': 'CPS DateTime Field',
+        'data': {
+            'is_searchabletext': 0,
+            'acl_write_roles': 'SectionReader',
+        },
+    }, 
+    'accommodation' : { ###(
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': True,
+            'acl_read_permissions': '',
+            'acl_read_roles': '',
+            'acl_read_expr': '',
+            'acl_write_permissions': '',
+            'acl_write_roles': '',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+             },
+        }, ###)
+    'accommodation_sc_id' : sc_id, 
+    'accommodation_sc_pin' : sc_pin, 
+    'accommodation_sc_value' : sc_value, 
+    'accommodation_date' : {
+        'type': 'CPS DateTime Field',
+        'data': {
+            'is_searchabletext': 0,
+            'acl_write_roles': 'SectionReader',
+        },
+    }, 
+    'hostel_fee_sc_id' : sc_id, 
+    'hostel_fee_sc_pin' : sc_pin, 
+    'hostel_fee_sc_value' : sc_value, 
+    'hostel_fee_date' : {
+        'type': 'CPS DateTime Field',
+        'data': {
+            'is_searchabletext': 0,
+            'acl_write_roles': 'SectionReader',
+        },
+    }, 
+}
+###)
+
+student_accommodation = { ###(
+    'sc_id': sc_id,
+    'sc_pin': sc_pin,
+    'sc_value': { ###(
+        'type': 'CPS Float Field',
+        'data': {
+            'default_expr': 'python:500.',
+            'is_searchabletext': True,
+            'acl_read_permissions': '',
+            'acl_read_roles': '',
+            'acl_read_expr': '',
+            'acl_write_permissions': '',
+            'acl_write_roles': '',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+            },
+        },###)
+    'accommodation': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': True,
+            'acl_read_permissions': '',
+            'acl_read_roles': '',
+            'acl_read_expr': '',
+            'acl_write_permissions': '',
+            'acl_write_roles': '',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+             },
+        },
+}
+###)
+
+student_hostel_fee = { ###(
+    'sc_id': sc_id,
+    'sc_pin': sc_pin,
+    'sc_value': { ###(
+        'type': 'CPS Float Field',
+        'data': {
+            'default_expr': 'python:2500.',
+            'is_searchabletext': True,
+            'acl_read_permissions': '',
+            'acl_read_roles': '',
+            'acl_read_expr': '',
+            'acl_write_permissions': '',
+            'acl_write_roles': '',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+            },
+        },###)
+    'accommodation': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': True,
+            'acl_read_permissions': '',
+            'acl_read_roles': '',
+            'acl_read_expr': '',
+            'acl_write_permissions': '',
+            'acl_write_roles': '',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+             },
+        },
+}
+###)
+
+student_admission = { ###(
+    'sc_id': sc_id,
+    'sc_pin': sc_pin,
+    'sc_value': { ###(
+        'type': 'CPS Float Field',
+        'data': {
+            'default_expr': 'python:300.',
+            'is_searchabletext': True,
+            'acl_read_permissions': '',
+            'acl_read_roles': '',
+            'acl_read_expr': '',
+            'acl_write_permissions': '',
+            'acl_write_roles': '',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+            },
+        },###)
+    'reg_nr': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': True,
+        },
+    },
+}
+###)
+
+student_clearance = { ###(
+    'sc_id': sc_id,
+    'sc_pin': sc_pin,
+    'sc_value': { ###(
+        'type': 'CPS Float Field',
+        'data': {
+            'default_expr': 'python:800.',
+            'is_searchabletext': True,
+            'acl_read_permissions': '',
+            'acl_read_roles': '',
+            'acl_read_expr': '',
+            'acl_write_permissions': '',
+            'acl_write_roles': '',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+            },
+        },###)
+    'reg_nr': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': True,
+        },
+    },
+    'lastname': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': True,
+            'acl_read_permissions': '',
+            'acl_read_roles': '',
+            'acl_read_expr': '',
+            'acl_write_permissions': '',
+            'acl_write_roles': '',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+             },
+        },
+}###)
+
+study_level = { ###(
+    'sc_id': sc_id,
+    'sc_pin': sc_pin,
+    'sc_value': { ###(
+        'type': 'CPS Float Field',
+        'data': {
+            'default_expr': 'python:1000.',
+            'is_searchabletext': True,
+            'acl_read_permissions': '',
+            'acl_read_roles': '',
+            'acl_read_expr': '',
+            'acl_write_permissions': '',
+            'acl_write_roles': '',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+            },
+        },###)
+}
+###)
+
+student_personal_schema = { ###(
+     'firstname': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': 1,
+        },
+    },
+    'middlename': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': 1,
+        },
+    },
+     'lastname': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': 1,
+        },
+    },
+     'username': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': 1,
+        },
+    },
+     'email': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': 1,
+        },
+    },
+     'sex': {
+        'type': 'CPS Boolean Field',
+        'default_expr': 'python:True',
+        'data': {
+            'is_searchabletext': 0,
+        },
+    },
+     'birthday': {
+        'type': 'CPS DateTime Field',
+        'data': {
+            'is_searchabletext': 0,
+        },
+    },
+     'age': {
+        'type': 'CPS DateTime Field',
+        'data': {
+            'is_searchabletext': 0,
+        },
+    },
+}
+###)
+
+student_eligibility = { ###(
+}###)
+
+student_documents = { ###(
+     'photo': {
+        'type': 'CPS Image Field',
+        'data': {
+            'is_searchabletext': 0,
+        },
+    },
+     'birth_certificate': {
+        'type': 'CPS Image Field',
+        'data': {
+            'is_searchabletext': 0,
+        },
+    },
+     'passport': {
+        'type': 'CPS Image Field',
+        'data': {
+            'is_searchabletext': 0,
+        },
+    },
+     'results_first': {
+        'type': 'CPS Image Field',
+        'data': {
+            'is_searchabletext': 0,
+        },
+    },
+     'results_second': {
+        'type': 'CPS Image Field',
+        'data': {
+            'is_searchabletext': 0,
+        },
+    },
+}
+###)
+
+student_eligibility = { ###(
+    'reg_nr': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': True,
+        },
+    },
+    'jamb_results': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+        },
+    },
+    'jamb_aggregate': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': False,
+        },
+    },
+    'faculty': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': False,
+        },
+    },
+    'course': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': False,
+        },
+    },
+    'jamb_listing_date': {
+        'type': 'CPS DateTime Field',
+        'data': {
+            'is_searchabletext': False,
+        },
+    },
+    'schoolresults': { ###(
+        'type': 'CPS List List Field',
+        'data': {
+            'is_searchabletext': False,
+            },
+        },###)
+}
+###)
+
+jamb_schema = { ###(
+    'reg_nr': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': True,
+        },
+    },
+    'admission_sc_id': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': True,
+        },
+    },
+    'admission_sc_pin': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': True,
+        },
+    },
+    'admission_sc_pin_usage': {
+        'type': 'CPS Int Field',
+        'data': {
+            'default_expr': 'python:0',
+            'is_searchabletext': False,
+            },
+    },
+     'firstname': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': 1,
+        },
+    },
+    'middlename': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': 1,
+        },
+    },
+     'lastname': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': 1,
+        },
+    },
+    'age': {
+        'type': 'CPS Int Field',
+        'data': {
+            'default_expr': 'python:20',
+            'is_searchabletext': False,
+        },
+    },
+    'sex': {
+        'type': 'CPS Boolean Field',
+        'data': {
+            'default_expr': 'python:0',
+            'is_searchabletext': False,
+        },
+    },
+    'state': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': False,
+        },
+    },
+    'exam_results': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+        },
+    },
+    'aggregate': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': False,
+        },
+    },
+    'faculty': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': False,
+        },
+    },
+    'course': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': False,
+        },
+    },
+    'listing_date': {
+        'type': 'CPS DateTime Field',
+        'data': {
+            'is_searchabletext': False,
+        },
+    },
+##    '2nd_choice': { ###(
+##        'type': 'CPS String Field',
+##        'data': {
+##            'default_expr': 'string:',
+##            'is_searchabletext': False,
+##            'acl_read_permissions': '',
+##            'acl_read_roles': '',
+##            'acl_read_expr': '',
+##            'acl_write_permissions': '',
+##            'acl_write_roles': '',
+##            'acl_write_expr': '',
+##            'read_ignore_storage': False,
+##            'read_process_expr': '',
+##            'read_process_dependent_fields': (),
+##            'write_ignore_storage': False,
+##            'write_process_expr': '',
+##        },
+##    },
+##    '3rd_choice': {
+##        'type': 'CPS String Field',
+##        'data': {
+##            'default_expr': 'string:',
+##            'is_searchabletext': True,
+##            'acl_read_permissions': '',
+##            'acl_read_roles': '',
+##            'acl_read_expr': '',
+##            'acl_write_permissions': '',
+##            'acl_write_roles': '',
+##            'acl_write_expr': '',
+##            'read_ignore_storage': False,
+##            'read_process_expr': '',
+##            'read_process_dependent_fields': (),
+##            'write_ignore_storage': False,
+##            'write_process_expr': '',
+##        },
+##    },
+###)
+}
+
+
+###)
+
+course_results_schema = { ###(
+     'points': {
+        'type': 'CPS Int Field',
+        'data': {
+            'is_searchabletext': 0,
+        },
+    },
+     'grade': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': 0,
+        },
+    },
+}
+#
+###)
+
+faculty_schema = { ###(
+}###)
+
+department_schema = { ###(
+}###)
+
+course_schema = { ###(
+##    'Title': {
+##        'type': 'CPS String Field',
+##        'data': {
+##            'default_expr': '',
+##            'is_searchabletext': True,
+##        },
+##    },
+    'heading': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': True,
+        },
+    },
+    'text': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': True,
+        },
+    },
+    'level': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': True,
+        },
+    },
+    'code': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': True,
+        },
+    },
+    'semester': {
+        'type': 'CPS Boolean Field',
+        'data': {
+            'default_expr': 'python:True',
+            'is_searchabletext': False,
+        },
+    },
+    'credit': {
+        'type': 'CPS Int Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': False,
+        },
+    },
+    'core_elective': {
+        'type': 'CPS Boolean Field',
+        'data': {
+            'default_expr': 'python:True',
+            'is_searchabletext': False,
+        },
+    },
+}###)
+
+accommodation = { ###(
+    'heading': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': True,
+        },
+    },
+    'text': {
+        'type': 'CPS String Field',
+        'data': {
+            'is_searchabletext': True,
+        },
+    },
+    'which_sex': {
+        'type': 'CPS Boolean Field',
+        'data': {
+            'is_searchabletext': True,
+        },
+    },
+    'nr_of_blocks': {
+        'type': 'CPS Int Field',
+        'data': {
+            'is_searchabletext': False,
+        },
+    },
+    'nr_of_floors': {
+        'type': 'CPS Int Field',
+        'data': {
+            'is_searchabletext': False,
+        },
+    },
+    'rooms_per_floor': {
+        'type': 'CPS Int Field',
+        'data': {
+            'is_searchabletext': False,
+        },
+    },
+    'beds_per_room': {
+        'type': 'CPS Int Field',
+        'data': {
+            'is_searchabletext': False,
+        },
+    },
+    'beds_assigned': {
+        'type': 'CPS Int Field',
+        'data': {
+            'is_searchabletext': False,
+        },
+    },
+    'beds_assigned_list': {
+        'type': 'CPS String List Field',
+        'data': {
+            'is_searchabletext': False,
+        },
+    },
+}###)
+
+##scratch_card = { ###(
+####   'allow_discussion': {
+####        'type': 'CPS Int Field',
+####        'data': {
+####            'default_expr': 'python:0',
+####            'is_searchabletext': 0,
+####            },
+####        },
+##     'sc_id': {
+##        'type': 'CPS String Field',
+##        'data': {
+##            'default_expr': '',
+##            'is_searchabletext': 0,
+##            'acl_read_permissions': '',
+##            'acl_read_roles': '',
+##            'acl_read_expr': '',
+##            'acl_write_permissions': '',
+##            'acl_write_roles': '',
+##            'acl_write_expr': '',
+##            'read_ignore_storage': False,
+##            'read_process_expr': '',
+##            'read_process_dependent_fields': (),
+##            'write_ignore_storage': False,
+##            'write_process_expr': '',
+##        },
+##    },
+##     'sc_pin': {
+##        'type': 'CPS String Field',
+##        'data': {
+##            'default_expr': '',
+##            'is_searchabletext': 0,
+##            'acl_read_permissions': '',
+##            'acl_read_roles': '',
+##            'acl_read_expr': '',
+##            'acl_write_permissions': '',
+##            'acl_write_roles': '',
+##            'acl_write_expr': '',
+##            'read_ignore_storage': False,
+##            'read_process_expr': '',
+##            'read_process_dependent_fields': (),
+##            'write_ignore_storage': False,
+##            'write_process_expr': '',
+##        },
+##    },
+##}
+###)
+
+schemas = {}
+
+schemas['university'] = university_schema
+schemas['academics'] = academics_folder_schema
+schemas['students'] = students_folder_schema
+schemas['student'] = student_schema
+schemas['student_admission'] = student_admission
+schemas['student_clearance'] = student_clearance
+schemas['student_eligibility'] = student_eligibility
+schemas['student_documents'] = student_documents
+schemas['student_accommodation'] = student_accommodation
+schemas['student_hostel_fee'] = student_hostel_fee
+schemas['study_level'] = study_level
+schemas['course_results'] = course_results_schema
+schemas['student_personal'] = student_personal_schema
+schemas['accommodation'] = accommodation
+schemas['jamb'] = jamb_schema
+#schemas['scratch_card'] = scratch_card
+schemas['faculty'] = faculty_schema
+schemas['department'] = department_schema
+schemas['course'] = course_schema
+
+return schemas
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/getWAeUPTypes.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/getWAeUPTypes.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/getWAeUPTypes.py	(revision 196)
@@ -0,0 +1,1018 @@
+#-*- mode: python; mode: fold -*-
+# $Id$
+"""Return custom document types."""
+# permissions
+from Products.CMFCore.permissions import View
+from Products.CMFCore.permissions import ModifyPortalContent
+from Products.CMFCore.permissions import AddPortalContent
+from Products.WAeUP.WAeUPPermissions import UniversityManage, StudentManage,FacultyManage,\
+                                            DepartmentManage,CourseManage
+ChangePermissions = 'Change permissions'
+
+university_type = { ###(
+    'title': 'WAeUP Base Folder',
+    'description': 'The WAeUP Container',
+    'content_icon': 'students_folder.gif',
+    'content_meta_type': 'University',
+    'product': 'WAeUP',
+    'factory': 'addUniversity',
+    'immediate_view': 'university_view',
+    'global_allow': 1,
+    'filter_content_types': 1,
+    'allowed_content_types': ('Chat','FAQ','CPSCalendar','Forum','StudentsFolder','Faculty','AccoFolder','Section','CPSProxyDocument'),
+    'allow_discussion': 0,
+    'cps_is_searchable': 1,
+    'cps_display_as_document_in_listing': 1,
+    'cps_proxy_type': 'folder',
+    'schemas': ['metadata', 'common', 'folder'],
+    'layouts': ['waeup_common'],
+    'layout_clusters': ['metadata:metadata'],
+    'cps_section_wf': 'waeup_section_wf',
+    'actions': ({'id': 'view',
+                 'name': 'Standard View',
+                 #'action': 'university_view',
+                 'action': 'temporary_view_all',
+                 #'condition': "python:member and 'Manager' in member.getRoles()",
+                 'permissions': (View,)},
+##                {'id': 'add_accommodation',
+##                 'name': 'Add an Accommodation Hall',
+##                 'condition': "python:member and not 'Student'in member.getRoles()",
+##                 'action'    : 'string:${object/absolute_url}/add_accommodation',
+##                 #'action': 'folder_factories',
+##                 'permissions': (UniversityManage,)},
+                 {'id': 'new_content',
+                 'name': 'New content',
+                 'condition': "python:member and  'Manager' in member.getRoles()",
+                 'action': 'string:${object_url}/folder_factories',
+                 'permission': (ModifyPortalContent,),
+                 'category': 'object',
+                 'visible': True,},
+                {'id': 'contents',
+                 'name': 'action_folder_contents',
+                 'action': 'folder_contents',
+                 'condition': "python:member and  'Manager' in member.getRoles()",
+                 'permissions': (ModifyPortalContent,)},
+                {'id': 'edit',
+                 'name': 'action_edit',
+                 'action': 'cpsdocument_edit_form',
+                 'condition': "python:member and 'Manager' in member.getRoles()",
+                 'permissions': (ModifyPortalContent,UniversityManage,)},
+                {'id': 'metadata',
+                 'name': 'action_metadata',
+                 'action': 'cpsdocument_metadata',
+                 'condition': "python:member and 'Manager' in member.getRoles()",
+                 'permissions': (ModifyPortalContent,)},
+                 {'id': 'localroles',
+                 'name': 'delegate',
+                 'action': 'folder_localrole_form',
+                 'permissions': (ModifyPortalContent),
+                 'visible' : 0,
+                 },
+                 )
+        }
+###)
+
+academics_folder_type = { ###(
+    'title': 'WAeUP Academics Folder',
+    'description': 'The WAeUP Academics Folder',
+    'content_icon': '',
+    'content_meta_type': 'AcademicsFolder',
+    'product': 'CPSDefault',
+    'factory': 'addFolder',
+    'immediate_view': 'folder_view',
+    'global_allow': 1,
+    'filter_content_types': 1,
+    'allowed_content_types': ('Faculty',),
+    'allow_discussion': 0,
+    'cps_is_searchable': 1,
+    'cps_display_as_document_in_listing': 1,
+    'cps_proxy_type': 'folder',
+    'schemas': ['metadata', 'common', 'folder'],
+    'layouts': ['waeup_common','folder'],
+    'layout_clusters': ['metadata:metadata'],
+    'cps_section_wf': 'waeup_section_wf',
+    'actions': ({'id': 'view',
+                 'name': 'Standard View',
+                 #'action': 'academics_view',
+                 'action': 'temporary_view_all',
+                 'condition': "",
+                 'permissions': (View,)},
+                {'id': 'add_faculty',
+                 'name': 'Add Faculty',
+                 'condition': "python:member and 'UniversityManager'in member.getRoles()",
+                 'action'    : 'string:${object/absolute_url}/create_common?type_name=Faculty',
+                 'permissions': (UniversityManage,)},
+                {'id': 'contents',
+                 'name': 'action_folder_contents',
+                 'action': 'string:${object/absolute_url}/folder_contents',
+                 'permissions': (UniversityManage,),
+                 'visible' : 1,
+                 },
+                 {'id': 'localroles',
+                 'name': 'delegate',
+                 'action': 'folder_localrole_form',
+                 'permissions': (UniversityManage,),
+                 'visible': False,
+                 },
+                )
+      }
+###)
+
+scratch_card = { ###(
+    'title': 'WAeUP Scratchcard',
+    'description': '',
+    'content_icon': 'student.gif',
+    'content_meta_type': 'Scratch Card',
+    'product': 'CPSDocument',
+    'factory': 'addCPSDocument',
+    'immediate_view': 'cpsdocument_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': (),
+    'allow_discussion': False,
+    'cps_is_searchable': True,
+    'cps_proxy_type': 'document',
+    'cps_display_as_document_in_listing': True,
+    'schemas': ('scratch_card'),
+    'layouts': ('scratch_card'),
+    'cps_workspace_wf': 'waeup_workspace_wf',
+    'cps_section_wf': 'waeup_section_wf',
+##    'actions': (
+##         {'id': 'view',
+##          'name': 'Standard View',
+##          'action': 'string:${object_url}/document_view',
+##          'condition': '',
+##          'permission': ('View',),
+##          'category': 'object',
+##          'visible': True,},
+##         {'id': 'new_content',
+##          'name': 'Add a scratch card',
+##          'action': 'string:${object_url}/folder_factories',
+##          'condition': "python: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: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,},
+##    )
+}
+#
+###)
+
+students_folder_type = { ###(
+    'title': 'WAeUP Student Folder',
+    'description': 'The WAeUP Student Folder',
+    'content_icon': 'students_folder.gif',
+    'content_meta_type': 'StudentsFolder',
+    'product': 'CPSDefault',
+    'factory': 'addFolder',
+    'immediate_view': 'folder_view',
+    'global_allow': 1,
+    'filter_content_types': 1,
+    'allowed_content_types': ('Student'),
+    #'allowed_content_types': ('Student','ScratchCard'),
+    'allow_discussion': 0,
+    'cps_is_searchable': 1,
+    'cps_display_as_document_in_listing': 1,
+    'cps_proxy_type': 'folder',
+    'schemas': ['metadata', 'common', 'folder'],
+    'layouts': ['waeup_common',],
+    'layout_clusters': ['metadata:metadata'],
+    'cps_section_wf': 'waeup_section_wf',
+    'actions': ({'id': 'view',
+                 'name': 'Standard View',
+                 'action': 'temporary_view_all',
+                 'permissions': (View,)},
+##                {
+##                'id'        : 'add_content',
+##                'name'      : 'Add Content',
+##                'action'    : 'string:${object/absolute_url}/folder_factories',
+##                'condition': "python:member and 'Manager' in member.getRoles()",
+##                'permissions': (StudentManage,)},
+                {
+                'id'        : 'add_jamb',
+                'name'      : 'Add JAMB Data',
+                'action'    : 'string:${object/absolute_url}/create_jamb',
+                'permissions': (UniversityManage,StudentManage)},
+                {
+                'id'        : 'check_admission',
+                'name'      : 'Check Admission Status',
+                'action'    : 'string:${object/absolute_url}/check_admission',
+                'condition':  'object/portal_membership/isAnonymousUser',
+                'permission': (View,)},
+                {
+                'id'        : 'admission_list',
+                'name'      : 'Clearance Eligibility Process',
+                'action'    : 'string:${object/absolute_url}/clearance',
+                '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',
+                 'name': 'delegate',
+                 'action': 'folder_localrole_form',
+                 'permissions': (ModifyPortalContent,UniversityManage),
+                 'visible' : 0,
+                },
+                {'id': 'contents',
+                 'name': 'action_folder_contents',
+                 'action': 'string:${object/absolute_url}/folder_contents',
+                 'permissions': (UniversityManage,),
+                 'visible' : 0,
+                 },
+##                {'id': 'edit',
+##                 'name': 'action_edit',
+##                 'action': 'cpsdocument_edit_form',
+##                 'permissions': (UniversityManage,)},
+##                {'id': 'metadata',
+##                 'name': 'action_metadata',
+##                 'action': 'cpsdocument_metadata',
+##                 'permissions': (UniversityManage,)},
+##                {'id': 'localroles',
+##                 'name': 'action_local_roles',
+##                 'action': 'folder_localrole_form',
+##                 'permissions': (UniversityManage,)},
+    )
+}
+###)
+
+student_type = { ###(
+    'title': 'WAeUP Student',
+    'description': '',
+    'content_icon': 'student.gif',
+    'content_meta_type': 'Student',
+    'product': 'WAeUP',
+    'factory': 'addStudent',
+    'immediate_view': 'folder_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': ('Jamb','StudentDocuments','StudentPersonal','StudyLevel'),
+    'allow_discussion': False,
+    'cps_is_searchable': True,
+    'cps_proxy_type': 'folder',
+    'cps_display_as_document_in_listing': True,
+    'schemas': ['metadata','common','student'],
+    'layouts': ['waeup_common','student'],
+    'flexible_layouts': (),
+    'layout_clusters': ['metadata:metadata'],
+    'cps_section_wf': 'waeup_section_wf',
+    'use_content_status_history': 0,
+    'actions': (
+         {'id': 'view',
+          'name': 'Standard View',
+          #'action': 'string:${object_url}/student_index_html',
+          'action': 'string:${object_url}/temporary_view_all',
+          'condition':  "python:object.getContent().memberIsOwner() or (member and 'UniversityManager'in member.getRoles())",
+          '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': (ModifyPortalContent),
+          'visible' : 0,
+          },
+          {'id': 'contents',
+          'name': 'action_folder_contents',
+          'action': 'string:${object/absolute_url}/folder_contents',
+          'permissions': (UniversityManage,),
+          'visible' : 0,
+          },
+          {
+          'id'        : 'PERSONAL',
+          'name'      : 'Personal Data',
+          'action'    : 'string:${object/absolute_url}/PERSONAL',
+          'condition':  "python: object.getContent().memberIsOwner() and getattr(object,'PERSONAL',None)",
+          'permission': (ModifyPortalContent,)
+          },
+          {
+          'id'        : 'eligibility',
+          'name'      : 'Eligibility Data',
+          'action'    : 'ELIGIBILITY',
+          'condition':  'object/memberIsOwner',
+          'permission': (ModifyPortalContent,),
+          'visible': True,
+          },
+          {
+          'id'        : 'DOCUMENTS',
+          'name'      : 'Scanned Documents',
+          'action'    : 'string:${object/absolute_url}/DOCUMENTS',
+          'condition':  "python: object.getContent().memberIsOwner() and getattr(object,'PERSONAL',None)",
+          'permission': (ModifyPortalContent,)
+          },
+          {
+          'id'        : 'register_study_level',
+          'name'      : 'Register for Next Level',
+          'action'    : 'string:${object/absolute_url}/register_level',
+          'condition':  'python: object.getContent().memberIsOwner() and not object.getContent().isRegisteredForCurrentLevel()',
+          'permission': (ModifyPortalContent,)
+          },
+          {
+          'id'        : 'book_accomodation',
+          'name'      : 'Book Accomodation',
+          'action'    : 'string:${object/absolute_url}/book_accommodation',
+          'condition':  'python: object.getContent().memberIsOwner() and not object.getContent().accommodationIsBooked()',
+          'permission': (ModifyPortalContent,)
+          },
+          {
+          'id'        : 'pay_hostel_fee',
+          'name'      : 'Pay Hostel Fee',
+          'action'    : 'string:${object/absolute_url}/pay_hostel_fee',
+          'condition':  'python: object.getContent().memberIsOwner() and not object.getContent().accommodationIsPayed()',
+          'permission': (ModifyPortalContent,)
+          },
+          {
+          'id'        : 'JAMB',
+          'name'      : '(JAMB Data)',
+          'action'    : 'string:${object/absolute_url}/JAMB',
+          'condition':  'python:object.getContent().memberIsOwner()',
+          'permission': (ModifyPortalContent,),
+          'visible': True,
+          },
+          )
+}###)
+
+jamb_type = { ###(
+    'title': "JAMB data",
+    'description': 'The data from JAMB',
+    'content_icon': '',
+    'content_meta_type': 'Jamb',
+    'product': 'WAeUP',
+    'factory': 'addJamb',
+    'immediate_view': 'cpsdocument_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': (),
+    'allow_discussion': False,
+    'cps_is_searchable': True,
+    'cps_proxy_type': 'document',
+    'cps_display_as_document_in_listing': True,
+    'cps_is_portalbox': False,
+    #'schemas': ['common','metadata','jamb'],
+    'schemas': ['jamb'],
+    'layouts': ['jamb'],
+    'flexible_layouts': (),
+    'storage_methods': ('admitted:store_admission_pin'),
+    'cps_workspace_wf': 'workspace_content_wf',
+    'cps_section_wf': 'section_content_wf',
+    'actions': (
+         {'id': 'view',
+          'name': 'Standard View',
+          #'action': 'string:${object_url}/jamb_index_html',
+          'action': 'temporary_view_all',
+          'condition': '',
+          'permission': (View,),
+          'visible': True,},
+         {'id': 'edit',
+          'name': 'action_edit',
+          'action': 'string:${object_url}/waeup_edit_form',
+          'condition': '',
+          'permission': (StudentManage),
+          },
+         {'id': 'localroles',
+          'name': 'delegate',
+          'action': 'folder_localrole_form',
+          'permissions': (ModifyPortalContent),
+          'visible' : 0,
+          },
+          {
+          'id'        : 'add_content',
+          'name'      : 'Add Content',
+          'action'    : 'string:${object/absolute_url}/folder_factories',
+          'condition': "python:member and 'Manager' in member.getRoles()",
+          'permissions': (StudentManage,)},
+         {'id': 'metadata',
+          'name': 'action_metadata',
+          'action': 'cpsdocument_metadata',
+          'condition': "python:'Manager' in member.getRoles()",
+          'permissions': (UniversityManage,)},
+          )
+}
+###)
+
+student_personal_type = { ###(
+    'title': "Student personal data",
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'StudentPersonal',
+    'product': 'WAeUP',
+    'factory': 'addStudentPersonal',
+    'immediate_view': 'temporary_view_all',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': (),
+    'allow_discussion': False,
+    'cps_is_searchable': True,
+    'cps_proxy_type': 'document',
+    'cps_display_as_document_in_listing': True,
+    'cps_is_portalbox': False,
+    'schemas': ['student_personal'],
+    'layouts': ['student_personal'],
+    'flexible_layouts': (),
+    'storage_methods': (),
+    'cps_workspace_wf': 'workspace_content_wf',
+    'cps_section_wf': 'section_content_wf',
+    'actions': (
+         {'id': 'view',
+          'name': 'Standard View',
+          'action': 'temporary_view_all',
+          'permission': (View,),
+          'category': 'object',
+          'visible': True,},
+         {'id': 'edit',
+          'name': 'action_edit',
+          'action': 'string:${object_url}/student_personal_edit_form',
+          'permission': (ModifyPortalContent,),
+          'category': 'object',
+          'visible': True,
+          },
+         {'id': 'metadata',
+          'name': 'action_metadata',
+          'action': 'cpsdocument_metadata',
+          'condition': "python:member and 'Manager' in member.getRoles()",
+          'permissions': (UniversityManage,)},
+          )
+}
+###)
+
+student_eligibility_type = { ###(
+    'title': "Student eligibility data",
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'StudentEligibility',
+    'product': 'WAeUP',
+    'factory': 'addStudentEligibility',
+    'immediate_view': 'temporary_view_all',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': (),
+    'allow_discussion': False,
+    'cps_is_searchable': True,
+    'cps_proxy_type': 'document',
+    'cps_display_as_document_in_listing': True,
+    'cps_is_portalbox': False,
+    'schemas': ['student_eligibility'],
+    'layouts': ['student_eligibility'],
+    'flexible_layouts': (),
+    'storage_methods': (),
+    'cps_workspace_wf': 'workspace_content_wf',
+    'cps_section_wf': 'section_content_wf',
+    'actions': (
+         {'id': 'view',
+          'name': 'Standard View',
+          'action': 'temporary_view_all',
+          'permission': (View,),
+          'category': 'object',
+          'visible': True,},
+         {'id': 'edit',
+          'name': 'action_edit',
+          'action': 'string:${object_url}/eligibility',
+          'permission': (ModifyPortalContent,),
+          'category': 'object',
+          'visible': True,},
+         {'id': 'metadata',
+          'name': 'action_metadata',
+          'action': 'cpsdocument_metadata',
+          'condition': "python:member and 'Manager' in member.getRoles()",
+          'permissions': (UniversityManage,),
+          'visible': False,},
+          )
+}
+###)
+
+student_documents = { ###(
+    'title': "Students documents data",
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'StudentDocuments',
+    'product': 'WAeUP',
+    'factory': 'addStudentDocuments',
+    'immediate_view': 'temporary_view_all',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': (),
+    'allow_discussion': False,
+    'cps_is_searchable': True,
+    'cps_proxy_type': 'document',
+    'cps_display_as_document_in_listing': True,
+    'cps_is_portalbox': False,
+    'schemas': ['student_documents'],
+    'layouts': ['student_documents'],
+    'flexible_layouts': (),
+    'storage_methods': (),
+    'cps_workspace_wf': 'workspace_content_wf',
+    'cps_section_wf': 'section_content_wf',
+    'actions': (
+         {'id': 'view',
+          'name': 'Standard View',
+          'action': 'string:${object_url}/temporary_view_all',
+          'permission': (View),
+          'category': 'object',
+          'visible': True,
+          },
+         {'id': 'edit',
+          'name': 'action_edit',
+          'action': 'string:${object_url}/student_documents_edit_form',
+          'permission': (ModifyPortalContent,),
+          'category': 'object',
+          'visible': True,
+          },
+         {'id': 'metadata',
+          'name': 'action_metadata',
+          'action': 'cpsdocument_metadata',
+          'condition': "python:member and 'Manager' in member.getRoles()",
+          'permissions': (UniversityManage,)},
+          )
+}
+###)
+
+study_level_folder = { ###(
+    'title': 'WAeUP Study Level Folder',
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'StudyLevel',
+    'product': 'WAeUP',
+    'factory': 'addStudyLevel',
+    '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': 'string:${object_url}/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': 'addSemester',
+    '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',
+          'action'    : 'add_course_ticket',
+          #'action': 'folder_factories',
+          'permissions': (ModifyPortalContent,UniversityManage,StudentManage)},
+         {'id': 'metadata',
+          'name': 'action_metadata',
+          'action': 'cpsdocument_metadata',
+          'condition': "python:member and 'Manager' in member.getRoles()",
+          'permissions': (ModifyPortalContent,UniversityManage,)},
+          {'id': 'localroles',
+          'name': 'delegate',
+          'action': 'folder_localrole_form',
+          'permissions': (ModifyPortalContent,UniversityManage,StudentManage),
+          'visible': 0,
+          },
+          )
+}
+###)
+
+course_ticket = { ###(
+    'title': 'WAeUP Course Ticket',
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'CourseTicket',
+    'product': 'WAeUP',
+    'factory': 'addCourseTicket',
+    'immediate_view': 'cpsdocument_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',
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'Faculty',
+    'product': 'WAeUP',
+    'factory': 'addFaculty',
+    'immediate_view': 'folder_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': ('Department'),
+    'allow_discussion': 0,
+    'cps_is_searchable': True,
+    'cps_proxy_type': 'folder',
+    'cps_display_as_document_in_listing': True,
+    'schemas': ['metadata','common','faculty'],
+    'layouts': ['faculty'],
+    'flexible_layouts': (),
+    'layout_clusters': ['metadata:metadata',],
+    'cps_section_wf': 'waeup_section_wf',
+    'use_content_status_history': 0,
+    'actions': (
+         {'id': 'view',
+          'name': 'Standard View',
+          #'action': 'string:${object_url}/faculty_index_html',
+          'action': 'temporary_view_all',
+          'condition': '',
+          'permission': (View,),
+          'visible': True,},
+         {'id': 'edit',
+          'name': 'action_edit',
+          'action': 'string:${object_url}/waeup_edit_form',
+          'condition': '',
+          'permission': (UniversityManage,),
+          'visible': True,},
+          {'id': 'add_department',
+          'name': 'Add Department',
+          'action'    : 'string:${object/absolute_url}/create_common?type_name=Department',
+          'permissions': (UniversityManage,)},
+          {'id': 'contents',
+          'name': 'action_folder_contents',
+          'action': 'folder_contents',
+          'permissions': (UniversityManage,),
+          'visible' : 0,
+          },
+          {'id': 'edit',
+          'name': 'action_edit',
+          'action': 'cpsdocument_edit_form',
+          'condition': "python:member and 'Manager' in member.getRoles()",
+          'permissions': (ModifyPortalContent,)},
+          {'id': 'metadata',
+          'name': 'action_metadata',
+          'action': 'cpsdocument_metadata',
+          'condition': "python:member and 'Manager' in member.getRoles()",
+          'permissions': (ModifyPortalContent,)},
+          {'id': 'localroles',
+          'name': 'delegate',
+          'action': 'folder_localrole_form',
+          'permissions': (ModifyPortalContent),
+          'visible' : 0,
+          },
+          )
+}
+###)
+
+department_type = { ###(
+    'title': 'WAeUP Department',
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'Department',
+    'product': 'WAeUP',
+    'factory': 'addDepartment',
+    'immediate_view': 'folder_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': ('Student','Course'),
+    'allow_discussion': False,
+    'cps_is_searchable': True,
+    'cps_proxy_type': 'folder',
+    'cps_display_as_document_in_listing': True,
+    'schemas': ['metadata','common','department'],
+    'layouts': ['department',],
+    'flexible_layouts': (),
+    'layout_clusters': ['metadata:metadata',],
+    'cps_section_wf': 'waeup_section_wf',
+    'use_content_status_history': 0,
+    'actions': (
+         {'id': 'view',
+          'name': 'Standard View',
+          #'action': 'string:${object_url}/department_index_html',
+          'action': 'temporary_view_all',
+          'condition': '',
+          'permission': ('View',),
+          'visible': True,},
+         {'id': 'edit',
+          'name': 'action_edit',
+          'action': 'string:${object_url}/waeup_edit_form',
+          'condition': '',
+          'permission': (UniversityManage,),
+          'visible': True,},
+          {'id': 'create_course',
+          'name': 'Add Course',
+          'action'    : 'string:${object/absolute_url}/create_course',
+          'permissions': (UniversityManage,)},
+          {'id': 'contents',
+          'name': 'action_folder_contents',
+          'action': 'folder_contents',
+          'condition': "python:member and 'Manager' in member.getRoles()",
+          'permissions': (ModifyPortalContent,)},
+          {'id': 'edit',
+          'name': 'action_edit',
+          'action': 'cpsdocument_edit_form',
+          'condition': "python:member and 'Manager' in member.getRoles()",
+          'permissions': (ModifyPortalContent,)},
+          {'id': 'metadata',
+          'name': 'action_metadata',
+          'action': 'cpsdocument_metadata',
+          'condition': "python:member and 'Manager' in member.getRoles()",
+          'permissions': (ModifyPortalContent,)},
+          {'id': 'localroles',
+          'name': 'delegate',
+          'action': 'folder_localrole_form',
+          'permissions': (ModifyPortalContent),
+          'visible' : 0,
+          },
+          )
+}
+###)
+
+course_type = { ###(
+    'title': 'WAeUP Course',
+    'description': '',
+    'content_icon': 'student.gif',
+    'content_meta_type': 'Course',
+    'product': 'WAeUP',
+    'factory': 'addCourse',
+    'immediate_view': 'cpsdocument_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': (),
+    'allow_discussion': False,
+    'cps_is_searchable': True,
+    'cps_proxy_type': 'document',
+    'cps_display_as_document_in_listing': True,
+    'schemas': ['metadata','common','course'],
+    'layouts': ['course',],
+    'flexible_layouts': (),
+    'layout_clusters': ['metadata:metadata',],
+    'cps_section_wf': 'waeup_section_wf',
+    'use_content_status_history': 0,
+    'actions': (
+         {'id': 'view',
+          'name': 'Standard View',
+          #'action': 'string:${object_url}/course_index_html',
+          'action': 'temporary_view_all',
+          'condition': '',
+          'permission': ('View',),
+          'category': 'object',
+          'visible': True,},
+         {'id': 'edit',
+          'name': 'action_edit',
+          'action': 'string:${object_url}/waeup_edit_form',
+          'condition': '',
+          'permission': (CourseManage,),
+          'category': 'object',
+          'visible': True,},
+          {'id': 'contents',
+          'name': 'action_folder_contents',
+          'action': 'folder_contents',
+          'condition': "python:member and 'Manager' in member.getRoles()",
+          'permissions': (ModifyPortalContent,UniversityManage,)},
+          {'id': 'edit',
+          'name': 'action_edit',
+          'action': 'cpsdocument_edit_form',
+          'condition': "python:member and 'Manager' in member.getRoles()",
+          'permissions': (ModifyPortalContent,UniversityManage,)},
+          {'id': 'metadata',
+          'name': 'action_metadata',
+          'action': 'cpsdocument_metadata',
+          'condition': "python:member and 'Manager' in member.getRoles()",
+          'permissions': (ModifyPortalContent,)},
+          {'id': 'localroles',
+          'name': 'delegate',
+          'action': 'folder_localrole_form',
+          'permissions': (ModifyPortalContent),
+          'visible' : 0,
+          },
+          )
+    }
+###)
+
+acco_folder = { ###(
+    'title': 'WAeUP Accommodation Folder',
+    'description': '',
+    'content_icon': '',
+    'content_meta_type': 'AccoFolder',
+    'product': 'WAeUP',
+    'factory': 'addAccoFolder',
+    'immediate_view': 'folder_view',
+    'global_allow': True,
+    'filter_content_types': True,
+    'allowed_content_types': ('Accommodation',),
+    '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_accommodation',
+          'name': 'Add Accommodation Hall',
+          #'condition': "python:member and 'UniversityManager'in member.getRoles()",
+          'action'    : 'add_accommodation',
+          #'action': 'folder_factories',
+          'permissions': (UniversityManage,)},
+         {'id': 'metadata',
+          'name': 'action_metadata',
+          'action': 'cpsdocument_metadata',
+          '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',
+          'action': 'folder_localrole_form',
+          'permissions': (UniversityManage,),
+          'visible': 0,
+          },
+          )
+}
+###)
+
+accommodation = { ###(
+    'title': 'WAeUP Accommodation',
+    'description': '',
+    'content_icon': 'student.gif',
+    'content_meta_type': 'Accommodation',
+    'product': 'WAeUP',
+    'factory': 'addAccommodation',
+    'immediate_view': 'cpsdocument_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','accommodation'],
+    'layouts': ['accommodation',],
+    'flexible_layouts': (),
+    'layout_clusters': ['metadata:metadata',],
+    'cps_section_wf': 'waeup_section_wf',
+    'use_content_status_history': 0,
+    'actions': (
+         {'id': 'view',
+          'name': 'Standard View',
+          #'action': 'string:${object_url}/accommodation_index_html',
+          'action': 'temporary_view_all',
+          'condition': '',
+          'permission': ('View',),
+          'category': 'object',
+          'visible': True,},
+         {'id': 'edit',
+          'name': 'action_edit',
+          'action': 'string:${object_url}/waeup_edit_form',
+          'permission': (UniversityManage,StudentManage),
+          'category': 'object',
+          'visible': True,},
+          {'id': 'metadata',
+          'name': 'action_metadata',
+          'action': 'cpsdocument_metadata',
+          'condition': "python:member and 'Manager' in member.getRoles()",
+          'permissions': (ModifyPortalContent,)},
+          {'id': 'localroles',
+          'name': 'delegate',
+          'action': 'folder_localrole_form',
+          'permissions': (UniversityManage,),
+          'visible' : 0,
+          },
+          )
+}
+###)
+
+types = {}
+types['University'] = university_type
+types['StudentsFolder'] = students_folder_type
+types['AcademicsFolder'] = academics_folder_type
+types['Student'] = student_type
+types['StudentDocuments'] = student_documents
+types['StudentEligibility'] = student_eligibility_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
+types['ScratchCard'] = scratch_card
+types['Jamb'] = jamb_type
+types['Faculty'] = faculty_type
+types['Department'] = department_type
+types['Course'] = course_type
+
+return types
+
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/getWAeUPVocabularies.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/getWAeUPVocabularies.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/getWAeUPVocabularies.py	(revision 196)
@@ -0,0 +1,124 @@
+#-*- mode: python; mode: fold -*-
+##parameters=
+# $Id$
+"""Return custom vocabularies."""
+##'xxx_voc': {
+##        'type': 'CPS Vocabulary',
+##        'data': {'tuples': (
+##            ('', "", ''),
+##            )},
+##        },
+##vocabluaries['xxx'] = xxx_voc
+
+vocabularies = {}
+
+nigerian_states = { ###(
+        'type': 'CPS Vocabulary',
+        'data': {'tuples': (
+            ('abia', "Abia", ''),
+            ('adam', "Adamawa", ''),
+            ('akwa', "Akwa Ibom", ''),
+            ('anam', "Anambra", ''),
+            ('bauchi', "Bauchi", ''),
+            ('baye', "Bayelsa", ''),
+            ('benu', "Benue", ''),
+            ('born', "Borno", ''),
+            ('cro', "Cross River", ''),
+            ('delt', "Delta", ''),
+            ('ebon', "Ebonyi", ''),
+            ('edo', "edo", ''),
+            ('ekit', "Ekiti", ''),
+            ('enug', "Enugu", ''),
+            ('gomb', "Gombe", ''),
+            ('imo', "Imo", ''),
+            ('jiga', "Jigawa", ''),
+            ('kad', "Kaduna", ''),
+            ('kano', "Kano", ''),
+            ('kats', "Katsina", ''),
+            ('keb', "Kebbi", ''),
+            ('kogi', "Kogi", ''),
+            ('kwar', "Kwara", ''),
+            ('lag', "Lagos", ''),
+            ('nasa', "Nasawara", ''),
+            ('nige', "Niger", ''),
+            ('ogun', "Ogun", ''),
+            ('ondo', "Ondo", ''),
+            ('osun', "Osun", ''),
+            ('oyo', "oyo", ''),
+            ('plat', "Plateau", ''),
+            ('riv', "Rivers", ''),
+            ('sok', "Sokoto", ''),
+            ('tar', "Taraba", ''),
+            ('yobe', "Yobe", ''),
+            ('zam', "Zamfara", ''),
+            ('fct', "FCT", ''),
+            )},
+        }
+vocabularies['nigerian_states'] = nigerian_states
+###)
+
+faculties = { ###(
+        'type': 'CPS Vocabulary',
+        'data': {'tuples': (
+            ('agri', "Agriculture", ''),
+            ('arts', "Arts", ''),
+            ('bmed', "Basic Med Sciences", ''),
+            ('edu', "Education", ''),
+            ('eng', "Engeneering", ''),
+            ('law', "Law", ''),
+            ('phar', "Pharmacy", ''),
+            ('sod', "School of Denistry", ''),
+            ('som', "School of Medicine", ''),
+            ('sci', "Science", ''),
+            ('soc', "Social Science", ''),
+            )},
+        }
+vocabularies['faculties'] = faculties
+###)
+get_faculties_voc = { ###(
+        'type': 'CPS Method Vocabulary',
+        'data': {'get_vocabulary_method': 'get_faculties_voc',}
+        }
+vocabularies['get_faculties_voc'] = get_faculties_voc
+###)
+get_departments_voc = { ###(
+        'type': 'CPS Method Vocabulary',
+        'data': {'get_vocabulary_method': 'get_departments_voc',}
+        }
+vocabularies['get_departments_voc'] = get_departments_voc
+###)
+
+level = { ###(
+        'type': 'CPS Vocabulary',
+        'data': {'tuples': (
+            ('100', "Year 1 (100 Level)", ''),
+            ('200', "Year 2 (200 Level)", ''),
+            ('300', "Year 3 (300 Level)", ''),
+            ('400', "Year 4 (400 Level)", ''),
+            )},
+        }
+vocabularies['courselevel'] = level
+
+###)
+
+vocabularies['range5'] = {'type': 'CPS Vocabulary',
+                               'data': {'tuples': ([('%d' % i, '%d' % i ,'') for i in range(1,6)])},
+                          }
+vocabularies['range10'] = {'type': 'CPS Vocabulary',
+                               'data': {'tuples': ([('%d' % i, '%d' % i,'') for i in range(1,11)])},
+                          }
+vocabularies['range20'] = {'type': 'CPS Vocabulary',
+                               'data': {'tuples': ([('%d' % i, '%d' % i,'') for i in range(1,21)])},
+                          }
+vocabularies['range50'] = {'type': 'CPS Vocabulary',
+                               'data': {'tuples': ([('%d' % i, '%d' % i,'') for i in range(1,51)])},
+                          }
+##'xxx_voc': {
+##        'type': 'CPS Vocabulary',
+##        'data': {'tuples': (
+##            ('', "", ''),
+##            )},
+##        },
+
+
+return vocabularies
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/getWAeUPWidgets.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/getWAeUPWidgets.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/getWAeUPWidgets.py	(revision 196)
@@ -0,0 +1,12 @@
+widgets = {
+        'StudentId Widget': {
+            'type': 'StudentId Widget Type',
+            'data': {},
+            },
+        'Scratchcard Pin Widget': {
+            'type': 'Scratchcard Pin Widget Type',
+            'data': {},
+            },
+        }
+
+return widgets
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/layout_waeup_create.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/layout_waeup_create.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/layout_waeup_create.pt	(revision 196)
@@ -0,0 +1,2 @@
+<tal:block define="global creation python:1" />
+<metal:block use-macro="here/waeup_layout_lib/macros/common_edit" />
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/layout_waeup_edit.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/layout_waeup_edit.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/layout_waeup_edit.pt	(revision 196)
@@ -0,0 +1,1 @@
+<metal:block use-macro="here/waeup_layout_lib/macros/default_edit" />
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/layout_waeup_view.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/layout_waeup_view.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/layout_waeup_view.pt	(revision 196)
@@ -0,0 +1,1 @@
+<metal:block use-macro="here/waeup_layout_lib/macros/table_view" />
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/logged_in.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/logged_in.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/logged_in.pt	(revision 196)
@@ -0,0 +1,122 @@
+<metal:html>
+
+<metal:body use-macro="here/main_template/macros/master">
+    
+    <metal:main fill-slot="main"
+                tal:define="p_props here/portal_properties;">
+      <metal:skin tal:condition="exists: here/portal_skins | nothing">
+        <div tal:condition="here/portal_skins/updateSkinCookie | nothing"
+             tal:define="dummy here/setupCurrentSkin">
+        </div>
+      </metal:skin>
+      <tal:block condition="isAnon">
+        <tal:block define="dummy python:request.RESPONSE.expireCookie('__ac',path='/')" />
+          <h1 i18n:translate="heading_login_failure">Login failure</h1>
+          <p>
+            <span i18n:translate="description_login_failure">
+              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
+            </span>
+            <a href="mailto:admin@here.com" title="Email Admin"
+               tal:attributes="href string:mailto:${p_props/email_from_address}"
+               tal:content="p_props/email_from_address">Email Admin</a>.
+          </p>
+          <p i18n:translate="">
+            help_password_forgotten
+            <tal:block i18n:name="link_password_forgotten"
+                       replace="string:${base_url}account_lost_password_form"/>
+          </p>
+          <p>
+            or <a href="" tal:attributes="href string:${base_url}check_admission">check your admission status</a>
+          </p>
+        </tal:block><!-- isAnon -->
+
+        <tal:block condition="not: isAnon"
+                   define="first_time python:(member.getProperty('login_time', None) ==
+                   here.ZopeTime('2000/01/01'));
+                   dum_home mtool/createMemberArea"
+                   >
+          <tal:block 
+              condition="python:'Students' in member.getGroups()"
+              tal:define="dummy python: context.process_waeup_login(member=member,sc_pin=request.get('sc_pin'))" />
+          <tal:block condition="first_time">
+            <div tal:define="now here/ZopeTime;
+            dum_reg python:member.setProperties(last_login_time=now,
+            login_time=now)" />
+            
+            <h1>Welcome!</h1>
+            <p>This is the first time that you've logged in to <span
+                                                                   replace="p_props/title">Here</span>. Before you start exploring you need
+              to change your original password. This will ensure that the password we
+            sent you via email cannot be used in a malicious manner.</p>
+            
+            <p>Please use the form below to change your password.</p>
+
+      <form action="change_password" method="post"
+            tal:attributes="action string:${base_url}change_password">
+        <input type="hidden" name="user" value=""
+               tal:attributes="value member" />
+        <input type="hidden" name="domains:tokens" value="" />
+        <input type="hidden" name="redirect" value=""
+               tal:attributes="value base_url" />
+
+      <table border="1" width="100%" cellspacing="1" cellpadding="1">
+
+       <tr valign="top" align="left">
+         <th>Username</th>
+         <td><span tal:replace="member">You</span></td>
+       </tr>
+
+       <tr valign="top" align="left">
+         <th>New password</th>
+         <td><input type="password" name="password" /></td>
+       </tr>
+
+       <tr valign="top" align="left">
+        <th>Confirm new password</th>
+        <td><input type="password" name="confirm" /></td>
+       </tr>
+
+       <tr>
+        <td></td>
+        <td>
+          <input type="submit" class="standalone" value="Change password" />
+        </td>
+       </tr>
+
+      </table>
+
+      </form>
+
+    </tal:block><!-- first_time -->
+
+    <tal:block condition="not: first_time">
+
+      <tal:block define="d_reg python:member.setProperties(
+                                      last_login_time=member.getProperty('login_time', None));
+                         ereg python:member.setProperties(
+                                     login_time=here.ZopeTime());
+                      "/>
+
+      <div tal:condition="request/came_from | nothing ">
+        <div tal:define="came_from python:request.get('came_from');
+                         response request/RESPONSE;
+                         dredirect python: response.redirect(came_from);
+                        " />
+      </div>
+
+      <h1 i18n:translate="heading_login_success">Login success</h1>
+      <p i18n:translate="description_login_success">
+         Welcome. You are currently logged in.
+      </p>
+
+   </tal:block><!-- not first_time -->
+
+  </tal:block><!-- not isAnon -->
+
+</metal:main>
+
+</metal:body>
+
+</metal:html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/logged_out.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/logged_out.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/logged_out.pt	(revision 196)
@@ -0,0 +1,24 @@
+<metal:html>
+
+<metal:body use-macro="here/main_template/macros/master">
+
+<metal:main fill-slot="main">
+
+  <p tal:condition="isAnon"
+     i18n:translate="description_logout_success">
+    You have been logged out. <br />
+  </p>
+
+  <p tal:condition="not:isAnon">
+    <span i18n:translate="description_logout_zmi_warning">
+      You are logged in outside the portal.  You may need to
+    </span>
+    <a href="/manage_zmi_logout"
+       i18n:translate="link_logout_zmi">
+      log out of the Zope management interface
+    </a>.
+  </p>
+
+</metal:main>
+</metal:body>
+</metal:html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/portlet_main_navigation.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/portlet_main_navigation.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/portlet_main_navigation.pt	(revision 196)
@@ -0,0 +1,21 @@
+<tal:block define="mtool here/portal_membership;
+                   anonymous mtool/isAnonymousUser;
+                   user python: mtool.getAuthenticatedMember();
+                   folder_id python:str(user)"
+                   >
+  <tal:block condition="python: 0 and 'Students' in user.getGroups()">
+    <a href="" i18n:translate=""
+       tal:attributes="href string:${here/portal_url}/sections/waeup/students/${folder_id}"
+       tal:content="string: Personal area for JAMB Registration ${folder_id}"></a>
+  </tal:block>
+  <tal:block condition="python: 1">
+    <a href="" i18n:translate=""
+       tal:attributes="href string:${here/portal_url}/sections/waeup/students"
+       >Studentadministration</a> | 
+    <a href="" i18n:translate=""
+       tal:attributes="href string:${here/portal_url}/sections/waeup/faculties"
+       >Faculties</a> 
+  </tal:block>
+  <tal:block condition="anonymous">
+  </tal:block>
+</tal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/portlet_session_info.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/portlet_session_info.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/portlet_session_info.pt	(revision 196)
@@ -0,0 +1,46 @@
+<tal:block define="mtool here/portal_membership;
+           member mtool/getAuthenticatedMember;
+           isAnon mtool/isAnonymousUser;
+           roles member/getRoles;
+           backend python:'UniversityManager' in roles or 'StudentManager' in roles;
+           frontend python:'Student' in roles or isAnon;"
+           >
+  <tal:block condition="not:isAnon">
+    <tal:block condition="backend">
+      <em tal:content="member" /> is working in back-end mode<br />
+      <span  tal:condition="python: 1" >
+        with Basic Roles <span tal:content="member/getRoles" /><br />
+        <span tal:condition="python: 0" tal:content="python:mtool.getCPSCandidateLocalRoles(context)" />
+      </span>
+    </tal:block>
+    <tal:block condition="not:backend">
+      <em tal:content="member" /> is working in front-end mode<br />
+      <span  tal:condition="python: 1" >
+        with Basic Roles <span tal:content="member/getRoles" /><br />
+        <span tal:condition="python: 0" tal:content="python:mtool.getCPSCandidateLocalRoles(context)" />
+      </span>
+    </tal:block>
+    <tal:block condition="python: 0">
+    <br />
+    <a href="" tal:condition="python: 'Student' in member.getRoles() and not 'UniversityManager' in member.getRoles()" 
+       tal:attributes="href string:${context/portal_url}/students/${member}">
+      Go to your personal area
+    </a>
+    </tal:block>
+    <br />
+    <a href="" tal:condition="python: 0" 
+       tal:attributes="href string:${context/portal_url}/cpsdirectory_entry_view?dirname=members&id=${member}">        
+      Edit your Preferences
+    </a>
+    <br />
+    <a href="" i18n:translate=""
+       tal:attributes="href string:logout">
+      Log out
+    </a>
+  </tal:block>
+  <tal:block condition="isAnon">
+    <div>You are not logged in. </div>
+    <br />
+    <a href="" tal:attributes="href string:login_form">Log in</a>
+  </tal:block>
+</tal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/student_view_all_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/student_view_all_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/student_view_all_form.pt	(revision 196)
@@ -0,0 +1,34 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+  <metal:block fill-slot="head_slot">
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+      tal:attributes="href string:${base_url}document.css" />
+  </metal:block>
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="roles member/getRoles;
+               backend python:'UniversityManager' in roles or 'StudentManager' in roles;
+               frontend python:'Student' in roles or isAnon;
+               folder here/getContent;
+               items python:context.filterContents(items=context.contentValues());"
+               >
+    <h1> <span tal:content="context/title_or_id" /></h1>      
+  
+    <p>This is a temporary view of the object with id <em tal:content="here/id" /> 
+       of type <em tal:content="here/portal_type" /> 
+       which can be customized according to the customer's needs.</p>       
+  
+    <br />
+    <span  tal:condition="python:context.portal_type != 'University'"  tal:omit-tag="">
+      <p>Exemplary view of the <strong>object's data fields</strong>: </p>
+      <tal:block  tal:content="structure rendered_main|python:doc.render(proxy=here)" />
+    </span>
+  
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/student_view_student_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/student_view_student_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/student_view_student_form.pt	(revision 196)
@@ -0,0 +1,58 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+  <metal:block fill-slot="head_slot">
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+      tal:attributes="href string:${base_url}document.css" />
+  </metal:block>
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="roles member/getRoles;
+               backend python:'UniversityManager' in roles or 'StudentManager' in roles;
+               frontend python:'Student' in roles or isAnon;
+               folder here/getContent;
+               items python:context.filterContents(items=context.contentValues());"
+               >
+    <h1> <span tal:content="context/title_or_id" /></h1>      
+  
+    <p>This is a temporary view of the object with id <em tal:content="here/id" /> 
+       of type <em tal:content="here/portal_type" /> 
+       which can be customized according to the customer's needs.</p>       
+  
+    <br />
+    <span  tal:condition="python:context.portal_type != 'University'"  tal:omit-tag="">
+      <p>Exemplary view of the <strong>object's data fields</strong>: </p>
+      <tal:block  tal:content="structure rendered_main|python:doc.render(proxy=here)" />
+    </span>
+    <br />      
+    <p>Exemplary view of the <strong>list of items attached to (or contained in) the object</strong>: </p>
+    <tal:block condition="python: len(items)">  
+      <table>
+        <span tal:repeat="item items">
+          <tr>
+            <td>
+              <span tal:content="item/portal_type" />:
+            </td>
+            <td>
+              <i>
+                <a href="xxx"  
+                   tal:attributes="href item/absolute_url"
+                   tal:content="item/title_or_id"></a>
+              </i>
+            </td>
+          </tr>
+        </span>
+      </table>
+    </tal:block>
+    
+    <tal:block condition="python: not len(items)">
+        (No items contained here!)
+    </tal:block>
+  
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/temporary_view_all.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/temporary_view_all.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/temporary_view_all.py	(revision 196)
@@ -0,0 +1,26 @@
+##parameters=psm=None
+# $Id$
+
+"""
+"""
+
+member = context.portal_membership.getAuthenticatedMember()
+uname = str(member)
+roles = member.getRoles()
+cat = context.portal_catalog
+request = context.REQUEST
+url0 = request.get('URL0')
+#return context.temporary_view_all_form(psm=psm)
+if context.portal_membership.isAnonymousUser():
+    if not url0.endswith('chat'):
+	return context.students.student_view_all_form(psm=psm)
+    return context.Chat()
+else:
+    if url0.find(uname) > 0 or 'UniversityManager' in roles or 'Manager' in roles:
+        return context.temporary_view_all_form(psm=psm)
+    elif 'Student' in roles and 'StudentManager' not in roles:
+        res = cat(pathindex="/portal/sections/students/%s" % uname)
+        for r in res:
+            if r.getPath().endswith("students/%s" % uname):
+                return r.getObject().student_view_student_form(psm=psm)
+        return context.students.student_view_all_form(psm=psm)
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/temporary_view_all_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/temporary_view_all_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/temporary_view_all_form.pt	(revision 196)
@@ -0,0 +1,58 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+  <metal:block fill-slot="head_slot">
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+      tal:attributes="href string:${base_url}document.css" />
+  </metal:block>
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="roles member/getRoles;
+               backend python:'UniversityManager' in roles or 'StudentManager' in roles;
+               frontend python:'Student' in roles or isAnon;
+               folder here/getContent;
+               items python:context.filterContents(items=context.contentValues());"
+               >
+    <h1> <span tal:content="context/title_or_id" /></h1>      
+  
+    <p>This is a temporary view of the object with id <em tal:content="here/id" /> 
+       of type <em tal:content="here/portal_type" /> 
+       which can be customized according to the customer's needs.</p>       
+  
+    <br />
+    <span  tal:condition="python:context.portal_type != 'University'"  tal:omit-tag="">
+      <p>Exemplary view of the <strong>object's data fields</strong>: </p>
+      <tal:block  tal:content="structure rendered_main|python:doc.render(proxy=here)" />
+    </span>
+    <br />      
+    <p>Exemplary view of the <strong>list of items attached to (or contained in) the object</strong>: </p>
+    <tal:block condition="python: len(items)">  
+      <table>
+        <span tal:repeat="item items">
+          <tr>
+            <td>
+              <span tal:content="item/portal_type" />:
+            </td>
+            <td>
+              <i>
+                <a href="xxx"  
+                   tal:attributes="href item/absolute_url"
+                   tal:content="item/title_or_id"></a>
+              </i>
+            </td>
+          </tr>
+        </span>
+      </table>
+    </tal:block>
+    
+    <tal:block condition="python: not len(items)">
+        (No items contained here!)
+    </tal:block>
+  
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/university_view_all.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/university_view_all.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/university_view_all.pt	(revision 196)
@@ -0,0 +1,24 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+  <metal:block fill-slot="head_slot">
+    <tal:block tal:define="student here/getContent">
+    </tal:block>
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+          tal:attributes="href string:${base_url}student.css" />
+  </metal:block>
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="student_folder here/getContent;
+               items here/contentValues"
+               >
+    <a href="" tal:attributes="href string:${context/absolute_url}/admission_status">Admission List UME</a>.<br />
+    <a href="" tal:attributes="href string:${context/absolute_url}/check_admission">Admission Request (JAMB canditates only)</a>.
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/waeup_edit_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/waeup_edit_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/waeup_edit_form.pt	(revision 196)
@@ -0,0 +1,69 @@
+<tal:block define="res python:here.editCPSDocument(REQUEST=request);
+                   rendered_main python: res[0];
+                   portal_status_message python: res[1];
+                   edition python:1;
+  ">
+<metal:block define-macro="edit_form">
+<metal:block use-macro="here/content_lib_master/macros/master">
+  <metal:block fill-slot="css_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">
+    <!--
+     function popup_rte(input_id, label_edit) {
+       var args, value
+       value = document.getElementById(input_id).value;
+       args='?input_id='+input_id+'&label_edit='+escape(label_edit);
+       popup = window.open('popup_rte_form'+args, input_id, 'toolbar=0, scrollbars=0, location=0, statusbar=0, menubar=0, resizable=1, dependent=1, width=640, height=480')
+       if(!popup.opener)
+         popup.opener = window;
+       return false;
+   }
+   //-->
+   </script>
+   </metal:block>
+  </metal:block>
+
+  <metal:block fill-slot="header"
+    tal:define="creation creation|nothing;
+                edition edition|nothing;
+                metadata metadata|nothing">
+    <h1 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>
+    </h1>
+    <h1 tal:condition="python: 0 and not creation">
+      <img tal:replace="structure python:here.getImgTag('/'+here.getIcon(), base_url='')">
+      <tal:block condition="edition"
+        i18n:translate="">Edit <span i18n:name="title"
+        tal:content="here/title_or_id">Page Title</span></tal:block>
+      <tal:block tal:condition="metadata"
+        i18n:translate="">heading_metadata_edit</tal:block>
+    </h1>
+  </metal:block>
+
+  <metal:block fill-slot="main">
+    <div tal:replace="structure rendered_main" />
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+
+</metal:block>
+</metal:block>
+</tal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_default/waeup_layout_lib.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_default/waeup_layout_lib.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_default/waeup_layout_lib.pt	(revision 196)
@@ -0,0 +1,372 @@
+<!-- WAeUP layout_lib  -->
+<!-- $Id: layout_lib_div_view.pt 24721 2005-07-08 13:04:38Z dwyart $ -->
+
+<!-- div_view  -->
+
+<metal:block define-macro="div_view"
+             tal:define="layout options/layout">
+  <tal:block repeat="row layout/rows">
+    <tal:block repeat="cell row">
+      <tal:block define="widget cell/widget">
+        <div tal:define="dm options/datastructure/getDataModel;"
+             tal:attributes="class cell/widget_css_class|nothing;
+             id python:widget.getHtmlWidgetId()+'_widget';"
+             >
+          <tal:block condition="widget/label">
+            <span class="dlabel" i18n:translate="" tal:condition="widget/is_i18n"
+                  tal:content="widget/label">label</span>
+            <span class="dlabel" tal:condition="not:widget/is_i18n"
+                  tal:content="widget/label">label</span>
+          </tal:block>
+          <tal:block replace="structure cell/widget_rendered" />
+        </div>
+      </tal:block>
+    </tal:block>
+  </tal:block>
+</metal:block>
+
+<!-- table view -->
+<metal:block define-macro="table_view"
+             tal:define="layout options/layout">
+<table border="0">
+    <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 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>
+                <div 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>
+
+<!-- default edit  -->
+
+<metal:block define-macro="default_edit"
+  tal:define="layout options/layout;
+              ds options/datastructure;
+              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 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="first_layout">
+  <tal:block
+  content="structure string:<form action='${formaction}' method='post'
+  enctype='multipart/form-data' class='workflow'>
+  <div class=''><div class=''>" />
+  <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">
+  <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 style="float: right;" tal:condition="is_flexible">
+            <input type="submit" value="button_move_up"
+              tal:condition="not:repeat/row/start"
+              tal:attributes="name string:uprow_${repeat/row/index}"
+              class="context moveUp" i18n:attributes="value" />
+            <input type="submit" value="button_move_down"
+              tal:condition="not:repeat/row/end"
+              tal:attributes="name string:downrow_${repeat/row/index}"
+              class="context moveDown" i18n:attributes="value" />
+            <input type="submit" value="button_delete"
+              class="destructive" i18n:attributes="value"
+              tal:attributes="name string:deleterow_${repeat/row/index};
+                              onclick python:'return window.confirm(\'%s\')' %
+                                (cpsmcat('description_confirm_delete'), )" />
+          </div>
+        </div>
+      </tal:block>
+    </td>
+  </tr>
+</table>
+
+<tal:block condition="is_flexible">
+<div style="float: right;"
+    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="submit" name="addwidget_button" value="button_add"
+     class="context"
+     i18n:attributes="value" />
+  </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"
+        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="last_layout">
+  <tal:block content="structure string:</div>" />
+  <metal:block define-slot="additional_content" />
+
+  <input type="submit" class="standalone" name="cpsdocument_edit_button"
+    value="button_change" i18n:attributes="value"
+    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>
+<!-- default edit  -->
+
+<metal:block define-macro="common_edit"
+  tal:define="layout options/layout;
+              ds options/datastructure;
+              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);
+              tin python:type_name and getattr(here.portal_types,type_name,None);
+              creation_form options/create_action|string:create_common;
+              edit_form    options/edit_action|string:cpsdocument_edit_form;
+              metadata_form python:ti and ti.getActionById('metadata', 'cpsdocument_metadata') or 'cpsdocument_metadata';
+              formaction python: test(creation, creation_form,
+                                 test(metadata, metadata_form,
+                                                edit_form));
+              first_layout python:1;
+              last_layout python:1;
+              is_flexible options/is_flexible;
+              cpsmcat nocall:here/translation_service;
+              ">
+<tal:block condition="first_layout">
+    <span tal:condition="python: 0">
+      <span tal:content="request/type_name|string:No Typename" /><br />
+      <span tal:content="creation_form" /><br />
+      <span tal:content="ti" /><br />
+      <span tal:content="python:ti.getActionById('create', 'cpsdocument_create_form')" /><br />
+      <span tal:content="python:getattr(here.portal_types,type_name,'no type')" /><br />
+    </span>
+  <tal:block
+  content="structure string:<form action='${formaction}' method='post'
+  enctype='multipart/form-data' class='workflow'>
+  <div class=''><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">
+  <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 style="float: right;" tal:condition="is_flexible">
+            <input type="submit" value="button_move_up"
+              tal:condition="not:repeat/row/start"
+              tal:attributes="name string:uprow_${repeat/row/index}"
+              class="context moveUp" i18n:attributes="value" />
+            <input type="submit" value="button_move_down"
+              tal:condition="not:repeat/row/end"
+              tal:attributes="name string:downrow_${repeat/row/index}"
+              class="context moveDown" i18n:attributes="value" />
+            <input type="submit" value="button_delete"
+              class="destructive" i18n:attributes="value"
+              tal:attributes="name string:deleterow_${repeat/row/index};
+                              onclick python:'return window.confirm(\'%s\')' %
+                                (cpsmcat('description_confirm_delete'), )" />
+          </div>
+        </div>
+      </tal:block>
+    </td>
+  </tr>
+</table>
+
+<tal:block condition="is_flexible">
+<div style="float: right;"
+    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="submit" name="addwidget_button" value="button_add"
+     class="context"
+     i18n:attributes="value" />
+  </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"
+        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="last_layout">
+  <tal:block content="structure string:</div>" />
+  <metal:block define-slot="additional_content" />
+
+  <input type="submit" class="standalone" name="cpsdocument_edit_button"
+    value="button_change" i18n:attributes="value"
+    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_product/branches/srpp_branch/skins/waeup_faculty/academics_view.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_faculty/academics_view.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_faculty/academics_view.py	(revision 196)
@@ -0,0 +1,17 @@
+##parameters=REQUEST=None,psm=None,groups=None
+# $Id$
+
+"""Default view for the forum. If post_id is not None, post with id = <post_id>
+will be displayed, otherwise first post will be displayed."""
+
+member = context.portal_membership.getAuthenticatedMember()
+
+if not context.portal_membership.isAnonymousUser():
+    if 'Manager' in member.getRoles():
+        return context.folder_view()
+index = getattr(context,'documents',None)
+if index:
+    fp = getattr(index,'academicsfrontpage',None)
+    if fp:
+        return fp() 
+return context.academics.academics_view_all(psm=psm)
Index: /waeup_product/branches/srpp_branch/skins/waeup_faculty/academics_view_all.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_faculty/academics_view_all.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_faculty/academics_view_all.pt	(revision 196)
@@ -0,0 +1,37 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+  <metal:block fill-slot="head_slot">
+    <tal:block tal:define="student here/getContent">
+    </tal:block>
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+          tal:attributes="href string:${base_url}student.css" />
+  </metal:block>
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="items here/contentValues">
+    <h2>Academics (Faculties)</h2>
+    <table cellspacing="0" cellpadding="0">
+      <tal:block condition="python: len(items)">
+        <span tal:repeat="item items">
+          <tr tal:condition="python:item.portal_type == 'Faculty'">
+            <td colspan="1">
+              <a href="faculty" tal:attributes="href item/absolute_url" tal:content="item/title_or_id"></a>
+            </td>
+          </tr>
+        </span>
+      </tal:block>
+      <tr tal:condition="python:not len(items)">
+        <td>
+          nothing yet !
+        </td>
+      </tr>
+    </table>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_faculty/course_index_html.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_faculty/course_index_html.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_faculty/course_index_html.py	(revision 196)
@@ -0,0 +1,14 @@
+##parameters=post_id=None, REQUEST=None
+
+# $Id$
+
+"""Default view for the Student."""
+member = context.portal_membership.getAuthenticatedMember()
+if not context.portal_membership.isAnonymousUser():
+    roles = member.getRoles()
+    if 'Manager' in roles:
+        return context.cpsdocument_view()
+    elif 'StudentManager' in roles:
+        return context.course_view_manager()
+return context.course_view_student()
+
Index: /waeup_product/branches/srpp_branch/skins/waeup_faculty/course_view_manager.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_faculty/course_view_manager.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_faculty/course_view_manager.pt	(revision 196)
@@ -0,0 +1,21 @@
+<metal:block define-macro="view">
+<metal:block use-macro="here/content_lib_master/macros/master">
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+      tal:attributes="href string:${base_url}document.css" />
+    <link rel="Stylesheet" type="text/css" href=""
+      tal:attributes="href string:${base_url}forum.css" />
+  </metal:block>
+
+  <metal:block fill-slot="main">
+    <tal:block tal:content="structure rendered_main|python:doc.render(proxy=here)" />
+
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+
+</metal:block>
+</metal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_faculty/course_view_student.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_faculty/course_view_student.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_faculty/course_view_student.pt	(revision 196)
@@ -0,0 +1,32 @@
+<metal:block define-macro="view">
+<metal:block use-macro="here/content_lib_master/macros/master">
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+      tal:attributes="href string:${base_url}document.css" />
+    <link rel="Stylesheet" type="text/css" href=""
+      tal:attributes="href string:${base_url}forum.css" />
+  </metal:block>
+
+  <metal:block fill-slot="main">
+      
+    <tal:block tal:content="structure rendered_main|python:doc.render(proxy=here)" />
+
+    <tal:block tal:condition="python:hasattr(here,'portal_discussion') and
+      hasattr(here.portal_discussion, 'isCommentingAllowedFor')">
+      <tal:block tal:define="comments_allowed
+        python:here.portal_discussion.isCommentingAllowedFor(here);"
+        tal:condition="comments_allowed">
+        <metal:block
+          use-macro="here/forum_comment_lib_view_comments_inline/macros/view_comments_inline" />
+      </tal:block>
+    </tal:block>
+
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+
+</metal:block>
+</metal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_faculty/create_course.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_faculty/create_course.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_faculty/create_course.py	(revision 196)
@@ -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_product/branches/srpp_branch/skins/waeup_faculty/department_index_html.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_faculty/department_index_html.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_faculty/department_index_html.py	(revision 196)
@@ -0,0 +1,13 @@
+##parameters=psm=None, REQUEST=None
+
+# $Id$
+
+"""Default view for a Faculty."""
+member = context.portal_membership.getAuthenticatedMember()
+if not context.portal_membership.isAnonymousUser():
+    roles = member.getRoles()
+    if 'Manager' in roles:
+        return context.folder_view()
+    elif 'StudentManager' in roles:
+        return context.department_view_manager()
+return context.department_view_student()
Index: /waeup_product/branches/srpp_branch/skins/waeup_faculty/department_index_html.py~
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_faculty/department_index_html.py~	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_faculty/department_index_html.py~	(revision 196)
@@ -0,0 +1,13 @@
+##parameters=psm=None, REQUEST=None
+
+# $Id: department_index_html.py 91 2005-10-26 12:30:11Z joachim $
+
+"""Default view for a Faculty."""
+member = context.portal_membership.getAuthenticatedMember()
+if not context.portal_membership.isAnonymousUser():
+    roles = member.getRoles()
+    if 'Manager' in roles:
+        return context.folder_view()
+    elif 'StudentManager' in roles:
+        return context.department_view_manager()
+return context.department_view_student()
Index: /waeup_product/branches/srpp_branch/skins/waeup_faculty/department_view_manager.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_faculty/department_view_manager.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_faculty/department_view_manager.pt	(revision 196)
@@ -0,0 +1,43 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+  <metal:block fill-slot="head_slot">
+    <tal:block tal:define="student here/getContent">
+    </tal:block>
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+          tal:attributes="href string:${base_url}student.css" />
+  </metal:block>
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="department here/getContent;
+               items here/contentValues"
+               >
+    <span>
+      <h2 tal:content="department/title_or_id"></h2>
+      <p tal:content="department/Description">
+      </p>
+      <br />
+      
+      <table cellspacing="0" cellpadding="0">
+        <tal:block condition="python: len(items)">
+          <tr tal:repeat="item items">
+            <td colspan="1">
+              <a href="student" tal:attributes="href item/absolute_url" tal:content="item/title_or_id"></a>
+            </td>
+          </tr>
+        </tal:block>
+        <tr tal:condition="python:not len(items)">
+          <td>
+            no courses yet !
+          </td>
+        </tr>
+      </table>
+    </span>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_faculty/department_view_student.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_faculty/department_view_student.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_faculty/department_view_student.pt	(revision 196)
@@ -0,0 +1,43 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+  <metal:block fill-slot="head_slot">
+    <tal:block tal:define="student here/getContent">
+    </tal:block>
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+          tal:attributes="href string:${base_url}student.css" />
+  </metal:block>
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="department here/getContent;
+               items here/contentValues"
+               >
+    <span>
+      <h2 tal:content="department/title_or_id"></h2>
+      <p tal:content="department/Description">
+      </p>
+      <br />
+      
+      <table cellspacing="0" cellpadding="0">
+        <tal:block condition="python: len(items)">
+          <tr tal:repeat="item items">
+            <td colspan="1">
+              <a href="student" tal:attributes="href item/absolute_url" tal:content="item/title_or_id"></a>
+            </td>
+          </tr>
+        </tal:block>
+        <tr tal:condition="python:not len(items)">
+          <td>
+            no courses yet !
+          </td>
+        </tr>
+      </table>
+    </span>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_faculty/faculty_index_html.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_faculty/faculty_index_html.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_faculty/faculty_index_html.py	(revision 196)
@@ -0,0 +1,14 @@
+##parameters=psm=None, REQUEST=None
+
+# $Id$
+
+"""Default view for a Faculty."""
+member = context.portal_membership.getAuthenticatedMember()
+
+if not context.portal_membership.isAnonymousUser():
+    roles = member.getRoles()
+    if 'Manager' in roles:
+        return context.folder_view()
+    elif 'StudentManager' in roles:
+        return context.faculty_view_manager()
+return context.faculty_view_student()
Index: /waeup_product/branches/srpp_branch/skins/waeup_faculty/faculty_view_manager.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_faculty/faculty_view_manager.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_faculty/faculty_view_manager.pt	(revision 196)
@@ -0,0 +1,40 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+  <metal:block fill-slot="head_slot">
+    <tal:block tal:define="student here/getContent">
+    </tal:block>
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+          tal:attributes="href string:${base_url}student.css" />
+  </metal:block>
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="faculty here/getContent;
+               items here/contentValues"
+               >
+    <h2 tal:content="faculty/title_or_id"></h2>
+    <p tal:content="faculty/Description"></p>
+    <span> 
+      <table cellspacing="0" cellpadding="0">
+        <tal:block condition="python: len(items)">
+          <tr tal:repeat="item items">
+            <td colspan="1">
+              <a href="student" tal:attributes="href item/absolute_url" tal:content="item/title_or_id"></a>
+            </td>
+          </tr>
+        </tal:block>
+        <tr tal:condition="python:not len(items)">
+          <td>
+            nothing yet !
+          </td>
+        </tr>
+      </table>
+    </span>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_faculty/faculty_view_student.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_faculty/faculty_view_student.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_faculty/faculty_view_student.pt	(revision 196)
@@ -0,0 +1,40 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+  <metal:block fill-slot="head_slot">
+    <tal:block tal:define="student here/getContent">
+    </tal:block>
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+          tal:attributes="href string:${base_url}student.css" />
+  </metal:block>
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="faculty here/getContent;
+               items here/contentValues"
+               >
+    <h2 tal:content="faculty/title_or_id"></h2>
+    <p tal:content="faculty/Description"></p>
+    <span> 
+      <table cellspacing="0" cellpadding="0">
+        <tal:block condition="python: len(items)">
+          <tr tal:repeat="item items">
+            <td colspan="1">
+              <a href="student" tal:attributes="href item/absolute_url" tal:content="item/title_or_id"></a>
+            </td>
+          </tr>
+        </tal:block>
+        <tr tal:condition="python:not len(items)">
+          <td>
+            nothing yet !
+          </td>
+        </tr>
+      </table>
+    </span>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_faculty/get_departments_voc.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_faculty/get_departments_voc.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_faculty/get_departments_voc.py	(revision 196)
@@ -0,0 +1,18 @@
+##parameters=key=None
+# $Id$
+"""
+Return the faculties as an vocabulary
+
+"""
+#academics = context.sections.portal.academics
+academics = context.portal_catalog(id = 'academics')[0].getObject()
+faculties = [f for f in context.filterContents(items=academics.contentValues()) if f.portal_type == 'Faculty']
+
+deplist = []
+for faculty in faculties:
+    departments = [d for d in context.filterContents(items=faculty.contentValues()) if d.portal_type == 'Department']
+    deplist.extend(departments)
+if not key:
+    return [(d.getId(),d.title_or_id(),) for d in deplist]
+return [d.title_or_id() for d in deplist if d.getId() == key][0]
+return [(d.getId(),d.title_or_id()) for d in deplist if d.getId() == key]
Index: /waeup_product/branches/srpp_branch/skins/waeup_faculty/get_faculties_voc.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_faculty/get_faculties_voc.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_faculty/get_faculties_voc.py	(revision 196)
@@ -0,0 +1,15 @@
+##parameters=key=None 
+# $Id$
+"""
+Return the faculties as an vocabulary
+
+"""
+academics = context.portal_catalog(id = 'academics')[-1].getObject()
+items = [i for i in context.filterContents(items=academics.contentValues()) if i.portal_type == 'Faculty']
+context.REQUEST.set('items', items)
+context.REQUEST.set('key', key)
+if not key:
+    return [(f.getId(),f.title_or_id(),) for f in items]
+return [f.title_or_id() for f in items if f.getId() == key][0]
+return [(f.getId(),f.title_or_id()) for f in items if f.getId() == key]
+
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/accommodation_index_html.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/accommodation_index_html.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/accommodation_index_html.py	(revision 196)
@@ -0,0 +1,17 @@
+##parameters=REQUEST=None,psm=None,groups=None
+
+# $Id$
+
+"""Default view for the Accommodation.
+"""
+
+member = context.portal_membership.getAuthenticatedMember()
+if not context.portal_membership.isAnonymousUser():
+    roles = member.getRoles()
+    if 'Manager' in roles:
+        return context.accommodation_view_manager(psm=psm)
+    elif 'StudentManager' in roles:
+        return context.accommodation_view_manager(psm=psm)
+    elif 'Student' in roles:
+        return context.accommodation_view_student(psm=psm)
+return context.accommodation_view_all(psm=psm)
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/accommodation_view_all.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/accommodation_view_all.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/accommodation_view_all.pt	(revision 196)
@@ -0,0 +1,29 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+<metal:block fill-slot="head_slot">
+  <tal:block tal:define="student here/getContent">
+  </tal:block>
+</metal:block>
+
+  <metal:block fill-slot="header">
+  </metal:block>
+
+<metal:block fill-slot="main"
+             tal:define="items here/contentValues"
+             >
+    <h2>Accomodation</h2>
+    <table cellspacing="0" cellpadding="0">
+      <tal:block condition="python: len(items)">
+        <tr tal:repeat="item items">
+          <td colspan="1"> 
+            <a href="jamb" 
+               tal:attributes="href item/absolute_url"
+               tal:content="item/heading"></a>
+          </td>
+        </tr>
+      </tal:block>
+    </table>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/accommodation_view_manager.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/accommodation_view_manager.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/accommodation_view_manager.pt	(revision 196)
@@ -0,0 +1,29 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+<metal:block fill-slot="head_slot">
+  <tal:block tal:define="student here/getContent">
+  </tal:block>
+</metal:block>
+
+  <metal:block fill-slot="header">
+  </metal:block>
+
+<metal:block fill-slot="main"
+             tal:define="items here/contentValues"
+             >
+    <h2>Accomodation</h2>
+    <table cellspacing="0" cellpadding="0">
+      <tal:block condition="python: len(items)">
+        <tr tal:repeat="item items">
+          <td colspan="1"> 
+            <a href="jamb" 
+               tal:attributes="href item/absolute_url"
+               tal:content="item/heading"></a>
+          </td>
+        </tr>
+      </tal:block>
+    </table>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/accommodation_view_student.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/accommodation_view_student.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/accommodation_view_student.pt	(revision 196)
@@ -0,0 +1,29 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+<metal:block fill-slot="head_slot">
+  <tal:block tal:define="student here/getContent">
+  </tal:block>
+</metal:block>
+
+  <metal:block fill-slot="header">
+  </metal:block>
+
+<metal:block fill-slot="main"
+             tal:define="items here/contentValues"
+             >
+    <h2>Accomodation</h2>
+    <table cellspacing="0" cellpadding="0">
+      <tal:block condition="python: len(items)">
+        <tr tal:repeat="item items">
+          <td colspan="1"> 
+            <a href="jamb" 
+               tal:attributes="href item/absolute_url"
+               tal:content="item/heading"></a>
+          </td>
+        </tr>
+      </tal:block>
+    </table>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/add_accommodation.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/add_accommodation.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/add_accommodation.py	(revision 196)
@@ -0,0 +1,49 @@
+##parameters=REQUEST=None
+# $Id$
+"""
+Add a Accommodation Hall
+
+"""
+type_name = 'Accommodation'
+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= 'accommodation',
+                      schema_id = 'accommodation',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      create_action = 'add_accommodation',
+                      )
+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('heading').replace(' ','')
+    context.invokeFactory(type_name,oid)
+    object = getattr(context,oid)
+    ds.set('Title',ds.get('heading'))
+    object.getContent().edit(mapping=ds)
+    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_product/branches/srpp_branch/skins/waeup_student/add_accommodation.py.Joachim
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/add_accommodation.py.Joachim	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/add_accommodation.py.Joachim	(revision 196)
@@ -0,0 +1,55 @@
+##parameters=REQUEST=None
+# $Id: add_accommodation.py 107 2005-10-27 23:58:38Z joachim $
+"""
+Add a Accommodation Hall
+
+"""
+type_name = 'Accommodation'
+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
+
+accofolder = getattr(context,"Accommodation",None)
+if accofolder is None:
+    context.invokeFactory('AccoFolder','Accommodation')
+    accofolder = getattr(context,"Accommodation")
+    context.notifyCPSDocumentCreation(ob=accofolder)
+    
+    
+res,psm,ds = lt.renderLayout(layout_id= 'accommodation',
+                      schema_id = 'accommodation',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      create_action = 'add_accommodation',
+                      )
+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('heading').replace(' ','')
+    accofolder.invokeFactory(type_name,oid) 
+    object = getattr(accofolder,oid)    
+    object.getContent().edit(mapping=ds)
+    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_product/branches/srpp_branch/skins/waeup_student/add_course_ticket.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/add_course_ticket.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/add_course_ticket.py	(revision 196)
@@ -0,0 +1,67 @@
+##parameters=REQUEST
+# $Id$
+"""
+book an accomodation
+"""
+type_name = 'CourseTicket'
+ti = context.portal_types[type_name]
+pm = context.portal_membership
+REQUEST.set('type_name',type_name)
+
+validate = REQUEST.has_key("cpsdocument_create_button")
+
+
+lt = context.portal_layouts
+pv = context.portal_vocabularies
+#pr = context.portal_registration
+
+res,psm,ds = lt.renderLayout(layout_id= 'study_level',
+                      schema_id= 'study_level',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      create_action = 'add_course_ticket',
+                      )
+if True or psm == 'invalid':
+    return context.common_edit_form(rendered = res,
+                                 create = 1,
+                                 type_name = type_name,
+                                 psm = 'Not yet active',
+                                 #psm = 'Please correct your errors',
+                                 )
+elif psm == '':
+    return context.common_edit_form(rendered = res,
+                                 create = 1,
+                                 type_name = type_name,
+                                 psm = psm,
+                                 #psm = str(ds),
+                                 )
+    
+elif psm == 'valid':
+    psm = (ds)
+    oid = ds.get('Title')
+    if hasattr(context,oid):
+        return context.common_edit_form(rendered = res,
+                                 create = 1,
+                                 type_name = type_name,
+                                 psm = 'You already registered for that level',
+                                 )
+    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)
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/admission_slip_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/admission_slip_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/admission_slip_form.pt	(revision 196)
@@ -0,0 +1,22 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+  <metal:block fill-slot="head_slot">
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+      tal:attributes="href string:${base_url}document.css" />
+  </metal:block>
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="main">
+    <h1> Your Admission Slip</h1>      
+    <p>you used a <span  tal:content="options/dict/sc_value" /> Scratchcard with PIN 
+    <span tal:content="options/dict/sc_pin" />
+    </p>
+      <tal:block  tal:content="structure options/rendered" />
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/admission_status.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/admission_status.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/admission_status.py	(revision 196)
@@ -0,0 +1,38 @@
+##parameters=
+# $Id$
+"""
+search for admitted students 
+return html renderer + psm
+"""
+##type_name = 'Jamb'
+##ti = context.portal_types[type_name]
+##
+##context.REQUEST.set('type_name',type_name)
+##
+##validate = REQUEST.has_key("cpsdocument_edit_button")
+
+request = context.REQUEST
+lt = context.portal_layouts
+catalog = context.portal_catalog
+
+rendered,psm,ds = lt.renderLayout(layout_id= 'admission_status',
+                      schema_id= 'jamb',
+                      context=context,
+                      mapping=request,
+                      ob={},
+                      layout_mode='create',
+                      )
+qs = ds.get('quick_search')
+list = []
+if qs:
+    res = catalog(SearchableText = "%s*" % qs)
+    if res:
+        for i in res:
+            o = i.getObject()
+            if o.portal_type == 'Jamb':
+                list.append(o)
+return context.admission_status_form(rendered = rendered,
+                                 psm = '',
+                                 list = list,
+                                 ds = ds
+                                 )
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/admission_status_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/admission_status_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/admission_status_form.pt	(revision 196)
@@ -0,0 +1,47 @@
+<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/content_lib_master/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">
+        <h1>List admitted students!</h1>
+        <p>
+          You may be seeing a long list of names or just the name of the person of your interest below. 
+          Click on the View Details against the name of the candidate of your interest to display the 
+          required information. If the candidate of your interest is not in the list displayed, 
+          you may type another name or registration number again in the Quick Search box below and click 
+          on GO button.
+        </p>
+      <div tal:replace="structure rendered_main" />
+        <span  tal:define="list options/list">
+          <span tal:condition="not: list">
+            No Records found
+          </span>
+          <span tal:condition="list">
+            <h2>The following entries match your query:</h2>
+          <table>
+            <tr tal:repeat="row list">
+              <td colspan="" tal:content="row/reg_nr"></td>
+              <td colspan="" tal:content="row/firstname"></td>
+              <td colspan="" tal:content="row/middlename"></td>
+              <td colspan="" tal:content="row/lastname"></td>
+            </tr>
+          </table>
+        </span>
+        </span>
+    </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+
+</metal:block>
+</metal:block>
+</tal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/book_accommodation.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/book_accommodation.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/book_accommodation.py	(revision 196)
@@ -0,0 +1,75 @@
+##parameters=REQUEST
+# $Id$
+"""
+book an accomodation
+"""
+import DateTime
+current = DateTime.DateTime()
+
+type_name = 'Student'
+ti = context.portal_types[type_name]
+pm = context.portal_membership
+REQUEST.set('type_name',type_name)
+
+validate = REQUEST.has_key("cpsdocument_edit_button")
+
+
+lt = context.portal_layouts
+pr = context.portal_registration
+
+res,psm,ds = lt.renderLayout(layout_id= 'accobook',
+                      schema_id= 'student_accommodation',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      submit = "book",
+                      action = 'book_accommodation',
+                      )
+if psm == 'invalid':
+    return context.book_accommodation_form(rendered = res,
+                                 psm = "Please correct your input",
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.book_accommodation_form(rendered = res,
+                                 psm = None,
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    sf = context.getContent()
+    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
+    h.edit(mapping = dict)
+    ds.set('accommodation', "Bed # %(beds_assigned)s in %(heading)s" % dict)
+    sf.edit(mapping = ds)
+    #psm = "Your not admitted"
+    psm = "h:%(heading)s free:%(nr_of_free)s %(beds_assigned)s" % dict
+
+    ds.set('sc_date',current)
+    sf.setScratchCardData('accommodation',ds)
+
+    return context.booked_accommodation(v=dict)
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/book_accommodation_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/book_accommodation_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/book_accommodation_form.pt	(revision 196)
@@ -0,0 +1,25 @@
+<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/content_lib_master/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">
+        <h1>Book Your Accommodation!</h1>
+      <div tal:replace="structure rendered_main" />
+    </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+
+</metal:block>
+</metal:block>
+</tal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/booked_accommodation.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/booked_accommodation.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/booked_accommodation.pt	(revision 196)
@@ -0,0 +1,19 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+  <metal:block fill-slot="head_slot">
+  </metal:block>
+  <metal:block fill-slot="header">
+  </metal:block>
+  <metal:block fill-slot="main"
+               tal:define="acco options/v"
+               >
+    You have successfully booked bed nr <span tal:content="acco/beds_assigned" /> in <span tal:content="acco/heading" />.
+    <p>Your next steps:</p>
+    <ul>
+      <li>Buy a Hostel Fee Scratch Card</li>
+      <li>Login with your user id and password </li>
+      <li>Click 'Pay Hostel Fee'</li>
+    </ul>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/check_admission.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/check_admission.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/check_admission.py	(revision 196)
@@ -0,0 +1,63 @@
+##parameters=REQUEST
+# $Id$
+"""
+process the Admission Form
+return html renderer + psm
+"""
+import DateTime
+current = DateTime.DateTime()
+
+
+type_name = 'Jamb'
+ti = context.portal_types[type_name]
+
+REQUEST.set('type_name',type_name)
+
+validate = REQUEST.has_key("cpsdocument_edit_button")
+
+
+lt = context.portal_layouts
+pr = context.portal_registration
+
+res,psm,ds = lt.renderLayout(layout_id= 'admission',
+                      schema_id= 'student_admission',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      action = "check_admission",
+                      submit = "check",
+                      )
+if psm == 'invalid':
+    return context.check_admission_form(rendered = res,
+                                 psm = "Please correct your input",
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.check_admission_form(rendered = res,
+                                 psm = None,
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    s_id = "s%s" % ds.get('jamb_id')
+    catalog = context.portal_catalog
+    search = catalog(SearchableText = "%s*" % s_id)
+    student = getattr(context,s_id,None)
+    if student is None:
+    #if len(search) < 1:
+        psm = "Your are not admitted"
+        return context.check_admission_form(rendered = res,
+                                 psm = psm, 
+                                 ds = ds,
+                                 )
+
+ds.set('sc_date',current)
+student.getContent().setScratchCardData('adm_check',ds)
+
+jamb = getattr(student,'JAMB')
+res = jamb.getContent().render(layout_id = 'admission_slip', 
+                               layout_mode = 'view',
+                               schema_id = 'jamb')
+
+return context.admission_slip_form(rendered = res, dict = ds)
+
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/check_admission_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/check_admission_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/check_admission_form.pt	(revision 196)
@@ -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/content_lib_master/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">
+        <h1> Check Your Admission Status! </h1>
+        <div tal:replace="structure rendered_main" />
+          <p>Instructions :</p>
+          <ul>
+            <li>Buy an Admission Check Scratch Card </li> 
+            <li>Enter the PIN here </li> 
+            <li>Print the Admission Slip which is displayed if you are admitted by the Univesity</li>
+            <li>Buy a Clearance Scratch Card </li> 
+            <li>Proceed to the Clearance Eligibility Online Form and fill your O/L details </li> 
+            <li>Proceed to the Univesity with all original documents for clearance to finalize the clearance process </li>
+          </ul>
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/clearance.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/clearance.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/clearance.py	(revision 196)
@@ -0,0 +1,66 @@
+##parameters=REQUEST
+# $Id$
+"""
+process the Admission Form
+return html renderer + psm
+"""
+import DateTime
+current = DateTime.DateTime()
+
+
+type_name = 'Jamb'
+ti = context.portal_types[type_name]
+
+REQUEST.set('type_name',type_name)
+
+validate = REQUEST.has_key("cpsdocument_edit_button")
+
+
+lt = context.portal_layouts
+pr = context.portal_registration
+
+res,psm,ds = lt.renderLayout(layout_id= 'clearance',
+                      schema_id= 'student_clearance',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      action = "clearance",
+                      submit = "submit",
+                      )
+
+if psm == 'invalid':
+    return context.clearance_form(rendered = res,
+                                 psm = "Please correct your input",
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.clearance_form(rendered = res,
+                                 psm = None,
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    s_id = "s%s" % ds.get('jamb_id')
+    catalog = context.portal_catalog
+    search = catalog(SearchableText = "%s*" % s_id)
+    if len(search) < 1:
+        psm = "You are not admitted"
+        return context.clearance_form(rendered = res,
+                                 psm = psm,
+                                 ds = ds,
+                                 )
+    sf = getattr(context,s_id,None)
+    if sf and getattr(sf,'PERSONAL',None):
+        psm = "Your are already admitted, please login"
+        return context.clearance_form(rendered = res,
+                                 psm = psm,
+                                 ds = ds,
+                                 )
+    rset = REQUEST.set
+    student = getattr(context,s_id)
+    ds.set('sc_date',current)
+    student.getContent().setScratchCardData('clearance',ds)
+    sc_pin =  ds.get('sc_pin')
+    #return REQUEST.RESPONSE.redirect("%s/logged_in?__ac_name=%s&__ac_password=UnSeT&sc_pin=%s"
+    return REQUEST.RESPONSE.redirect("%s/logged_in?__ac_name=%s&__ac_password=123456&sc_pin=%s"
+                                    % (context.absolute_url(),s_id,sc_pin))
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/clearance_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/clearance_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/clearance_form.pt	(revision 196)
@@ -0,0 +1,30 @@
+<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/content_lib_master/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">
+        <h1>Start Clearance Process!</h1>
+        <div tal:replace="structure rendered_main" />
+          <p>Instructions :</p>
+          <ul>
+            <li>Buy a Clearance Scratch Card </li> 
+            <li>Enter the PIN here </li> 
+            <li>Proceed to the Clearance Eligibility Online Form and fill your O/L details </li> 
+            <li>Proceed to the Univesity with all original documents for clearance to finalize the clearance process</li>
+          </ul>
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/create_jamb.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/create_jamb.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/create_jamb.py	(revision 196)
@@ -0,0 +1,70 @@
+##parameters=REQUEST=None
+# $Id$
+"""
+Create an the Jamb-Record for a Student
+
+"""
+
+type_name = 'Jamb'
+ti = context.portal_types[type_name]
+pr = context.portal_registration
+pm = context.portal_membership
+
+REQUEST.set('type_name',type_name)
+
+validate = REQUEST.has_key("cpsdocument_edit_button")
+
+lt = context.portal_layouts
+
+res,psm,ds = lt.renderLayout(layout_id= 'jambcreate',
+                      schema_id= 'jamb',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      )
+if psm == 'invalid':
+    return context.create_jamb_form(rendered = res,
+                                 psm = 'Please correct your errors',
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.create_jamb_form(rendered = res,
+                                 psm = psm,
+                                 ds = ds,
+                                 )
+    
+elif psm == 'valid':
+    s_id = "s%s" % ds.get('reg_nr')
+    skw = {'title': "%(firstname)s %(lastname)s" % ds}
+    context.invokeFactory('Student',s_id) 
+    student = getattr(context,s_id)    
+    student.getContent().edit(mapping=skw)
+    context.notifyCPSDocumentCreation(ob=student)
+    jamb_id = 'JAMB'
+    student.invokeFactory('Jamb',jamb_id) 
+    jamb = getattr(student,jamb_id)    
+    ds.set('title', "%(reg_nr)s (%(lastname)s)" % ds)
+    jamb.getContent().edit(mapping=ds)
+    context.notifyCPSDocumentCreation(ob=jamb)
+    psm = 'Student created'
+    noCPSMember = False
+    try:
+        #pr.addMember(s_id, 'UnSeT',roles=('Member','CPSMember','Student','Contributor'))
+        pr.addMember(s_id, '123456',roles=('Member','CPSMember','Student','Contributor'))
+    except:
+        noCPSMember = True
+    if noCPSMember:
+        #pr.addMember(s_id, 'UnSeT',roles=('Member','Student','Contributor'))
+        pr.addMember(s_id, '123456',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'])
+##    gm.extend((s_id,))
+##    groups.editEntry({'group': 'Students', 
+##                      'members': gm})  
+    return context.students_folder_view_manager(psm=psm)
+
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/create_jamb_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/create_jamb_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/create_jamb_form.pt	(revision 196)
@@ -0,0 +1,22 @@
+<tal:block define="rendered_main options/rendered;
+                   portal_status_message options/psm;"
+                   >
+<metal:block define-macro="edit_form">
+<metal:block use-macro="here/content_lib_master/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>Enter the JAMB Data for a Student </h1>
+      <div tal:replace="structure rendered_main" />
+    </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+
+</metal:block>
+</metal:block>
+</tal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/create_personal_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/create_personal_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/create_personal_form.pt	(revision 196)
@@ -0,0 +1,26 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+  <metal:block fill-slot="head_slot">
+    <tal:block tal:define="student here/getContent">
+    </tal:block>
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+          tal:attributes="href string:${base_url}student.css" />
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="items here/contentValues"
+               >
+    <form action="content_create" tal:attributes="action string:${here_url}/content_create"
+          method="post" class="group">
+      <dt>
+        <input type="hidden" name="type_name" value="StudentPersonal" /> 
+      <p>
+        <input id="objectTitle" type="text" name="Title" value="personal" class="focus" size="40" />
+        <input type="submit" class="standalone searchButton" value="create" />
+      </p>
+    </form>
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/create_student.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/create_student.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/create_student.py	(revision 196)
@@ -0,0 +1,76 @@
+##parameters=type_name, REQUEST=None, **kw
+# $Id$
+"""
+Create an object.
+
+FIXME: what are the parameters?
+"""
+
+from urllib import urlencode
+
+##for k,v in kw.items():
+##    print k,v
+##return printed
+
+if REQUEST is not None:
+    kw.update(REQUEST.form)
+    # Use creation without empty object.
+    # XXX should find better
+    ti = getattr(context.portal_types, type_name)
+    # For cpsdocument
+    if ti.meta_type == 'CPS Flexible Type Information':
+        args = {'type_name': type_name}
+        # XXX pass prefilled title, a bit of a hack...
+        args['widget__Title'] = kw.get('title', '')
+
+        # Look for the create action on the ti
+        create_action_form = ti.getActionById('create', 'cpsdocument_create_form')
+
+        return REQUEST.RESPONSE.redirect('%s/%s?%s'
+                                         % (context.absolute_url(),
+                                            create_action_form,
+                                            urlencode(args)))
+
+
+if REQUEST and not kw.get('title'):
+    # Need a title before creating folders
+    if type_name in ('Section', 'Workspace'):
+        args = {'type_name': type_name}
+        return REQUEST.RESPONSE.redirect('%s/folder_edit_form?%s' %
+                                (context.absolute_url(), urlencode(args)))
+
+
+id = kw.get('title', 'my_sdfsdfdsf' + type_name)
+id = context.computeId(compute_from=id)
+
+context.invokeFactory(type_name, id)
+ob = getattr(context, id)
+
+try:
+    doc = ob.getEditableContent()
+except AttributeError:
+    # not a proxy
+    doc = ob
+else:
+    try:
+        doc.edit(proxy=ob, **kw)
+    except:
+        # CMF Compatibility.
+        # type_name not necessarly and edit method
+        # for CMF types is not aware about that.
+        if kw.has_key('type_name'):
+            del kw['type_name']
+        doc.edit(**kw)
+
+context.portal_eventservice.notifyEvent('modify_object', context, {})
+context.portal_eventservice.notifyEvent('modify_object', ob, {})
+
+
+if REQUEST is not None:
+    psm = 'psm_content_created'
+    action_path = doc.getTypeInfo().immediate_view # getActionById('metadata')
+    REQUEST.RESPONSE.redirect('%s/%s?portal_status_message=%s' %
+                              (ob.absolute_url(), action_path,
+                               psm))
+
+return id
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/create_student_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/create_student_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/create_student_form.pt	(revision 196)
@@ -0,0 +1,30 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+  <metal:block fill-slot="head_slot">
+    <tal:block tal:define="student here/getContent">
+    </tal:block>
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+          tal:attributes="href string:${base_url}student.css" />
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="items here/contentValues"
+               >
+    <form action="content_create" tal:attributes="action string:${here_url}/create_student"
+          method="post" class="group">
+      <dt>
+        <input type="hidden" name="type_name" value="Student" /> 
+      <p>
+        <label for="objectTitle">
+          <strong>Studentname</strong>
+        </label>
+
+        <input id="objectTitle" type="text" name="title" class="focus" size="40" />
+        <input type="submit" class="standalone searchButton" value="create" />
+      </p>
+    </form>
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/eligibility.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/eligibility.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/eligibility.py	(revision 196)
@@ -0,0 +1,81 @@
+##parameters=REQUEST=None
+# $Id$
+"""
+process the Admission Form
+return html renderer + psm
+"""
+request = REQUEST
+rget = request.get
+rset = request.set
+fget = request.form.get
+form = request.form
+fhas = request.form.has_key
+
+
+lt = context.portal_layouts
+pr = context.portal_registration
+pm = context.portal_membership
+eli = context.ELIGIBILITY.getContent()
+sr = eli.schoolresults
+
+validate = fhas('add') or fhas('change') or fhas('delete')
+data = {'faculty': eli.faculty,
+        'course': eli.course,
+        'jamb_aggregate': eli.jamb_aggregate,
+        }
+res,psm,ds = lt.renderLayout(layout_id= 'student_eligibility',
+                      schema_id= 'student_eligibility',
+                      context=context,
+                      mapping=validate and request,
+                      ob=data,
+                      layout_mode='create',
+                      formaction = "eligibility",
+                      schoolresults = sr,
+                      )
+if psm == 'invalid':
+    return context.eligibility_form(rendered = res,
+                                 psm = 'Please correct your errors',
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.eligibility_form(rendered = res,
+                                 psm = psm,
+                                 ds = ds,
+                                 )
+inr = 0
+if fhas('add') and (fget('type') or fget('subject') or fget('result')):
+    sr.append((fget('type'),fget('subject'),fget('result')))
+    psm = "new result added"
+elif fhas('change') and fget('keys'):
+    for k in fget('keys'):
+        sr[int(k)] = (fget('type_%s' % k),fget('subject_%s' % k),fget('result_%s' % k))
+        inr += 1
+    psm = "%s items changed" % inr
+elif fhas('delete') and fget('keys'):
+    new = []
+    todelete = fget('keys')
+    for k in range(len(sr)):
+        if str(k) not in todelete:
+            new.append(sr[k])
+    inr = len(todelete)
+    sr = new
+    psm = "%s items deleted" % inr
+elif psm == 'valid':
+    psm = "Your changes have been saved."
+
+ds.set('schoolresults',sr)
+eli.edit(mapping=ds)
+res,dummy,fds = lt.renderLayout(layout_id= 'student_eligibility',
+                      schema_id= 'student_eligibility',
+                      context=context,
+                      mapping=request,
+                      ob={},
+                      layout_mode='create',
+                      formaction = "eligibility",
+                      schoolresults = sr,
+                      )
+
+return context.eligibility_form(rendered = res,
+                                 #psm = "%s <br /> %s" % (str(ds),str(lt.student_eligibility.getLayoutDefinition()))
+                                 psm = psm,
+                                 )
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/eligibility_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/eligibility_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/eligibility_form.pt	(revision 196)
@@ -0,0 +1,21 @@
+<tal:block define="rendered_main options/rendered;
+                   portal_status_message options/psm;
+                   jamb options/jamb/getContent|nothing;
+                   edition python:1;"
+                   >
+<metal:block define-macro="edit_form">
+<metal:block use-macro="here/content_lib_master/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 tal:replace="structure rendered_main" />
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/jamb_index_html.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/jamb_index_html.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/jamb_index_html.py	(revision 196)
@@ -0,0 +1,15 @@
+##parameters=post_id=None, REQUEST=None
+
+# $Id$
+
+"""Default view for the Student."""
+member = context.portal_membership.getAuthenticatedMember()
+
+#return context.student_view_manager()
+if not context.portal_membership.isAnonymousUser:
+    roles = member.getRoles()
+    if 'Manager' in roles:
+        return context.cpsdocument_view()
+    elif 'StudentManager' in roles:
+        return context.jamb_view_manager()
+return context.jamb_view_student()
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/jamb_view_manager.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/jamb_view_manager.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/jamb_view_manager.pt	(revision 196)
@@ -0,0 +1,31 @@
+<metal:block define-macro="view">
+<metal:block use-macro="here/content_lib_master/macros/master">
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+      tal:attributes="href string:${base_url}document.css" />
+    <link rel="Stylesheet" type="text/css" href=""
+      tal:attributes="href string:${base_url}forum.css" />
+  </metal:block>
+
+  <metal:block fill-slot="main">
+    <tal:block tal:content="structure rendered_main|python:doc.render(proxy=here)" />
+
+    <tal:block tal:condition="python:hasattr(here,'portal_discussion') and
+      hasattr(here.portal_discussion, 'isCommentingAllowedFor')">
+      <tal:block tal:define="comments_allowed
+        python:here.portal_discussion.isCommentingAllowedFor(here);"
+        tal:condition="comments_allowed">
+        <metal:block
+          use-macro="here/forum_comment_lib_view_comments_inline/macros/view_comments_inline" />
+      </tal:block>
+    </tal:block>
+
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+
+</metal:block>
+</metal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/jamb_view_student.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/jamb_view_student.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/jamb_view_student.pt	(revision 196)
@@ -0,0 +1,32 @@
+<metal:block define-macro="view">
+<metal:block use-macro="here/content_lib_master/macros/master">
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+      tal:attributes="href string:${base_url}document.css" />
+    <link rel="Stylesheet" type="text/css" href=""
+      tal:attributes="href string:${base_url}forum.css" />
+  </metal:block>
+
+  <metal:block fill-slot="main">
+      
+    <tal:block tal:content="structure rendered_main|python:doc.render(proxy=here)" />
+
+    <tal:block tal:condition="python:hasattr(here,'portal_discussion') and
+      hasattr(here.portal_discussion, 'isCommentingAllowedFor')">
+      <tal:block tal:define="comments_allowed
+        python:here.portal_discussion.isCommentingAllowedFor(here);"
+        tal:condition="comments_allowed">
+        <metal:block
+          use-macro="here/forum_comment_lib_view_comments_inline/macros/view_comments_inline" />
+      </tal:block>
+    </tal:block>
+
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+
+</metal:block>
+</metal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/layout_admission_status_create.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/layout_admission_status_create.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/layout_admission_status_create.pt	(revision 196)
@@ -0,0 +1,83 @@
+<tal:block define="global creation python:1" />
+<metal:block define-macro="default_edit"
+             tal:define="layout options/layout;
+             ds options/datastructure;
+             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 string:check_admission_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;
+             "
+             >
+  <form action='admission_status' method='post'
+        enctype='multipart/form-data' class='workflow'>
+    <div class=''>
+      <div class='documentFields'>
+        <table width="100%" 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="GO" />
+      </div>        
+    </div>
+  </form>
+</metal:block>
+  
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/layout_eligibility_create.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/layout_eligibility_create.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/layout_eligibility_create.pt	(revision 196)
@@ -0,0 +1,174 @@
+<tal:block define="global creation python:1" />
+<metal:block define-macro="default_edit"
+             tal:define="layout options/layout;
+             ds options/datastructure;
+             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 options/formaction;
+             first_layout options/first_layout|python:0;
+             last_layout options/last_layout|python:0;
+             is_flexible options/is_flexible;
+             cpsmcat nocall:here/translation_service;
+             results options/schoolresults;
+             "
+             >
+  <form action='eligibility' method='post' tal:attributes="action formaction"
+        enctype='multipart/form-data' class='workflow'>
+    <div class=''>
+      <div class='documentFields'>
+        <table width="100%" 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>
+    <table cellspacing="0" cellpadding="2" border="0" width="100%" tal:condition="results|nothing">
+      <tr>
+        <td align="left" valign="top">
+          &nbsp;
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Type</div>
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Subject</div>
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Result</div>
+        </td>
+      </tr>
+      <span tal:repeat="row results" tal:omit-tag="">
+        <tr tal:define="rindex repeat/row/index">
+          <td align="left" valign="top">
+            <input type="checkbox" name="keys:list" value="100" tal:attributes="value string:${repeat/row/index}"/>
+          </td>
+          <td align="left" valign="top">
+            <div class="field">
+              <input type="text" name="key_0" value="100" size="20" 
+                     tal:attributes="name string:type_${rindex};value python:row[0]" />
+            </div>
+          </td>
+          <td align="left">
+            <div class="field">
+              <input type="text" name="label_0" value="Year 1 (100 Level)" size="40" 
+                     tal:attributes="name string:subject_${rindex};value python:row[1]" />
+            </div>
+          </td>
+          <td align="left">
+            <div class="field">
+              <input type="text" name="msgid_0" value="" size="10" 
+                     tal:attributes="name string:result_${rindex};value python:row[2]" />
+            </div>
+          </td>
+        </tr>
+      </span>
+      <tr>
+        <td align="left" colspan="3">
+          <input class="standalone" type="submit" name="change" value=" Change " />
+          <input class="standalone" type="submit" name="delete" value=" Delete " />
+        </td>
+      </tr>
+    </table>
+    <table cellspacing="0" cellpadding="2" border="0" width="100%">
+      <tr>
+        <td align="left" valign="top" colspan="2">
+          <div>Add a new post-primary school result:</div>
+        </td>
+      </tr>
+      <tr>
+        <td align="left" valign="top">
+          &nbsp;
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Type</div>
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Subject</div>
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Result</div>
+        </td>
+      </tr>
+      <tr>
+        <td align="left" valign="top">
+          &nbsp;
+        </td>
+        <td align="left" valign="top">
+          <div  class="field">
+            <input type="text" name="type" value="" size="20" /> 
+          </div>
+        </td>
+        <td align="left">
+          <div  class="field">
+            <input type="text" name="subject" value="" size="40" />
+          </div>
+        </td>
+        <td align="left">
+          <div  class="field">
+            <input type="text" name="result" value="" size="10" />
+          </div>
+        </td>
+      </tr>
+      <tr>
+        <td align="left" colspan="3">
+          <input class="standalone" type="submit" name="add" value=" Change/Add " />
+        </td>
+      </tr>
+    </table>
+  </form>
+</metal:block>
+  
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/layout_jambcreate_create.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/layout_jambcreate_create.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/layout_jambcreate_create.pt	(revision 196)
@@ -0,0 +1,83 @@
+<tal:block define="global creation python:1" />
+<metal:block define-macro="default_edit"
+             tal:define="layout options/layout;
+             ds options/datastructure;
+             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 string:check_admission_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;
+             "
+             >
+  <form action='create_jamb' method='post'
+        enctype='multipart/form-data' class='workflow'>
+    <div class=''>
+      <div class='documentFields'>
+        <table width="100%" 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="add" />
+      </div>        
+    </div>
+  </form>
+</metal:block>
+  
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/layout_personal_edit.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/layout_personal_edit.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/layout_personal_edit.pt	(revision 196)
@@ -0,0 +1,1 @@
+<metal:block use-macro="here/waeup_layout_lib/macros/default_edit" />
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/layout_personal_view.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/layout_personal_view.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/layout_personal_view.pt	(revision 196)
@@ -0,0 +1,1 @@
+<metal:block use-macro="here/waeup_layout_lib/macros/table_view" />
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/layout_results_create.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/layout_results_create.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/layout_results_create.pt	(revision 196)
@@ -0,0 +1,117 @@
+<tal:block define="global creation python:1" />
+<metal:block define-macro="default_edit"
+             tal:define="layout options/layout;
+             ds options/datastructure;
+             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 options/formaction;
+             first_layout options/first_layout|python:0;
+             last_layout options/last_layout|python:0;
+             is_flexible options/is_flexible;
+             cpsmcat nocall:here/translation_service;
+             results options/schoolresults;
+             "
+             >
+  <form action='eligibility' method='post' tal:attributes="action formaction"
+        enctype='multipart/form-data' class='workflow'>
+    <table cellspacing="0" cellpadding="2" border="0" width="100%" tal:condition="results|nothing">
+      <tr>
+        <td align="left" valign="top">
+          &nbsp;
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Type</div>
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Subject</div>
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Result</div>
+        </td>
+      </tr>
+      <span tal:repeat="row results" tal:omit-tag="">
+        <tr tal:define="rindex repeat/row/index">
+          <td align="left" valign="top">
+            <input type="checkbox" name="keys:list" value="100" tal:attributes="value string:${repeat/row/index}"/>
+          </td>
+          <td align="left" valign="top">
+            <div class="field">
+              <input type="text" name="key_0" value="100" size="20" 
+                     tal:attributes="name string:type_${rindex};value python:row[0]" />
+            </div>
+          </td>
+          <td align="left">
+            <div class="field">
+              <input type="text" name="label_0" value="Year 1 (100 Level)" size="40" 
+                     tal:attributes="name string:subject_${rindex};value python:row[1]" />
+            </div>
+          </td>
+          <td align="left">
+            <div class="field">
+              <input type="text" name="msgid_0" value="" size="10" 
+                     tal:attributes="name string:result_${rindex};value python:row[2]" />
+            </div>
+          </td>
+        </tr>
+      </span>
+      <tr>
+        <td align="left" colspan="3">
+          <input class="standalone" type="submit" name="change" value=" Change " />
+          <input class="standalone" type="submit" name="delete" value=" Delete " />
+        </td>
+      </tr>
+    </table>
+    <table cellspacing="0" cellpadding="2" border="0" width="100%">
+      <tr>
+        <td align="left" valign="top" colspan="2">
+          <div>Add a new postprimary school result</div>
+        </td>
+      </tr>
+      <tr>
+        <td align="left" valign="top">
+          &nbsp;
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Type</div>
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Subject</div>
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Result</div>
+        </td>
+      </tr>
+      <tr>
+        <td align="left" valign="top">
+          &nbsp;
+        </td>
+        <td align="left" valign="top">
+          <div  class="field">
+            <input type="text" name="type" value="" size="20" /> 
+          </div>
+        </td>
+        <td align="left">
+          <div  class="field">
+            <input type="text" name="subject" value="" size="40" />
+          </div>
+        </td>
+        <td align="left">
+          <div  class="field">
+            <input type="text" name="result" value="" size="10" />
+          </div>
+        </td>
+      </tr>
+      <tr>
+        <td align="left" colspan="3">
+          <input class="standalone" type="submit" name="add" value=" Add " />
+        </td>
+      </tr>
+    </table>
+  </form>
+</metal:block>
+  
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/layout_sc_create.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/layout_sc_create.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/layout_sc_create.pt	(revision 196)
@@ -0,0 +1,85 @@
+<tal:block define="global creation python:1" />
+<metal:block define-macro="default_edit"
+             tal:define="layout options/layout;
+             ds options/datastructure;
+             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 options/action;
+             submittext options/submit;
+             first_layout options/first_layout|python:0;
+             last_layout options/last_layout|python:0;
+             is_flexible options/is_flexible;
+             cpsmcat nocall:here/translation_service;
+             "
+             >
+  <form action='check_admission' tal:attributes="action formaction" method='post'
+        enctype='multipart/form-data' class='workflow'>
+    <div class=''>
+      <div class='documentFields'>
+        <table width="100%" 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="check" tal:attributes="value submittext"/>
+      </div>        
+    </div>
+  </form>
+</metal:block>
+  
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/layout_slregister_create.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/layout_slregister_create.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/layout_slregister_create.pt	(revision 196)
@@ -0,0 +1,2 @@
+<tal:block define="global creation python:1" />
+<metal:block use-macro="here/waeup_layout_lib/macros/common_edit" />
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/pay_hostel_fee.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/pay_hostel_fee.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/pay_hostel_fee.py	(revision 196)
@@ -0,0 +1,45 @@
+##parameters=REQUEST
+# $Id$
+"""
+book an accomodation
+"""
+import DateTime
+current = DateTime.DateTime()
+
+type_name = 'Student'
+ti = context.portal_types[type_name]
+pm = context.portal_membership
+REQUEST.set('type_name',type_name)
+
+validate = REQUEST.has_key("cpsdocument_edit_button")
+
+
+lt = context.portal_layouts
+pr = context.portal_registration
+
+res,psm,ds = lt.renderLayout(layout_id= 'accopay',
+                      schema_id= 'student_hostel_fee',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      submit = "pay",
+                      action = 'pay_hostel_fee',
+                      )
+if psm == 'invalid':
+    return context.book_accommodation_form(rendered = res,
+                                 psm = "Please correct your input",
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.book_accommodation_form(rendered = res,
+                                 psm = None,
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    sf = context.getContent()
+
+    ds.set('sc_date',current)
+    sf.setScratchCardData('hostel_fee',ds)
+
+    return context.payed_hostel_fee(dict=ds)
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/payed_hostel_fee.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/payed_hostel_fee.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/payed_hostel_fee.pt	(revision 196)
@@ -0,0 +1,17 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+  <metal:block fill-slot="head_slot">
+  </metal:block>
+  <metal:block fill-slot="header">
+  </metal:block>
+  <metal:block fill-slot="main"
+               tal:define="student context/getContent;
+               dict options/dict"
+               >
+    You payed <span tal:content="student/accommodation" /><br /> 
+    with Scratchcard PIN <span tal:content="dict/sc_pin" /> <br />
+    on <span  tal:content="dict/sc_date"/>.
+    
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/personal_addon.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/personal_addon.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/personal_addon.py	(revision 196)
@@ -0,0 +1,51 @@
+##parameters=REQUEST
+# $Id$
+"""
+process the Admission Form
+return html renderer + psm
+"""
+type_name = 'Jamb'
+ti = context.portal_types[type_name]
+
+REQUEST.set('type_name',type_name)
+
+validate = REQUEST.has_key("cpsdocument_edit_button")
+
+
+lt = context.portal_layouts
+pr = context.portal_registration
+pm = context.portal_membership
+
+jamb = getattr(context,'JAMB')
+jamb_rendered = jamb.getContent().render(layout_id = 'admission_slip', 
+                               layout_mode = 'view',
+                               schema_id = 'jamb')
+
+res,psm,ds = lt.renderLayout(layout_id= 'student_personal_addon',
+                      schema_id= 'student_personal',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      )
+res = jamb_rendered + res
+if psm == 'invalid':
+    return context.personal_addon_form(rendered = res,
+                                 #psm = str(ds),
+                                 psm = "Please correct your input",
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.personal_addon_form(rendered = res,
+                                 psm = None,
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    s_personal = context.PERSONAL.getContent()
+    s_personal.edit(mapping={'email': ds.get('email')})
+    #pw = REQUEST.get("widget__pw")
+    #pm.setPassword(pw)
+psm = 'Email has been successfully set. '
+##return context.REQUEST.RESPONSE.redirect('%s' % context.portal_url.getUrlFromRpath('/students'))
+
+return context.eligibility()
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/personal_addon_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/personal_addon_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/personal_addon_form.pt	(revision 196)
@@ -0,0 +1,23 @@
+<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/content_lib_master/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">
+        <h1> Fillin Your Email</h1>
+        <div tal:replace="structure rendered_main" />
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/process_waeup_login.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/process_waeup_login.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/process_waeup_login.py	(revision 196)
@@ -0,0 +1,57 @@
+##parameters=member=None,sc_pin=None
+# $Id$
+"""
+Process a student after login
+
+"""
+request = context.REQUEST
+response=request.response
+
+if request.form.get('submit') == 'Login':
+    #waeup = context.portal_catalog(id = 'demouni')[0]
+    waeup = context.portal_catalog(portal_type = 'University')[0]
+    if "Manager" in member.getRoles():
+        return
+    return response.redirect(waeup.getURL())
+
+member_id = str(member)
+ma = getattr(context,member_id)
+jkw = {'admission_sc_pin': sc_pin}
+jamb = getattr(ma,'JAMB')
+jamb.getContent().edit(mapping=jkw)
+#pdid = 'personal%s' % member_id
+pdid = 'PERSONAL'
+ma.invokeFactory('StudentPersonal', pdid)
+pd = getattr(ma,pdid)
+pkw = {}
+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['course'] = getattr(jc,'course')
+pkw['age'] = getattr(jc,'age')
+pkw['jamb_results'] = getattr(jc,'exam_results')
+pkw['jamb_aggregate'] = getattr(jc,'aggregate')
+pkw['jamb_listing_date'] = getattr(jc,'listing_date')
+pkw['state'] = getattr(jc,'state')
+
+pd.getContent().edit(mapping=pkw)
+context.notifyCPSDocumentCreation(ob=pd)
+
+pdid = 'DOCUMENTS'
+ma.invokeFactory('StudentDocuments', pdid)
+pd = getattr(ma,pdid)
+context.notifyCPSDocumentCreation(ob=pd)
+
+pdid = 'ELIGIBILITY'
+ma.invokeFactory('StudentEligibility', pdid)
+pd = getattr(ma,pdid)
+pd.getContent().edit(mapping=pkw)
+context.notifyCPSDocumentCreation(ob=pd)
+
+return response.redirect("%s" % ma.absolute_url())
+#return ma.personal_addon(REQUEST=context.REQUEST)
+
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/register_level.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/register_level.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/register_level.py	(revision 196)
@@ -0,0 +1,63 @@
+##parameters=REQUEST
+# $Id$
+"""
+register for next level
+"""
+type_name = 'StudyLevel'
+ti = context.portal_types[type_name]
+pm = context.portal_membership
+REQUEST.set('type_name',type_name)
+
+validate = REQUEST.has_key("cpsdocument_create_button")
+
+
+lt = context.portal_layouts
+pv = context.portal_vocabularies
+#pr = context.portal_registration
+
+res,psm,ds = lt.renderLayout(layout_id= 'study_level',
+                      schema_id= 'study_level',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      create_action = 'register_level',
+                      )
+if psm == 'invalid':
+    return context.register_level_form(rendered = res,
+                                 psm = "Please correct your input",
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.register_level_form(rendered = res,
+                                 psm = None,
+                                 ds = ds,
+                                 )
+
+elif psm == 'valid':
+    voc = pv.courselevel
+    level_id = voc.items()[0][0]
+    level = getattr(context,level_id,None)
+    if level:
+        return context.register_level_form(rendered = res,
+                                 psm = "You have already registered for Level %s" % voc.get(level_id),
+                                 ds = ds,
+                                 )
+
+    context.invokeFactory(type_name,level_id)
+    object = getattr(context,level_id)
+    ds.set('Title',voc.get(level_id))
+    object.getContent().edit(mapping=ds,proxy=object)
+    context.notifyCPSDocumentCreation(ob=object)
+    psm = 'new %s created' % level_id
+    semester_id = 'Semester_1_%s_%s' % (level_id,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' % (level_id,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)
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/register_level_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/register_level_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/register_level_form.pt	(revision 196)
@@ -0,0 +1,25 @@
+<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/content_lib_master/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">
+        <h1>Register for Next Level!</h1>
+      <div tal:replace="structure rendered_main" />
+    </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+
+</metal:block>
+</metal:block>
+</tal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/student_admitted_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/student_admitted_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/student_admitted_form.pt	(revision 196)
@@ -0,0 +1,12 @@
+<tal:block define="rendered_main options/rendered;
+                   portal_status_message options/psm;
+                   jamb options/jamb/getContent;
+                   student options/student/getContent;
+                   edition python:1;"
+                   >
+  <metal:html use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main">
+      <a href="edits" tal:attributes="href string:${context/pd/absolute_url}/cpsdocument_edit_form"></a>
+    </metal:main>
+  </metal:html>
+</tal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/student_documents_edit_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/student_documents_edit_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/student_documents_edit_form.pt	(revision 196)
@@ -0,0 +1,69 @@
+<tal:block define="res python:here.editCPSDocument(REQUEST=request);
+                   rendered_main python: res[0];
+                   portal_status_message python: res[1];
+                   edition python:1;
+  ">
+<metal:block define-macro="edit_form">
+<metal:block use-macro="here/content_lib_master/macros/master">
+  <metal:block fill-slot="css_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">
+    <!--
+     function popup_rte(input_id, label_edit) {
+       var args, value
+       value = document.getElementById(input_id).value;
+       args='?input_id='+input_id+'&label_edit='+escape(label_edit);
+       popup = window.open('popup_rte_form'+args, input_id, 'toolbar=0, scrollbars=0, location=0, statusbar=0, menubar=0, resizable=1, dependent=1, width=640, height=480')
+       if(!popup.opener)
+         popup.opener = window;
+       return false;
+   }
+   //-->
+   </script>
+   </metal:block>
+  </metal:block>
+
+  <metal:block fill-slot="header"
+    tal:define="creation creation|nothing;
+                edition edition|nothing;
+                metadata metadata|nothing">
+    <h1 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>
+    </h1>
+    <h1 tal:condition="python: 0 and not creation">
+      <img tal:replace="structure python:here.getImgTag('/'+here.getIcon(), base_url='')">
+      <tal:block condition="edition"
+        i18n:translate="">Edit <span i18n:name="title"
+        tal:content="here/title_or_id">Page Title</span></tal:block>
+      <tal:block tal:condition="metadata"
+        i18n:translate="">heading_metadata_edit</tal:block>
+    </h1>
+  </metal:block>
+
+  <metal:block fill-slot="main">
+    <div tal:replace="structure rendered_main" />
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+
+</metal:block>
+</metal:block>
+</tal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/student_index_html.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/student_index_html.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/student_index_html.py	(revision 196)
@@ -0,0 +1,15 @@
+##parameters=post_id=None, REQUEST=None
+
+# $Id$
+
+"""Default view for the Student."""
+member = context.portal_membership.getAuthenticatedMember()
+
+#return context.student_view_manager()
+if not context.portal_membership.isAnonymousUser():
+    roles = member.getRoles()
+    if 'Manager' in roles:
+        return context.folder_view()
+    elif 'StudentManager' in roles:
+        return context.student_view_manager()
+return context.student_view_student()
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/student_personal_edit_form.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/student_personal_edit_form.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/student_personal_edit_form.pt	(revision 196)
@@ -0,0 +1,69 @@
+<tal:block define="res python:here.editCPSDocument(REQUEST=request);
+                   rendered_main python: res[0];
+                   portal_status_message python: res[1];
+                   edition python:1;
+  ">
+<metal:block define-macro="edit_form">
+<metal:block use-macro="here/content_lib_master/macros/master">
+  <metal:block fill-slot="css_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">
+    <!--
+     function popup_rte(input_id, label_edit) {
+       var args, value
+       value = document.getElementById(input_id).value;
+       args='?input_id='+input_id+'&label_edit='+escape(label_edit);
+       popup = window.open('popup_rte_form'+args, input_id, 'toolbar=0, scrollbars=0, location=0, statusbar=0, menubar=0, resizable=1, dependent=1, width=640, height=480')
+       if(!popup.opener)
+         popup.opener = window;
+       return false;
+   }
+   //-->
+   </script>
+   </metal:block>
+  </metal:block>
+
+  <metal:block fill-slot="header"
+    tal:define="creation creation|nothing;
+                edition edition|nothing;
+                metadata metadata|nothing">
+    <h1 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>
+    </h1>
+    <h1 tal:condition="python: 0 and not creation">
+      <img tal:replace="structure python:here.getImgTag('/'+here.getIcon(), base_url='')">
+      <tal:block condition="edition"
+        i18n:translate="">Edit <span i18n:name="title"
+        tal:content="here/title_or_id">Page Title</span></tal:block>
+      <tal:block tal:condition="metadata"
+        i18n:translate="">heading_metadata_edit</tal:block>
+    </h1>
+  </metal:block>
+
+  <metal:block fill-slot="main">
+    <div tal:replace="structure rendered_main" />
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+
+</metal:block>
+</metal:block>
+</tal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/student_personal_index_html.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/student_personal_index_html.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/student_personal_index_html.py	(revision 196)
@@ -0,0 +1,15 @@
+##parameters=post_id=None, REQUEST=None
+
+# $Id$
+
+"""Default view for the Student."""
+member = context.portal_membership.getAuthenticatedMember()
+
+#return context.student_view_manager()
+if not context.portal_membership.isAnonymousUser():
+    roles = member.getRoles()
+    if 'Manager' in roles:
+        return context.cpsdocument_view()
+    elif 'StudentManager' in roles:
+        return context.student_personal_view_manager()
+return context.student_personal_view_student()
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/student_personal_view_manager.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/student_personal_view_manager.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/student_personal_view_manager.pt	(revision 196)
@@ -0,0 +1,31 @@
+<metal:block define-macro="view">
+<metal:block use-macro="here/content_lib_master/macros/master">
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+      tal:attributes="href string:${base_url}document.css" />
+    <link rel="Stylesheet" type="text/css" href=""
+      tal:attributes="href string:${base_url}forum.css" />
+  </metal:block>
+
+  <metal:block fill-slot="main">
+    <tal:block tal:content="structure rendered_main|python:doc.render(proxy=here)" />
+
+    <tal:block tal:condition="python:hasattr(here,'portal_discussion') and
+      hasattr(here.portal_discussion, 'isCommentingAllowedFor')">
+      <tal:block tal:define="comments_allowed
+        python:here.portal_discussion.isCommentingAllowedFor(here);"
+        tal:condition="comments_allowed">
+        <metal:block
+          use-macro="here/forum_comment_lib_view_comments_inline/macros/view_comments_inline" />
+      </tal:block>
+    </tal:block>
+
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+
+</metal:block>
+</metal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/student_personal_view_student.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/student_personal_view_student.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/student_personal_view_student.pt	(revision 196)
@@ -0,0 +1,20 @@
+<metal:block define-macro="view">
+  <metal:block use-macro="here/content_lib_master/macros/master">
+    <metal:block fill-slot="header">
+    </metal:block>
+
+    <metal:block fill-slot="css_slot">
+      <link rel="Stylesheet" type="text/css" href=""
+            tal:attributes="href string:${base_url}document.css" />
+      <link rel="Stylesheet" type="text/css" href=""
+            tal:attributes="href string:${base_url}forum.css" />
+    </metal:block>
+    
+    <metal:block fill-slot="main">
+      <tal:block tal:content="structure rendered_main|python:doc.render(proxy=here)" />
+    </metal:block>
+    <metal:block fill-slot="sub">
+    </metal:block>
+
+</metal:block>
+</metal:block>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/student_view_manager.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/student_view_manager.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/student_view_manager.pt	(revision 196)
@@ -0,0 +1,38 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+<metal:block fill-slot="head_slot">
+  <tal:block tal:define="student here/getContent">
+  </tal:block>
+</metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+          tal:attributes="href string:${base_url}student.css" />
+  </metal:block>
+  <metal:block fill-slot="header">
+  </metal:block>
+
+<metal:block fill-slot="main"
+             tal:define="items here/contentValues"
+             >
+    <h2>Data for Student <span tal:content="context/id" /></h2>
+    <table cellspacing="0" cellpadding="0">
+      <tal:block condition="python: len(items)">
+        <tr tal:repeat="item items">
+          <td colspan="1"> 
+            <a href="jamb" 
+               tal:attributes="href item/absolute_url"
+               tal:content="item/title_or_id"></a>
+          </td>
+        </tr>
+      </tal:block>
+      <tr tal:condition="python:not len(items)">
+        <td>
+          no Items yet !
+        </td>
+      </tr>
+    </table>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/student_view_student.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/student_view_student.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/student_view_student.pt	(revision 196)
@@ -0,0 +1,37 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+<metal:block fill-slot="head_slot">
+  <tal:block tal:define="student here/getContent">
+  </tal:block>
+</metal:block>
+
+<metal:block fill-slot="css_slot">
+  <link rel="Stylesheet" type="text/css" href=""
+    tal:attributes="href string:${base_url}student.css" />
+</metal:block>
+  <metal:block fill-slot="header">
+  </metal:block>
+  <metal:block fill-slot="main"
+               tal:define="student here/getContent;
+               items here/contentValues"
+               >
+    <tal:block condition="python:0 and len(items)">
+    <table cellspacing="0" cellpadding="0">
+        <tr tal:repeat="item items">
+          <td colspan="1"> 
+            <a href="jamb" 
+               tal:attributes="href item/absolute_url"
+               tal:content="item/title_or_id"></a>
+          </td>
+        </tr>
+    </table>
+    </tal:block>
+    <ul>
+      <li>  <a href="" tal:attributes="href string:${context/absolute_url}/JAMB">Clearence Form Processing</a></li>
+      <li>  <a href="" tal:attributes="href string:${context/absolute_url}/PERSONAL">Personal Data Form</a></li>
+      <li>  <a href="" tal:attributes="href string:${context/absolute_url}/book_accommodation">Book your accommodation</a></li>
+    </ul>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/students_folder_view.py
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/students_folder_view.py	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/students_folder_view.py	(revision 196)
@@ -0,0 +1,20 @@
+##parameters=REQUEST=None,psm=None,groups=None
+
+# $Id$
+
+"""Default view for the forum. If post_id is not None, post with id = <post_id>
+will be displayed, otherwise first post will be displayed."""
+
+member = context.portal_membership.getAuthenticatedMember()
+if not context.portal_membership.isAnonymousUser():
+    roles = member.getRoles()
+    if 'Manager' in roles:
+        return context.folder_view()
+    elif 'StudentManager' in roles or 'UniversityManager' in roles:
+        return context.students_folder_view_manager(psm=psm)
+    elif 'Student' in roles:
+        return getattr(context, str(member))()
+context_ti = context.portal_types['University'] 
+index = context_ti.getActionById('view','university_view')
+return getattr(context,index)(psm=psm)
+return context.students_folder_view_all(psm=psm)
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/students_folder_view_all.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/students_folder_view_all.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/students_folder_view_all.pt	(revision 196)
@@ -0,0 +1,26 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+  <metal:block fill-slot="head_slot">
+    <tal:block tal:define="student here/getContent">
+    </tal:block>
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+          tal:attributes="href string:${base_url}student.css" />
+  </metal:block>
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="student_folder here/getContent;
+               items here/contentValues"
+               >
+    <span tal:condition="python: mtool.isAnonymousUser()"> 
+      Please <a href="" tal:attributes="href string:${context/portal_url}/login_form">login</a> or <br />
+      <a href="" tal:attributes="href string:${context/absolute_url}/admission_status">check you Jambadmission</a>.
+    </span>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/students_folder_view_anon.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/students_folder_view_anon.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/students_folder_view_anon.pt	(revision 196)
@@ -0,0 +1,24 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+  <metal:block fill-slot="head_slot">
+    <tal:block tal:define="student here/getContent">
+    </tal:block>
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+          tal:attributes="href string:${base_url}student.css" />
+  </metal:block>
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="student_folder here/getContent;
+               items here/contentValues"
+               >
+    <a href="" tal:attributes="href string:${context/absolute_url}/admission_status">Admission List UME</a>.<br />
+    <a href="" tal:attributes="href string:${context/absolute_url}/check_admission">Admission Request (JAMB canditates only)</a>.
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /waeup_product/branches/srpp_branch/skins/waeup_student/students_folder_view_manager.pt
===================================================================
--- /waeup_product/branches/srpp_branch/skins/waeup_student/students_folder_view_manager.pt	(revision 196)
+++ /waeup_product/branches/srpp_branch/skins/waeup_student/students_folder_view_manager.pt	(revision 196)
@@ -0,0 +1,38 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+  <metal:block fill-slot="head_slot">
+    <tal:block tal:define="student here/getContent">
+    </tal:block>
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+          tal:attributes="href string:${base_url}student.css" />
+  </metal:block>
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="student_folder here/getContent;
+               items here/contentValues"
+               >
+    <span> 
+      <table cellspacing="0" cellpadding="0">
+        <tal:block condition="python: len(items)">
+          <tr tal:repeat="item items">
+            <td colspan="1">
+              <a href="student" tal:attributes="href item/absolute_url" tal:content="item/title_or_id"></a>
+            </td>
+          </tr>
+        </tal:block>
+        <tr tal:condition="python:not len(items)">
+          <td>
+            no Students yet !
+          </td>
+        </tr>
+      </table>
+    </span>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
