Index: /main/waeup.kofa/trunk/src/waeup/kofa/university/department.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/university/department.py	(revision 10634)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/university/department.py	(revision 10635)
@@ -23,9 +23,10 @@
 from zope.interface import implementedBy
 from zope.component import getUtility
+from zope.schema import getFields
 from waeup.kofa.university.faculty import longtitle
 from waeup.kofa.university.coursescontainer import CoursesContainer
 from waeup.kofa.university.certificatescontainer import CertificatesContainer
 from waeup.kofa.utils.batching import VirtualExportJobContainer
-from waeup.kofa.interfaces import IKofaUtils
+from waeup.kofa.interfaces import IKofaUtils, IKofaPluggable
 from waeup.kofa.utils.helpers import attrs_to_fields
 from waeup.kofa.university.interfaces import IDepartment, IDepartmentAdd
@@ -71,4 +72,5 @@
         self.certificates.__parent__ = self
         self.certificates.__name__ = 'certificates'
+        self.score_editing_disabled = False
 
     def traverse(self, name):
@@ -90,10 +92,4 @@
         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.
@@ -111,2 +107,36 @@
         """
         return implementedBy(Department)
+
+class DepartmentsPlugin(grok.GlobalUtility):
+    """A plugin that updates courses.
+    """
+
+    grok.implements(IKofaPluggable)
+    grok.name('departments')
+
+    deprecated_attributes = []
+
+    def setup(self, site, name, logger):
+        return
+
+    def update(self, site, name, logger):
+        items = getFields(IDepartment).items()
+        for faculty in site['faculties'].values():
+            for department in faculty.values():
+                # Add new attributes
+                for i in items:
+                    if not hasattr(department,i[0]):
+                        setattr(department,i[0],i[1].missing_value)
+                        logger.info(
+                            'DepartmentsPlugin: %s attribute %s added.' % (
+                            department.code,i[0]))
+                # Remove deprecated attributes
+                for i in self.deprecated_attributes:
+                    try:
+                        delattr(department,i)
+                        logger.info(
+                            'DepartmentsPlugin: %s attribute %s deleted.' % (
+                            department.code,i))
+                    except AttributeError:
+                        pass
+        return
