Index: WAeUP_SRP/base/CHANGES.txt
===================================================================
--- WAeUP_SRP/base/CHANGES.txt	(revision 3681)
+++ WAeUP_SRP/base/CHANGES.txt	(revision 3682)
@@ -26,2 +26,7 @@
 - admitOneStudent uses entry_session from applicants_catalog instead
   of static argument (not yet tested)
+  
+1.4 (2008-09-21)
+-----------------
+- Implement Student Pastoral Report for secondary schools
+
Index: WAeUP_SRP/base/Students.py
===================================================================
--- WAeUP_SRP/base/Students.py	(revision 3681)
+++ WAeUP_SRP/base/Students.py	(revision 3682)
@@ -907,4 +907,5 @@
 ###)
 
+
 class StudentPume(CPSDocument): ###(
     """
@@ -927,6 +928,22 @@
     ob = StudentPume(id, **kw)
     return CPSBase_adder(container, ob, REQUEST=REQUEST)
-
-
+###)
+
+
+class StudentPastoralReport(CPSDocument): ###(
+    """
+    Student Pastoral Report
+    """
+    meta_type = 'StudentPastoralReport'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
+
+InitializeClass(StudentPastoralReport)
+
+def addStudentPastoralReport(container, id, REQUEST=None, **kw):
+    """Add a Student Pastoral Report."""
+    ob = StudentPastoralReport(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)
+###)
 
 # Backward Compatibility StudyLevel
Index: WAeUP_SRP/base/__init__.py
===================================================================
--- WAeUP_SRP/base/__init__.py	(revision 3681)
+++ WAeUP_SRP/base/__init__.py	(revision 3682)
@@ -8,4 +8,5 @@
 from Products.GenericSetup import profile_registry
 from Products.GenericSetup import EXTENSION
+from Products.GenericSetup import BASE
 
 from Products.CPSCore.interfaces import ICPSSite
@@ -56,4 +57,5 @@
          #"Semester",
          "StudentCourseResult",
+         "StudentPastoralReport",
          # move to Academics later
          #"Semester",
@@ -125,5 +127,5 @@
     temp = root.unrestrictedTraverse( "/temp_folder", None )
     if temp is not None and not sess_container_name in temp.objectIds():
-        addSessionDataContainer( temp, sess_container_name, 9600, 4800, 
+        addSessionDataContainer( temp, sess_container_name, 9600, 4800,
                   lazy=True, title='Faster session data container')
 
Index: WAeUP_SRP/base/profiles/default/layouts.xml
===================================================================
--- WAeUP_SRP/base/profiles/default/layouts.xml	(revision 3681)
+++ WAeUP_SRP/base/profiles/default/layouts.xml	(revision 3682)
@@ -59,4 +59,5 @@
   <object name="student_transfer" meta_type="CPS Layout"/>
   <object name="study_level" meta_type="CPS Layout"/>
+  <object name="student_pastoral_report" meta_type="CPS Layout"/>
   <object name="university" meta_type="CPS Layout"/>
   <object name="upload" meta_type="CPS Layout"/>
Index: WAeUP_SRP/base/profiles/default/layouts/student_pastoral_report.xml
===================================================================
--- WAeUP_SRP/base/profiles/default/layouts/student_pastoral_report.xml	(revision 3682)
+++ WAeUP_SRP/base/profiles/default/layouts/student_pastoral_report.xml	(revision 3682)
@@ -0,0 +1,396 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="student_pastoral_report" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method">layout_clearance_view</property>
+ <property name="style_prefix">layout_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+
+ <widget name="code" meta_type="Select Widget">
+  <property name="title">Term</property>
+  <property name="fields">
+   <element value="code"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Term</property>
+  <property name="label_edit">Term</property>
+  <property name="readonly_layout_modes"/>
+  <property name="vocabulary">terms</property>
+  <property name="hidden_layout_modes">
+  <element value="edit"/>
+  <element value="view"/>
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+
+ </widget>
+
+ <widget name="adherence" meta_type="Generic Select Widget">
+  <property name="title">Adherence to School Rules</property>
+  <property name="fields">
+   <element value="adherence"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Adherence to School Rules</property>
+  <property name="label_edit">Adherence to School Rules</property>
+  <property name="description">Personal Qualities</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+  <property name="render_format">radio</property>
+ </widget>
+
+ <widget name="self_discipline" meta_type="Select Widget">
+  <property name="title">Self-discipline</property>
+  <property name="fields">
+   <element value="self_discipline"/>
+  </property>
+  <property name="label">Self-discipline</property>
+  <property name="label_edit">Self-discipline</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+
+ <widget name="self_respect" meta_type="Select Widget">
+  <property name="title">Self-respect</property>
+  <property name="fields">
+   <element value="self_respect"/>
+  </property>
+  <property name="label">Self-respect</property>
+  <property name="label_edit">Self-respect</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+ <widget name="self_confidence" meta_type="Select Widget">
+  <property name="title">Self-confidence</property>
+  <property name="fields">
+   <element value="self_confidence"/>
+  </property>
+  <property name="label">Self-confidence</property>
+  <property name="label_edit">Self-confidence</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+ <widget name="punctuality" meta_type="Select Widget">
+  <property name="title">Punctuality</property>
+  <property name="fields">
+   <element value="punctuality"/>
+  </property>
+  <property name="label">Punctuality</property>
+  <property name="label_edit">Punctuality</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+ <widget name="trustworthiness" meta_type="Select Widget">
+  <property name="title">Trustworthiness</property>
+  <property name="fields">
+   <element value="trustworthiness"/>
+  </property>
+  <property name="label">Trustworthiness</property>
+  <property name="label_edit">Trustworthiness</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+ <widget name="leadership" meta_type="Select Widget">
+  <property name="title">Leadership</property>
+  <property name="fields">
+   <element value="leadership"/>
+  </property>
+  <property name="label">Leadership</property>
+  <property name="label_edit">Leadership</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+ <widget name="independence_initiative" meta_type="Select Widget">
+  <property name="title">Independence and Initiative</property>
+  <property name="fields">
+   <element value="independence_initiative"/>
+  </property>
+  <property name="label">Independence and Initiative</property>
+  <property name="label_edit">Independence and Initiative</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+ <widget name="motivation" meta_type="Select Widget">
+  <property name="title">Motivation</property>
+  <property name="fields">
+   <element value="motivation"/>
+  </property>
+  <property name="label">Motivation</property>
+  <property name="label_edit">Motivation</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+ <widget name="extracurricular_accp" meta_type="Select Widget">
+  <property name="title">Extracurricular Accomplishment</property>
+  <property name="fields">
+   <element value="extracurricular_accp"/>
+  </property>
+  <property name="label">Extracurricular Accomplishment</property>
+  <property name="label_edit">Extracurricular Accomplishment</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+ <widget name="emotional_maturity" meta_type="Select Widget">
+  <property name="title">Emotional Maturity</property>
+  <property name="fields">
+   <element value="emotional_maturity"/>
+  </property>
+  <property name="label">Emotional Maturity</property>
+  <property name="label_edit">Emotional Maturity</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+ <widget name="warmth_personality" meta_type="Select Widget">
+  <property name="title">Warmth of Personality</property>
+  <property name="fields">
+   <element value="warmth_personality"/>
+  </property>
+  <property name="label">Warmth of Personality</property>
+  <property name="label_edit">Warmth of Personality</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+ <widget name="concern_others" meta_type="Select Widget">
+  <property name="title">Concern for Others</property>
+  <property name="fields">
+   <element value="concern_others"/>
+  </property>
+  <property name="label">Concern for Others</property>
+  <property name="label_edit">Concern for Others</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+ <widget name="cooperation" meta_type="Select Widget">
+  <property name="title">Co-operation</property>
+  <property name="fields">
+   <element value="cooperation"/>
+  </property>
+  <property name="label">Co-operation</property>
+  <property name="label_edit">Co-operation</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+ <widget name="helpfulness" meta_type="Select Widget">
+  <property name="title">Helpfulness</property>
+  <property name="fields">
+   <element value="helpfulness"/>
+  </property>
+  <property name="label">Helpfulness</property>
+  <property name="label_edit">Helpfulness</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+ <widget name="application_studies" meta_type="Select Widget">
+  <property name="title">Application to Studies</property>
+  <property name="fields">
+   <element value="application_studies"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Application to Studies</property>
+  <property name="label_edit">Application to Studies</property>
+  <property name="description">Work Ethics</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+
+ <widget name="commitment_duty" meta_type="Select Widget">
+  <property name="title">Commitment to Duty</property>
+  <property name="fields">
+   <element value="commitment_duty"/>
+  </property>
+  <property name="label">Commitment to Duty</property>
+  <property name="label_edit">Commitment to Duty</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+
+ <widget name="disciplined_work" meta_type="Select Widget">
+  <property name="title">Disciplined Work Wabits</property>
+  <property name="fields">
+   <element value="disciplined_work"/>
+  </property>
+  <property name="label">Disciplined Work Wabits</property>
+  <property name="label_edit">Disciplined Work Wabits</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+ <widget name="contribution_life" meta_type="Select Widget">
+  <property name="title">Contribution to Life of School</property>
+  <property name="fields">
+   <element value="contribution_life"/>
+  </property>
+  <property name="label">Contribution to Life of School</property>
+  <property name="label_edit">Contribution to Life of School</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+
+ <widget name="appropriat_dress" meta_type="Select Widget">
+  <property name="title">Appropriateness of Dress</property>
+  <property name="fields">
+   <element value="appropriat_dress"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Appropriateness of Dress</property>
+  <property name="label_edit">Appropriateness of Dress</property>
+  <property name="description">Etiquette</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+
+ <widget name="care_property" meta_type="Select Widget">
+  <property name="title">Care of Property</property>
+  <property name="fields">
+   <element value="care_property"/>
+  </property>
+  <property name="label">Care of Property</property>
+  <property name="label_edit">Care of Property</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+ <widget name="care_environment" meta_type="Select Widget">
+  <property name="title">Care of Environment</property>
+  <property name="fields">
+   <element value="care_environment"/>
+  </property>
+  <property name="label">Care of Environment</property>
+  <property name="label_edit">Care of Environment</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+
+ <widget name="eating_habits" meta_type="Select Widget">
+  <property name="title">Eating Habits</property>
+  <property name="fields">
+   <element value="eating_habits"/>
+  </property>
+  <property name="label">Eating Habits</property>
+  <property name="label_edit">Eating Habits</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">pastoral_grade</property>
+ </widget>
+
+
+  <table>
+  <row>
+   <cell name="code"/>
+  </row>
+  <row>
+   <cell name="adherence"/>
+  </row>
+  <row>
+   <cell name="self_discipline"/>
+  </row>
+  <row>
+   <cell name="self_respect"/>
+  </row>
+  <row>
+   <cell name="self_confidence"/>
+  </row>
+  <row>
+   <cell name="punctuality"/>
+  </row>
+  <row>
+   <cell name="trustworthiness"/>
+  </row>
+  <row>
+   <cell name="leadership"/>
+  </row>
+  <row>
+   <cell name="independence_initiative"/>
+  </row>
+  <row>
+   <cell name="motivation"/>
+  </row>
+  <row>
+   <cell name="extracurricular_accp"/>
+  </row>
+  <row>
+   <cell name="emotional_maturity"/>
+  </row>
+  <row>
+   <cell name="warmth_personality"/>
+  </row>
+  <row>
+   <cell name="concern_others"/>
+  </row>
+  <row>
+   <cell name="cooperation"/>
+  </row>
+  <row>
+   <cell name="helpfulness"/>
+  </row>
+  <row>
+   <cell name="application_studies"/>
+  </row>
+  <row>
+   <cell name="commitment_duty"/>
+  </row>
+  <row>
+   <cell name="disciplined_work"/>
+  </row>
+  <row>
+   <cell name="contribution_life"/>
+  </row>
+  <row>
+   <cell name="appropriat_dress"/>
+  </row>
+  <row>
+   <cell name="care_property"/>
+  </row>
+  <row>
+   <cell name="care_environment"/>
+  </row>
+   <row>
+   <cell name="eating_habits"/>
+  </row>
+ </table>
+</object>
+
Index: WAeUP_SRP/base/profiles/default/schemas.xml
===================================================================
--- WAeUP_SRP/base/profiles/default/schemas.xml	(revision 3681)
+++ WAeUP_SRP/base/profiles/default/schemas.xml	(revision 3682)
@@ -43,4 +43,5 @@
  <object name="students" meta_type="CPS Schema"/>
  <object name="student_study_level" meta_type="CPS Schema"/>
+ <object name="student_pastoral_report" meta_type="CPS Schema"/>
  <object name="study_level" meta_type="CPS Schema"/>
  <object name="university" meta_type="CPS Schema"/>
Index: WAeUP_SRP/base/profiles/default/schemas/student_pastoral_report.xml
===================================================================
--- WAeUP_SRP/base/profiles/default/schemas/student_pastoral_report.xml	(revision 3682)
+++ WAeUP_SRP/base/profiles/default/schemas/student_pastoral_report.xml	(revision 3682)
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="student_course_results" meta_type="CPS Schema">
+ <field name="code" meta_type="CPS String Field"/>
+ <field name="adherence" meta_type="CPS String Field"/>
+ <field name="self_discipline" meta_type="CPS String Field"/>
+ <field name="self_respect" meta_type="CPS String Field"/>
+ <field name="self_confidence" meta_type="CPS String Field"/>
+ <field name="punctuality" meta_type="CPS String Field"/>
+ <field name="trustworthiness" meta_type="CPS String Field"/>
+ <field name="leadership" meta_type="CPS String Field"/>
+ <field name="independence_initiative" meta_type="CPS String Field"/>
+ <field name="motivation" meta_type="CPS String Field"/>
+ <field name="extracurricular_accp" meta_type="CPS String Field"/>
+ <field name="emotional_maturity" meta_type="CPS String Field"/>
+ <field name="warmth_personality" meta_type="CPS String Field"/>
+ <field name="concern_others" meta_type="CPS String Field"/>
+ <field name="cooperation" meta_type="CPS String Field"/>
+ <field name="helpfulness" meta_type="CPS String Field"/>
+ <field name="application_studies" meta_type="CPS String Field"/>
+ <field name="commitment_duty" meta_type="CPS String Field"/>
+ <field name="disciplined_work" meta_type="CPS String Field"/>
+ <field name="contribution_life" meta_type="CPS String Field"/>
+ <field name="appropriat_dress" meta_type="CPS String Field"/>
+ <field name="care_property" meta_type="CPS String Field"/>
+ <field name="care_environment" meta_type="CPS String Field"/>
+ <field name="eating_habits" meta_type="CPS String Field"/>
+ 
+</object>
Index: WAeUP_SRP/base/profiles/default/types.xml
===================================================================
--- WAeUP_SRP/base/profiles/default/types.xml	(revision 3681)
+++ WAeUP_SRP/base/profiles/default/types.xml	(revision 3682)
@@ -35,3 +35,4 @@
  <object name="UploadsFolder" meta_type="CPS Flexible Type Information"/>
  <object name="Upload" meta_type="CPS Flexible Type Information"/>
+ <object name="StudentPastoralReport" meta_type="CPS Flexible Type Information"/>
 </object>
Index: WAeUP_SRP/base/profiles/default/types/StudentPastoralReport.xml
===================================================================
--- WAeUP_SRP/base/profiles/default/types/StudentPastoralReport.xml	(revision 3682)
+++ WAeUP_SRP/base/profiles/default/types/StudentPastoralReport.xml	(revision 3682)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="StudentPastoralReport" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Student Pastoral Report</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">StudentPastoralReport</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addStudentPastoralReport</property>
+ <property name="immediate_view">student_index</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type">document</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="student_pastoral_report"/>
+ </property>
+ <property name="layouts">
+  <element value="student_pastoral_report"/>
+ </property>
+ <property name="layout_clusters"/>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="student_index"/>
+ <alias from="create_do" to="waeup_document_create_do"/>
+ <alias from="view" to="student_index"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/student_index" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="" url_expr="string:${object_url}/waeup_edit_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
+
Index: WAeUP_SRP/base/profiles/default/types/StudentStudyLevel.xml
===================================================================
--- WAeUP_SRP/base/profiles/default/types/StudentStudyLevel.xml	(revision 3681)
+++ WAeUP_SRP/base/profiles/default/types/StudentStudyLevel.xml	(revision 3682)
@@ -13,5 +13,5 @@
  <property name="filter_content_types">True</property>
  <property name="allowed_content_types">
-  <element value="Semester"/>
+  <element value="StudentPastoralReport"/>
  </property>
  <property name="allow_discussion">False</property>
@@ -31,5 +31,4 @@
  <alias from="(Default)" to="student_index"/>
  <alias from="create_do" to="waeup_document_create_do"/>
- <alias from="created" to=""/>
  <alias from="view" to="student_index"/>
  <action title="View" action_id="view" category="object" condition_expr=""
@@ -37,9 +36,12 @@
   <permission value="View"/>
  </action>
- <action title="Add Course" action_id="new_entry" category="object"
+ <action title="Add Pastoral Report" action_id="new_entry" category="object"
     condition_expr=""
-    url_expr="string:${object_url}/content_create?type_name=StudentCourseResult"
-    visible="False">
+    url_expr="string:${object_url}/content_create?type_name=StudentPastoralReport"
+    visible="True">
   <permission value="Add portal content"/>
  </action>
 </object>
+
+
+
Index: WAeUP_SRP/base/profiles/default/vocabularies.xml
===================================================================
--- WAeUP_SRP/base/profiles/default/vocabularies.xml	(revision 3681)
+++ WAeUP_SRP/base/profiles/default/vocabularies.xml	(revision 3682)
@@ -53,3 +53,5 @@
  <object name="aos" meta_type="CPS Vocabulary"/>
  <object name="application_status" meta_type="CPS Vocabulary"/>
+ <object name="pastoral_grade" meta_type="CPS Vocabulary"/>
+ <object name="terms" meta_type="CPS Vocabulary"/>
  </object>
Index: WAeUP_SRP/base/profiles/default/vocabularies/pastoral_grade.xml
===================================================================
--- WAeUP_SRP/base/profiles/default/vocabularies/pastoral_grade.xml	(revision 3682)
+++ WAeUP_SRP/base/profiles/default/vocabularies/pastoral_grade.xml	(revision 3682)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="pastoral_grade" meta_type="CPS Vocabulary">
+    <property name="title"></property>
+    <property name="title_msgid"></property>
+    <property name="description"></property>
+    <item key="" msgid=""></item>
+    <item key="outstanding" msgid="">Outstanding</item>
+    <item key="very_good" msgid="">Very Good</item>
+    <item key="good" msgid="">Good</item>
+    <item key="satisfactory" msgid="">Satisfactory</item>
+    <item key="unsatisfactory" msgid="">Unsatisfactory</item>
+</object>
Index: WAeUP_SRP/base/profiles/default/vocabularies/terms.xml
===================================================================
--- WAeUP_SRP/base/profiles/default/vocabularies/terms.xml	(revision 3682)
+++ WAeUP_SRP/base/profiles/default/vocabularies/terms.xml	(revision 3682)
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
+<object name="terms" meta_type="CPS Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="acl_write_roles">Manager</property>
+ <item key="fpr" msgid="">First Term</item>
+ <item key="spr" msgid="">Second Term</item>
+ <item key="tpr" msgid="">Third Term</item>
+</object>
Index: WAeUP_SRP/base/profiles/default/workflows.xml
===================================================================
--- WAeUP_SRP/base/profiles/default/workflows.xml	(revision 3681)
+++ WAeUP_SRP/base/profiles/default/workflows.xml	(revision 3682)
@@ -130,4 +130,7 @@
    <bound-workflow workflow_id="waeup_document_wf"/>
   </type>
+  <type type_id="StudentPastoralReport">
+   <bound-workflow workflow_id="waeup_student_subobject_wf"/>
+  </type>
  </bindings>
 </object>
Index: WAeUP_SRP/base/skins/waeup_default/waeup_document_create_do.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_default/waeup_document_create_do.py	(revision 3681)
+++ WAeUP_SRP/base/skins/waeup_default/waeup_document_create_do.py	(revision 3682)
@@ -11,5 +11,5 @@
 request = context.REQUEST
 
-if type_name in ("StudyLevel","StudentStudyLevel","WAeUPDocument"):
+if type_name in ("StudyLevel","StudentStudyLevel","WAeUPDocument","StudentPastoralReport"):
     id = datamodel.get('code')
 else:
Index: WAeUP_SRP/base/skins/waeup_default/waeup_edit_form.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_default/waeup_edit_form.pt	(revision 3681)
+++ WAeUP_SRP/base/skins/waeup_default/waeup_edit_form.pt	(revision 3682)
@@ -9,5 +9,6 @@
            is_allowed context/isSectionOfficer;
            metadata metadata|nothing;
-           template here/main_template/macros/master;"
+           template here/main_template/macros/master;
+           info here/getDocumentInfo;"
            >
   <metal:block define-macro="edit_form">
@@ -78,5 +79,5 @@
       <tal:block condition="not: metadata"
         i18n:translate="">Edit <span id="page_title" i18n:name="title"
-        tal:content="here/title_or_id">Page Title</span>
+        tal:content="info/title">Page Title</span>
       </tal:block>
       <tal:block tal:condition="metadata"
Index: WAeUP_SRP/base/skins/waeup_student/academic_report_view.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/academic_report_view.pt	(revision 3681)
+++ WAeUP_SRP/base/skins/waeup_student/academic_report_view.pt	(revision 3682)
@@ -42,6 +42,4 @@
     </div>    
     </span>
-
-
           
     <a href=""
@@ -61,5 +59,16 @@
     
         <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> 
@@ -99,5 +108,4 @@
         </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%;"
Index: WAeUP_SRP/base/skins/waeup_student/getPastoralReportInfo.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/getPastoralReportInfo.py	(revision 3682)
+++ WAeUP_SRP/base/skins/waeup_student/getPastoralReportInfo.py	(revision 3682)
@@ -0,0 +1,46 @@
+## 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)
+
+return info
Index: WAeUP_SRP/base/skins/waeup_student/getStudentObjectTitles.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/getStudentObjectTitles.py	(revision 3681)
+++ WAeUP_SRP/base/skins/waeup_student/getStudentObjectTitles.py	(revision 3682)
@@ -19,3 +19,4 @@
               'StudentStudyCourse': 'Study Course',
               'PaymentsFolder': 'Payments',
+              'StudentPastoralReport': 'Pastoral Report',
               }
Index: WAeUP_SRP/base/skins/waeup_student/pastoral_report_view.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/pastoral_report_view.pt	(revision 3682)
+++ WAeUP_SRP/base/skins/waeup_student/pastoral_report_view.pt	(revision 3682)
@@ -0,0 +1,58 @@
+<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="">
+        <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/base/skins/waeup_student/student_index.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/student_index.py	(revision 3681)
+++ 	(revision )
@@ -1,54 +1,0 @@
-## Script (Python) "student_index"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=batch=None,portal_status_message=None
-##title=
-##
-# $Id$
-"""
-return the current student_index
-"""
-
-request = context.REQUEST
-#session = request.SESSION
-response = request.RESPONSE
-redirect = response.redirect
-pm = context.portal_membership
-member = pm.getAuthenticatedMember()
-
-#from Products.zdb import set_trace;set_trace()
-if context.isStaff():
-    if context.portal_type == 'StudentStudyCourse':
-        return context.study_course_view()
-    elif context.portal_type == 'StudentStudyLevel':
-        return context.study_level_view()
-    elif context.portal_type == 'StudentClearance':
-        return context.clearance_view()
-    elif context.portal_type == 'PaymentsFolder':
-        return context.payments_view()
-    elif context.portal_type == 'Student':
-        if portal_status_message:
-            return redirect("%s/student_view?portal_status_message=%s" % (context.absolute_url(),portal_status_message))
-        else:
-            return redirect("%s/student_view" % context.absolute_url())
-    elif context.portal_type == 'Payment':
-        return context.payment_receipt()
-    return redirect("%s/waeup_document_view" % context.absolute_url())
-if context.isStudent():
-    if context.portal_type == 'PaymentsFolder':
-        return context.payments_view()
-    elif context.portal_type == 'Payment':
-        return context.payment_receipt()
-    elif context.portal_type == 'StudentStudyLevel':
-        return context.study_level_view()
-    elif context.portal_type == 'StudentStudyCourse':
-        return context.study_course_view()
-    students_url = "%s/campus/students" % (context.portal_url())
-    id = str(member)
-    return redirect("%s/%s/student_view" % (students_url, id))
-
-return redirect("%s/srp_anonymous_view" % context.portal_url())
-
