Ignore:
Timestamp:
1 Oct 2019, 10:22:33 (5 years ago)
Author:
Henrik Bettermann
Message:

Add score_editing_disabled switch at course level. Plugins must be updated!

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
3 edited

Legend:

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

    r15626 r15629  
    35803580        self.current_academic_session = grok.getSite()[
    35813581            'configuration'].current_academic_session
    3582         if self.context.__parent__.__parent__.score_editing_disabled:
     3582        if self.context.__parent__.__parent__.score_editing_disabled \
     3583            or self.context.score_editing_disabled:
    35833584            self.flash(_('Score editing disabled.'), type="warning")
    35843585            self.redirect(self.url(self.context))
     
    36473648        self.current_academic_session = grok.getSite()[
    36483649            'configuration'].current_academic_session
    3649         if self.context.__parent__.__parent__.score_editing_disabled:
     3650        if self.context.__parent__.__parent__.score_editing_disabled \
     3651            or self.context.score_editing_disabled:
    36503652            self.flash(_('Score editing disabled.'), type="warning")
    36513653            self.redirect(self.url(self.context))
  • main/waeup.kofa/trunk/src/waeup/kofa/university/course.py

    r15422 r15629  
    5959        self.results_validation_date = None
    6060        self.results_validation_session = None
     61        self.score_editing_disabled = False
    6162
    6263    def traverse(self, name):
  • main/waeup.kofa/trunk/src/waeup/kofa/university/interfaces.py

    r15422 r15629  
    209209        )
    210210
     211    score_editing_disabled = schema.Bool(
     212        title = _(u'Score editing disabled'),
     213        description = _(
     214            u'Lectures can not edit scores if ticked.'),
     215        required = False,
     216        default = False,
     217        )
     218
    211219class ICertificate(IKofaObject):
    212220    """Representation of a certificate.
Note: See TracChangeset for help on using the changeset viewer.