- Timestamp:
- 9 Jun 2016, 12:55:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py
r13880 r13900 18 18 import grok 19 19 from zope.i18n import translate 20 from zope.component import getUtility 20 from zope.component import getUtility, queryUtility 21 21 from zope.security import checkPermission 22 from zope.catalog.interfaces import ICatalog 22 23 from zope.formlib.textwidgets import BytesDisplayWidget 23 24 from waeup.kofa.browser.layout import UtilityView … … 40 41 CourseTicketDisplayFormPage, 41 42 CourseTicketManageFormPage, 42 EditScoresPage 43 EditScoresPage, 44 ExportPDFScoresSlip 43 45 ) 44 46 from kofacustom.nigeria.students.browser import ( … … 606 608 type="danger") 607 609 return 610 611 class CustomExportPDFScoresSlip(ExportPDFScoresSlip): 612 """Deliver a PDF slip of course tickets for a lecturer. 613 """ 614 615 def table_data(self, session): 616 cat = queryUtility(ICatalog, name='coursetickets_catalog') 617 coursetickets = cat.searchResults( 618 session=(session, session), 619 code=(self.context.code, self.context.code) 620 ) 621 result = [[_('Matric No.'), 622 _('Reg. No.'), 623 _('Fullname'), 624 _('Status'), 625 _('Course of Studies'), 626 _('Level'), 627 _('Score'), 628 _('CA') ],] 629 for ticket in list(coursetickets): 630 row = [ticket.student.matric_number, 631 ticket.student.reg_number, 632 ticket.student.display_fullname, 633 ticket.student.translated_state, 634 ticket.student.certcode, 635 ticket.level, 636 ticket.score, 637 ticket.ca] 638 result.append(row) 639 return result
Note: See TracChangeset for help on using the changeset viewer.