Ignore:
Timestamp:
14 May 2019, 10:02:40 (6 years ago)
Author:
Henrik Bettermann
Message:

Round percentages properly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py

    r15388 r15408  
    629629    omit_fields = ('password', 'suspended', 'suspended_comment',
    630630        'phone', 'adm_code', 'sex', 'email', 'date_of_birth',
    631         'department', 'current_mode', 'current_level', 'flash_notice')
     631        'department', 'current_mode', 'current_level', 'flash_notice',
     632        'transcript_remark')
    632633
    633634    @property
     
    12271228        failed_perc = 0
    12281229        if total:
    1229             passed_perc = 100 * passed / total
    1230             failed_perc = 100 * failed / total
     1230            passed_perc = round(100.0 * passed / total)
     1231            failed_perc = round(100.0 * failed / total)
    12311232        dep = self.context.__parent__.__parent__.longtitle
    12321233        fac = self.context.__parent__.__parent__.__parent__.longtitle
Note: See TracChangeset for help on using the changeset viewer.