Index: WAeUP_SRP/trunk/skins/waeup_student/getSessionResults.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/getSessionResults.py	(revision 1174)
+++ WAeUP_SRP/trunk/skins/waeup_student/getSessionResults.py	(revision 1174)
@@ -0,0 +1,77 @@
+## Script (Python) "getSessionResults"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: display_session_results.py 1166 2006-12-31 18:11:47Z henrik $
+"""
+process the Application Form
+return html renderer + psm
+"""
+import DateTime
+current = DateTime.DateTime()
+pr = context.portal_registration
+
+returning = context.returning_import
+results = context.results_import
+
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+
+if mtool.isAnonymousUser():
+    return None
+info = {}
+#from Products.zdb import set_trace
+#set_trace()
+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
+
+students_object = context.portal_url.getPortalObject().campus.students
+student = getattr(students_object, student_id)
+
+
+clear = getattr(student,'clearance',None)
+if clear:
+    value = clear.getContent().matric_no
+else:
+    return None
+
+res = returning(matric_no = value)
+student = res[0]
+res = results(matric_no = value)
+results = res
+
+
+sem1 = []
+sem2 = []
+with_courses_cat = hasattr(context,'courses_catalog')
+fields = context.results_import.schema()
+for r in results:
+    result = {}
+    for field in fields:
+        result[field] = getattr(r,field)
+    if with_courses_cat:
+        res = context.courses_catalog(code = r.CosCode)
+    if 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)
+info['results'] = (sem1, sem2)
+info['student'] = student
+info['s_id'] = student_id
+return info
Index: WAeUP_SRP/trunk/skins/waeup_student/portlet_student_workflow_display.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/portlet_student_workflow_display.pt	(revision 1172)
+++ WAeUP_SRP/trunk/skins/waeup_student/portlet_student_workflow_display.pt	(revision 1174)
@@ -120,5 +120,5 @@
   <span tal:condition="python:info['review_state']=='returning'">
   <tr><td class="active">
-    <a href="" tal:attributes="href string:${info/url}/personal_edit_form">
+    <a href="" tal:attributes="href string:${info/url}/session_results_view">
     Returning
     </a>
Index: WAeUP_SRP/trunk/skins/waeup_student/session_results_anon_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/session_results_anon_view.pt	(revision 1172)
+++ WAeUP_SRP/trunk/skins/waeup_student/session_results_anon_view.pt	(revision 1174)
@@ -4,11 +4,4 @@
   <metal:body use-macro="here/main_template/macros/master">
     <metal:main fill-slot="main">
-      <div tal:condition="nothing" style="text-align: right">
-        <a href="" target="slip" tal:attributes="href string:session_results_anon_slip?nr=${student/matric_no}"
-           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" />
-          Session Result Slip
-        </a>
-      </div>
       <h3>Session Results of <span tal:content="student/Firstname" />
         <span tal:content="student/Middlename" />
Index: WAeUP_SRP/trunk/skins/waeup_student/session_results_slip.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/session_results_slip.pt	(revision 1174)
+++ WAeUP_SRP/trunk/skins/waeup_student/session_results_slip.pt	(revision 1174)
@@ -0,0 +1,68 @@
+<metal:html tal:define="info context/getSessionResults">
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main">
+      <div tal:condition="nothing" style="text-align: right">
+        <a href="" target="slip" tal:attributes="href string:session_results_slip?nr=${info/student/matric_no}"
+           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" />
+          Session Result Slip
+        </a>
+      </div>
+      <h3>Session Results of <span tal:content="info/student/Firstname" />
+        <span tal:content="info/student/Middlename" />
+        <span tal:content="info/student/Lastname" />
+      </h3>
+      <br />
+      <table>
+        <tr>
+          <th width="180px">Student ID:</th>
+          <td> 
+            <span tal:replace="info/s_id" />
+          </td>      
+        </tr>      
+     
+        <tr>
+          <th width="150px">Matriculation Number:</th><td tal:content="info/student/matric_no" />                     
+        </tr>
+        <tr>
+          <th>Sex:</th><td tal:content="info/student/Sex" />                     
+        </tr>
+        <tr>
+          <th>Course of Study:</th><td tal:content="info/student/Coursemajor" />                     
+        </tr>
+        <tr>
+          <th>Level:</th><td tal:content="info/student/Level" />                     
+        </tr>
+      </table>
+        
+       <table>
+          <tr>
+            <th width="180px">Verdict:</th><td tal:content="python:info['results'][0][0]['Verdict']" /> 
+          </tr>
+          <tr>  
+            <th>Session:</th><td tal:content="python:info['results'][0][0]['Session']" /> 
+          </tr>        
+       </table>
+
+       <br />
+                     
+       <table>
+         <span tal:repeat="semester info/results">
+            <span tal:repeat="result semester">
+             <tr tal:condition="repeat/result/start">
+              <th colspan="5">
+                <span tal:replace="python: test(repeat['semester'].index,'Second','First')" /> Semester
+              </th>
+             </tr>
+            <tr>     
+            <td width="80px" tal:content="result/CosCode" />
+            <td tal:content="result/title" />
+            <td width="50px" align="center" tal:content="result/GRADE" />
+          </tr>
+        </span>
+        </span>
+      </table>
+
+    </metal:main>
+  </metal:body>
+</metal:html>
Index: WAeUP_SRP/trunk/skins/waeup_student/session_results_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/session_results_view.pt	(revision 1172)
+++ WAeUP_SRP/trunk/skins/waeup_student/session_results_view.pt	(revision 1174)
@@ -1,37 +1,36 @@
-<metal:html>
+<metal:html tal:define="info context/getSessionResults">
   <metal:body use-macro="here/main_template/macros/master">
     <metal:main fill-slot="main">
-      <div tal:condition="nothing" style="text-align: right">
-        <a href="" target="slip" tal:attributes="href string:session_results_anon_slip?nr=${student/matric_no}"
+      <div style="text-align: right">
+        <a href="" target="slip" tal:attributes="href string:session_results_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" />
-          Session Result Slip
+          Sessional Result Slip
         </a>
       </div>
-      <h3>Session Results of <span tal:content="student/Firstname" />
-        <span tal:content="student/Middlename" />
-        <span tal:content="student/Lastname" />
+      <h3>Session Results of <span tal:content="info/student/Firstname" />
+        <span tal:content="info/student/Middlename" />
+        <span tal:content="info/student/Lastname" />
       </h3>
       <br />
       <table>
         <tr>
-          <td width="180px"><span class="dlabel">Student ID</span>:
-          </td>
+          <th width="180px">Student ID:</th>
           <td> 
-            <span tal:replace="python:here.aq_parent.aq_parent.id" />
+            <span tal:replace="info/s_id" />
           </td>      
         </tr>      
      
         <tr>
-          <th width="150px">Matriculation Number:</th><td tal:content="student/matric_no" />                     
+          <th width="150px">Matriculation Number:</th><td tal:content="info/student/matric_no" />                     
         </tr>
         <tr>
-          <th>Sex:</th><td tal:content="student/Sex" />                     
+          <th>Sex:</th><td tal:content="info/student/Sex" />                     
         </tr>
         <tr>
-          <th>Course of Study:</th><td tal:content="student/Coursemajor" />                     
+          <th>Course of Study:</th><td tal:content="info/student/Coursemajor" />                     
         </tr>
         <tr>
-          <th>Level:</th><td tal:content="student/Level" />                     
+          <th>Level:</th><td tal:content="info/student/Level" />                     
         </tr>
       </table>
@@ -39,8 +38,8 @@
        <table>
           <tr>
-            <th width="150px">Verdict:</th><td tal:content="python:results[0][0]['Verdict']" /> 
+            <th width="180px">Verdict:</th><td tal:content="python:info['results'][0][0]['Verdict']" /> 
           </tr>
           <tr>  
-            <th>Session:</th><td tal:content="python:results[0][0]['Session']" /> 
+            <th>Session:</th><td tal:content="python:info['results'][0][0]['Session']" /> 
           </tr>        
        </table>
@@ -49,5 +48,5 @@
                      
        <table>
-         <span tal:repeat="semester results">
+         <span tal:repeat="semester info/results">
             <span tal:repeat="result semester">
              <tr tal:condition="repeat/result/start">
