Ignore:
Timestamp:
31 Jul 2014, 04:38:23 (10 years ago)
Author:
Henrik Bettermann
Message:

Provide customizable method for disabling clearance by clearance officers.

File:
1 edited

Legend:

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

    r11641 r11772  
    910910        return bedticket.bed_coordinates
    911911
     912    def clearance_disabled_message(self, student):
     913        try:
     914            session_config = grok.getSite()[
     915                'configuration'][str(student.current_session)]
     916        except KeyError:
     917            return _('Session configuration object is not available.')
     918        if not session_config.clearance_enabled:
     919            return _('Clearance is disabled for this session.')
     920        return None
     921
    912922    VERDICTS_DICT = {
    913923        '0': _('(not yet)'),
Note: See TracChangeset for help on using the changeset viewer.