Changeset 9653 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 17 Nov 2012, 07:15:04 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/reports.py
r9652 r9653 26 26 from waeup.kofa.reports import IReport 27 27 28 class IStudent Report(IReport):28 class IStudentsReport(IReport): 29 29 pass 30 30 … … 112 112 ] 113 113 114 @implementer(IStudent Report)115 class Student Report(Report):114 @implementer(IStudentsReport) 115 class StudentsReport(Report): 116 116 data = None 117 117 session = None … … 119 119 120 120 def __init__(self, session, mode, author='System'): 121 super(Student Report, self).__init__(121 super(StudentsReport, self).__init__( 122 122 args=[session, mode], kwargs={'author':author}) 123 123 self.session = academic_sessions_vocab.getTerm(session).title … … 127 127 128 128 def __repr__(self): 129 return 'Student Report (session=%s, mode=%s)' % (129 return 'StudentsReport (session=%s, mode=%s)' % ( 130 130 self.session, self.mode) 131 131 … … 152 152 153 153 @implementer(IReportGenerator) 154 class Student ReportGenerator(grok.GlobalUtility):154 class StudentsReportGenerator(grok.GlobalUtility): 155 155 156 156 title = _('Students') … … 162 162 163 163 def generate(self, site, session=None, mode=None, author=None): 164 result = Student Report(session=session, mode=mode, author=author)164 result = StudentsReport(session=session, mode=mode, author=author) 165 165 return result 166 166 … … 174 174 from waeup.kofa.reports import get_generators 175 175 grok.templatedir('browser_templates') 176 class Student ReportGeneratorPage(KofaPage):177 178 grok.context(Student ReportGenerator)176 class StudentsReportGeneratorPage(KofaPage): 177 178 grok.context(StudentsReportGenerator) 179 179 grok.name('index.html') 180 180 grok.require('waeup.manageReports') … … 219 219 return 220 220 221 class Student ReportPDFView(grok.View):222 223 grok.context(IStudent Report)221 class StudentsReportPDFView(grok.View): 222 223 grok.context(IStudentsReport) 224 224 grok.name('pdf') 225 225 grok.require('waeup.Public') -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_reports.py
r9647 r9653 1 1 # Tests for student related reports 2 2 from waeup.kofa.students.reports import ( 3 get_students_by, Student Report)3 get_students_by, StudentsReport) 4 4 from waeup.kofa.students.tests.test_catalog import CatalogTestSetup 5 5 from waeup.kofa.testing import FunctionalLayer 6 6 7 class Student ReportTests(CatalogTestSetup):7 class StudentsReportTests(CatalogTestSetup): 8 8 9 9 layer = FunctionalLayer … … 54 54 def test_create_pdf(self): 55 55 self.create_cert('FAC2', 'dept2', 'CERT2') 56 report = Student Report(2010, 'Undergraduate Full-Time')56 report = StudentsReport(2010, 'Undergraduate Full-Time') 57 57 result = report.create_pdf() 58 58 self.assertTrue(result.startswith('%PDF-'))
Note: See TracChangeset for help on using the changeset viewer.