Changeset 13859


Ignore:
Timestamp:
11 May 2016, 07:26:30 (8 years ago)
Author:
Henrik Bettermann
Message:

Change table lines.

Catch error if current level is not in range.

File:
1 edited

Legend:

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

    r13858 r13859  
    8484        row = paths.index(row_name)
    8585        normalized_level = 100*(stud.current_level/100)
    86         if stud.sex == 'f':
    87             col = 2 * levels.index(normalized_level) + 1
    88             total_col = -1
    89         elif stud.sex == 'm':
    90             col = 2 * levels.index(normalized_level)
    91             total_col = -2
     86        if stud.current_level and stud.current_level in range(100, 500, 10):
     87            if stud.sex == 'f':
     88                col = 2 * levels.index(normalized_level) + 1
     89                total_col = -1
     90            elif stud.sex == 'm':
     91                col = 2 * levels.index(normalized_level)
     92                total_col = -2
     93            else:
     94                continue
    9295        else:
    9396            continue
     
    131134    ('FONT', (0,0), (-1,0), 'Helvetica-Bold', 8),
    132135    ('FONT', (0,-1), (-1,-1), 'Helvetica-Bold', 8),
    133     ('FONT', (-1,0), (-1,-1), 'Helvetica-Bold', 8),
     136    #('FONT', (-1,0), (-1,-1), 'Helvetica-Bold', 8),
    134137    ('ALIGN', (1,1), (-1,-1), 'RIGHT'),
    135138    ('INNERGRID', (0,0), (-1,-1), 0.25, colors.black),
    136139    ('LINEBELOW', (0,-1), (-1,-1), 0.25, colors.black),
    137     ('LINEAFTER', (-1,0), (-1,-1), 0.25, colors.black),
    138 
     140
     141    ('LINEAFTER', (-1,0), (-1,-1), 1.0, colors.black),
    139142    ('LINEBEFORE', (-2,0), (-2,-1), 1.0, colors.black),
     143    ('LINEBEFORE', (-4,0), (-4,-1), 1.0, colors.black),
     144    ('LINEBEFORE', (-6,0), (-6,-1), 1.0, colors.black),
     145    ('LINEBEFORE', (-8,0), (-8,-1), 1.0, colors.black),
     146    ('LINEBEFORE', (-10,0), (-10,-1), 1.0, colors.black),
     147    ('LINEBEFORE', (-12,0), (-12,-1), 1.0, colors.black),
    140148
    141149    ('LINEABOVE', (0,-1), (-1,-1), 1.0, colors.black),
Note: See TracChangeset for help on using the changeset viewer.