Changeset 14200 for main


Ignore:
Timestamp:
28 Sep 2016, 09:45:55 (8 years ago)
Author:
Henrik Bettermann
Message:

Enable the import of GPA parameters and show imported instead of calculated values.

File:
1 edited

Legend:

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

    r14154 r14200  
    140140        if credits_counted:
    141141            level_gpa = round(credits_weighted/credits_counted, 3)
     142        # Override level_gpa if value has been imported
     143        # (not implemented in base package)
     144        imported_gpa = getattr(self, 'imported_gpa', None)
     145        if imported_gpa:
     146            level_gpa = imported_gpa
    142147        return level_gpa, credits_counted, credits_weighted
    143148
     
    194199            if total_credits_counted:
    195200                cgpa = round(total_credits_weighted / total_credits_counted, 3)
     201            # Override cgpa if value has been imported
     202            # (not implemented in base package)
     203            imported_cgpa = getattr(self, 'imported_cgpa', None)
     204            if imported_cgpa:
     205                cgpa = imported_cgpa
    196206        return (cgpa, total_credits_counted, total_credits_weighted,
    197207               total_credits, credits_passed)
Note: See TracChangeset for help on using the changeset viewer.