Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py	(revision 10633)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py	(revision 10634)
@@ -116,5 +116,5 @@
         # The code has explicitely to be set, otherwise we don't
         # find created students in their department
-        self.app['faculties']['fac1']['dep1'] = Department(code='dep1')
+        self.app['faculties']['fac1']['dep1'] = Department(code=u'dep1')
         self.department = self.app['faculties']['fac1']['dep1']
         self.app['faculties']['fac1']['dep1'].certificates.addCertificate(
Index: /main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py	(revision 10633)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py	(revision 10634)
@@ -71,5 +71,5 @@
         self.certificate.school_fee_2 = 20000.0
         self.app['faculties']['fac1'] = Faculty(code='fac1')
-        self.app['faculties']['fac1']['dep1'] = Department(code='dep1')
+        self.app['faculties']['fac1']['dep1'] = Department(code=u'dep1')
         self.app['faculties']['fac1']['dep1'].certificates.addCertificate(
             self.certificate)
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 10633)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 10634)
@@ -3071,4 +3071,8 @@
         self.current_academic_session = grok.getSite()[
             'configuration'].current_academic_session
+        if self.context.__parent__.__parent__.score_editing_disabled:
+            self.flash(_('Score editing disabled.'))
+            self.redirect(self.url(self.context))
+            return
         if not self.current_academic_session:
             self.flash(_('Current academic session not set.'))
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_student_statistics.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_student_statistics.py	(revision 10633)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_student_statistics.py	(revision 10634)
@@ -49,5 +49,5 @@
     def test_get_student_stats_session_multiple(self):
         # we can get a table with several students
-        self.create_cert('fac2', 'dept2', 'CERT2')
+        self.create_cert(u'fac2', u'dept2', u'CERT2')
         result1 = get_student_stats(2010, 'Undergraduate Full-Time')
         result2 = get_student_stats(2009, 'Undergraduate Full-Time')
@@ -69,5 +69,5 @@
 
     def test_create_pdf(self):
-        self.create_cert('FAC2', 'dept2', 'CERT2')
+        self.create_cert(u'FAC2', u'dept2', u'CERT2')
         report = StudentStatisticsReport(2010, 'Undergraduate Full-Time')
         result = report.create_pdf()
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 10633)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 10634)
@@ -1683,14 +1683,44 @@
             self.student['studycourse']['100']['COURSE1'].course,
             self.course)
-        # Lecturer can neither access ths student ...
+        # Lecturer can neither access the student ...
         self.assertRaises(
             Unauthorized, self.browser.open, self.student_path)
-        # ... nor the respective course ticket since a
+        # ... nor the respective course ticket since
         # editing course tickets by lecturers is not feasible.
-        # Course results must be imported.
         self.assertTrue('COURSE1' in self.student['studycourse']['100'].keys())
         course_ticket_path = self.student_path + '/studycourse/100/COURSE1'
         self.assertRaises(
             Unauthorized, self.browser.open, course_ticket_path)
+        # Course results can be batch edited via the edit_courses view
+        self.app['faculties']['fac1']['dep1'].score_editing_disabled = True
+        self.browser.open("http://localhost/app/faculties/fac1/dep1/courses/COURSE1")
+        self.browser.getLink("Update scores").click()
+        self.assertTrue('Score editing disabled' in self.browser.contents)
+        self.app['faculties']['fac1']['dep1'].score_editing_disabled = False
+        self.browser.getLink("Update scores").click()
+        self.assertTrue('Current academic session not set' in self.browser.contents)
+        self.app['configuration'].current_academic_session = 2004
+        self.browser.getLink("Update scores").click()
+        self.assertFalse(
+            '<input type="text" name="scores" class="span1" />'
+            in self.browser.contents)
+        IWorkflowState(self.student).setState('courses validated')
+        # Student must be in state 'courses validated'
+        self.browser.open(
+            "http://localhost/app/faculties/fac1/dep1/courses/COURSE1/edit_scores")
+        self.assertTrue(
+            '<input type="text" name="scores" class="span1" />'
+            in self.browser.contents)
+        self.browser.getControl(name="scores", index=0).value = '55'
+        self.browser.getControl("Update scores").click()
+        # New score has been set
+        self.assertEqual(
+            self.student['studycourse']['100']['COURSE1'].score, 55)
+        # Score editing has been logged
+        logfile = os.path.join(
+            self.app['datacenter'].storage, 'logs', 'students.log')
+        logcontent = open(logfile).read()
+        self.assertTrue('mrslecturer - students.browser.EditScoresPage - '
+                        'K1000000 100/COURSE1 score updated (55)' in logcontent)
 
     def test_change_current_mode(self):
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_move.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_move.py	(revision 10633)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_move.py	(revision 10634)
@@ -31,5 +31,5 @@
             self.app['faculties']['fac1']['dep1'].certificates['CERT1'],
             self.certificate)
-        self.app['faculties']['fac1']['dep2'] = Department(code='dep2')
+        self.app['faculties']['fac1']['dep2'] = Department(code=u'dep2')
         self.certificate.moveCertificate('fac1', 'dep2')
         self.assertEqual(
Index: /main/waeup.kofa/trunk/src/waeup/kofa/university/department.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/university/department.py	(revision 10633)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/university/department.py	(revision 10634)
@@ -28,4 +28,5 @@
 from waeup.kofa.utils.batching import VirtualExportJobContainer
 from waeup.kofa.interfaces import IKofaUtils
+from waeup.kofa.utils.helpers import attrs_to_fields
 from waeup.kofa.university.interfaces import IDepartment, IDepartmentAdd
 
@@ -89,4 +90,10 @@
         return longtitle(self)
 
+# Set all attributes of Department required in IDepartment as field
+# properties. Doing this, we do not have to set initial attributes
+# ourselves and as a bonus we get free validation when an attribute is
+# set.
+Department = attrs_to_fields(Department)
+
 class DepartmentFactory(grok.GlobalUtility):
     """A factory for department containers.
Index: /main/waeup.kofa/trunk/src/waeup/kofa/university/interfaces.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/university/interfaces.py	(revision 10633)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/university/interfaces.py	(revision 10634)
@@ -103,4 +103,12 @@
         )
 
+    score_editing_disabled = schema.Bool(
+        title = _(u'Score editing disabled'),
+        description = _(
+            u'Lectures cannnot edit scores if ticked.'),
+        required = False,
+        default = False,
+        )
+
     courses = Attribute("A container for courses.")
     certificates = Attribute("A container for certificates.")
