Ignore:
Timestamp:
9 Aug 2024, 19:25:01 (5 months ago)
Author:
Henrik Bettermann
Message:

Final clearance for final year students only.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py

    r17872 r17875  
    833833
    834834    def final_clearance_enabled(self, student):
    835         return True
    836         #if 'Demo' in student.display_fullname:
    837         #    return True
    838         #return False
     835        studycourse = student['studycourse']
     836        certificate = getattr(studycourse,'certificate',None)
     837        current_level = studycourse.current_level
     838        if None in (current_level, certificate):
     839            return False
     840        if student.is_postgrad:
     841            return True
     842        end_level = certificate.end_level
     843        if current_level >= end_level:
     844            return True
     845        return False
    839846
    840847    # Uniben prefix
Note: See TracChangeset for help on using the changeset viewer.