Ignore:
Timestamp:
1 Sep 2013, 08:11:34 (11 years ago)
Author:
Henrik Bettermann
Message:

Start implementation of 'Presentation of results to senate' report.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students/reports
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/level_report.py

    r10572 r10574  
    11## $Id$
    22##
    3 ## Copyright (C) 2012 Uli Fouquet & Henrik Bettermann
     3## Copyright (C) 2013 Uli Fouquet & Henrik Bettermann
    44## This program is free software; you can redistribute it and/or modify
    55## it under the terms of the GNU General Public License as published by
     
    3535    creation_dt_string = Attribute('Human readable report creation datetime')
    3636
    37 def get_students_by(faccode, depcode, session, level):
     37def get_students(faccode, depcode, session, level):
    3838    """Get students in a certain department who registered courses
    3939    in a certain session at a certain level.
     
    4242    """
    4343    site = grok.getSite()
    44     faccodes = tuple(sorted([x for x in site['faculties'].keys()],
    45                              key=lambda x: x.lower()))
    4644    cat = queryUtility(ICatalog, name="students_catalog")
    4745    result = cat.searchResults(
     
    142140        self.creation_dt_string = self.creation_dt.astimezone(
    143141            getUtility(IKofaUtils).tzinfo).strftime("%Y-%m-%d %H:%M:%S %Z")
    144         self.data = get_students_by(faccode, depcode, session, level)
     142        self.data = get_students(faccode, depcode, session, level)
    145143
    146144    def create_pdf(self):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_level_report.py

    r10564 r10574  
    55from waeup.kofa.interfaces import IJobManager
    66from waeup.kofa.students.reports.level_report import (
    7     get_students_by, LevelReport, ILevelReport)
     7    get_students, LevelReport, ILevelReport)
    88from waeup.kofa.students.tests.test_catalog import CatalogTestSetup
    99from waeup.kofa.students.tests.test_browser import StudentsFullSetup
     
    2323        return
    2424
    25     def test_get_students_by(self):
     25    def test_get_students(self):
    2626        # we can get a table with one student
    27         result = get_students_by('fac1', 'dep1', 2010, 100)
     27        result = get_students('fac1', 'dep1', 2010, 100)
    2828        self.assertEqual(result,
    2929            [(u'K1000000', u'1234', u'Bob Tester', 30, 30, 5.0, [])])
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_student_statistics.py

    r10559 r10574  
    2929        return
    3030
    31     def test_get_student_stats_by_session_simple(self):
     31    def test_get_student_stats_session_simple(self):
    3232        # we can get a table with one student
    3333        result1 = get_student_stats(2010, 'Undergraduate Full-Time')
     
    4747        return
    4848
    49     def test_get_student_stats_by_session_multiple(self):
     49    def test_get_student_stats_session_multiple(self):
    5050        # we can get a table with several students
    5151        self.create_cert('fac2', 'dept2', 'CERT2')
Note: See TracChangeset for help on using the changeset viewer.