Changeset 15033 for main/waeup.kofa
- Timestamp:
- 30 May 2018, 10:49:10 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/raw_score_report.py
r14644 r15033 85 85 return table 86 86 87 TABLE_STYLE = [88 ('FONT', (0,0), (-1,-1), 'Helvetica', 8),89 ('VALIGN', (0, 1), (-1,-1), 'TOP'),90 #('FONT', (0,0), (0,-1), 'Helvetica-Bold', 8), # 1st column91 ('FONT', (0,0), (-1,0), 'Helvetica-Bold', 8), # 1st row92 #('FONT', (0,-1), (-1,-1), 'Helvetica-Bold', 8), # last row93 #('FONT', (-1,0), (-1,-1), 'Helvetica-Bold', 8), # last column94 ('ALIGN', (3,1), (-1,-1), 'RIGHT'),95 ('ALIGN', (0,0), (0,-1), 'RIGHT'),96 #('ALIGN', (6,0), (6,-1), 'LEFT'),97 ('INNERGRID', (0,1), (-1,-1), 0.25, colors.black),98 ('BOX', (0,1), (-1,-1), 1, colors.black),99 ]100 101 87 class IRawScoreReport(IReport): 102 88 … … 118 104 note = "" 119 105 signatures = None 106 fontsize = 10 107 108 @property 109 def table_style(self): 110 return [ 111 ('FONT', (0,0), (-1,-1), 'Helvetica', self.fontsize), 112 ('VALIGN', (0, 1), (-1,-1), 'TOP'), 113 #('FONT', (0,0), (0,-1), 'Helvetica-Bold', 8), # 1st column 114 ('FONT', (0,0), (-1,0), 'Helvetica-Bold', self.fontsize), # 1st row 115 #('FONT', (0,-1), (-1,-1), 'Helvetica-Bold', 8), # last row 116 #('FONT', (-1,0), (-1,-1), 'Helvetica-Bold', 8), # last column 117 ('ALIGN', (3,1), (-1,-1), 'RIGHT'), 118 ('ALIGN', (0,0), (0,-1), 'RIGHT'), 119 #('ALIGN', (6,0), (6,-1), 'LEFT'), 120 ('INNERGRID', (0,1), (-1,-1), 0.25, colors.black), 121 ('BOX', (0,1), (-1,-1), 1, colors.black), 122 ] 123 120 124 121 125 @property … … 245 249 self.data[level], self.certcourses[level]) 246 250 col_widths = [1*cm, 4*cm, 5*cm] + [1*cm] * len(self.certcourses) 247 pdf_data = [Paragraph('< b>%s - Report %s</b>'248 % (self. creation_dt_string, job_id),251 pdf_data = [Paragraph('<font size=%s><b>%s - Report %s</b></font>' 252 % (self.fontsize, self.creation_dt_string, job_id), 249 253 STYLE["Normal"]), 250 254 Spacer(1, 12),] 251 255 pdf_data += [Paragraph( 252 256 translate( 253 ' ${a}<br />${b}<br />${c}<br />'254 'Session: ${d}<br />Level: ${e} ',257 '<font size=${s}>${a}<br />${b}<br />${c}<br />' 258 'Session: ${d}<br />Level: ${e}</font>', 255 259 mapping = {'a':self.certtitle, 256 260 'b':self.deptitle, … … 258 262 'd':self.session, 259 263 'e':self.level, 264 's':self.fontsize 260 265 }), 261 266 STYLE["Normal"]), … … 264 269 for level in self.past_levels: 265 270 pdf_data.append(Spacer(1, 20)) 266 pdf_data += [Paragraph('< b>Level %s Courses</b>' % level,267 STYLE["Normal"]), Spacer(1, 20),]271 pdf_data += [Paragraph('<font size=%s><b>Level %s Courses</b></font>' 272 % (self.fontsize, level), STYLE["Normal"]), Spacer(1, 20),] 268 273 pdf_data += [ 269 274 Table(table_data[level], 270 style= TABLE_STYLE,275 style=self.table_style, 271 276 colWidths=col_widths)] 272 277 pdf_data.append(Spacer(1, 20))
Note: See TracChangeset for help on using the changeset viewer.