Changeset 15821 for main


Ignore:
Timestamp:
18 Nov 2019, 13:23:26 (5 years ago)
Author:
Henrik Bettermann
Message:

Add grade statistics (requested by AAUE).

File:
1 edited

Legend:

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

    r15705 r15821  
    10411041                translate(_('<b>${a}</b>',
    10421042                    mapping = {'a':data[1][1]})), style["Normal"]),]
    1043 
    10441043            pdf_data += [Paragraph(
    10451044                translate(_('<b>Total Students: ${a}</b>',
     
    10511050                translate(_('<b>Total Fail: ${a} (${b}%)</b>',
    10521051                mapping = {'a':data[1][5],'b':data[1][6]})), style["Normal"]),]
     1052            grade_stats = []
     1053            for item in data[1][7].items():
     1054                grade_stats.append(('%s=%s' % (item[0], item[1])))
     1055            grade_stats_string = ', '.join(grade_stats)
     1056            pdf_data += [Paragraph(
     1057                translate(_('<b>${a}</b>',
     1058                mapping = {'a':grade_stats_string})), style["Normal"]),]
    10531059        pdf_data.append(Spacer(1, 20))
    10541060        colWidths = [None] * len(data[0][0])
Note: See TracChangeset for help on using the changeset viewer.