Changeset 13125


Ignore:
Timestamp:
1 Jul 2015, 18:35:23 (9 years ago)
Author:
Henrik Bettermann
Message:

Move VERDICTS_DICT to KofaUtils?.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py

    r13119 r13125  
    561561
    562562    def _set_verdicts(self):
    563         verdicts = getUtility(IStudentsUtils).VERDICTS_DICT
     563        verdicts = getUtility(IKofaUtils).VERDICTS_DICT
    564564        self.verdicts = verdicts.items()
    565565        return
  • main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py

    r13103 r13125  
    2424from waeup.kofa.interfaces import (
    2525    IKofaObject, academic_sessions_vocab, validate_email, ICSVExporter,
    26     ContextualDictSourceFactoryBase)
     26    ContextualDictSourceFactoryBase, IKofaUtils)
    2727from waeup.kofa.interfaces import MessageFactory as _
    2828from waeup.kofa.schema import TextLineChoice, FormattedDate, PhoneNumber
     
    5757    """
    5858    def getValues(self, context):
    59         verdicts_dict = getUtility(IStudentsUtils).VERDICTS_DICT
     59        verdicts_dict = getUtility(IKofaUtils).VERDICTS_DICT
    6060        return sorted(verdicts_dict.keys())
    6161
     
    6464
    6565    def getTitle(self, context, value):
    66         verdicts_dict = getUtility(IStudentsUtils).VERDICTS_DICT
     66        verdicts_dict = getUtility(IKofaUtils).VERDICTS_DICT
    6767        if value != '0':
    6868            return verdicts_dict[value] + ' (%s)' % value
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r13124 r13125  
    928928        return None
    929929
    930     VERDICTS_DICT = {
    931         '0': _('(not yet)'),
    932         'A': 'Successful student',
    933         'B': 'Student with carryover courses',
    934         'C': 'Student on probation',
    935         }
    936 
    937930    SEPARATORS_DICT = {
    938931        }
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py

    r13124 r13125  
    200200        }
    201201
     202    VERDICTS_DICT = {
     203        '0': _('(not yet)'),
     204        'A': 'Successful student',
     205        'B': 'Student with carryover courses',
     206        'C': 'Student on probation',
     207        }
     208
    202209    #: Set positive number for allowed max, negative for required min
    203210    #: avail.
Note: See TracChangeset for help on using the changeset viewer.