Ignore:
Timestamp:
2 Nov 2021, 13:03:05 (3 years ago)
Author:
Henrik Bettermann
Message:

Filter out students with extension levels higher than selected level

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/reports/level_report.py

    r16673 r16692  
    7575
    7676    def _excluded(self, level_obj):
    77         """
    78         """
    79         final_level = max(level_obj.student['studycourse'].keys())
    80         # Filter out all students with extension levels (only if end_level has been selected)
    81         if level_obj.level == level_obj.student['studycourse'].certificate.end_level:
    82             if int(final_level) > level_obj.student['studycourse'].certificate.end_level:
    83                 return True
    84         final_level_obj = level_obj.student['studycourse'][final_level]
    85         if final_level_obj.remark not in (
     77        # Do not list student if selecetd level is not final or an extension
     78        if level_obj.level < level_obj.student['studycourse'].certificate.end_level:
     79            return True
     80        # Filter out students with extension levels higher than selected level
     81        final_level = int(max(level_obj.student['studycourse'].keys()))
     82        if final_level > level_obj.level:
     83            return True
     84        if level_obj.remark not in (
    8685            'Pass', '3s_rd_s', '2s_2_s', '2s_1_s', '1s_st_s',
    8786            'Merit', 'Credit', 'Distinction'):
Note: See TracChangeset for help on using the changeset viewer.