Ignore:
Timestamp:
6 Apr 2023, 17:29:31 (22 months ago)
Author:
Henrik Bettermann
Message:

Enable customization of certificate select box entries also in the students section.

File:
1 edited

Legend:

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

    r17211 r17376  
    284284    TEMP_PASSWORD_MINUTES = 10
    285285
     286    def sortCertificates(self, context, resultset):
     287        """Sort already filtered certificates in `CertificateSource`.
     288        """
     289        return sorted(resultset, key=lambda value: value.code)
     290
     291    def getCertTitle(self, context, value):
     292        """Compose the titles in `CertificateSource`.
     293        """
     294        return "%s - %s" % (value.code, value.title)
     295
    286296    def sendContactForm(self, from_name, from_addr, rcpt_name, rcpt_addr,
    287297                        from_username, usertype, portal, body, subject,
Note: See TracChangeset for help on using the changeset viewer.