Ignore:
Timestamp:
21 Sep 2013, 08:27:47 (11 years ago)
Author:
Henrik Bettermann
Message:

Disable score editing on department manage page.

Add tests.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/university
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/university/department.py

    r10561 r10634  
    2828from waeup.kofa.utils.batching import VirtualExportJobContainer
    2929from waeup.kofa.interfaces import IKofaUtils
     30from waeup.kofa.utils.helpers import attrs_to_fields
    3031from waeup.kofa.university.interfaces import IDepartment, IDepartmentAdd
    3132
     
    8990        return longtitle(self)
    9091
     92# Set all attributes of Department required in IDepartment as field
     93# properties. Doing this, we do not have to set initial attributes
     94# ourselves and as a bonus we get free validation when an attribute is
     95# set.
     96Department = attrs_to_fields(Department)
     97
    9198class DepartmentFactory(grok.GlobalUtility):
    9299    """A factory for department containers.
  • main/waeup.kofa/trunk/src/waeup/kofa/university/interfaces.py

    r10185 r10634  
    103103        )
    104104
     105    score_editing_disabled = schema.Bool(
     106        title = _(u'Score editing disabled'),
     107        description = _(
     108            u'Lectures cannnot edit scores if ticked.'),
     109        required = False,
     110        default = False,
     111        )
     112
    105113    courses = Attribute("A container for courses.")
    106114    certificates = Attribute("A container for certificates.")
Note: See TracChangeset for help on using the changeset viewer.