Ignore:
Timestamp:
20 Nov 2012, 09:08:13 (12 years ago)
Author:
Henrik Bettermann
Message:

We need to customize if students are allowed to remove mandatory course tickets. Therefore I added a property attribute removable_by_student.

Allow manager to edit the mandatory attribute.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r9697 r9698  
    106106        value._p_activate()
    107107        value_dict = dict([i for i in value.__dict__.items()])
    108         value_dict['mandatory_bool'] = value.mandatory
     108        value_dict['removable_by_student'] = value.removable_by_student
    109109        value_dict['mandatory'] = translate(str(value.mandatory), 'zope',
    110110            target_language=lang)
     
    13061306    form_fields['passmark'].for_display = True
    13071307    form_fields['credits'].for_display = True
    1308     form_fields['mandatory'].for_display = True
     1308    form_fields['mandatory'].for_display = False
    13091309    form_fields['automatic'].for_display = True
    13101310    form_fields['carry_over'].for_display = True
     
    22272227        for id in child_id:
    22282228            # Students are not allowed to remove core tickets
    2229             if not self.context[id].mandatory:
     2229            if self.context[id].removable_by_student:
    22302230                del self.context[id]
    22312231                deleted.append(id)
Note: See TracChangeset for help on using the changeset viewer.