Changeset 14314 for main/waeup.kofa/trunk
- Timestamp:
- 6 Dec 2016, 15:41:25 (8 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r14305 r14314 3267 3267 grok.require('waeup.editScores') 3268 3268 3269 def table_data(self, session):3269 def data(self, session): 3270 3270 cat = queryUtility(ICatalog, name='coursetickets_catalog') 3271 3271 coursetickets = cat.searchResults( … … 3290 3290 ticket.score] 3291 3291 tickets.append(row) 3292 return header + sorted(tickets, key=lambda value: value[0]) 3292 return header + sorted(tickets, key=lambda value: value[0]), None 3293 3293 3294 3294 def render(self): … … 3299 3299 students_utils = getUtility(IStudentsUtils) 3300 3300 return students_utils.renderPDFCourseticketsOverview( 3301 self, session, self. table_data(session), lecturers)3301 self, session, self.data(session), lecturers) 3302 3302 3303 3303 class ExportJobContainerOverview(KofaPage): -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r14294 r14314 955 955 956 956 def renderPDFCourseticketsOverview( 957 self, view, session, table_data, lecturers):957 self, view, session, data, lecturers): 958 958 filename = 'coursetickets_%s_%s_%s.pdf' % ( 959 959 view.context.code, session, view.request.principal.id) … … 967 967 translate(_('<b>Credits: ${a}</b>', 968 968 mapping = {'a':view.context.credits})), style["Normal"]),] 969 # Not used in base package. 970 if data[1]: 971 pdf_data += [Paragraph( 972 translate(_('<b>Pass: ${a}%</b>', 973 mapping = {'a':data[1][0]})), style["Normal"]),] 974 pdf_data += [Paragraph( 975 translate(_('<b>Fail: ${a}%</b>', 976 mapping = {'a':data[1][1]})), style["Normal"]),] 969 977 pdf_data.append(Spacer(1, 20)) 970 pdf_data += [Table( table_data, style=CONTENT_STYLE)]978 pdf_data += [Table(data[0], style=CONTENT_STYLE)] 971 979 doc_title = translate(_('${a} (${b}) - Academic Session ${d}', 972 980 mapping = {'a':view.context.title,
Note: See TracChangeset for help on using the changeset viewer.