Ignore:
Timestamp:
27 Jan 2017, 06:35:14 (8 years ago)
Author:
Henrik Bettermann
Message:

Put summary data into table.

File:
1 edited

Legend:

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

    r14440 r14467  
    111111    #('INNERGRID', (0,1), (-1,-1), 0.25, colors.black),
    112112    #('BOX', (0,1), (-1,-1), 1, colors.black),
     113    ]
     114
     115SUMMARY_STYLE = [
     116    ('ALIGN', (3,1), (-1,-1), 'RIGHT'),
    113117    ]
    114118
     
    202206        pdf_data.append(Spacer(1, 10))
    203207        total_count = 0
     208        table_data = list()
    204209        for gpa_class in range(len(students_utils.gpa_boundaries)-1,-1,-1):
    205210            gpa_class_name = students_utils.gpa_boundaries[gpa_class][1]
    206211            gpa_count = len(self.data[gpa_class])
    207212            total_count += gpa_count
    208             pdf_data += [Paragraph('%s: %s'
    209                          % (gpa_class_name, gpa_count), STYLE["Normal"])]
     213            table_data += [(gpa_class_name + ':', gpa_count)]
     214            #pdf_data += [Paragraph('%s: %s'
     215            #             % (gpa_class_name, gpa_count), STYLE["Normal"])]
    210216            pass
    211         pdf_data += [Paragraph('Total: %s' % (total_count), STYLE["Normal"])]
     217        #pdf_data += [Paragraph('Total: %s' % (total_count), STYLE["Normal"])]
     218        table_data += [('Total:', total_count)]
     219        pdf_data += [Table(table_data, style=SUMMARY_STYLE, hAlign='LEFT')]
    212220
    213221        doc_title = translate(_('Presentation of Session Results'))
Note: See TracChangeset for help on using the changeset viewer.