Index: waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py
===================================================================
--- waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py	(revision 104)
+++ waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py	(revision 106)
@@ -512,4 +512,64 @@
 ###)
 
+accobook = { ###(
+    'widgets': {
+        'sc_id': {
+            'type': 'String Widget',
+            'data': {
+                'title': 'SC ID',
+                'fields': ('accommodation_sc_id',),
+                'is_required': False,
+                'label': 'Card Serial Number ',
+                'label_edit': 'Card Serial Number',
+                'description': 'Card Serial Number ',
+                'help': 'This can be found on the bottom right of the reverse side of your Scratch Card',
+                'is_i18n': False,
+                'readonly_layout_modes': (),
+                'hidden_layout_modes': (),
+                'hidden_readonly_layout_modes': (),
+                'hidden_empty': False,
+                'hidden_if_expr': 'python:1',
+                'css_class': '',
+                'widget_mode_expr': '',
+                'display_width': 10,
+                'size_max': 0,
+            },
+        },
+        'sc_pin': {
+            'type': 'Scratchcard Pin Widget',
+            'data': {
+                'title': 'SC Pin',
+                'fields': ('accommodation_sc_pin'),
+                'is_required': True,
+                'label': '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,
+            },
+        },
+    },
+   'layout': {
+        'style_prefix': 'layout_accobook_',
+        'flexible_widgets': (),
+        'ncols': 1,
+        'rows': [
+            #[{'widget_id': 'sc_id', 'ncols': 1},],
+            [{'widget_id': 'sc_pin', 'ncols': 1},],
+            [{'widget_id': 'jamb_id', 'ncols': 1},],
+        ]
+    },
+}
+###)
+
 admission_status = { ###(
     'widgets': {        
@@ -645,5 +705,5 @@
                 'title': 'Faculty',
                 'fields': ('faculty',),
-                'is_required': False,
+                'is_required': True,
                 'label': 'faculty',
                 'label_edit': 'faculty',
@@ -652,4 +712,17 @@
                 'is_i18n': False,
                 'vocabulary': 'faculties',
+            },
+        },
+        'course': {
+            'type': 'String Widget',
+            'data': {
+                'title': 'Study Course',
+                'fields': ('course',),
+                'is_required': True,
+                'label': 'Study Course',
+                'label_edit': 'Study Course',
+                'description': '',
+                'help': 'The course to study',
+                'is_i18n': False,
             },
         },
@@ -789,4 +862,5 @@
             [{'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},],
@@ -816,4 +890,5 @@
             [{'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},],
Index: waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py
===================================================================
--- waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py	(revision 104)
+++ waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py	(revision 106)
@@ -47,4 +47,58 @@
         },
     },
+    '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': '',
+        },
+    },
+    'accomodation_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': '',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+        },
+    },
+    'accomodation_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': '',
+            'acl_write_expr': '',
+            'read_ignore_storage': False,
+            'read_process_expr': '',
+            'read_process_dependent_fields': (),
+            'write_ignore_storage': False,
+            'write_process_expr': '',
+        },
+    },
 }
 #
@@ -178,4 +232,11 @@
     },
     'faculty': {
+        'type': 'CPS String Field',
+        'data': {
+            'default_expr': 'string:',
+            'is_searchabletext': False,
+        },
+    },
+    'course': {
         'type': 'CPS String Field',
         'data': {
Index: waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py
===================================================================
--- waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py	(revision 104)
+++ waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py	(revision 106)
@@ -36,12 +36,14 @@
                 {'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': (ModifyPortalContent,UniversityManage,)},
+                 'permissions': (UniversityManage,)},
                 {'id': 'add_accommodation',
-                 'name': 'Add an Accomodation Hall',
+                 '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': (ModifyPortalContent,UniversityManage,)},
+                 'permissions': (UniversityManage,)},
                 {'id': 'contents',
                  'name': 'action_folder_contents',
@@ -62,5 +64,5 @@
           'name': 'delegate',
           'action': 'folder_localrole_form',
-          'permissions': (UniversityManage,)
+          'permissions': (UniversityManage,StudentManage)
           },
                  )
@@ -286,5 +288,5 @@
     'description': '',
     'content_icon': '',
-    'content_meta_type': 'CPS Document',
+    'content_meta_type': 'StudentPersonal',
     'product': 'WAeUP',
     'factory': 'addStudentPersonal',
@@ -298,5 +300,4 @@
     'cps_display_as_document_in_listing': True,
     'cps_is_portalbox': False,
-    #'schemas': ['common','metadata','jamb'],
     'schemas': ['student_personal'],
     'layouts': ['student_personal'],
@@ -310,5 +311,4 @@
           'action': 'string:${object_url}/student_personal_index_html',
           #'action': 'string:${object_url}/cpsdocument_view',
-          'condition': '',
           'permission': ('View',),
           'category': 'object',
Index: waeup_product/trunk/skins/waeup_default/portlet_session_info.pt
===================================================================
--- waeup_product/trunk/skins/waeup_default/portlet_session_info.pt	(revision 104)
+++ waeup_product/trunk/skins/waeup_default/portlet_session_info.pt	(revision 106)
@@ -11,4 +11,6 @@
          tal:attributes="href string:${here/portal_url}/sections/waeup/students/${member}">goto your personal area</a>
     </span><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 />
+   <br />
     (<a href="" i18n:translate=""
         tal:attributes="href string:${here/portal_url}/sections/waeup/logout">log out</a>)
Index: waeup_product/trunk/skins/waeup_faculty/course_view_student.pt
===================================================================
--- waeup_product/trunk/skins/waeup_faculty/course_view_student.pt	(revision 106)
+++ waeup_product/trunk/skins/waeup_faculty/course_view_student.pt	(revision 106)
@@ -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/trunk/skins/waeup_faculty/department_view_student.pt
===================================================================
--- waeup_product/trunk/skins/waeup_faculty/department_view_student.pt	(revision 106)
+++ waeup_product/trunk/skins/waeup_faculty/department_view_student.pt	(revision 106)
@@ -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/trunk/skins/waeup_student/check_admission.py
===================================================================
--- waeup_product/trunk/skins/waeup_student/check_admission.py	(revision 104)
+++ waeup_product/trunk/skins/waeup_student/check_admission.py	(revision 106)
@@ -35,13 +35,15 @@
 elif psm == 'valid':
     s_id = "s%s" % ds.get('jamb_id')
-    sf = getattr(context,s_id,None)
-    if sf is None:
+    catalog = context.portal_catalog
+    search = catalog(SearchableText = "%s*" % s_id)
+    if len(search) < 1:
         psm = "Your not admitted"
         return context.check_admission_form(rendered = res,
-                                 psm = psm,
+                                 psm = psm + str(search),
                                  ds = ds,
                                  )
-    elif hasattr(sf,'PERSONAL'):
-        psm = "Your already admitted"
+    sf = getattr(context,s_id,None)
+    if sf and getattr(sf,'PERSONAL',None):
+        psm = "Your already admitted, pleae login"
         return context.check_admission_form(rendered = res,
                                  psm = psm,
@@ -52,12 +54,12 @@
     return REQUEST.RESPONSE.redirect("%s/logged_in?__ac_name=%s&__ac_password=UnSeT&sc_pin=%s" 
                                     % (context.absolute_url(),s_id,sc_pin))
-    return context.student_admitted_form(rendered = res,
-                                 psm = psm,
-                                 ds = ds,
-                                 student = student,
-                                 jamb = jamb,
-                                 pd = pd,
-                                 )
-    
-return res,psm,ds
+##    return context.student_admitted_form(rendered = res,
+##                                 psm = psm,
+##                                 ds = ds,
+##                                 student = student,
+##                                 jamb = jamb,
+##                                 pd = pd,
+##                                 )
+##    
+##return res,psm,ds
 
Index: waeup_product/trunk/skins/waeup_student/create_jamb.py
===================================================================
--- waeup_product/trunk/skins/waeup_student/create_jamb.py	(revision 104)
+++ waeup_product/trunk/skins/waeup_student/create_jamb.py	(revision 106)
@@ -52,9 +52,9 @@
     noCPSMember = False
     try:
-        pr.addMember(s_id, 'UnSeT',roles=('Member','CPSMember','Student'))
+        pr.addMember(s_id, 'UnSeT',roles=('Member','CPSMember','Student','Contributor'))
     except:
         noCPSMember = True
     if noCPSMember:
-        pr.addMember(s_id, 'UnSeT',roles=('Member',))
+        pr.addMember(s_id, 'UnSeT',roles=('Member','Student','Contributor'))
 ##    groups = context.portal_directories.groups
 ##    gm = list(groups.getEntry('Students')['members'])
Index: waeup_product/trunk/skins/waeup_student/process_waeup_login.py
===================================================================
--- waeup_product/trunk/skins/waeup_student/process_waeup_login.py	(revision 104)
+++ waeup_product/trunk/skins/waeup_student/process_waeup_login.py	(revision 106)
@@ -18,5 +18,5 @@
 jkw = {'admission_sc_pin': sc_pin}
 jamb = getattr(ma,'JAMB')
-jamb.edit(mapping=jkw)
+jamb.getContent().edit(mapping=jkw)
 #pdid = 'personal%s' % member_id
 pdid = 'PERSONAL'
Index: waeup_product/trunk/skins/waeup_student/student_personal_view_student.pt
===================================================================
--- waeup_product/trunk/skins/waeup_student/student_personal_view_student.pt	(revision 104)
+++ waeup_product/trunk/skins/waeup_student/student_personal_view_student.pt	(revision 106)
@@ -13,7 +13,4 @@
     <metal:block fill-slot="main">
       <tal:block tal:content="structure rendered_main|python:doc.render(proxy=here)" />
-      <p>
-        <a href="" tal:attributes="href string:${context/absolute_url}/student_personal_edit_form">edit</a>
-      </p>
     </metal:block>
     <metal:block fill-slot="sub">
Index: waeup_product/trunk/skins/waeup_student/students_folder_view.py
===================================================================
--- waeup_product/trunk/skins/waeup_student/students_folder_view.py	(revision 104)
+++ waeup_product/trunk/skins/waeup_student/students_folder_view.py	(revision 106)
@@ -14,4 +14,7 @@
         return context.students_folder_view_manager(psm=psm)
     elif 'Student' in roles:
-        return context.students_folder_view_student(psm=psm)
+        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)
