Index: WAeUP_SRP/base/skins/waeup_student/getLecturerCourseResults.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/getLecturerCourseResults.py	(revision 3611)
+++ WAeUP_SRP/base/skins/waeup_student/getLecturerCourseResults.py	(revision 3611)
@@ -0,0 +1,59 @@
+## Script (Python) "getLecturerCourseResultsInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=course_id
+##title=
+##
+# $Id: getCoursesInfo.py 3482 2008-05-01 05:54:53Z henrik $
+"""
+return Info about the Courses
+"""
+
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+lec_id = member_id = str(member)
+if mtool.isAnonymousUser():
+    return None
+
+
+request = context.REQUEST
+
+path_info = request.get('PATH_INFO').split('/')
+
+info = {}
+info['lec_id'] = lec_id
+info['course_id'] = course_id
+
+res = context.course_results(code=course_id)
+items = [ brain for brain in res]
+rows = []
+for r in items:
+    row = {}
+    if r['carry_over']:
+        row['carry_over'] =  'CO'
+    else:
+        row['carry_over'] =  ''
+    row['credits'] =  r['credits']
+    row['session_id'] =  r['session_id']
+    row['level_id'] =  level_id = r['level_id']
+    row['score'] =  r['score']
+    row['student_id'] = student_id = r['student_id']
+    
+    student_record = context.students_catalog.getRecordByKey(student_id)
+    row['student_record'] = context.getFormattedStudentEntry(student_record)
+    row['url'] = "%s/campus/students/%s/study_course/%s" % (context.portal_url(),student_id,level_id)
+    
+    row['editable'] = not r['score'] and  row['student_record']['review_state'] == 'courses_validated'
+    row['sort_dummy'] = row['student_record']['review_state']
+    rows.append(row)
+    
+rows.sort(cmp=lambda x,y: cmp("%(session_id)s%(sort_dummy)s" % x,
+                              "%(session_id)s%(sort_dummy)s" % y))    
+info['students'] = rows
+
+return context.lecturer_students_list(info = info,)
+
+#return info
Index: WAeUP_SRP/base/skins/waeup_student/getLecturerCoursesInfo.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/getLecturerCoursesInfo.py	(revision 3611)
+++ WAeUP_SRP/base/skins/waeup_student/getLecturerCoursesInfo.py	(revision 3611)
@@ -0,0 +1,58 @@
+## Script (Python) "getLecturerCoursesInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: getCoursesInfo.py 3482 2008-05-01 05:54:53Z henrik $
+"""
+return Info about the Courses
+"""
+
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+lec_id = member_id = str(member)
+if mtool.isAnonymousUser():
+    return None
+
+
+def cmpsemester(a,b):
+    if a.semester == b.semester:
+        return 0
+    if a.semester > b.semester:
+        return 1
+    return -1
+
+request = context.REQUEST
+
+path_info = request.get('PATH_INFO').split('/')
+
+
+info = {}
+info['lec_id'] = lec_id
+
+res = context.courses_catalog(lecturer=lec_id)
+items = [ brain for brain in res]
+items.sort(cmpsemester)
+rows = []
+for r in items:
+    row = {}
+    code = getattr(r,'code',None)
+    if code is None:
+        continue
+    #ro = getattr(context,code)
+    row['id'] = code
+    row['title'] = r['title']
+    row['semester'] = r['semester']
+    row['course_url'] = "%s/campus/academics/%s/%s/courses/%s" % (context.portal_url(),r['faculty'],r['department'],code)
+    row['list_url'] = "%s/getLecturerCourseResults?course_id=%s" % (context.portal_url(),code)
+    #row['review_state'] = wf.getInfoFor(ro,'review_state','None')
+    #row['is_editable'] = mtool.checkPermission('Modify portal content', ro)
+    rows.append(row)
+rows.sort(cmp=lambda x,y: cmp("%(semester)s%(id)s" % x,
+                              "%(semester)s%(id)s" % y))
+info['courses'] = rows
+return info
Index: WAeUP_SRP/base/skins/waeup_student/lecturer_course_edit.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/lecturer_course_edit.py	(revision 3611)
+++ WAeUP_SRP/base/skins/waeup_student/lecturer_course_edit.py	(revision 3611)
@@ -0,0 +1,84 @@
+## Script (Python) "lecturer_course_edit"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST, cpsdocument_edit_button=None, cpsdocument_edit_and_view_button=None, action=None
+##title=
+# $Id: course_edit.py 1071 2006-12-16 15:53:13Z joachim $
+"""
+This method is for demonstration purposes only. 
+There is noi security to deter lecturers from editing courses they are not allowed to edit.
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+from urllib import urlencode
+from Products.CPSDocument.utils import getFormUidUrlArg
+from Products.AdvancedQuery import Eq, Between, Le,In
+import DateTime
+current = DateTime.DateTime()
+import logging
+logger = logging.getLogger('Skins.course_edit')
+wf = context.portal_workflow
+request = REQUEST
+edit = "edit" in request.form.keys()
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+groups = member.getGroups()
+
+member_id = str(member)
+requested_id = context.getStudentId()
+if not 'Lecturers' in groups:
+    logger.info('%s tried to access course result of %s' % (member_id,requested_id))
+    return REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+student_id = requested_id
+
+level_id = context.getId()
+course_id = traverse_subpath[0]
+query = Eq('student_id',student_id) &\
+        Eq('level_id', level_id) &\
+        Eq('code', course_id)
+
+course_results = context.course_results.evalAdvancedQuery(query)
+mode = 'edit'
+object = {}
+course = course_results[0]
+for field in context.course_results.schema():
+    object[field] = getattr(course,field)
+lt = context.portal_layouts
+res,psm, ds = lt.renderLayout(schema_id = 'student_course_result',
+                               layout_id = 'student_course_result',
+                               layout_mode = mode,
+                               context=context,
+                               mapping=edit and REQUEST,
+                               ob=object,
+                               commit = False)
+
+while True:
+    if psm == 'invalid':
+        psm = "Please correct your input"
+        break
+    elif psm == '':
+        break
+    if edit:
+        data = {}
+        dm = ds.getDataModel()
+        for field in context.course_results.schema():
+            if dm.has_key("%s" % field):
+                data[field] = dm.get(field)
+        data['key'] = object['key']
+        context.course_results.modifyRecord(**data)
+        logger.info('%s edited course result data %s' % (student_id, course_id))
+        psm = 'psm_content_changed'
+        break
+
+return context.course_edit_form(rendered = res,
+                                psm = psm,
+                                mode = mode,
+                                ds = ds,
+                               )
Index: WAeUP_SRP/base/skins/waeup_student/lecturer_students_list.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/lecturer_students_list.pt	(revision 3611)
+++ WAeUP_SRP/base/skins/waeup_student/lecturer_students_list.pt	(revision 3611)
@@ -0,0 +1,42 @@
+<metal:body use-macro="here/main_template/macros/master">
+  <metal:main fill-slot="main"
+              tal:define="info options/info;
+                          students info/students;">
+      <h3>Registered Students of Course <span tal:replace="info/course_id"/></h3><br />
+      <span tal:condition="students">
+        <span tal:define="items students">
+          <table class="contentListing" width="100%">
+
+             <span tal:repeat="student students">
+                <tr tal:condition="student" 
+                    tal:attributes="class python:test(repeat['student'].even(), 'even ajaxtd', 'odd ajaxtd')">
+                  <td><a href="id" tal:attributes="href string:${context/portal_url}/campus/students/${student/student_id}"
+                         tal:content="student/student_id"></a></td>    
+                  <td>
+                    <span tal:replace="student/student_record/name" />
+                  </td>                            
+                  <td><span tal:replace="student/student_record/matric_no" /></td>   
+                  <td><span tal:replace="student/student_record/session" /></td>
+                  <td><span tal:replace="student/student_record/level" /></td>
+                  <td><span tal:replace="student/student_record/review_state" /></td>
+                  <td><span tal:replace="student/session_id" /></td>
+                  <td><span tal:replace="student/level_id" /></td>
+                  <td><span tal:replace="student/carry_over" /></td>
+                  <td><span tal:replace="student/score" /></td>
+                  
+                  <td tal:condition="student/editable">
+                    <a href="edit" tal:attributes="href string:${student/url}/lecturer_course_edit/${info/course_id}"
+                    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>                   
+                  
+                  
+                </tr>
+            </span>
+          </table>
+        </span>
+      </span>
+  </metal:main>
+</metal:body>
