Index: waeup_product/trunk/skins/waeup_default/create_common.py
===================================================================
--- waeup_product/trunk/skins/waeup_default/create_common.py	(revision 102)
+++ waeup_product/trunk/skins/waeup_default/create_common.py	(revision 103)
@@ -39,40 +39,9 @@
     context.invokeFactory(type_name,oid) 
     object = getattr(context,oid)    
-    okw = {'Title': ds.get('Title'),
-           'Description': ds.get('Description')
-           }
     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)
-    name = ds.get('name')
-    student = getattr(context,s_id)    
-    student.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.edit(mapping=ds)
-    context.notifyCPSDocumentCreation(ob=jamb)
-    psm = 'Student created'
-    noCPSMember = False
-    try:
-        pr.addMember(s_id, 'UnSeT',roles=('Member','CPSMember','Student'))
-    except:
-        noCPSMember = True
-    if noCPSMember:
-        pr.addMember(s_id, 'UnSeT',roles=('Member',))
-##    groups = context.portal_directories.groups
-##    gm = list(groups.getEntry('Students')['members'])
-##    gm.extend((s_id,))
-##    groups.editEntry({'group': 'Students', 
-##                      'members': gm})  
-##    return context.create_jamb_form(rendered = res,
-##                                 psm = psm,
-##                                 ds = ds,
-##                                 )
-    
-return res,psm,ds
 
Index: waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py
===================================================================
--- waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py	(revision 102)
+++ waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py	(revision 103)
@@ -826,8 +826,20 @@
 course = { ###(
     'widgets': {
-        'heading': Heading,
+        'heading': {
+         'type': 'Heading Widget',
+         'data': {
+                'fields': ['heading'],
+                'level': 1,
+                'is_i18n': 0,
+                'is_required': 1,
+                'label_edit': 'Title',
+                'help': 'Course Title',
+                'display_width': 40,
+                'size_max': 40,
+            },
+        },
         'text': Text,
         'level': {
-            'type': 'String Widget',
+            'type': 'Select Widget',
             'data': {
                 'title': '',
@@ -839,6 +851,5 @@
                 'help': '',
                 'is_i18n': False,
-                'display_width': 10,
-                'size_max': 0,
+                'vocabulary': 'courselevel',
             },
         },
@@ -925,85 +936,89 @@
 ###)
 
-accomodation = { ###(
+accommodation = { ###(
     'widgets': {
-        'heading': Heading,
+        'heading': {
+         'type': 'Heading Widget',
+         'data': {
+                'fields': ['heading'],
+                'level': 1,
+                'is_i18n': 0,
+                'is_required': 1,
+                'label_edit': 'Hallname',
+                'help': '',
+                'display_width': 40,
+                'size_max': 40,
+            },
+        },
         'text': Text,
-        '': {
-            'type': 'String Widget',
-            'data': {
-                'title': '',
-                'fields': ('level',),
-                'is_required': True,
-                'label': 'Level',
-                'label_edit': 'Level',
-                'description': '',
-                'help': '',
-                'is_i18n': False,
-                'display_width': 10,
-                'size_max': 0,
-            },
-        },
-        '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': {
+        'which_sex': {
             '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,
+                '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': 'Number of Blocks this Hall has',
+                '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': 'Number of Floors per Block this Hall has',
+                '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': 'Number of Rooms per Floor this Hall has',
+                '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': 'Number of Beds per Room this Hall has',
+                'is_i18n': False,
+                'vocabulary': 'range10',
             },
         },
@@ -1016,9 +1031,9 @@
             [{'widget_id': 'heading', '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},],
+            [{'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},],
         ]
     },
@@ -1031,4 +1046,5 @@
 layouts['student'] = student_layout
 layouts['student_personal'] = student_personal_layout
+layouts['accommodation'] = accommodation 
 layouts['scratch_card'] = scratch_card
 layouts['admission'] = admission
Index: waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py
===================================================================
--- waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py	(revision 102)
+++ waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py	(revision 103)
@@ -290,5 +290,5 @@
 }###)
 
-accomodation_schema = { ###(
+accommodation = { ###(
     'heading': {
         'type': 'CPS String Field',
@@ -305,36 +305,36 @@
         },
     },
-    '': {
-        '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',
+    'which_sex': {
+        'type': 'CPS Boolean Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': True,
+        },
+    },
+    'nr_of_blocks': {
+        'type': 'CPS Int Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': False,
+        },
+    },
+    'nr_of_floors': {
+        'type': 'CPS Int Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': False,
+        },
+    },
+    'rooms_per_floor': {
+        'type': 'CPS Int Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': False,
+        },
+    },
+    'beds_per_room': {
+        'type': 'CPS Int Field',
+        'data': {
+            'default_expr': 'string:',
             'is_searchabletext': False,
         },
@@ -394,4 +394,5 @@
 schemas['student'] = student_schema
 schemas['student_personal'] = student_personal_schema
+schemas['accommodation'] = accommodation
 schemas['jamb'] = jamb_schema
 #schemas['scratch_card'] = scratch_card
Index: waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py
===================================================================
--- waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py	(revision 102)
+++ waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py	(revision 103)
@@ -20,5 +20,5 @@
     'global_allow': 1,
     'filter_content_types': 1,
-    'allowed_content_types': ('StudentsFolder','Faculty'),
+    'allowed_content_types': ('StudentsFolder','Faculty','AccoFolder'),
     'allow_discussion': 0,
     'cps_is_searchable': 1,
@@ -37,4 +37,9 @@
                  'name': 'Add a Faculty',
                  'action'    : 'string:${object/absolute_url}/create_common?type_name=Faculty',
+                 #'action': 'folder_factories',
+                 'permissions': (ModifyPortalContent,UniversityManage,)},
+                {'id': 'add_accommodation',
+                 'name': 'Add an Accomodation Hall',
+                 'action'    : 'string:${object/absolute_url}/add_accommodation',
                  #'action': 'folder_factories',
                  'permissions': (ModifyPortalContent,UniversityManage,)},
@@ -54,9 +59,9 @@
                  'condition': "python:member and 'Manager' in member.getRoles()",
                  'permissions': (ModifyPortalContent,)},
-                {'id': 'localroles',
-                 'name': 'action_local_roles',
-                 'action': 'folder_localrole_form',
-                 'condition': 'python:0',
-                 'permissions': (ModifyPortalContent,)},
+          {'id': 'localroles',
+          'name': 'delegate',
+          'action': 'folder_localrole_form',
+          'permissions': (UniversityManage,)
+          },
                  )
         }
@@ -99,4 +104,9 @@
                 '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',
@@ -154,4 +164,9 @@
           'condition': "python:member and 'Manager' in member.getRoles()",
           'permissions': (UniversityManage,)},
+          {'id': 'localroles',
+          'name': 'delegate',
+          'action': 'folder_localrole_form',
+          'permissions': (UniversityManage,)
+          },
           )
 }
@@ -247,4 +262,9 @@
           'permission': (ModifyPortalContent,StudentManage),
           },
+          {'id': 'localroles',
+          'name': 'delegate',
+          'action': 'folder_localrole_form',
+          'permissions': (UniversityManage,)
+          },
           {
           'id'        : 'add_content',
@@ -364,8 +384,8 @@
           'permissions': (ModifyPortalContent,)},
           {'id': 'localroles',
-          'name': 'action_local_roles',
-          'action': 'folder_localrole_form',
-          'condition': 'python:0',
-          'permissions': (ModifyPortalContent,)},
+          'name': 'delegate',
+          'action': 'folder_localrole_form',
+          'permissions': (UniversityManage,)
+          },
           )
 }
@@ -426,8 +446,8 @@
           'permissions': (ModifyPortalContent,)},
           {'id': 'localroles',
-          'name': 'action_local_roles',
-          'action': 'folder_localrole_form',
-          'condition': 'python:0',
-          'permissions': (ModifyPortalContent,)},
+          'name': 'delegate',
+          'action': 'folder_localrole_form',
+          'permissions': (UniversityManage,)
+          },
           )
 }
@@ -452,5 +472,5 @@
     'layouts': ['course',],
     'flexible_layouts': (),
-    'layout_clusters': ['metadata:metadata','coursetotal:metadata,course'],
+    'layout_clusters': ['metadata:metadata',],
     'cps_section_wf': 'waeup_section_wf',
     'use_content_status_history': 0,
@@ -486,8 +506,102 @@
           'permissions': (ModifyPortalContent,)},
           {'id': 'localroles',
-          'name': 'action_local_roles',
-          'action': 'folder_localrole_form',
-          'condition': 'python:0',
+          '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,
+          },
           )
 }
@@ -499,4 +613,6 @@
 types['Student'] = student_type
 types['StudentPersonal'] = student_personal_type
+types['AccoFolder'] = acco_folder
+types['Accommodation'] = accommodation
 types['ScratchCard'] = scratch_card
 types['Jamb'] = jamb_type
Index: waeup_product/trunk/skins/waeup_default/getWAeUPVocabularies.py
===================================================================
--- waeup_product/trunk/skins/waeup_default/getWAeUPVocabularies.py	(revision 102)
+++ waeup_product/trunk/skins/waeup_default/getWAeUPVocabularies.py	(revision 103)
@@ -72,6 +72,35 @@
             )},
         }
+vocabularies['faculties'] = faculties_voc
+level_voc = {
+        'type': 'CPS Vocabulary',
+        'data': {'tuples': (
+            ('100', "Year 1 (100 Level)", ''),
+            ('200', "Year 2 (200 Level)", ''),
+            ('300', "Year 3 (300 Level)", ''),
+            ('400', "Year 4 (100 Level)", ''),
+            )},
+        }
+vocabularies['courselevel'] = level_voc
 
-vocabularies['faculties'] = faculties_voc
+vocabularies['range5'] = {'type': 'CPS Vocabulary',
+                               'data': {'tuples': ([('%d' % i,i,'') for i in range(1,6)])},
+                          }
+vocabularies['range10'] = {'type': 'CPS Vocabulary',
+                               'data': {'tuples': ([('%d' % i,i,'') for i in range(1,11)])},
+                          }
+vocabularies['range20'] = {'type': 'CPS Vocabulary',
+                               'data': {'tuples': ([('%d' % i,i,'') for i in range(1,21)])},
+                          }
+vocabularies['range50'] = {'type': 'CPS Vocabulary',
+                               'data': {'tuples': ([('%d' % i,i,'') for i in range(1,51)])},
+                          }
+##'xxx_voc': {
+##        'type': 'CPS Vocabulary',
+##        'data': {'tuples': (
+##            ('', "", ''),
+##            )},
+##        },
+
 
 return vocabularies
Index: waeup_product/trunk/skins/waeup_faculty/create_course.py
===================================================================
--- waeup_product/trunk/skins/waeup_faculty/create_course.py	(revision 102)
+++ waeup_product/trunk/skins/waeup_faculty/create_course.py	(revision 103)
@@ -41,13 +41,9 @@
     context.invokeFactory(type_name,oid) 
     object = getattr(context,oid)    
-##    okw = {'Title': ds.get('Title'),
-##           'Description': ds.get('Description')
-##           }
     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)
-##    ret = getattr(context,index)
-##    return REQUEST.RESPONSE.redirect(ret.absolute_url())
 
Index: waeup_product/trunk/skins/waeup_faculty/faculty_view_student.pt
===================================================================
--- waeup_product/trunk/skins/waeup_faculty/faculty_view_student.pt	(revision 103)
+++ waeup_product/trunk/skins/waeup_faculty/faculty_view_student.pt	(revision 103)
@@ -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/trunk/skins/waeup_student/accommodation_index_html.py
===================================================================
--- waeup_product/trunk/skins/waeup_student/accommodation_index_html.py	(revision 103)
+++ waeup_product/trunk/skins/waeup_student/accommodation_index_html.py	(revision 103)
@@ -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.folder_view()
+    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/trunk/skins/waeup_student/accommodation_view_all.pt
===================================================================
--- waeup_product/trunk/skins/waeup_student/accommodation_view_all.pt	(revision 103)
+++ waeup_product/trunk/skins/waeup_student/accommodation_view_all.pt	(revision 103)
@@ -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><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>
+    </table>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: waeup_product/trunk/skins/waeup_student/accommodation_view_manager.pt
===================================================================
--- waeup_product/trunk/skins/waeup_student/accommodation_view_manager.pt	(revision 103)
+++ waeup_product/trunk/skins/waeup_student/accommodation_view_manager.pt	(revision 103)
@@ -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><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>
+    </table>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: waeup_product/trunk/skins/waeup_student/accommodation_view_student.pt
===================================================================
--- waeup_product/trunk/skins/waeup_student/accommodation_view_student.pt	(revision 103)
+++ waeup_product/trunk/skins/waeup_student/accommodation_view_student.pt	(revision 103)
@@ -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><span tal:content="context/title_or_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>
+    </table>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: waeup_product/trunk/skins/waeup_student/add_accommodation.py
===================================================================
--- waeup_product/trunk/skins/waeup_student/add_accommodation.py	(revision 103)
+++ waeup_product/trunk/skins/waeup_student/add_accommodation.py	(revision 103)
@@ -0,0 +1,56 @@
+##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
+
+accofolder = getattr(context,"Accommodation",None)
+if accofolder is None:
+    context.invokeFactory('AccoFolder','Accommodation')
+    context.notifyCPSDocumentCreation(ob=object)
+    accofolder = getattr(context,"Accommodation")
+    
+    
+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/trunk/skins/waeup_student/create_jamb.py
===================================================================
--- waeup_product/trunk/skins/waeup_student/create_jamb.py	(revision 102)
+++ waeup_product/trunk/skins/waeup_student/create_jamb.py	(revision 103)
@@ -24,5 +24,5 @@
                       layout_mode='create',
                       )
-if psm == 'invalid' or psm == '':
+if psm == 'invalid':
     return context.create_jamb_form(rendered = res,
                                  psm = 'Please correct your errors',
