Changeset 14546


Ignore:
Timestamp:
14 Feb 2017, 10:31:15 (8 years ago)
Author:
Henrik Bettermann
Message:

Provide option for selecting all academic (= current) sessions. This is not used in the base package.

File:
1 edited

Legend:

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

    r14513 r14546  
    8282    #   further).
    8383    cat = queryUtility(ICatalog, name="students_catalog")
    84     result = cat.searchResults(current_session=(session, session))
     84    if session == 0:
     85        result = cat.searchResults(student_id=(None, None))
     86    else:
     87        result = cat.searchResults(current_session=(session, session))
    8588    table = [[0 for x in xrange(2*len(payment_cats))]
    8689                for y in xrange(len(codes)+1)]
     
    203206        self.studylevelsource = StudyLevelSource().factory
    204207        self.portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    205         self.session = academic_sessions_vocab.getTerm(session).title
     208        if session != 0:
     209            self.session = academic_sessions_vocab.getTerm(session).title
     210        else:
     211            self.session = 'All sessions'
    206212        if entry_session != 0:
    207213            self.entry_session = academic_sessions_vocab.getTerm(
Note: See TracChangeset for help on using the changeset viewer.