Ignore:
Timestamp:
15 Jan 2016, 15:34:03 (9 years ago)
Author:
Henrik Bettermann
Message:

Add DegreeSource? and degree field to Certificate. Plugins must be updated!

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

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/university/certificate.py

    r12620 r13617  
    5959                 school_fee_1=None, school_fee_2=None,
    6060                 school_fee_3=None, school_fee_4=None,
    61                  ratio=None,
     61                 ratio=None, degree=None,
    6262                 custom_textline_1=None, custom_textline_2=None,
    6363                 custom_float_1=None, custom_float_2=None):
     
    7474        self.school_fee_4 = school_fee_4
    7575        self.ratio = ratio
     76        self.degree = degree
    7677        self.custom_textline_1 = custom_textline_1
    7778        self.custom_textline_2 = custom_textline_2
  • main/waeup.kofa/trunk/src/waeup/kofa/university/interfaces.py

    r13399 r13617  
    3030    InstTypeSource,
    3131    SemesterSource,
     32    DegreeSource,
    3233    )
    3334
     
    173174        default = u'ug_ft',
    174175        required = True,
     176        )
     177
     178    degree = schema.Choice(
     179        title = _(u'Degree'),
     180        source = DegreeSource(),
     181        required = False,
    175182        )
    176183
  • main/waeup.kofa/trunk/src/waeup/kofa/university/vocabularies.py

    r12862 r13617  
    6868    DICT_NAME = 'STUDY_MODES_DICT'
    6969
     70class DegreeSource(ContextualDictSourceFactoryBase):
     71    """A source for certificate degrees
     72    """
     73    #: name of dict to deliver from kofa utils.
     74    DICT_NAME = 'DEGREES_DICT'
     75
     76    def getTitle(self, context, value):
     77        utils = getUtility(IKofaUtils)
     78        return "%s (%s)" % (getattr(utils, self.DICT_NAME)[value], value)
     79
    7080class CourseSource(BasicSourceFactory):
    7181    """A course source delivers all courses inside the portal by looking
Note: See TracChangeset for help on using the changeset viewer.