Ignore:
Timestamp:
28 Feb 2018, 17:47:23 (7 years ago)
Author:
Henrik Bettermann
Message:

Customize warnCreditsOOR.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/utils.py

    r14942 r14956  
    204204        return None, payment
    205205
     206    def warnCreditsOOR(self, studylevel, course=None):
     207        """Return message if credits are out of range. In the base
     208        package only maximum credits is set.
     209        """
     210        if course and studylevel.total_credits + course.credits > 80:
     211            return _('Maximum credits exceeded.')
     212        elif studylevel.total_credits > 80:
     213            return _('Maximum credits exceeded.')
     214        return
     215
    206216    #: A tuple containing names of file upload viewlets which are not shown
    207217    #: on the `StudentClearanceManageFormPage`. Nothing is being skipped
Note: See TracChangeset for help on using the changeset viewer.