Index: /WAeUP_SRP/base/skins/waeup_student/accommodation_slip.pt
===================================================================
--- /WAeUP_SRP/base/skins/waeup_student/accommodation_slip.pt	(revision 2828)
+++ /WAeUP_SRP/base/skins/waeup_student/accommodation_slip.pt	(revision 2829)
@@ -8,6 +8,5 @@
       <span tal:condition="python: info_acco and info_acco['acco']">                   
           <h3>Hostel Allocation Slip (and Maintenance Receipt)</h3>
-          <br />
-          - updated database -
+
           <br /><br />
            
Index: /WAeUP_SRP/fceokene/profiles/customized_files.txt
===================================================================
--- /WAeUP_SRP/fceokene/profiles/customized_files.txt	(revision 2828)
+++ /WAeUP_SRP/fceokene/profiles/customized_files.txt	(revision 2829)
@@ -3,4 +3,5 @@
 layouts/acco_hall.xml
 layouts/members.xml
+layouts/student_accommodation_fe.xml
 vocabularies/cos.xml (edited by Issoufou)
 vocabularies/levels.xml
Index: /WAeUP_SRP/fceokene/profiles/default/layouts/student_accommodation_fe.xml
===================================================================
--- /WAeUP_SRP/fceokene/profiles/default/layouts/student_accommodation_fe.xml	(revision 2828)
+++ /WAeUP_SRP/fceokene/profiles/default/layouts/student_accommodation_fe.xml	(revision 2829)
@@ -51,18 +51,5 @@
   <property name="hidden_readonly_layout_modes"/>
  </widget>
- <widget name="acco_res_sc_pin" meta_type="Scratchcard Pin Widget">
-  <property name="title">Access Code</property>
-  <property name="fields">
-   <element value="acco_res_sc_pin"/>
-  </property>
-  <property name="label">Access Code</property>
-  <property name="label_edit">Access Code</property>
-  <property name="readonly_layout_modes">
-   <element value="edit"/>
-  </property>
-  <property name="hidden_layout_modes"/>
-  <property name="hidden_readonly_layout_modes"/>
-  <property name="prefix">HOS</property>
- </widget>
+
  <widget name="bed" meta_type="Method Widget">
   <property name="title">Bed</property>
@@ -116,7 +103,4 @@
   </row>
   <row>
-   <cell name="acco_res_sc_pin"/>
-  </row>
-  <row>
    <cell name="acco_res_date"/>
   </row>
Index: /WAeUP_SRP/fceokene/waeup_custom/getAccommodationInfo.py
===================================================================
--- /WAeUP_SRP/fceokene/waeup_custom/getAccommodationInfo.py	(revision 2829)
+++ /WAeUP_SRP/fceokene/waeup_custom/getAccommodationInfo.py	(revision 2829)
@@ -0,0 +1,113 @@
+## Script (Python) "getAccommodationInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student_id=None
+##title=
+##
+# $Id: getAccommodationInfo.py 1726 2007-05-02 06:21:50Z henrik $
+"""
+return Info about the current Student
+"""
+import logging
+logger = logging.getLogger('Skins.getAccommodationInfo')
+import DateTime
+
+request = context.REQUEST
+mtool = context.portal_membership
+wf = context.portal_workflow
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+path_info = request.get('PATH_INFO').split('/')
+
+if mtool.isAnonymousUser():
+    return None
+info = {}
+if student_id is None:
+    requested_id = context.getStudentId()
+    if requested_id and not context.isStaff() and member_id != requested_id:
+        logger.info('%s tried to access %s' % (member_id,requested_id))
+        return None
+    elif context.isStaff():
+        student_id = requested_id
+    else:
+        student_id = member_id
+res = context.students_catalog(id=student_id)
+if len(res) != 1:
+    logger.info('%s not found in students_catalog' % student_id)
+    return None
+
+
+s_brain = res[0]
+info['error'] = None
+info['matric_no']=s_brain.matric_no
+info['jamb_reg_no']=s_brain.jamb_reg_no
+info['name']=s_brain.name
+info['email']=s_brain.email
+info['level']=s_brain.level
+info['end_level'] = s_brain.end_level
+info['verdict']=getattr(s_brain,'verdict','')
+review_state = info['review_state'] = s_brain.review_state
+
+info['session'] = current_session = context.getSessionId()[0]
+
+students_object = context.portal_url.getPortalObject().campus.students
+student = getattr(students_object, student_id)
+info['id'] = student_id
+info['student'] = student
+
+booking_allowed = False
+if review_state in ('school_fee_paid','courses_registered', 'courses_validated',) and s_brain.session == current_session:
+    booking_allowed = True
+
+
+booking_allowed = True # booking temporarily disabled
+                        # the algorithm must be adapted to new course_results catalog
+                        # and/or FCEOkene modalities
+
+
+info['booking_allowed'] = booking_allowed
+if not booking_allowed:
+    info['acco'] = None
+    return info
+acco_id = 'accommodation_' + str(current_session)
+acco = getattr(student,acco_id,None)
+info['acco'] = acco
+info['acco_id'] = acco_id
+
+bt = 're'
+if acco is not None:
+    info['acco_doc'] = acco.getContent()
+    info['acco_review_state'] = wf.getInfoFor(acco,'review_state',None)
+d = {}
+if review_state == "cleared_and_validated":
+    bt = 'fr'
+elif int(s_brain.level) < 300:
+    bt = 're'
+elif int(s_brain.level) < 100:
+    bt = 'pr'
+else:
+    if s_brain.end_level and s_brain.end_level:
+        certlevel = int(certificate.end_level)
+    else:
+        info["error"] = '"no level information provided","%s"' % c_brain.getId
+        return info
+    if s_brain.end_level >= s_brain.end_level:
+        bt = "fi"
+d['sex'] = 'male'
+if s_brain.sex:
+    d['sex'] = 'female'
+
+
+info['sex']=d['sex']
+
+
+d['bt'] = bt
+#from Products.zdb import set_trace
+#set_trace()
+student_status = "%(sex)s_%(bt)s" % d
+info['student_status'] = student_status
+return info
+
Index: /WAeUP_SRP/fceokene/waeup_custom/layout_student_acco_view_slip.pt
===================================================================
--- /WAeUP_SRP/fceokene/waeup_custom/layout_student_acco_view_slip.pt	(revision 2829)
+++ /WAeUP_SRP/fceokene/waeup_custom/layout_student_acco_view_slip.pt	(revision 2829)
@@ -0,0 +1,34 @@
+<!-- a layout_lib macro -->
+<!-- $Id: layout_student_acco_view_slip.pt 1316 2007-01-17 18:05:49Z henrik $ -->
+<metal:block define-macro="default_view"
+  tal:define="layout options/layout;
+              dm options/datastructure/getDataModel;
+              widgets python:context.getRenderedWidgets(layout);
+              fields python:('bed',
+
+                                 'acco_res_date',
+                                 'acco_maint_sc_pin', 
+                                 'acco_maint_date',
+                                 )"
+                                 >
+  <table width="" cellpadding="2" cellspacing="0" summary="Form layout">
+    <tr tal:repeat="field fields">
+      <tal:block tal:define="cell python: widgets[field]">
+        <tal:block define="widget cell/widget">
+          <div tal:attributes="class cell/widget_css_class|string:label;
+            id python:widget.getHtmlWidgetId()+'_widget';">
+            <td width="180px" valign="top">
+             <span class="dlabel"
+                    tal:condition="widget/label"
+                    tal:content="widget/label">label</span>:
+            </td>
+            <td> 
+               <span tal:condition="cell" tal:content="structure cell/widget_rendered"></span>
+               <span tal:condition="not:cell/widget_rendered"> none </span>
+            </td>
+          </div>
+        </tal:block>
+      </tal:block>
+    </tr>
+  </table>
+</metal:block>
