Changeset 10559
- Timestamp:
- 29 Aug 2013, 12:35:42 (11 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students/reports
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/student_statistics.py
r10558 r10559 32 32 creation_dt_string = Attribute('Human readable report creation datetime') 33 33 34 def get_student s_by(session, mode):34 def get_student_stats(session, mode): 35 35 """Get students in a certain session and study mode. 36 36 … … 133 133 self.creation_dt_string = self.creation_dt.astimezone( 134 134 getUtility(IKofaUtils).tzinfo).strftime("%Y-%m-%d %H:%M:%S %Z") 135 self.data = get_student s_by(session, mode)135 self.data = get_student_stats(session, mode) 136 136 137 137 def create_pdf(self): … … 154 154 class StudentStatisticsReportGenerator(grok.GlobalUtility): 155 155 156 title = _('Student sStatistics')157 grok.name('student s_stats')156 title = _('Student Statistics') 157 grok.name('student_stats') 158 158 159 159 def generate(self, site, session=None, mode=None, author=None): -
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_student_statistics.py
r10556 r10559 6 6 from waeup.kofa.interfaces import IJobManager 7 7 from waeup.kofa.students.reports.student_statistics import ( 8 get_student s_by, StudentStatisticsReport, IStudentStatisticsReport)8 get_student_stats, StudentStatisticsReport, IStudentStatisticsReport) 9 9 from waeup.kofa.students.tests.test_catalog import CatalogTestSetup 10 10 from waeup.kofa.students.tests.test_browser import StudentsFullSetup … … 29 29 return 30 30 31 def test_get_student s_by_session_simple(self):31 def test_get_student_stats_by_session_simple(self): 32 32 # we can get a table with one student 33 result1 = get_student s_by(2010, 'Undergraduate Full-Time')34 result2 = get_student s_by(2009, 'Undergraduate Full-Time')33 result1 = get_student_stats(2010, 'Undergraduate Full-Time') 34 result2 = get_student_stats(2009, 'Undergraduate Full-Time') 35 35 self.assertEqual( 36 36 result1, … … 47 47 return 48 48 49 def test_get_student s_by_session_multiple(self):49 def test_get_student_stats_by_session_multiple(self): 50 50 # we can get a table with several students 51 51 self.create_cert('fac2', 'dept2', 'CERT2') 52 result1 = get_student s_by(2010, 'Undergraduate Full-Time')53 result2 = get_student s_by(2009, 'Undergraduate Full-Time')52 result1 = get_student_stats(2010, 'Undergraduate Full-Time') 53 result2 = get_student_stats(2009, 'Undergraduate Full-Time') 54 54 self.assertEqual( 55 55 result1, … … 102 102 self.assertEqual(self.browser.headers['Status'], '200 Ok') 103 103 self.browser.getLink("Create new report").click() 104 self.browser.getControl(name="generator").value = ['student s_by']104 self.browser.getControl(name="generator").value = ['student_stats'] 105 105 self.browser.getControl("Configure").click() 106 106 self.browser.getControl(name="mode").value = ['All'] … … 134 134 self.assertTrue( 135 135 'INFO - zope.mgr - students.reports.student_statistics.StudentStatisticsReportGeneratorPage - ' 136 'report %s created: Student s (session=2004, mode=All)'136 'report %s created: Student Statistics (session=2004, mode=All)' 137 137 % job_id in logcontent 138 138 )
Note: See TracChangeset for help on using the changeset viewer.