Ignore:
Timestamp:
5 Feb 2017, 19:54:02 (8 years ago)
Author:
Henrik Bettermann
Message:

Add serial number column to Session Results Presentations.

File:
1 edited

Legend:

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

    r14505 r14507  
    106106    ('FONT', (0,0), (-1,-1), 'Helvetica', 8),
    107107    ('FONT', (0,0), (-1,0), 'Helvetica-Bold', 8), # 1st row
    108     ('ALIGN', (3,1), (-1,-1), 'RIGHT'),
     108    #('ALIGN', (3,1), (-1,-1), 'RIGHT'),
    109109    #('ALIGN', (1,0), (1,-1), 'LEFT'),
    110110    #('ALIGN', (2,0), (2,-1), 'LEFT'),
     
    198198            pdf_data += [Paragraph('<strong>%s</strong>' % gpa_class_name,
    199199                         STYLE["Normal"])]
     200            pdf_data.append(Spacer(1, 6))
    200201            if len(self.data[gpa_class]):
    201                 gpa_class_data = self.data[gpa_class]
     202                sns = range(len(self.data[gpa_class]))
     203                gpa_class_data = [(i+1,) + self.data[gpa_class][i] for i in sns]
    202204            else:
    203                 gpa_class_data = [('', '- Nil -', '')]
    204             table_data = [('Student Id', 'Matric No.',
     205                gpa_class_data = [('', '', '- Nil -', '')]
     206            table_data = [('S/N', 'Student Id', 'Matric No.',
    205207                translate(_('Student Name')))] + gpa_class_data
    206208            pdf_data += [Table(table_data, style=TABLE_STYLE)]    #, colWidths=col_widths)]
Note: See TracChangeset for help on using the changeset viewer.