Changeset 10251 for main/waeup.kofa/trunk/src
- Timestamp:
- 30 May 2013, 11:53:33 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r10250 r10251 209 209 """ 210 210 data = [] 211 line = []212 211 style = getSampleStyleSheet() 213 212 214 213 for level in levels_data: 215 214 level_obj = level['level'] 215 tickets = level['tickets_1'] + level['tickets_2'] + level['tickets_3'] 216 headerline = [] 217 tabledata = [] 216 218 subheader = 'Session %s, Level %s' % ( 217 219 view.session_dict[level_obj.level_session], 218 220 view.course_levels.getTerm(level_obj.level).title) 219 221 data.append(Paragraph(subheader, HEADING_STYLE)) 220 221 tabledata = []222 222 for element in tableheader: 223 223 field = '<strong>%s</strong>' % formatted_text(element[0]) 224 224 field = Paragraph(field, style["Normal"]) 225 line.append(field) 226 tabledata.append(line) 227 tickets = [] 228 tickets += level['tickets_1'] 229 tickets += level['tickets_2'] 230 tickets += level['tickets_3'] 225 headerline.append(field) 226 tabledata.append(headerline) 231 227 for ticket in tickets: 232 line = []228 ticketline = [] 233 229 for element in tableheader: 234 230 field = formatted_text(getattr(ticket,element[1],u' ')) 235 231 field = Paragraph(field, style["Normal"]) 236 line.append(field)237 tabledata.append( line)232 ticketline.append(field) 233 tabledata.append(ticketline) 238 234 table = Table(tabledata,colWidths=[ 239 235 element[2]*cm for element in tableheader], style=CONTENT_STYLE)
Note: See TracChangeset for help on using the changeset viewer.