Index: /WAeUP_SRP/trunk/profiles/default/layouts/student_course_result.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/layouts/student_course_result.xml	(revision 730)
+++ /WAeUP_SRP/trunk/profiles/default/layouts/student_course_result.xml	(revision 731)
@@ -7,4 +7,19 @@
  <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="credits" meta_type="Int Widget">
   <property name="title">Credits</property>
@@ -17,5 +32,9 @@
     <property name="readonly_layout_modes">
       <element value="edit"/>
-    </property>
+      <element value="create"/>
+    </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
   <property name="hidden_readonly_layout_modes"/>
  </widget>
@@ -30,6 +49,9 @@
     <property name="readonly_layout_modes">
       <element value="edit"/>
-    </property>
-  <property name="hidden_layout_modes"/>
+      <element value="create"/>
+    </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
   <property name="hidden_readonly_layout_modes"/>
  </widget>
@@ -42,7 +64,10 @@
   <property name="label_edit">Course Title</property>
     <property name="readonly_layout_modes">
-      <element value="edit"/>
-    </property>
-  <property name="hidden_layout_modes"/>
+      <element value="create"/>
+      <element value="edit"/>
+    </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
   <property name="hidden_readonly_layout_modes"/>
   <property name="display_width">60</property>
@@ -93,14 +118,17 @@
  </widget>
  <widget name="import_id" meta_type="String Widget">
-  <property name="title">ID</property>
+  <property name="title">imported ID</property>
   <property name="fields">
    <element value="import_id"/>
   </property>
-  <property name="label">ID</property>
-  <property name="label_edit">ID</property>
-    <property name="readonly_layout_modes">
-      <element value="edit"/>
-    </property>
-  <property name="hidden_layout_modes"/>
+  <property name="label">imported ID</property>
+  <property name="label_edit">imported ID</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>
@@ -112,5 +140,8 @@
   <property name="label">Score</property>
   <property name="label_edit">Score</property>
-  <property name="readonly_layout_modes"/>
+    <property name="readonly_layout_modes">
+      <element value="edit"/>
+      <element value="create"/>
+    </property>
   <property name="hidden_layout_modes"/>
   <property name="hidden_readonly_layout_modes"/>
@@ -140,4 +171,7 @@
  <table>
   <row>
+   <cell name="code"/>
+  </row>
+  <row>
    <cell name="title"/>
   </row>
Index: /WAeUP_SRP/trunk/profiles/default/layouts/student_study_course.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/layouts/student_study_course.xml	(revision 730)
+++ /WAeUP_SRP/trunk/profiles/default/layouts/student_study_course.xml	(revision 731)
@@ -7,4 +7,16 @@
  <property name="flexible_widgets"/>
  <property name="validate_values_expr"></property>
+ <widget name="title" meta_type="String Widget">
+  <property name="title">Certificate Code</property>
+  <property name="fields">
+   <element value="title"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Certificate</property>
+  <property name="label_edit">Certificate</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
  <widget name="study_course" meta_type="String Widget">
   <property name="title">Certificate Code</property>
@@ -160,4 +172,7 @@
  <table>
   <row>
+   <cell name="title"/>
+  </row>
+  <row>
    <cell name="study_course"/>
   </row>
Index: /WAeUP_SRP/trunk/profiles/default/layouts/student_study_level.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/layouts/student_study_level.xml	(revision 730)
+++ /WAeUP_SRP/trunk/profiles/default/layouts/student_study_level.xml	(revision 731)
@@ -16,5 +16,8 @@
   <property name="label_edit">Level No</property>
   <property name="readonly_layout_modes"/>
-  <property name="hidden_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="edit"/>
+   <element value="view"/>
+  </property>
   <property name="hidden_readonly_layout_modes"/>
  </widget>
@@ -88,4 +91,7 @@
  <table>
   <row>
+   <cell name="code"/>
+  </row>
+  <row>
    <cell name="session"/>
   </row>
Index: /WAeUP_SRP/trunk/profiles/default/schemas/student_course_result.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/schemas/student_course_result.xml	(revision 730)
+++ /WAeUP_SRP/trunk/profiles/default/schemas/student_course_result.xml	(revision 731)
@@ -1,8 +1,10 @@
 <?xml version="1.0"?>
 <object name="course_results" meta_type="CPS Schema">
+ <field name="code" meta_type="CPS String Field"/>
  <field name="title" meta_type="CPS String Field"/>
  <field name="faculty_code" meta_type="CPS String Field"/>
  <field name="department_code" meta_type="CPS String Field"/>
  <field name="credits" meta_type="CPS Int Field"/>
+ <field name="core_or_elective" meta_type="CPS Boolean Field"/>
  <field name="passmark" meta_type="CPS Int Field"/>
  <field name="ansbook" meta_type="CPS String Field"/>
Index: /WAeUP_SRP/trunk/profiles/default/schemas/student_study_level.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/schemas/student_study_level.xml	(revision 730)
+++ /WAeUP_SRP/trunk/profiles/default/schemas/student_study_level.xml	(revision 731)
@@ -3,5 +3,5 @@
  <field name="code" meta_type="CPS String Field"/>
  <field name="session" meta_type="CPS String Field"/>
- <field name="gpa" meta_type="CPS String Field"/>
+ <field name="gpa" meta_type="CPS Float Field"/>
  <field name="status" meta_type="CPS String Field"/>
  <field name="verdict" meta_type="CPS String Field"/>
Index: /WAeUP_SRP/trunk/profiles/default/types/StudentCourseResult.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/types/StudentCourseResult.xml	(revision 730)
+++ /WAeUP_SRP/trunk/profiles/default/types/StudentCourseResult.xml	(revision 731)
@@ -2,5 +2,5 @@
 <object name="StudentCourseResult" meta_type="CPS Flexible Type Information"
    xmlns:i18n="http://xml.zope.org/namespaces/i18n">
- <property name="title">WAeUP Course Ticket</property>
+ <property name="title">WAeUP Course Result</property>
  <property name="description"></property>
  <property name="content_icon"></property>
@@ -27,4 +27,6 @@
  <property name="cps_is_portlet">False</property>
  <alias from="(Default)" to="academics_document_view"/>
+ <alias from="create_do" to="waeup_document_create_do"/>
+ <alias from="created" to="student_course_result_created"/>
  <alias from="view" to="academics_document_view"/>
  <action title="View" action_id="view" category="object"
Index: /WAeUP_SRP/trunk/profiles/default/types/StudentStudyCourse.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/types/StudentStudyCourse.xml	(revision 730)
+++ /WAeUP_SRP/trunk/profiles/default/types/StudentStudyCourse.xml	(revision 731)
@@ -41,3 +41,9 @@
   <permission value="Modify portal content"/>
  </action>
+ <action title="Add Level" action_id="new_entry" category="object"
+    condition_expr=""
+    url_expr="string:${object/absolute_url}/content_create?type_name=StudentStudyLevel"
+    visible="True">
+  <permission value="Add portal content"/>
+ </action>
 </object>
Index: /WAeUP_SRP/trunk/profiles/default/types/StudentStudyLevel.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/types/StudentStudyLevel.xml	(revision 730)
+++ /WAeUP_SRP/trunk/profiles/default/types/StudentStudyLevel.xml	(revision 731)
@@ -30,5 +30,5 @@
  <alias from="(Default)" to="student_index"/>
  <alias from="create_do" to="waeup_document_create_do"/>
- <alias from="created" to="level_created"/>
+ <alias from="created" to=""/>
  <alias from="view" to="student_index"/>
  <action title="View" action_id="view" category="object" condition_expr=""
@@ -36,3 +36,9 @@
   <permission value="View"/>
  </action>
+ <action title="Add Course" action_id="new_entry" category="object"
+    condition_expr=""
+    url_expr="string:${object_url}/content_create?type_name=StudentCourseResult"
+    visible="True">
+  <permission value="Add portal content"/>
+ </action>
 </object>
Index: /WAeUP_SRP/trunk/profiles/default/types/StudyLevel.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/types/StudyLevel.xml	(revision 730)
+++ /WAeUP_SRP/trunk/profiles/default/types/StudyLevel.xml	(revision 731)
@@ -30,5 +30,5 @@
  <alias from="(Default)" to="academics_index"/>
  <alias from="create_do" to="waeup_document_create_do"/>
- <alias from="created" to="level_created"/>
+ <alias from="created" to=""/>
  <alias from="view" to="academics_index"/>
  <action title="View" action_id="view" category="object" condition_expr=""
Index: /WAeUP_SRP/trunk/skins/waeup_academics/findCourseById.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_academics/findCourseById.py	(revision 731)
+++ /WAeUP_SRP/trunk/skins/waeup_academics/findCourseById.py	(revision 731)
@@ -0,0 +1,17 @@
+## Script (Python) "findCourseById"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=cid
+##title=
+##
+# $Id: student_edit.py 486 2006-09-06 10:09:39Z joachim $
+''' find the course'''
+res = context.portal_catalog({'meta_type': 'Course',
+                              'id': cid})
+if len(res) < 1:
+    return None
+course = res[0].getObject().getContent()
+return course
Index: /WAeUP_SRP/trunk/skins/waeup_default/waeup_document_create_do.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_default/waeup_document_create_do.py	(revision 730)
+++ /WAeUP_SRP/trunk/skins/waeup_default/waeup_document_create_do.py	(revision 731)
@@ -10,5 +10,5 @@
 from Products.CMFCore.utils import getToolByName
 
-if type_name == "StudyLevel":
+if type_name in ("StudyLevel","StudentStudyLevel"):
     id = datamodel.get('code')
 else:
Index: /WAeUP_SRP/trunk/skins/waeup_student/add_course_result.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/add_course_result.py	(revision 731)
+++ /WAeUP_SRP/trunk/skins/waeup_student/add_course_result.py	(revision 731)
@@ -0,0 +1,16 @@
+## Script (Python) "folder_delete"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: folder_delete.py 586 2006-09-28 22:10:21Z joachim $
+"""
+FIXME: add docstring.
+"""
+
+return context.REQUEST.RESPONSE.redirect("%s/content_create?type_name=StudentCourseResult"
+                                          % (context.absolute_url()))
Index: /WAeUP_SRP/trunk/skins/waeup_student/searchStudents.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/searchStudents.py	(revision 730)
+++ /WAeUP_SRP/trunk/skins/waeup_student/searchStudents.py	(revision 731)
@@ -59,5 +59,7 @@
 with_review = state != "all"
 onlyreview = with_review and not term
-with_level_results = state.startswith("category") and evalAdvancedQuery is not None
+with_level_results = state.startswith("category") or\
+                     state in ('content_addable',) and\
+                     evalAdvancedQuery is not None
 bools = "with_review = %s<br\> onlyreview = %s<br\> with_level_results = %s" % (with_review,onlyreview,with_level_results)
 if not term and not with_review:
@@ -87,5 +89,6 @@
 elif onlyreview and with_level_results:
     query_step = 2
-    query =  Eq('portal_type','StudentStudyLevel') & Eq('review_state',state) 
+    query =  (Eq('portal_type','StudentStudyLevel') | 
+             Eq('portal_type','StudentStudyCourse')) & Eq('review_state',state) 
     res = evalAdvancedQuery(query)
 elif what == "student_id":
@@ -135,5 +138,6 @@
         st = "%s*" % term.strip()
     query = Eq('portal_type',pt) & Eq('SearchableText',"%s*" % term.strip().lower())\
-                | Eq('portal_type','StudentStudyLevel') & Eq('review_state',state) 
+                | ((Eq('portal_type','StudentStudyLevel') | 
+                   Eq('portal_type','StudentStudyCourse')) & Eq('review_state',state))
     try:
         res = evalAdvancedQuery(query)
@@ -149,5 +153,5 @@
 if res:
     for r in res:
-        if r.portal_type in ("StudentApplication","StudentPersonal",):
+        if r.portal_type in ("StudentApplication","StudentPersonal","StudentStudyCourse",):
             student = r.getObject().aq_parent
         elif r.portal_type in ("StudentStudyLevel",):
@@ -167,5 +171,5 @@
         students.append(context.getStudentInfo(item))
     return context.students_manager_view(rendered = rend,
-                             psm = "%d matching Students found" % len(items),
+                             psm = "%d matching Students found QS = %s" % (len(items),query_step),
                              students = students,
                              is_manager = is_manager,
Index: /WAeUP_SRP/trunk/skins/waeup_student/student_course_result_created.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/student_course_result_created.py	(revision 731)
+++ /WAeUP_SRP/trunk/skins/waeup_student/student_course_result_created.py	(revision 731)
@@ -0,0 +1,32 @@
+## Script (Python) "cpsdocument_created"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=object=None
+##title=
+##
+"""
+Do the necessary rendering or redirection after an object has been
+successfully created and filled with the initial values by the user.
+
+In CPS, context is a proxy.
+
+May return a rendered document, or do a redirect.
+"""
+# $Id: level_created.py 614 2006-10-03 13:44:51Z henrik $
+if object is not None:
+    course = object
+else:
+    course = context
+real_course = context.findCourseById(course.getId())
+from_real_course = ('title','credits','passmark')
+d = {}
+for f in from_real_course:
+    d[f] = getattr(real_course,f)
+course.getContent().edit(mapping=d)
+psm = 'CourseResult created'
+action_path = context.getTypeInfo().immediate_view
+context.REQUEST.RESPONSE.redirect('%s/%s?portal_status_message=%s' %
+                                  (context.absolute_url(), action_path, psm))
Index: /WAeUP_SRP/trunk/skins/waeup_student/study_level_view.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/study_level_view.pt	(revision 730)
+++ /WAeUP_SRP/trunk/skins/waeup_student/study_level_view.pt	(revision 731)
@@ -27,5 +27,5 @@
                 tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
               <td align="left" valign="middle" style="width: 5px;" 
-                  tal:condition="python:0 and is_manager">
+                  tal:condition="python:1 and is_manager">
                 <input type="checkbox" name="ids:list" value="" id="" class="noborder"
                        tal:condition="is_manager"
@@ -63,5 +63,5 @@
             <td align="left" valign="top" rowspan="3"></td>
             <td align="left" valign="top">
-              <span tal:condition="python:0 and is_manager">
+              <span tal:condition="python:1 and is_manager">
                 <input type="button" value="button_select_all" class="context"
                        onclick="someJavaScriptFunctionThatWillBeReplaced"
@@ -70,7 +70,7 @@
                        % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
                        />
-                <input type="submit" name="approve_checked:method"
+                <input tal:condition="python:0" type="submit" name="approve_checked:method"
                        class="context" value="Approve" />
-                <input type="submit" name="retract_checked:method"
+                <input tal:condition="python:0" type="submit" name="retract_checked:method"
                        class="context" value="Retract" />
                 <input type="submit" name="folder_delete:method" value="button_delete"
@@ -79,5 +79,5 @@
                        (cpsmcat('description_confirm_delete'), )" 
                        />
-                <input tal:condition="python: context.portal_type not in ('Semester','Certificate')"
+                <input tal:condition="python: 0"
                        type="submit" name="id_rename_form:method"
                        class="context" value="Change Object ID" i18n:attributes="value" 
