Ignore:
Timestamp:
2 Apr 2019, 07:06:56 (6 years ago)
Author:
Henrik Bettermann
Message:

Customize warnCreditsOOR.

File:
1 edited

Legend:

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

    r15316 r15381  
    6262
    6363    """
     64
     65    def warnCreditsOOR(self, studylevel, course=None):
     66        """Return message if credits are out of range. In the base
     67        package only maximum credits is set.
     68        """
     69        if studylevel.student.current_mode == 'nce_ft':
     70            limit = 56
     71        elif studylevel.student.current_mode == 'ug_ft':
     72            limit = 48
     73        else:
     74            limit = 50
     75        if course and studylevel.total_credits + course.credits > limit:
     76            return _('Maximum credits exceeded.')
     77        elif studylevel.total_credits > limit:
     78            return _('Maximum credits exceeded.')
     79        return
    6480
    6581    def _isPaymentDisabled(self, p_session, category, student):
Note: See TracChangeset for help on using the changeset viewer.