Index: WAeUP_SRP/trunk/skins/waeup_ois/academic_report_slip.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_ois/academic_report_slip.pt	(revision 3718)
+++ WAeUP_SRP/trunk/skins/waeup_ois/academic_report_slip.pt	(revision 3718)
@@ -0,0 +1,64 @@
+<metal:body use-macro="here/slip_template/macros/master">
+<metal:main fill-slot="main"    tal:define="info context/getStudyLevelInfo;"    > 
+<span tal:condition="not: info"> 
+    <span tal:content="here/illegal_view" />
+</span> 
+<span tal:condition="info" tal:omit-tag=""> 
+    <span tal:omit-tag=""   tal:define="is_so info/is_so;   
+                                       is_ca info/is_ca;   
+                                       show_check_boxes 
+                                       info/show_check_boxes;   
+                                       is_student info/is_student;   
+                                       validated info/validated;   ">  
+        <h3> <span tal:content="info/session" /> Academic Report (<span tal:content="info/student/course" /> 
+                                                                  <span tal:content="info/level_str" />)
+            </h3>  <br /> 
+        <span tal:omit-tag=""       tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'],       
+                                                 layout_mode='view_info',       
+                                                 layout_id='student_application')"       />
+        <br /> 
+        <span tal:condition="not:info/data_missing" tal:omit-tag="">
+            <table class="contentListing" id="folder_content" width="100%">
+                <span tal:repeat="sem python:(('1','Term One','normal1'),('2','Term Two','normal2'),('3','Term Three','normal3'))">
+                    <tr tal:condition="python:info[sem[2]]">
+                        <th tal:content="python:sem[1]" />
+                        <th align='center'>CA 1 <br />Marks</th>
+                        <th align='center'>CA 2 <br />Marks</th>    
+                        <th align='center'>Exam <br />Marks</th>              
+                        <th align='center'>Overall <br />Marks</th>
+                        <th align='center'>Grade</th>
+                        <th tal:condition="is_so" align='center'>
+                        </th>
+                    </tr>
+                    <tr tal:repeat="row python:info[sem[2]]"       
+                        tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')"> 
+                        <td tal:content="row/title"></td> 
+                        <td align="center" tal:content="row/ca1"></td> 
+                        <td align="center" tal:content="row/ca2"></td> 
+                        <td align="center" tal:content="row/exam"></td> 
+                        <td align="center" tal:content="row/score_calc"></td>
+                        <td align="center" tal:content="row/grade"></td>
+                    </tr>
+                    <tr><td>&nbsp;</td>
+                    </tr>
+                </span>
+            </table>
+        </span>
+
+        <span tal:condition="python:False">      <br /><br />
+            <table width=100%>
+                <tr > 
+                    <td width=50%>Date:</td><td>Date:</td>
+                </tr>
+            </table>    <br /><br /><br /><br />
+            <table width=100%>
+                <tr > 
+                    <td width=50% style="border-top-style:solid; border-top-width:1px; border-top-color:black"> Student</td> 
+                    <td width=50% style="border-top-style:solid; border-top-width:1px; border-top-color:black">Course Adviser</td>
+                </tr>
+            </table>
+        </span>
+    </span>
+</span>
+</metal:main>
+</metal:body>
Index: WAeUP_SRP/trunk/skins/waeup_ois/academic_report_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_ois/academic_report_view.pt	(revision 3718)
+++ WAeUP_SRP/trunk/skins/waeup_ois/academic_report_view.pt	(revision 3718)
@@ -0,0 +1,283 @@
+<metal:body use-macro="here/main_template/macros/master">
+  <metal:main fill-slot="main"
+          tal:define="info context/getStudyLevelInfo;
+                      contact_student_form string:contact_student_form;
+                      study_level_view string:study_level_view;">
+  <metal:block define-macro="edit_form">   
+              
+    <span tal:condition="not: info">
+      <span tal:content="here/illegal_view" />
+    </span>
+    <span tal:condition="info">
+    <span tal:define= "is_so context/isSectionOfficer;
+    is_ca info/is_ca;
+    show_check_boxes info/show_check_boxes;
+    has_verdict info/has_verdict;
+    submission_allowed info/submission_allowed;
+    rejection_allowed info/rejection_allowed;
+    is_current_level info/is_current_level;
+    is_student info/is_student;
+    with_score not: info/without_score|nothing;
+    with_cascore not: info/without_cascore|nothing;
+    ">     
+    
+
+    <span tal:condition="python:True">  
+    <div style="text-align: right" 
+         tal:condition="python:True">
+    <a href="" target="slip" tal:attributes="href string:academic_report_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" />
+        Academic Report Slip
+    </a>
+    </div>
+    </span>
+          
+    <a href=""
+       tal:attributes="href string:${here/academicsParent}">
+      <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+      Up one level
+    </a>
+
+    <h3> 
+      <span tal:condition="python: is_so or is_ca">
+        <span tal:content="info/student/name" />:
+      </span>
+      <span tal:condition="is_student">My </span>
+      
+      Subject Registration Form for <span tal:content="info/level_str" />
+    </h3>
+    
+        <br />
+           
+        <table>
+           <tr>
+            <th valign='top'>Pastoral Reports:</th> 
+            <td>
+              <span tal:repeat="item python:info['items']">
+                <a href="view" 
+                   tal:attributes="href item/id"
+                   tal:content="item/title"/><br />
+              </span>
+            </td>
+          </tr>
+          <tr>
+            <th>Session:</th> 
+            <td><span tal:content="info/session" /></td>
+          </tr>
+          <tr tal:condition="has_verdict">
+            <th>Verdict:</th> 
+            <td><span tal:content="info/verdict" /></td>
+          </tr>      
+        </table>           
+   
+             
+    <form action="." method="post" class="group" onsubmit="return submit_once()">
+
+      <div class="" tal:condition="python: info['data_missing'] and not info['spillover']">
+        <font color="red">Your faculty has not yet provided the list of subjects for your certificate. Please contact your faculty!</font>
+        <br /><br />
+      </div>
+       
+      <span tal:condition="not:info/data_missing" tal:omit-tag=""> 
+
+      <table class="contentListing"  id="folder_content" width="100%">
+        
+        <span tal:repeat="sem python:(('1','Term One','normal1'),('2','Term Two','normal2'),('3','Term Three','normal3'))">       
+                    
+        <tr tal:condition="python:info[sem[2]]">
+        <th tal:attributes="colspan python: test(show_check_boxes,'2','1')" 
+            tal:content="python:sem[1]" />
+        <th align='center'>CA 1 <br />Marks</th>
+        <th align='center'>CA 2 <br />Marks</th>    
+        <th align='center'>Exam <br />Marks</th>              
+        <th align='center'>Overall <br />Marks</th>
+        <th align='center'>Grade</th>
+        <th tal:condition="submission_allowed" align='center'></th>   
+        <th tal:condition="is_so" align='center'></th> 
+            
+        </tr>                
+        <tr tal:repeat="row python:info[sem[2]]"
+            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+          <td align="left" valign="middle" style="width: 5%;"
+             tal:condition="show_check_boxes">
+            <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                   tal:define="id row/id"
+                   tal:attributes="value id;
+                   id python:'cb_' + id;
+                   checked python:id in info['choosen_ids'];" 
+                   />
+          </td>
+          <td tal:content="row/title"></td>
+          <td align="center" tal:content="row/ca1"></td>
+          <td align="center" tal:content="row/ca2"></td>
+          <td align="center" tal:content="row/exam"></td>
+          <td align="center" tal:content="row/score_calc"></td>
+          <td align="center" tal:content="row/grade"></td>
+          
+          <td tal:condition="python:submission_allowed and is_student and False" align="center">
+            <a href="edit" tal:attributes="href string:course_edit/${row/code}"
+            target="edit_course_result"
+            onclick="javascript:window.open('','edit_course_result','width=600, height=350, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
+            [edit]
+            </a> 
+          </td>       
+          <td tal:condition="is_so" align="center">
+            <a href="edit" tal:attributes="href string:lecturer_course_edit/${row/code}"
+            target="edit_course_result"
+            onclick="javascript:window.open('','edit_course_result','width=600, height=500, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
+            [edit]
+            </a> 
+          </td>                   
+        </tr>
+        <tr><td>&nbsp;</td></tr>
+        </span>        
+        
+      </table>
+      </span>
+      
+ 
+          
+      <br />
+      
+      <table tal:condition="python: is_student and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
+             class="folderButtons">
+        <tr>
+          <td align="left" valign="top" rowspan="3"></td>
+          <td align="left" valign="top">
+              <input type="submit" name="delete_course_result:method" value="Delete selected"
+                     class="destructive" i18n:attributes="value"
+                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                     ('Do you really want to delete selected subjects?', )" 
+                     />
+              <input tal:condition="python: 1" type="submit" name="refresh_level:method"
+                     class="context" value="Update" 
+                     />
+                    
+                     
+              <br /><br />
+              <input tal:condition="not: info/credits_exceeded" 
+                     type="submit" name="register_courses:method"
+                     class="context" value="Submit to Academic Tutor" 
+                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                     ('Do you really want to submit the list? You will not be able to edit your data after submission.', )" />
+              <span tal:condition="info/credits_exceeded">
+                  <font color="red"> <strong>Your total credits exceed <span tal:replace="info/max_credits" />!</strong></font>
+              </span>
+                     
+              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
+                     tal:attributes="value study_level_view"/>  
+                     
+              <br /><br />
+              
+              <span tal:condition="python: 1">
+              <strong>Note:</strong> 'Update' checks for all subjects in your certificate and will add them to your subject list irrespective of
+              prior deletion, i.e. already deleted subjectss will show up again. 
+              Please use this function only if you are sure that your department has added subjects which are not yet on your subject list.                                
+              </span>
+              <span tal:condition="python: 0">
+              <strong>Note:</strong> The 'Update' function has been temporarily disabled.                                 
+              </span>              
+                     
+          </td>
+        </tr>
+      </table>
+      <table tal:condition="python: is_so and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
+             class="folderButtons">
+        <tr>
+          <td align="left" valign="top" rowspan="3"></td>
+          <td align="left" valign="top">
+              <input type="button" value="Select all" class="context"
+                     onclick="someJavaScriptFunctionThatWillBeReplaced"
+                     i18n:attributes="value"
+                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                     />
+              <input type="submit" name="delete_course_result:method" value="Delete selected"
+                     class="destructive" i18n:attributes="value"
+                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                     ('Do you really want to delete the subjects selected?', )" 
+                     />
+              <input 
+                     type="submit" name="refresh_level:method"
+                     class="context" value="Update" 
+                     />
+              <input tal:condition="submission_allowed" type="submit" name="register_courses:method"
+                     class="context" value="Submit" />  
+              <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method"
+                     class="context" value="Validate" />
+              <input tal:condition="info/rejection_allowed" type="submit" name="reject_courses:method"
+                     class="context" value="Reject" />
+                     
+              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
+                     tal:attributes="value study_level_view"/>                         
+              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
+                     tal:attributes="value contact_student_form"/>                         
+
+          </td>
+        </tr>
+      </table>
+      <table tal:condition="python:is_ca and is_current_level and not has_verdict" width="100%" cellspacing="0" cellpadding="2"
+             class="folderButtons">
+        <tr>
+          <td align="left" valign="top" rowspan="3"></td>
+          <td align="left" valign="top">
+              <input tal:condition="show_check_boxes"
+                     type="button" value="Select all" class="context"
+                     onclick="someJavaScriptFunctionThatWillBeReplaced"
+                     i18n:attributes="value"
+                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                     />
+              <input tal:condition="show_check_boxes"
+                     type="submit" name="delete_course_result:method" value="Delete selected"
+                     class="destructive" i18n:attributes="value"
+                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                     ('Do you really want to delete the subjects selected?', )" 
+                     />
+              <input tal:condition="show_check_boxes"
+                     type="submit" name="refresh_level:method"
+                     class="context" value="Update" 
+                     />
+              <input tal:condition="submission_allowed" type="submit" name="register_courses:method"
+                     class="context" value="Submit" />  
+              <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method"
+                     class="context" value="Validate" />
+              <input tal:condition="info/rejection_allowed" type="submit" name="reject_courses:method"
+                     class="context" value="Reject" />
+                     
+              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
+                     tal:attributes="value study_level_view"/>                         
+              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
+                     tal:attributes="value contact_student_form"/>    
+                                           
+
+          </td>
+        </tr>
+      </table>
+
+    </form>
+    <br />
+      <form action="add_course_result" method="post" class="group" onsubmit="return submit_once()"
+          tal:condition="show_check_boxes">
+      <table>
+        <tr>
+          <th>Subject Id</th>
+          <td><input type="text" name="course_id" 
+                     tal:attributes="value request/course_id|nothing"/></td>
+          <td colspan="2">
+            <input type="submit" name="add"
+                   class="context" value="Add Subject" 
+                   />
+            <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
+                     tal:attributes="value study_level_view"/>                       
+          </td>                
+      </table>
+      </form>   
+  </span>
+  </span>        
+  </metal:block>    
+  </metal:main>
+
+</metal:body>
+
Index: WAeUP_SRP/trunk/skins/waeup_ois/getPastoralReportInfo.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_ois/getPastoralReportInfo.py	(revision 3718)
+++ WAeUP_SRP/trunk/skins/waeup_ois/getPastoralReportInfo.py	(revision 3718)
@@ -0,0 +1,51 @@
+## Script (Python) "getPastoralReportInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id: getPastoralReportInfo.py 2760 2007-11-26 07:39:15Z henrik $
+"""
+return Info about the Studylevel
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+"""
+
+info = context.waeup_tool.getAccessInfo(context)
+student_id = info['student_id']
+if student_id is None:
+    return None
+
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+
+course_results = context.course_results
+request = context.REQUEST
+response = request.RESPONSE
+import logging
+logger = logging.getLogger('Skins.getPastoralReportInfo')
+
+level_doc = info['level_doc'] = context.aq_parent.getContent()
+doc = info['doc'] = context.getContent()
+info['session'] = context.portal_vocabularies.sessions.get(level_doc.session)
+info['level'] = context.portal_vocabularies.student_levels.get(context.aq_parent.getId())
+info['term'] = context.portal_vocabularies.terms.get(context.getId())
+info['is_so'] = is_so = info['is_sectionofficer']
+#info['is_student'] = is_student = context.isStudent()
+#info['is_ca'] = is_ca = context.isCourseAdviser()
+#info['student'] = student = context.students_catalog(id=student_id)[0]
+#info['student'] = student = context.students_catalog.getRecordByKey(student_id)
+
+students_object = context.portal_url.getPortalObject().campus.students
+student = getattr(students_object, student_id)
+info['app'] = student.application
+info['app_doc'] = student.application.getContent()
+
+return info
Index: WAeUP_SRP/trunk/skins/waeup_ois/pastoral_report_slip.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_ois/pastoral_report_slip.pt	(revision 3718)
+++ WAeUP_SRP/trunk/skins/waeup_ois/pastoral_report_slip.pt	(revision 3718)
@@ -0,0 +1,34 @@
+<metal:body use-macro="here/slip_template/macros/master">
+  <metal:main fill-slot="main"
+              tal:define="info context/getPastoralReportInfo;
+              s_name context/getStudentNameInContext;
+              ">
+    <span tal:condition="not: info">
+      <span tal:content="here/illegal_view" />
+    </span>
+    <span tal:condition="info" tal:omit-tag="">
+      <h3> <span tal:content="info/session" /> <span tal:content="info/term" /> Pastoral Report (<span tal:content="info/level" />)
+            </h3>
+      <br />
+      <span tal:omit-tag="" tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'],       
+                                                 layout_mode='view_info',       
+                                                 layout_id='student_application')"/>      
+      <br />
+      <span tal:omit-tag=""  
+            tal:content="structure python: info['doc'].render(layout_mode='view')" />
+    </span>      
+        <span tal:condition="python:True">      <br /><br />
+            <table width=100%>
+                <tr > 
+                    <td width=50%>Date:</td><td></td>
+                </tr>
+            </table>    <br /><br /><br /><br />
+            <table width=100%>
+                <tr > 
+                    <td width=50% style="border-top-style:solid; border-top-width:1px; border-top-color:black">Name of House Staff</td> 
+                    <td width=50% style="border-top-style:solid; border-top-width:1px; border-top-color:black">Signature</td>
+                </tr>
+            </table>
+        </span>    
+  </metal:main> 
+</metal:body>
Index: WAeUP_SRP/trunk/skins/waeup_ois/pastoral_report_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_ois/pastoral_report_view.pt	(revision 3718)
+++ WAeUP_SRP/trunk/skins/waeup_ois/pastoral_report_view.pt	(revision 3718)
@@ -0,0 +1,68 @@
+<metal:body use-macro="here/main_template/macros/master">
+  <metal:main fill-slot="main"
+              tal:define="info context/getPastoralReportInfo;
+              s_name context/getStudentNameInContext;
+              ">
+    <span tal:condition="not: info">
+      <span tal:content="here/illegal_view" />
+    </span>
+    <span tal:condition="info" tal:omit-tag="">
+      <span tal:condition="not:info/is_anonymous" tal:omit-tag="">
+
+    <div style="text-align: right" 
+         tal:condition="python:True">
+    <a href="" target="slip" tal:attributes="href string:pastoral_report_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" />
+        Pastoral Report Slip
+    </a>
+    </div>
+      
+        <span tal:define="breadcrumbs context/getBreadCrumbs|nothing">
+          <a tal:condition="not: breadcrumbs" href="" 
+             tal:attributes="href string:${here/aq_parent/absolute_url}">
+            <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+            Up one level
+          </a>
+          <div tal:condition="breadcrumbs">
+            <span tal:repeat="crumb breadcrumbs"><a href="crumb" 
+                                                    tal:attributes="href crumb/url"
+                                                    tal:content="crumb/title"></a> 
+              <span tal:condition="not: repeat/crumb/end">&gt;</span>
+            </span>
+          </div>
+        </span>      
+      </span>      
+      <h3 tal:define="is_so info/is_sectionofficer;"> 
+        <span tal:condition="python:is_so and s_name">
+          <span tal:content="s_name" />:
+        </span>
+        Pastoral Report
+      </h3>
+      <br />
+      
+          
+      <table>
+        <tr>
+          <th>Session:</th> 
+          <td><span tal:content="info/session" /></td>
+        </tr>
+        <tr>
+          <th>Year:</th> 
+          <td><span tal:content="info/level" /></td>
+        </tr>      
+        <tr>
+          <th>Term:</th> 
+          <td><span tal:content="info/term" /></td>
+        </tr>          
+      </table>           
+      
+      <br />
+      
+      <span tal:omit-tag=""  
+            tal:content="structure python: info['doc'].render(layout_mode='view')" />
+    </span>      
+  </metal:main> 
+  <metal:sub fill-slot="sub"/>
+</metal:body>
+
Index: WAeUP_SRP/trunk/skins/waeup_ois/study_course_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_ois/study_course_view.pt	(revision 3712)
+++ WAeUP_SRP/trunk/skins/waeup_ois/study_course_view.pt	(revision 3718)
@@ -132,5 +132,5 @@
     <div tal:condition="info/missing_data">
        <font color='red'>
-          Your faculty has not yet provided the results and verdict of the previous session.
+          Your department has not yet provided the results and verdict of the previous session.
        </font>
     </div>
