Ignore:
Timestamp:
20 Jan 2021, 08:54:13 (4 years ago)
Author:
Henrik Bettermann
Message:

Maximum credit load for final year is 80.

File:
1 edited

Legend:

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

    r16294 r16377  
    6969        package only maximum credits is set.
    7070        """
    71         if course and studylevel.total_credits + course.credits > 60:
     71        max_credits = 60
     72        end_level = getattr(studylevel.__parent__.certificate, 'end_level', None)
     73        if end_level and studylevel.level >= end_level:
     74            max_credits = 80
     75        if course and studylevel.total_credits + course.credits > max_credits:
    7276            return _('Maximum credits exceeded.')
    73         elif studylevel.total_credits > 60:
     77        elif studylevel.total_credits > max_credits:
    7478            return _('Maximum credits exceeded.')
    7579        return
Note: See TracChangeset for help on using the changeset viewer.