Changeset 14391


Ignore:
Timestamp:
12 Jan 2017, 17:29:12 (8 years ago)
Author:
Henrik Bettermann
Message:

Students without results have failed.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students/reports
Files:
2 edited

Legend:

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

    r14382 r14391  
    8282                continue
    8383        if level_obj.gpa_params[1] == 0:
    84             # Error: no credits weighted
    85             table[len(students_utils.gpa_boundaries)].append(line)
    86             continue
    87         gpaclass = students_utils.getDegreeClassNumber(level_obj)
    88         table[gpaclass].append(line)
     84            # No credits weighted
     85            table[0].append(line)
     86        else:
     87            gpaclass = students_utils.getDegreeClassNumber(level_obj)
     88            table[gpaclass].append(line)
    8989    return table
    9090
     
    167167            pdf_data += [
    168168                Paragraph(
    169                     '<strong>Students with no available data for '
    170                     'computation</strong>', STYLE["Normal"])]
     169                    '<strong>Students with erroneous data</strong>', STYLE["Normal"])]
    171170            pdf_data.append(Spacer(1, 10))
    172171            table_data = [('Student Id', 'Matric No.', 'Name')] + self.data[-1]
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_session_results_presentation.py

    r14373 r14391  
    5252        result = get_students('fac1', 'dep1', 2010, 0)
    5353        self.assertEqual(result,
    54             [[], [], [], [], [], [], [(u'K1000000', u'1234', u'Bob Tester')]])
     54            [[(u'K1000000', u'1234', u'Bob Tester')], [], [], [], [], [], []])
    5555
    5656    def test_get_students_without_level_in_session(self):
Note: See TracChangeset for help on using the changeset viewer.