Index: /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 16438)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 16439)
@@ -23,5 +23,7 @@
 from zope.formlib.textwidgets import BytesDisplayWidget
 from zope.component import getUtility
+from zope.event import notify
 from hurry.workflow.interfaces import IWorkflowInfo
+from waeup.kofa.utils.helpers import get_current_principal
 from waeup.kofa.interfaces import (
     REQUESTED, IExtFileStore, IKofaUtils, IObjectHistory)
@@ -37,5 +39,6 @@
     ExportPDFTranscriptSlip,
     PaymentsManageFormPage,
-    StartClearancePage)
+    StartClearancePage,
+    StudyCourseManageFormPage)
 from waeup.kofa.students.workflow import (CREATED, ADMITTED, PAID,
     CLEARANCE, REQUESTED, RETURNING, CLEARED, REGISTERED, VALIDATED,
@@ -499,5 +502,4 @@
             self.flash(_('Current level not available for certificate.'))
             return
-        #notify(grok.ObjectModifiedEvent(self.context.__parent__))
         return
 
@@ -516,4 +518,31 @@
     def view_scores_allowed(self):
         return checkPermission('waeup.manageStudent', self.context)
+
+class CustomStudyCourseManageFormPage(StudyCourseManageFormPage):
+    """ Page to edit the student study course data
+    """
+
+    @action(_('Save'), style='primary')
+    def save(self, **data):
+        user = get_current_principal()
+        if user.id not in ('admin', 'med', 'zope.mgr', 'zope.manager',
+                           'benamechi', 'tbazuaye'):
+            if data['previous_verdict'] == 'R' and self.context.previous_verdict != 'R':
+                self.flash(_('You are not entitled to assign this verdict.'),
+                           type="warning")
+                return
+            if data['current_verdict'] == 'R' and self.context.current_verdict != 'R':
+                self.flash(_('You are not entitled to assign this verdict.'),
+                           type="warning")
+                return
+        try:
+            msave(self, **data)
+        except ConstraintNotSatisfied:
+            # The selected level might not exist in certificate
+            self.flash(_('Current level not available for certificate.'),
+                       type="warning")
+            return
+        #notify(grok.ObjectModifiedEvent(self.context.__parent__))
+        return
 
 class CustomExportPDFCourseRegistrationSlip(
