Ignore:
Timestamp:
29 Aug 2013, 12:35:42 (11 years ago)
Author:
Henrik Bettermann
Message:

Rename students_by to student_statistics

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  
    3232    creation_dt_string = Attribute('Human readable report creation datetime')
    3333
    34 def get_students_by(session, mode):
     34def get_student_stats(session, mode):
    3535    """Get students in a certain session and study mode.
    3636
     
    133133        self.creation_dt_string = self.creation_dt.astimezone(
    134134            getUtility(IKofaUtils).tzinfo).strftime("%Y-%m-%d %H:%M:%S %Z")
    135         self.data = get_students_by(session, mode)
     135        self.data = get_student_stats(session, mode)
    136136
    137137    def create_pdf(self):
     
    154154class StudentStatisticsReportGenerator(grok.GlobalUtility):
    155155
    156     title = _('Students Statistics')
    157     grok.name('students_stats')
     156    title = _('Student Statistics')
     157    grok.name('student_stats')
    158158
    159159    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  
    66from waeup.kofa.interfaces import IJobManager
    77from waeup.kofa.students.reports.student_statistics import (
    8     get_students_by, StudentStatisticsReport, IStudentStatisticsReport)
     8    get_student_stats, StudentStatisticsReport, IStudentStatisticsReport)
    99from waeup.kofa.students.tests.test_catalog import CatalogTestSetup
    1010from waeup.kofa.students.tests.test_browser import StudentsFullSetup
     
    2929        return
    3030
    31     def test_get_students_by_session_simple(self):
     31    def test_get_student_stats_by_session_simple(self):
    3232        # we can get a table with one student
    33         result1 = get_students_by(2010, 'Undergraduate Full-Time')
    34         result2 = get_students_by(2009, 'Undergraduate Full-Time')
     33        result1 = get_student_stats(2010, 'Undergraduate Full-Time')
     34        result2 = get_student_stats(2009, 'Undergraduate Full-Time')
    3535        self.assertEqual(
    3636            result1,
     
    4747        return
    4848
    49     def test_get_students_by_session_multiple(self):
     49    def test_get_student_stats_by_session_multiple(self):
    5050        # we can get a table with several students
    5151        self.create_cert('fac2', 'dept2', 'CERT2')
    52         result1 = get_students_by(2010, 'Undergraduate Full-Time')
    53         result2 = get_students_by(2009, 'Undergraduate Full-Time')
     52        result1 = get_student_stats(2010, 'Undergraduate Full-Time')
     53        result2 = get_student_stats(2009, 'Undergraduate Full-Time')
    5454        self.assertEqual(
    5555            result1,
     
    102102        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    103103        self.browser.getLink("Create new report").click()
    104         self.browser.getControl(name="generator").value = ['students_by']
     104        self.browser.getControl(name="generator").value = ['student_stats']
    105105        self.browser.getControl("Configure").click()
    106106        self.browser.getControl(name="mode").value = ['All']
     
    134134        self.assertTrue(
    135135            'INFO - zope.mgr - students.reports.student_statistics.StudentStatisticsReportGeneratorPage - '
    136             'report %s created: Students (session=2004, mode=All)'
     136            'report %s created: Student Statistics (session=2004, mode=All)'
    137137            % job_id in logcontent
    138138            )
Note: See TracChangeset for help on using the changeset viewer.