Changeset 14917


Ignore:
Timestamp:
30 Nov 2017, 11:19:10 (7 years ago)
Author:
Henrik Bettermann
Message:

Also the length of GPABoundaries() may depend on the parameters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/session_results_presentation.py

    r14915 r14917  
    107107        students_utils = getUtility(IStudentsUtils)
    108108        table = list()
    109         for i in range(len(students_utils.GPABoundaries())+1):
     109        for i in range(len(students_utils.GPABoundaries(
     110                faccode=faccode, depcode=depcode,
     111                certcode=certcode))+1):
    110112            # The last list is reserved for students with more than one
    111113            # level in the same session.
     
    137139                if itemcount > 1:
    138140                    # Error: more than one level registered in this session
    139                     table[len(students_utils.GPABoundaries())].append(line)
     141                    table[len(students_utils.GPABoundaries(
     142                        faccode=faccode, depcode=depcode,
     143                        certcode=certcode))].append(line)
    140144                    continue
    141145            gpaclass = students_utils.getDegreeClassNumber(level_obj)
    142146            table[gpaclass].append(line)
    143             for i in range(len(students_utils.GPABoundaries())+1):
     147            for i in range(len(students_utils.GPABoundaries(
     148                    faccode=faccode, depcode=depcode,
     149                    certcode=certcode))+1):
    144150                if len(table[i]):
    145151                    table[i] = sorted([value for value in table[i]],
     
    211217        students_utils = getUtility(IStudentsUtils)
    212218        # Print classes in reverse order
    213         for gpa_class in range(len(students_utils.GPABoundaries())-1,-1,-1):
     219        for gpa_class in range(len(students_utils.GPABoundaries(
     220                faccode=self.faccode, depcode=self.depcode,
     221                certcode=self.certcode))-1,-1,-1):
    214222            pdf_data.append(Spacer(1, 20))
    215223            gpa_class_name = students_utils.GPABoundaries(
     
    240248        total_count = 0
    241249        table_data = list()
    242         for gpa_class in range(len(students_utils.GPABoundaries())-1,-1,-1):
     250        for gpa_class in range(len(students_utils.GPABoundaries(
     251                faccode=self.faccode, depcode=self.depcode,
     252                certcode=self.certcode))-1,-1,-1):
    243253            gpa_class_name = students_utils.GPABoundaries(
    244254                faccode=self.faccode, depcode=self.depcode,
Note: See TracChangeset for help on using the changeset viewer.