Ignore:
Timestamp:
26 Nov 2011, 18:07:42 (13 years ago)
Author:
Henrik Bettermann
Message:

Show more information in student listings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/catalog.py

    r7203 r7215  
    2424from zope.catalog.interfaces import ICatalog
    2525from zope.component import queryUtility
    26 from waeup.sirp.interfaces import IUniversity, IQueryResultItem
     26from waeup.sirp.interfaces import (
     27    IUniversity, IQueryResultItem, academic_sessions_vocab)
    2728from waeup.sirp.students.interfaces import IStudent
     29from waeup.sirp.university.vocabularies import course_levels
    2830
    2931class StudentIndexes(grok.Indexes):
     
    5860        self.matric_number = context.matric_number
    5961        self.state = context.state
     62        try:
     63            current_level = course_levels.getTerm(
     64                context['studycourse'].current_level).title
     65        except LookupError:
     66            current_level = None
     67        self.current_level = current_level
     68        try:
     69            current_session = academic_sessions_vocab.getTerm(
     70                context['studycourse'].current_session).title
     71        except LookupError:
     72            current_session = None
     73        self.current_session = current_session
     74        self.certificate = context['studycourse'].certificate
    6075
    6176def search(query=None, searchtype=None, view=None):
Note: See TracChangeset for help on using the changeset viewer.