Index: /WAeUP_SRP/trunk/skins/waeup_accommodation/accommodation_edit_form.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/accommodation_edit_form.pt	(revision 5167)
+++ /WAeUP_SRP/trunk/skins/waeup_accommodation/accommodation_edit_form.pt	(revision 5167)
@@ -0,0 +1,78 @@
+<tal:block define="rendered_main options/rendered;
+                   portal_status_message options/psm;
+                   data_storage options/ds|nothing;
+                   mode options/mode;
+                   edition python:1;
+                   info python: context.getAccommodationInfo();
+                   maintenance_online info/online_payment|nothing"
+                   >
+<metal:block define-macro="edit_form">
+  <metal:block use-macro="here/main_template/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 style="text-align: right" tal:condition="python: mode == 'edit'">
+        <a href="" target="slip" tal:attributes="href string:accommodation_slip"
+            onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+            Accommodation Slip
+        </a>
+        </div>      
+      
+        <h3 tal:condition="python: mode == 'create'">Book Your Accommodation! </h3>
+        <h3 tal:condition="python: mode == 'edit'">Pay Your Accommodation Maintenance Fee! </h3>
+        <br />
+        <div tal:replace="structure rendered_main" />
+        
+        <p tal:condition="not: maintenance_online">Instructions :</p>
+        
+        <ul tal:condition="python: mode == 'create' and not maintenance_online">
+                  <li>Buy a Hostel Application Scratch Card.</li> 
+            <li>Enter the PIN above and press 'Book'.</li>
+            <li>Print your Hostel Allocation Slip.</li>
+        </ul>
+ 
+        <tal:block condition="python: mode == 'edit'" >
+ 
+           <ul tal:condition="not: maintenance_online" tal:omit-tag="">
+             <li>Buy a Hostel Maintenance Scratch Card 
+               (Code: <span tal:replace="python: info['acco_doc'].acco_maint_code" />) for 
+               <span tal:replace="python: info['acco_doc'].acco_maint_fee" /> Nairas</li> 
+             <li>Enter the PIN above and press 'Save'.</li>
+             <li>Print your Hostel Maintenance Receipt.</li>
+           </ul>
+          
+        
+          <tal:block condition="maintenance_online">
+            <table tal:condition="not: info/maintenance_paid">
+              <tr >
+                <form action="pay_interswitch_acco" method="post" 
+                      enctype="multipart/form-data" class="workflow"
+                      >
+                  <input type="hidden" 
+                         name="paytype"
+                         value="HOM"
+                         />
+                  <td colspan="2">  
+                    <input type="submit" 
+                           class="standalone" 
+                           name="cpsdocument_create_button"
+                           value="Pay Maintenance Fee Online"
+                           />
+                  </td>
+                </form>
+              </tr>
+            </table>
+          </tal:block>
+        </tal:block>
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: /WAeUP_SRP/trunk/skins/waeup_accommodation/accommodation_slip.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/accommodation_slip.pt	(revision 5167)
+++ /WAeUP_SRP/trunk/skins/waeup_accommodation/accommodation_slip.pt	(revision 5167)
@@ -0,0 +1,26 @@
+<metal:body use-macro="here/slip_template/macros/master">
+    <metal:main fill-slot="main"
+                tal:define="info_acco context/getAccommodationInfo;
+                            info_app  context/getApplicationInfo">
+      <span tal:condition="python: not info_acco or not info_acco['acco']">
+            <span tal:content="here/illegal_view" />
+      </span>   
+      <span tal:condition="python: info_acco and info_acco['acco']">                   
+          <h3>Hostel Allocation Slip (including Maintenance Receipt)</h3>
+
+          <br />
+           
+        <span tal:omit-tag=""
+              tal:content="structure python: info_app['app_doc'].render(proxy=info_app['app_doc'],
+              layout_mode='view_info', 
+              layout_id='student_application')" 
+              />     
+          
+          <span tal:omit-tag=""
+                tal:content="structure python: info_acco['acco_doc'].render(proxy=info_acco['acco_doc'],
+                layout_mode='view_slip', 
+                layout_id='student_accommodation_fe')" 
+                />
+      </span>      
+    </metal:main>
+</metal:body>
Index: /WAeUP_SRP/trunk/skins/waeup_accommodation/accommodation_view.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/accommodation_view.pt	(revision 5167)
+++ /WAeUP_SRP/trunk/skins/waeup_accommodation/accommodation_view.pt	(revision 5167)
@@ -0,0 +1,30 @@
+<metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main"
+            tal:define="info context/getAccommodationInfo">
+      <span tal:condition="python: not info or not info['acco']">
+        <span tal:content="here/illegal_view" />
+      </span>
+      <span tal:condition="python: info and info['acco']">
+
+        <div style="text-align: right">
+        <a href="" target="slip" tal:attributes="href string:accommodation_slip"
+            onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+            Accommodation Slip
+        </a>
+        </div>
+        <a href=""
+           tal:attributes="href string:${here/academicsParent}">
+          <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+          Up one level
+        </a>        
+        <h3>My Accommodation Record</h3>
+        <br />
+        <span tal:omit-tag=""
+              tal:content="structure python: info['acco_doc'].render(proxy=info['acco_doc'],
+              layout_mode='view', 
+              layout_id='student_accommodation_fe')" 
+              />
+    </span>
+  </metal:main>
+</metal:body>
Index: eUP_SRP/trunk/skins/waeup_accommodation/reallocate_bed.py_not_used
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/reallocate_bed.py_not_used	(revision 5166)
+++ 	(revision )
@@ -1,107 +1,0 @@
-## Script (Python) "reallocate_bed"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=
-##title=
-##
-# $Id: reallocateBed.py 1206 2007-01-05 18:24:56Z joachim $
-"""
-reallocate beds
-"""
-import logging
-logger = logging.getLogger('Skins.reallocate_bed')
-
-request = context.REQUEST
-redirect = request.RESPONSE.redirect
-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
-students = context.portal_url.getPortalObject().campus.students
-beds = context.portal_accommodation
-studs = context.students_catalog
-student_id = context.getStudentId()
-
-if student_id is not None:
-    logger.info('%s requests bed_change for %s' % (member_id,student_id))
-    info = context.getAccommodationInfo(student_id)
-    res = beds(student=student_id)
-    if len(res) == 0:
-        logger.info('No bed found for %s' % (student_id))
-        redirect("%s/%s" % (students.absolute_url(),student_id))
-    allocated_bed = res[0]
-    status = info['student_status']
-    student = student_id
-    bedtype = context.getBedStatusFromHall(allocated_bed.bed)
-    if not bedtype.endswith("reserved"):
-        logger.info('%s is NOT a reserved bed' % (bedtype))
-        return redirect("%s/%s/%s" % (students.absolute_url(),student,info['acco_id']))
-    logger.info('%s reallocate reserved bed %s/%s' % (student_id,bedtype,status))
-    beds.modifyRecord(bed=allocated_bed.bed,
-                      student='',
-                      bed_type=bedtype)
-    code,bed = beds.searchAndReserveBed(student_id,status)
-    if code > 0:
-        #from Products.zdb import set_trace; set_trace()
-        d = {}
-        d['bed'] = bed
-        d['student_status'] = status
-        acco_info = context.waeup_tool.getHallInfo(bed)
-        d['acco_maint_code'] = acco_info.get('maintenance_code')
-        d['acco_maint_fee'] = acco_info.get('maintenance_fee')
-        acco_doc = info['acco_doc']
-        acco_doc.edit(mapping=d)
-        return redirect("%s/%s/%s" % (students.absolute_url(),student,info['acco_id']))
-    logger.info('%s new bed allocation failed, code = %s' % (student_id,code))
-    return redirect("%s/%s/%s" % (students.absolute_url(),student,info['acco_id']))
-
-info = {}
-#records = [r for r in beds() if  r.student]
-records = beds.uniqueValuesFor('bed')
-list = []
-to_modify = []
-for b in records:
-    r = beds(bed=b)[0]
-    bedtype = context.getBedStatusFromHall(r.bed)
-    if not bedtype.endswith("reserved"):
-        #logger.info('"%s", "allocated bed is NOT reserved","%s"' % (student_id,bedtype))
-        #list.append("Student %s bed_type %s ok" % (r.student,bedtype))
-        continue
-    if not r.student:
-        beds.modifyRecord(bed=b,
-                      bed_type=bedtype)
-        list.append("Empty bed %s set to %s" % (r.bed,bedtype))
-        continue
-    info = context.getAccommodationInfo(r.student)
-    sbt = info.get('student_status',None)
-    if sbt is None:
-        continue
-    list.append("Student %s bed_type %s != %s" % (r.student,
-                                                  r.bed_type,
-                                                  bedtype))
-    to_modify.append((r.bed,r.student,info['student_status'],info['acco_doc'],bedtype))
-for former_bed, student, status,acco_doc,bedtype in to_modify:
-    beds.modifyRecord(bed=former_bed,
-                      student='',
-                      bed_type=bedtype)
-    code,bed = beds.searchAndReserveBed(student,status)
-    if code > 0:
-        #from Products.zdb import set_trace; set_trace()
-        d = {}
-        d['bed'] = bed
-        d['student_status'] = status
-        acco_info = context.waeup_tool.getHallInfo(bed)
-        d['acco_maint_code'] = acco_info.get('maintenance_code')
-        d['acco_maint_fee'] = acco_info.get('maintenance_fee')
-        acco_doc.edit(mapping=d)
-        list.append("Student %s got bed %s, code = %s" % (student,
-                                                              bed,
-                                                              code))
-return "\r".join(list)
Index: eUP_SRP/trunk/skins/waeup_student/accommodation_edit_form.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/accommodation_edit_form.pt	(revision 5166)
+++ 	(revision )
@@ -1,78 +1,0 @@
-<tal:block define="rendered_main options/rendered;
-                   portal_status_message options/psm;
-                   data_storage options/ds|nothing;
-                   mode options/mode;
-                   edition python:1;
-                   info python: context.getAccommodationInfo();
-                   maintenance_online info/online_payment|nothing"
-                   >
-<metal:block define-macro="edit_form">
-  <metal:block use-macro="here/main_template/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 style="text-align: right" tal:condition="python: mode == 'edit'">
-        <a href="" target="slip" tal:attributes="href string:accommodation_slip"
-            onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
-            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
-            Accommodation Slip
-        </a>
-        </div>      
-      
-        <h3 tal:condition="python: mode == 'create'">Book Your Accommodation! </h3>
-        <h3 tal:condition="python: mode == 'edit'">Pay Your Accommodation Maintenance Fee! </h3>
-        <br />
-        <div tal:replace="structure rendered_main" />
-        
-        <p tal:condition="not: maintenance_online">Instructions :</p>
-        
-        <ul tal:condition="python: mode == 'create' and not maintenance_online">
-                  <li>Buy a Hostel Application Scratch Card.</li> 
-            <li>Enter the PIN above and press 'Book'.</li>
-            <li>Print your Hostel Allocation Slip.</li>
-        </ul>
- 
-        <tal:block condition="python: mode == 'edit'" >
- 
-           <ul tal:condition="not: maintenance_online" tal:omit-tag="">
-             <li>Buy a Hostel Maintenance Scratch Card 
-               (Code: <span tal:replace="python: info['acco_doc'].acco_maint_code" />) for 
-               <span tal:replace="python: info['acco_doc'].acco_maint_fee" /> Nairas</li> 
-             <li>Enter the PIN above and press 'Save'.</li>
-             <li>Print your Hostel Maintenance Receipt.</li>
-           </ul>
-          
-        
-          <tal:block condition="maintenance_online">
-            <table tal:condition="not: info/maintenance_paid">
-              <tr >
-                <form action="pay_interswitch_acco" method="post" 
-                      enctype="multipart/form-data" class="workflow"
-                      >
-                  <input type="hidden" 
-                         name="paytype"
-                         value="HOM"
-                         />
-                  <td colspan="2">  
-                    <input type="submit" 
-                           class="standalone" 
-                           name="cpsdocument_create_button"
-                           value="Pay Maintenance Fee Online"
-                           />
-                  </td>
-                </form>
-              </tr>
-            </table>
-          </tal:block>
-        </tal:block>
-      </metal:block>
-      <metal:block fill-slot="sub">
-      </metal:block>
-    </metal:block>
-  </metal:block>
-</tal:block>
Index: eUP_SRP/trunk/skins/waeup_student/accommodation_slip.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/accommodation_slip.pt	(revision 5166)
+++ 	(revision )
@@ -1,26 +1,0 @@
-<metal:body use-macro="here/slip_template/macros/master">
-    <metal:main fill-slot="main"
-                tal:define="info_acco context/getAccommodationInfo;
-                            info_app  context/getApplicationInfo">
-      <span tal:condition="python: not info_acco or not info_acco['acco']">
-            <span tal:content="here/illegal_view" />
-      </span>   
-      <span tal:condition="python: info_acco and info_acco['acco']">                   
-          <h3>Hostel Allocation Slip (including Maintenance Receipt)</h3>
-
-          <br />
-           
-        <span tal:omit-tag=""
-              tal:content="structure python: info_app['app_doc'].render(proxy=info_app['app_doc'],
-              layout_mode='view_info', 
-              layout_id='student_application')" 
-              />     
-          
-          <span tal:omit-tag=""
-                tal:content="structure python: info_acco['acco_doc'].render(proxy=info_acco['acco_doc'],
-                layout_mode='view_slip', 
-                layout_id='student_accommodation_fe')" 
-                />
-      </span>      
-    </metal:main>
-</metal:body>
Index: eUP_SRP/trunk/skins/waeup_student/accommodation_view.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/accommodation_view.pt	(revision 5166)
+++ 	(revision )
@@ -1,30 +1,0 @@
-<metal:body use-macro="here/main_template/macros/master">
-    <metal:main fill-slot="main"
-            tal:define="info context/getAccommodationInfo">
-      <span tal:condition="python: not info or not info['acco']">
-        <span tal:content="here/illegal_view" />
-      </span>
-      <span tal:condition="python: info and info['acco']">
-
-        <div style="text-align: right">
-        <a href="" target="slip" tal:attributes="href string:accommodation_slip"
-            onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
-            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
-            Accommodation Slip
-        </a>
-        </div>
-        <a href=""
-           tal:attributes="href string:${here/academicsParent}">
-          <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
-          Up one level
-        </a>        
-        <h3>My Accommodation Record</h3>
-        <br />
-        <span tal:omit-tag=""
-              tal:content="structure python: info['acco_doc'].render(proxy=info['acco_doc'],
-              layout_mode='view', 
-              layout_id='student_accommodation_fe')" 
-              />
-    </span>
-  </metal:main>
-</metal:body>
Index: eUP_SRP/trunk/skins/waeup_student/application_pin_form.pt_not_used
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/application_pin_form.pt_not_used	(revision 5166)
+++ 	(revision )
@@ -1,32 +1,0 @@
-<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/main_template/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">
-        <h3>Apply for the Post University Matriculation Examination! </h3>
-        <br />
-        <div tal:replace="structure rendered_main" />
-          <p>Instructions :</p>
-          <ul>
-            <li>Buy an Application Scratch Card.</li> 
-            <li>Enter your JAMB Registration Number and the Application PIN above.</li> 
-            <li>Upload your passport picture.</li> 
-            <li>Apply for admission.</li>
-            <li>Print the Application Acknowledgement Slip.</li>
-          </ul>
-      </metal:block>
-      <metal:block fill-slot="sub">
-      </metal:block>
-    </metal:block>
-  </metal:block>
-</tal:block>
Index: eUP_SRP/trunk/skins/waeup_student/display_session_results.py_not_used
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/display_session_results.py_not_used	(revision 5166)
+++ 	(revision )
@@ -1,99 +1,0 @@
-##parameters=REQUEST
-# $Id: display_session_results.py 1867 2007-06-08 09:59:59Z joachim $
-"""
-process the Application Form
-return html renderer + psm
-"""
-import DateTime
-current = DateTime.DateTime()
-pr = context.portal_registration
-
-validate = REQUEST.has_key("cpsdocument_create_button")
-
-lt = context.portal_layouts
-#pr = context.portal_registration
-
-res,psm,ds = lt.renderLayout('student_session_results_search',
-                             'student_returning',
-                             context,
-                             mapping=validate and REQUEST,
-                             layout_mode='create',
-                             ob = {},
-                             commit=False,
-                             formaction = "display_session_results",
-                             button = "Search",
-                             )
-if psm == 'invalid':
-    return context.display_session_results_form(rendered = res,
-                                 psm = "Please correct your input!",
-                                 #psm = "%s, %s" % (psm,ds),
-                                 firstlayout = True,
-                                 lastlayout = True,
-                                 ds = ds,
-                                 )
-elif psm == '':
-    return context.display_session_results_form(rendered = res,
-                                 psm = None,
-                                 firstlayout = True,
-                                 lastlayout = True,
-                                 ds = ds,
-                                 )
-elif psm == 'valid':
-    pass
-s_fields = context.returning_import.schema()
-student_rec = ds.get('student')
-student = {}
-for field in s_fields:
-    student[field] = getattr(student_rec,field)
-brains = ds.get('results')
-sem1 = []
-sem2 = []
-with_courses_cat = hasattr(context,'courses_catalog')
-
-fields = context.results_import.schema()
-verdict = None
-session = None
-for r in brains:
-    if verdict is None:
-        verdict = r.Verdict
-        session = r.Session
-    result = {}
-    for field in fields:
-        result[field] = getattr(r,field)
-    if with_courses_cat:
-        res = context.courses_catalog(code = r.CosCode)
-    if r.CosCode == 'N/A':
-        result['title'] = 'N/A'
-    elif with_courses_cat and res:
-        result['title'] = res[0].title
-    else:
-        result['title'] = "To Be Determined"
-    if r.Semester == '2':
-        sem2.append(result)
-    else:
-        sem1.append(result)
-#from Products.zdb import set_trace;set_trace()
-results = (sem1, sem2)
-student['verdict'] = verdict
-student['session'] = session
-registered = None
-res = context.returning_import(matric_no = student_rec.matric_no)
-if res:
-    student_id = res[0].id
-
-    #There was one student with empty id in returning_import (BMS0406035)
-    student_obj = None
-    if student_id:
-        student_obj = getattr(context.portal_url.getPortalObject().campus.students,student_id,None)
-    else:
-        registered = ' '
-
-    if student_obj and hasattr(student_obj,'application'):
-        registered = student_id
-else:
-    registered = "no_student_object"
-return context.session_results_anon_view(student=student,
-                                           results=results,
-                                           name = "%(Firstname)s %(Middlename)s %(Lastname)s" % student_rec,
-                                           registered = registered)
-
Index: eUP_SRP/trunk/skins/waeup_student/display_session_results_form.pt_not_used
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/display_session_results_form.pt_not_used	(revision 5166)
+++ 	(revision )
@@ -1,23 +1,0 @@
-<tal:block define="rendered_main options/rendered;
-           portal_status_message options/psm;
-           data_storage options/ds;
-           edition python:1;"
-           >
-  <metal:block define-macro="edit_form">
-    <metal:block use-macro="here/main_template/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">
-        <h3>Display Your 2005/2006 Session Results! </h3>
-        <br />
-        <div tal:replace="structure rendered_main" />
-      </metal:block>
-      <metal:block fill-slot="sub">
-      </metal:block>
-    </metal:block>
-  </metal:block>
-</tal:block>
