Index: WAeUP_SRP/base/CHANGES.txt
===================================================================
--- WAeUP_SRP/base/CHANGES.txt	(revision 3674)
+++ WAeUP_SRP/base/CHANGES.txt	(revision 3675)
@@ -5,12 +5,18 @@
 ----------------
 
-- Product initialization: Now creating a "faster" session data container 
+- Product initialization: Now creating a "faster" session data container
   in the ZODB /temp_folder upon Zope startup. Moved from "faster" product
   itself.
 
 
-1.0 (XXXX-XX-XX)
+1.2 (2008-09-18)
 -----------------
 
-- New backend module to edit and check university infrastructure and course 
-  data. 
+- Start customization of the course_results catalog and using different
+  layouts for course result editing by lecturers and section officers.
+  Dont't forget to add symbolic links in all product folders, for example:
+
+  cd /zope/instances/WAeUP_OIS/WAeUP_SRP/profiles/default/
+  ln -s ../../profiles_custom/default/course_results.xml .
+  cd layouts/
+  ln -s ../../../profiles_custom/default/layouts/student_course_result.xml .
Index: WAeUP_SRP/base/WAeUPTables.py
===================================================================
--- WAeUP_SRP/base/WAeUPTables.py	(revision 3674)
+++ WAeUP_SRP/base/WAeUPTables.py	(revision 3675)
@@ -1574,4 +1574,10 @@
                     d['grade'] = grade
                     d['score'] = score
+
+            if str(brain.ca1).isdigit() and str(brain.ca2).isdigit() and str(brain.exam).isdigit():
+                d['score_calc'] = int(brain.ca1) + int(brain.ca2) + int(brain.exam)
+            else:
+                d['score_calc'] = ''
+
             d['coe'] = ''
             if brain.core_or_elective:
Index: WAeUP_SRP/base/profiles/default/course_results.xml
===================================================================
--- WAeUP_SRP/base/profiles/default/course_results.xml	(revision 3674)
+++ 	(revision )
@@ -1,36 +1,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl" href="catalog.xsl"?>
-<object name="course_results" meta_type="WAeUP Table">
- <column value="key"/>
- <column value="code"/>
- <column value="carry_over"/>
- <column value="core_or_elective"/>
- <column value="student_id"/>
- <column value="credits"/>
- <column value="level_id"/>
- <column value="session_id"/>
- <column value="score"/>
- <column value="ca1"/>
- <column value="ca2"/>
- <column value="exam"/> 
- <column value="grade"/>
- <column value="lecturer"/>
- <index name="key" meta_type="FieldIndex">
-  <indexed_attr value="key"/>
- </index>
- <index name="code" meta_type="FieldIndex">
-  <indexed_attr value="code"/>
- </index>
- <index name="lecturer" meta_type="FieldIndex">
-  <indexed_attr value="lecturer"/>
- </index>
- <index name="student_id" meta_type="FieldIndex">
-  <indexed_attr value="student_id"/>
- </index>
- <index name="level_id" meta_type="FieldIndex">
-  <indexed_attr value="level_id"/>
- </index>
- <index name="session_id" meta_type="FieldIndex">
-  <indexed_attr value="session_id"/>
- </index>
-</object>
Index: WAeUP_SRP/base/profiles/default/layouts/student_course_result.xml
===================================================================
--- WAeUP_SRP/base/profiles/default/layouts/student_course_result.xml	(revision 3674)
+++ 	(revision )
@@ -1,159 +1,0 @@
-<?xml version="1.0"?>
-<object name="student_course_result" meta_type="CPS Layout">
- <property name="layout_create_method"></property>
- <property name="layout_edit_method"></property>
- <property name="layout_view_method"></property>
- <property name="style_prefix">layout_waeup_</property>
- <property name="flexible_widgets"/>
- <property name="validate_values_expr"></property>
-
- <widget name="code" meta_type="CertificateCourseId Widget">
-  <property name="title">Course Code</property>
-  <property name="fields">
-   <element value="code"/>
-  </property>
-  <property name="is_required">True</property>
-  <property name="label">Course Code</property>
-  <property name="label_edit">Course Code</property>
-  <property name="readonly_layout_modes"/>
-  <property name="hidden_layout_modes">
-   <element value="view"/>
-   <element value="edit"/>
-  </property>
-  <property name="hidden_readonly_layout_modes"/>
- </widget>
- <widget name="core_or_elective " meta_type="Boolean Widget">
-  <property name="title">Core or Elective (editable value)</property>
-  <property name="fields">
-   <element value="core_or_elective"/>
-  </property>
-  <property name="is_required">True</property>
-  <property name="label">Core or Elective (editable value)</property>
-  <property name="label_edit">Core or Elective (editable value)</property>
-  <property name="readonly_layout_modes"/>
-  <property name="hidden_layout_modes"/>
-  <property name="hidden_readonly_layout_modes"/>
-  <property name="label_false">elective</property>
-  <property name="label_true">core</property>
- </widget>
- <widget name="credits" meta_type="Int Widget">
-  <property name="title">Credits</property>
-  <property name="fields">
-   <element value="credits"/>
-  </property>
-  <property name="label">Credits</property>
-  <property name="label_edit">Credits</property>
-  <property name="readonly_layout_modes">
-   <element value="edit"/>
-   <element value="create"/>
-  </property>
-  <property name="hidden_layout_modes">
-   <element value="create"/>
-  </property>
-  <property name="hidden_readonly_layout_modes"/>
- </widget>
- <widget name="passmark" meta_type="Int Widget">
-  <property name="title">Passmark</property>
-  <property name="fields">
-   <element value="passmark"/>
-  </property>
-  <property name="label">Passmark</property>
-  <property name="label_edit">Passmark</property>
-  <property name="readonly_layout_modes">
-   <element value="edit"/>
-   <element value="create"/>
-  </property>
-  <property name="hidden_layout_modes">
-   <element value="create"/>
-  </property>
-  <property name="hidden_readonly_layout_modes"/>
- </widget>
- <widget name="score" meta_type="Int Widget">
-  <property name="title">Score</property>
-  <property name="fields">
-   <element value="score"/>
-  </property>
-  <property name="label">Score</property>
-  <property name="label_edit">Score</property>
-  <property name="readonly_layout_modes">
-  </property>
-  <property name="hidden_layout_modes"/>
-  <property name="hidden_readonly_layout_modes"/>
- </widget>
-
- <widget name="exam" meta_type="Int Widget">
-  <property name="title">Exam Score</property>
-  <property name="fields">
-   <element value="exam"/>
-  </property>
-  <property name="label">Exam Score</property>
-  <property name="label_edit">Exam Score</property>
-  <property name="readonly_layout_modes">
-  </property>
-  <property name="hidden_layout_modes"/>
-  <property name="hidden_readonly_layout_modes"/>
- </widget>
- <widget name="ca1" meta_type="Int Widget">
-  <property name="title">CA Score 1</property>
-  <property name="fields">
-   <element value="ca1"/>
-  </property>
-  <property name="label">CA Score 1</property>
-  <property name="label_edit">CA Score 1</property>
-  <property name="readonly_layout_modes">
-  </property>
-  <property name="hidden_layout_modes"/>
-  <property name="hidden_readonly_layout_modes"/>
- </widget>
- <widget name="ca2" meta_type="Int Widget">
-  <property name="title">CA Score 2</property>
-  <property name="fields">
-   <element value="ca2"/>
-  </property>
-  <property name="label">CA Score 2</property>
-  <property name="label_edit">CA Score 2</property>
-  <property name="readonly_layout_modes">
-  </property>
-  <property name="hidden_layout_modes"/>
-  <property name="hidden_readonly_layout_modes"/>
- </widget>
-
- <widget name="title" meta_type="String Widget">
-  <property name="title">Original Course Title</property>
-  <property name="fields">
-   <element value="title"/>
-  </property>
-  <property name="label">Original Course Title</property>
-  <property name="label_edit">Original Course Title</property>
-  <property name="readonly_layout_modes">
-   <element value="edit"/>
-   <element value="create"/>
-  </property>
-  <property name="hidden_layout_modes">
-   <element value="create"/>
-  </property>
-  <property name="hidden_readonly_layout_modes"/>
-  <property name="display_width">60</property>
- </widget>
- <table>
-  <row>
-   <cell name="code"/>
-  </row>
-  <row>
-   <cell name="score"/>
-  </row>
-  <row>
-   <cell name="ca1"/>
-  </row>
-  <row>
-   <cell name="ca2"/>
-  </row>
-  <row>
-   <cell name="exam"/>
-  </row>
-  <row>
-   <cell name="core_or_elective "/>
-  </row>
- </table>
-</object>
-
Index: WAeUP_SRP/base/skins/waeup_student/academic_report_view.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/academic_report_view.pt	(revision 3674)
+++ WAeUP_SRP/base/skins/waeup_student/academic_report_view.pt	(revision 3675)
@@ -63,5 +63,5 @@
         <table>
           <tr>
-            <th  width="220px">Session:</th> 
+            <th>Session:</th> 
             <td><span tal:content="info/session" /></td>
           </tr>
@@ -95,4 +95,5 @@
         <th align='center'>om</th>
         <th tal:condition="submission_allowed" align='center'></th>   
+        <th tal:condition="is_so" align='center'></th> 
             
         </tr>                
@@ -114,7 +115,7 @@
           <td align="center" tal:content="row/ca2"></td>
           <td align="center" tal:content="row/exam"></td>
-          <td align="center" tal:content="row/score"></td>
+          <td align="center" tal:content="row/score_calc"></td>
           
-          <td tal:condition="submission_allowed" width="5%" align="center">
+          <td tal:condition="python:submission_allowed and is_student" align="center">
             <a href="edit" tal:attributes="href string:course_edit/${row/code}"
             target="edit_course_result"
@@ -122,5 +123,12 @@
             [edit]
             </a> 
-          </td>          
+          </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>
Index: WAeUP_SRP/ois/profiles_custom/default/course_results.xml
===================================================================
--- WAeUP_SRP/ois/profiles_custom/default/course_results.xml	(revision 3675)
+++ WAeUP_SRP/ois/profiles_custom/default/course_results.xml	(revision 3675)
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="catalog.xsl"?>
+<object name="course_results" meta_type="WAeUP Table">
+ <column value="key"/>
+ <column value="code"/>
+ <column value="carry_over"/>
+ <column value="core_or_elective"/>
+ <column value="student_id"/>
+ <column value="credits"/>
+ <column value="level_id"/>
+ <column value="session_id"/>
+ <column value="score"/>
+ <column value="ca1"/>
+ <column value="ca2"/>
+ <column value="exam"/> 
+ <column value="grade"/>
+ <column value="lecturer"/>
+ <index name="key" meta_type="FieldIndex">
+  <indexed_attr value="key"/>
+ </index>
+ <index name="code" meta_type="FieldIndex">
+  <indexed_attr value="code"/>
+ </index>
+ <index name="lecturer" meta_type="FieldIndex">
+  <indexed_attr value="lecturer"/>
+ </index>
+ <index name="student_id" meta_type="FieldIndex">
+  <indexed_attr value="student_id"/>
+ </index>
+ <index name="level_id" meta_type="FieldIndex">
+  <indexed_attr value="level_id"/>
+ </index>
+ <index name="session_id" meta_type="FieldIndex">
+  <indexed_attr value="session_id"/>
+ </index>
+</object>
Index: WAeUP_SRP/ois/profiles_custom/default/layouts/student_course_result.xml
===================================================================
--- WAeUP_SRP/ois/profiles_custom/default/layouts/student_course_result.xml	(revision 3675)
+++ WAeUP_SRP/ois/profiles_custom/default/layouts/student_course_result.xml	(revision 3675)
@@ -0,0 +1,159 @@
+<?xml version="1.0"?>
+<object name="student_course_result" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+
+ <widget name="code" meta_type="CertificateCourseId Widget">
+  <property name="title">Course Code</property>
+  <property name="fields">
+   <element value="code"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Course Code</property>
+  <property name="label_edit">Course Code</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="view"/>
+   <element value="edit"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="core_or_elective " meta_type="Boolean Widget">
+  <property name="title">Core or Elective</property>
+  <property name="fields">
+   <element value="core_or_elective"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Core or Elective</property>
+  <property name="label_edit">Core or Elective</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="label_false">elective</property>
+  <property name="label_true">core</property>
+ </widget>
+ <widget name="credits" meta_type="Int Widget">
+  <property name="title">Credits</property>
+  <property name="fields">
+   <element value="credits"/>
+  </property>
+  <property name="label">Credits</property>
+  <property name="label_edit">Credits</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+   <element value="create"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="passmark" meta_type="Int Widget">
+  <property name="title">Passmark</property>
+  <property name="fields">
+   <element value="passmark"/>
+  </property>
+  <property name="label">Passmark</property>
+  <property name="label_edit">Passmark</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+   <element value="create"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="score" meta_type="Int Widget">
+  <property name="title">Score</property>
+  <property name="fields">
+   <element value="score"/>
+  </property>
+  <property name="label">Score</property>
+  <property name="label_edit">Score</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+
+ <widget name="exam" meta_type="Int Widget">
+  <property name="title">Exam Marks</property>
+  <property name="fields">
+   <element value="exam"/>
+  </property>
+  <property name="label">Exam Marks</property>
+  <property name="label_edit">Exam Marks</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="ca1" meta_type="Int Widget">
+  <property name="title">CA 1 Marks</property>
+  <property name="fields">
+   <element value="ca1"/>
+  </property>
+  <property name="label">CA 1 Marks</property>
+  <property name="label_edit">CA 1 Marks</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="ca2" meta_type="Int Widget">
+  <property name="title">CA 2 Marks</property>
+  <property name="fields">
+   <element value="ca2"/>
+  </property>
+  <property name="label">CA 2 Marks</property>
+  <property name="label_edit">CA 2 Marks</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+
+ <widget name="title" meta_type="String Widget">
+  <property name="title">Original Course Title</property>
+  <property name="fields">
+   <element value="title"/>
+  </property>
+  <property name="label">Original Course Title</property>
+  <property name="label_edit">Original Course Title</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+   <element value="create"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">60</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="code"/>
+  </row>
+  <row>
+   <cell name="score"/>
+  </row>
+  <row>
+   <cell name="ca1"/>
+  </row>
+  <row>
+   <cell name="ca2"/>
+  </row>
+  <row>
+   <cell name="exam"/>
+  </row>
+  <row>
+   <cell name="core_or_elective "/>
+  </row>
+ </table>
+</object>
+
Index: WAeUP_SRP/ois/waeup_custom/slip_template.pt
===================================================================
--- WAeUP_SRP/ois/waeup_custom/slip_template.pt	(revision 3674)
+++ WAeUP_SRP/ois/waeup_custom/slip_template.pt	(revision 3675)
@@ -83,5 +83,5 @@
           </td>
           <td style="padding: 1em 0em 0em 0em; text-align: left;" valign="top">
-             <h2>UOlashore International School <br /> Iloko-Ijesa, Nigeria</h2>
+             <h2>Olashore International School <br /> Iloko-Ijesa, Nigeria</h2>
           
           </td>
