Ignore:
Timestamp:
10 Oct 2019, 14:24:16 (5 years ago)
Author:
Henrik Bettermann
Message:

Customize warnCreditsOOR

File:
1 edited

Legend:

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

    r15658 r15660  
    4040    #: passport pictures is allowed.
    4141    PORTRAIT_CHANGE_STATES = (ADMITTED, CLEARANCE,)
     42
     43    def warnCreditsOOR(self, studylevel, course=None):
     44        """Return message if credits are out of range. In the base
     45        package only maximum credits is set.
     46        """
     47        if course and studylevel.total_credits + course.credits > 120:
     48            return _('Maximum credits exceeded.')
     49        elif studylevel.total_credits > 120:
     50            return _('Maximum credits exceeded.')
     51        return
    4252
    4353    def setPaymentDetails(self, category, student,
Note: See TracChangeset for help on using the changeset viewer.