Changeset 7688 for main/waeup.sirp/trunk


Ignore:
Timestamp:
23 Feb 2012, 12:25:23 (13 years ago)
Author:
Henrik Bettermann
Message:

Fix sources.

Location:
main/waeup.sirp/trunk/src/waeup/sirp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py

    r7683 r7688  
    103103    """
    104104    def getValues(self, context):
    105         self.appcats_dict = getUtility(
     105        appcats_dict = getUtility(
    106106            IApplicantsUtils).getApplicationTypeDict()
    107         return sorted(self.appcats_dict.keys())
     107        return sorted(appcats_dict.keys())
    108108
    109109    def getToken(self, context, value):
     
    111111
    112112    def getTitle(self, context, value):
    113         return self.appcats_dict[value][0]
     113        appcats_dict = getUtility(
     114            IApplicantsUtils).getApplicationTypeDict()
     115        return appcats_dict[value][0]
    114116
    115117# Maybe Uniben still needs this ...
     
    119121#    """
    120122#    def getValues(self, context):
    121 #        self.apppins_dict = getUtility(
     123#        apppins_dict = getUtility(
    122124#            IApplicantsUtils).getApplicationTypeDict()
    123 #        return sorted(self.appcats_dict.keys())
     125#        return sorted(appcats_dict.keys())
    124126#
    125127#    def getToken(self, context, value):
     
    127129#
    128130#    def getTitle(self, context, value):
     131#        apppins_dict = getUtility(
     132#            IApplicantsUtils).getApplicationTypeDict()
    129133#        return u"%s (%s)" % (
    130 #            self.apppins_dict[value][1],self.apppins_dict[value][0])
     134#            apppins_dict[value][1],self.apppins_dict[value][0])
    131135
    132136class ApplicantContainerProviderSource(BasicSourceFactory):
  • main/waeup.sirp/trunk/src/waeup/sirp/students/interfaces.py

    r7681 r7688  
    3939    """
    4040    def getValues(self, context):
    41         self.verdicts_dict = getUtility(IStudentsUtils).getVerdictsDict()
    42         return self.verdicts_dict.keys()
     41        verdicts_dict = getUtility(IStudentsUtils).getVerdictsDict()
     42        return verdicts_dict.keys()
    4343
    4444    def getToken(self, context, value):
     
    4646
    4747    def getTitle(self, context, value):
    48         return self.verdicts_dict[value]
     48        verdicts_dict = getUtility(IStudentsUtils).getVerdictsDict()
     49        return verdicts_dict[value]
    4950
    5051
  • main/waeup.sirp/trunk/src/waeup/sirp/university/vocabularies.py

    r7681 r7688  
    4141    """
    4242    def getValues(self, context):
    43         self.semesters_dict = getUtility(ISIRPUtils).getSemesterDict()
    44         return self.semesters_dict.keys()
     43        semesters_dict = getUtility(ISIRPUtils).getSemesterDict()
     44        return semesters_dict.keys()
    4545
    4646    def getToken(self, context, value):
     
    4848
    4949    def getTitle(self, context, value):
    50         return self.semesters_dict[value]
     50        semesters_dict = getUtility(ISIRPUtils).getSemesterDict()
     51        return semesters_dict[value]
    5152
    5253class InstTypeSource(BasicContextualSourceFactory):
     
    5556    """
    5657    def getValues(self, context):
    57         self.insttypes_dict = getUtility(ISIRPUtils).getInstTypeDict()
    58         return sorted(self.insttypes_dict.keys())
     58        insttypes_dict = getUtility(ISIRPUtils).getInstTypeDict()
     59        return sorted(insttypes_dict.keys())
    5960
    6061    def getToken(self, context, value):
     
    6263
    6364    def getTitle(self, context, value):
    64         return self.insttypes_dict[value]
     65        insttypes_dict = getUtility(ISIRPUtils).getInstTypeDict()
     66        return insttypes_dict[value]
    6567
    6668class AppCatSource(BasicContextualSourceFactory):
     
    6971    """
    7072    def getValues(self, context):
    71         self.appcats_dict = getUtility(ISIRPUtils).getAppCatDict()
    72         return sorted(self.appcats_dict.keys())
     73        appcats_dict = getUtility(ISIRPUtils).getAppCatDict()
     74        return sorted(appcats_dict.keys())
    7375
    7476    def getToken(self, context, value):
     
    7678
    7779    def getTitle(self, context, value):
    78         return self.appcats_dict[value]
     80        appcats_dict = getUtility(ISIRPUtils).getAppCatDict()
     81        return appcats_dict[value]
    7982
    8083class StudyModeSource(BasicContextualSourceFactory):
     
    8386    """
    8487    def getValues(self, context):
    85         self.studymodes_dict = getUtility(ISIRPUtils).getStudyModesDict()
    86         return sorted(self.studymodes_dict.keys())
     88        studymodes_dict = getUtility(ISIRPUtils).getStudyModesDict()
     89        return sorted(studymodes_dict.keys())
    8790
    8891    def getToken(self, context, value):
     
    9093
    9194    def getTitle(self, context, value):
    92         return self.studymodes_dict[value]
     95        studymodes_dict = getUtility(ISIRPUtils).getStudyModesDict()
     96        return studymodes_dict[value]
    9397
    9498class CourseSource(BasicSourceFactory):
Note: See TracChangeset for help on using the changeset viewer.