Index: waeup_product/trunk/skins/waeup_student/create_jamb.py
===================================================================
--- waeup_product/trunk/skins/waeup_student/create_jamb.py	(revision 107)
+++ waeup_product/trunk/skins/waeup_student/create_jamb.py	(revision 112)
@@ -1,624 +1,71 @@
-#-*- mode: python; mode: fold -*-
+##parameters=REQUEST=None
 # $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'
+"""
+Create an the Jamb-Record for a Student
 
-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': ('StudentsFolder','Faculty','AccoFolder'),
-    'allow_discussion': 0,
-    'cps_is_searchable': 1,
-    'cps_display_as_document_in_listing': 1,
-    'cps_proxy_type': 'folder',
-    'schemas': ['metadata', 'common', 'folder'],
-    'layouts': ['common', 'university'],
-    'layout_clusters': ['metadata:metadata'],
-    'cps_section_wf': 'waeup_section_wf',
-    'actions': ({'id': 'view',
-                 'name': 'action_view',
-                 'action': 'university_view',
-                 'condition': "python:member and 'Manager' in member.getRoles()",
-                 'permissions': (View,)},
-                {'id': 'add_faculty',
-                 'name': 'Add a Faculty',
-                 'condition': "python:member and not 'Student'in member.getRoles()",
-                 'action'    : 'string:${object/absolute_url}/create_common?type_name=Faculty',
-                 #'action': 'folder_factories',
-                 'permissions': (UniversityManage,)},
-                {'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': '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': (UniversityManage,StudentManage)
-          },
-                 )
-        }
-###)
+"""
 
-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','folder'],
-    'layout_clusters': ['metadata:metadata'],
-    'cps_section_wf': 'waeup_section_wf',
-    'actions': ({'id': 'view',
-                 'name': 'Students',
-                 'action': 'students_folder_view',
-                 'condition': "python:member and 'Manager' in member.getRoles()",
-                 '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 Student JAMB',
-                'action'    : 'string:${object/absolute_url}/create_jamb',
-                'permissions': (UniversityManage,StudentManage)},
-          {'id': 'localroles',
-          'name': 'delegate',
-          'action': 'folder_localrole_form',
-          'permissions': (UniversityManage,)
-          },
-##                {'id': 'contents',
-##                 'name': 'action_folder_contents',
-##                 'action': 'folder_contents',
-##                 'permissions': (UniversityManage,)},
-##                {'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,)},
-    )
-}
-###)
+type_name = 'Jamb'
+ti = context.portal_types[type_name]
+pr = context.portal_registration
+pm = context.portal_membership
 
-student_type = { ###(
-    'title': 'WAeUP Student',
-    'description': '',
-    'content_icon': 'student.gif',
-    'content_meta_type': 'Student',
-    'product': 'WAeUP',
-    'factory': 'addStudent',
-    'immediate_view': 'cpsdocument_view',
-    'global_allow': True,
-    'filter_content_types': True,
-    'allowed_content_types': ('Jamb','StudentPersonal'),
-    'allow_discussion': False,
-    'cps_is_searchable': True,
-    'cps_proxy_type': 'document',
-    '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': 'action_view',
-          'action': 'string:${object_url}/student_index_html',
-          #'action': 'string:${object_url}/cpsdocument_view',
-          '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,)
-          },
-          )
-}
-###)
+REQUEST.set('type_name',type_name)
 
-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': 'action_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,},
-##    )
-}
-#
-###)
+validate = REQUEST.has_key("cpsdocument_edit_button")
 
-jamb_type = { ###(
-    'title': "JAMB data",
-    'description': 'The data from JAMB',
-    'content_icon': '',
-    'content_meta_type': 'CPS Document',
-    '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,
-    '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': 'action_view',
-          'action': 'string:${object_url}/jamb_index_html',
-          'condition': '',
-          'permission': (View,),
-          'visible': True,},
-         {'id': 'edit',
-          'name': 'action_edit',
-          'action': 'string:${object_url}/waeup_edit_form',
-          'condition': '',
-          'permission': (ModifyPortalContent,StudentManage),
-          },
-          {'id': 'localroles',
-          'name': 'delegate',
-          'action': 'folder_localrole_form',
-          'permissions': (UniversityManage,)
-          },
-          {
-          '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,)},
-          )
-}
-###)
+lt = context.portal_layouts
 
-student_personal_type = { ###(
-    'title': "Student personal data",
-    'description': '',
-    'content_icon': '',
-    'content_meta_type': 'StudentPersonal',
-    'product': 'WAeUP',
-    'factory': 'addStudentPersonal',
-    'immediate_view': 'student_personal_index_html',
-    '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': 'action_view',
-          'action': 'string:${object_url}/student_personal_index_html',
-          #'action': 'string:${object_url}/cpsdocument_view',
-          'permission': ('View',),
-          'category': 'object',
-          'visible': True,},
-         {'id': 'edit',
-          'name': 'action_edit',
-          'action': 'string:${object_url}/student_personal_edit_form',
-          '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,)},
-          )
-}
-###)
+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')
+    name = ds.get('name')
+    skw = {'title': name}
+    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', name)
+    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'))
+    except:
+        noCPSMember = True
+    if noCPSMember:
+        pr.addMember(s_id, 'UnSeT',roles=('Member','Student','Contributor'))
+##    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)
+##    return context.create_jamb_form(rendered = res,
+##                                 psm = psm,
+##                                 ds = ds,
+##                                 )
+    
+return res,psm,ds
 
-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': 'action_view',
-          'action': 'string:${object_url}/faculty_index_html',
-          '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 a Department',
-          'action'    : 'string:${object/absolute_url}/create_common?type_name=Department',
-          'permissions': (ModifyPortalContent,UniversityManage,)},
-          {'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': (UniversityManage,)
-          },
-          )
-}
-###)
-
-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': 'action_view',
-          'action': 'string:${object_url}/department_index_html',
-          'condition': '',
-          'permission': ('View',),
-          'visible': True,},
-         {'id': 'edit',
-          'name': 'action_edit',
-          'action': 'string:${object_url}/waeup_edit_form',
-          'condition': '',
-          'permission': (FacultyManage,),
-          'visible': True,},
-          {'id': 'create_course',
-          'name': 'Add a Course',
-          'action'    : 'string:${object/absolute_url}/create_course',
-          'permissions': (ModifyPortalContent,UniversityManage,)},
-          {'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': (UniversityManage,)
-          },
-          )
-}
-###)
-
-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': 'action_view',
-          'action': 'string:${object_url}/course_index_html',
-          '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': (UniversityManage,)
-          },
-          )
-    }
-###)
-
-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': 'cpsdocument',
-    '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': 'action_view',
-          'action': 'string:${portal_url}/sections/waeup/Accomodation/accommodation_index_html',
-          '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,
-          },
-          )
-}
-###)
-
-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': 'document',
-    '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': 'action_view',
-          'action': 'string:${object_url}/accommodation_index_html',
-          'condition': '',
-          'permission': ('View',),
-          'category': 'object',
-          'visible': True,},
-         {'id': 'edit',
-          'name': '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['Student'] = student_type
-types['StudentPersonal'] = student_personal_type
-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
-
