Changeset 7844


Ignore:
Timestamp:
12 Mar 2012, 11:38:09 (13 years ago)
Author:
Henrik Bettermann
Message:

Doing the same (see last revisions) in the applicants package.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/applicants
Files:
3 edited

Legend:

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

    r7833 r7844  
    162162        year = data['year']
    163163        code = u'%s%s' % (data['prefix'], year)
    164         appcats_dict = getUtility(IApplicantsUtils).getApplicationTypeDict()
     164        appcats_dict = getUtility(IApplicantsUtils).APP_TYPES_DICT
    165165        title = appcats_dict[data['prefix']][0]
    166166        title = u'%s %s/%s' % (title, year, year + 1)
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py

    r7819 r7844  
    105105    def getValues(self, context):
    106106        appcats_dict = getUtility(
    107             IApplicantsUtils).getApplicationTypeDict()
     107            IApplicantsUtils).APP_TYPES_DICT
    108108        return sorted(appcats_dict.keys())
    109109
     
    113113    def getTitle(self, context, value):
    114114        appcats_dict = getUtility(
    115             IApplicantsUtils).getApplicationTypeDict()
     115            IApplicantsUtils).APP_TYPES_DICT
    116116        return appcats_dict[value][0]
    117117
     
    123123#    def getValues(self, context):
    124124#        apppins_dict = getUtility(
    125 #            IApplicantsUtils).getApplicationTypeDict()
     125#            IApplicantsUtils).APP_TYPES_DICT
    126126#        return sorted(appcats_dict.keys())
    127127#
     
    131131#    def getTitle(self, context, value):
    132132#        apppins_dict = getUtility(
    133 #            IApplicantsUtils).getApplicationTypeDict()
     133#            IApplicantsUtils).APP_TYPES_DICT
    134134#        return u"%s (%s)" % (
    135135#            apppins_dict[value][1],self.apppins_dict[value][0])
     
    176176    """A collection of methods which are subject to customization.
    177177    """
    178     pass
     178
     179    APP_TYPES_DICT = Attribute(' dict of application types')
    179180
    180181class IApplicantsRoot(IKofaObject, IContainer):
     
    465466    """
    466467
    467     history = Attribute('Object history, a list of messages.')
     468    history = Attribute('Object history, a list of messages')
    468469    state = Attribute('The application state of an applicant')
    469470    display_fullname = Attribute('The fullname of an applicant')
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py

    r7811 r7844  
    2727    grok.implements(IApplicantsUtils)
    2828
    29     def getApplicationTypeDict(self):
    30         """Provide a dictionary of application types.
    31         """
    32         return {
    33         'pude': ['Post UDE Screening', 'PUDE'],
    34         'prence': ['Pre-NCE Programme', 'PRE'],
    35         'sandwich': ['Part Time Degree in Education', 'SAND'],
    36         'pt': ['Part-Time Degree Programmes', 'PTP'],
    37         'pume': ['Post UME Screening Test', 'PUME'],
    38         'app': ['General Studies', 'APP'],
    39         'cest': ['Common Entry Screening Test', 'CEST'],
    40         'ct': ['Certificate Programmes', 'CTP'],
    41         'dp': ['Diploma Programmes', 'DPP'],
    42         'pce': ['PCE Screening', 'PCE']
    43         }
     29    APP_TYPES_DICT = {
     30      'app': ['General Studies', 'APP'],
     31      }
Note: See TracChangeset for help on using the changeset viewer.