Index: WAeUP_SRP/trunk/skins/waeup_default/waeup_edit.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_default/waeup_edit.py	(revision 1019)
+++ WAeUP_SRP/trunk/skins/waeup_default/waeup_edit.py	(revision 1025)
@@ -23,4 +23,12 @@
 # (We don't call getEditableContent here, validate does it when needed.)
 doc = context.getContent()
+if context.portal_type == "StudentStudyCourse":
+    if len(context.objectIds()) > 0:
+        psm = 'Edit of StudyCourse is only possible if there are no levels'
+        args = getFormUidUrlArg(REQUEST)
+        args['portal_status_message'] = psm
+        url = context.absolute_url() + '?' + urlencode(args)
+        REQUEST.RESPONSE.redirect(url)
+        
 is_valid, ds = doc.validate(request=REQUEST, proxy=context, cluster=cluster,
                             use_session=True)
@@ -36,4 +44,17 @@
     comments = REQUEST.get('comments')
     context.cpsdocument_notify_modification(comments=comments)
+    if context.portal_type == "StudentStudyCourse":
+        course = ds.get('study_course')
+        student_id = context.getStudentId()
+        res = context.portal_catalog(portal_type='Certificate',id = course)
+        if res:
+            c_brain = res[0]
+            c_path = c_brain.getPath().split('/')
+            student_id = context.getStudentId()
+            context.students_catalog.modifyRecord(id = student_id,
+                                                  course = course,
+                                                  faculty = c_path[-4],
+                                                  department = c_path[-3],
+                                                  )
     if cpsdocument_edit_and_view_button is not None:
         action = ''
