Changeset 10581


Ignore:
Timestamp:
3 Sep 2013, 06:48:26 (11 years ago)
Author:
Henrik Bettermann
Message:

If no credits have been weighted, do not categorize as '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

    r10579 r10581  
    7676                continue
    7777            if itemcount > 1:
    78                 # More than one session registered in this session
     78                # Error: more than one session registered in this session
    7979                table[len(students_utils.gpa_boundaries)].append(line)
    8080                continue
     81        if level_obj.gpa_params[1] == 0:
     82            # Error: no credits weighted
     83            table[len(students_utils.gpa_boundaries)].append(line)
     84            continue
     85        # Session GPA can be determined
    8186        table[students_utils.getClassFromCGPA(level_obj.gpa)[0]].append(line)
    8287    return table
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_session_results_presentation.py

    r10580 r10581  
    4747            [[], [], [], [], [], [], [(u'K1000000', u'1234', u'Bob Tester')]])
    4848        return
     49
     50    def test_get_students_without_scores(self):
     51        self.student['studycourse']['100']['Course1'].score = None
     52        result = get_students('fac1', 'dep1', 2010)
     53        self.assertEqual(result,
     54            [[], [], [], [], [], [], [(u'K1000000', u'1234', u'Bob Tester')]])
    4955
    5056    def test_get_students_without_level_in_session(self):
Note: See TracChangeset for help on using the changeset viewer.