Ignore:
Timestamp:
5 Jan 2017, 08:36:18 (8 years ago)
Author:
Henrik Bettermann
Message:

Count and display the number of courses registered but not taken.

File:
1 edited

Legend:

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

    r14361 r14368  
    160160    def passed_params(self):
    161161        """Determine the number and credits of passed and failed courses.
     162        Count the number of courses registered but not taken.
    162163        This method is used for level reports.
    163164        """
     
    166167        credits_failed = 0
    167168        credits_passed = 0
     169        no_courses_not_taken = 0
    168170        for ticket in self.values():
    169171            if ticket.total_score is not None:
     
    178180                    passed += 1
    179181                    credits_passed += ticket.credits
    180         return passed, failed, credits_passed, credits_failed, courses_failed
     182            else:
     183                no_courses_not_taken += 1
     184        return (passed, failed, credits_passed,
     185                credits_failed, courses_failed,
     186                no_courses_not_taken)
    181187
    182188    @property
Note: See TracChangeset for help on using the changeset viewer.