Ignore:
Timestamp:
22 May 2024, 07:25:56 (4 months ago)
Author:
Henrik Bettermann
Message:

Make the certificate's longtitle customizable.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/CHANGES.txt

    r17787 r17798  
    441.8.2.dev0 (unreleased)
    55=======================
     6
     7* Make the certificate's longtitle customizable.
    68
    79* Add `SessionConfigurationProcessor`.
  • main/waeup.kofa/trunk/src/waeup/kofa/university/certificate.py

    r14652 r17798  
    2727from zope.component.interfaces import IFactory, ComponentLookupError
    2828from zope.interface import implementedBy
    29 from waeup.kofa.interfaces import IKofaPluggable
     29from waeup.kofa.interfaces import IKofaPluggable, IKofaUtils
    3030from waeup.kofa.university.interfaces import (
    3131    ICertificate, ICertificateCourse)
     
    9393    @property
    9494    def longtitle(self):
    95         return "%s (%s)" % (self.title,self.code)
     95        return getUtility(
     96            IKofaUtils).getCertLongTitle(self)
     97
    9698
    9799    def addCertCourse(self, course, level=100,
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py

    r17376 r17798  
    290290
    291291    def getCertTitle(self, context, value):
    292         """Compose the titles in `CertificateSource`.
     292        """Compose the titles in `CertificateSource.
    293293        """
    294294        return "%s - %s" % (value.code, value.title)
     295
     296    def getCertLongTitle(self, value):
     297        """Compose certificate's longtitle.
     298        """
     299        return "%s (%s)" % (value.title, value.code)
    295300
    296301    def sendContactForm(self, from_name, from_addr, rcpt_name, rcpt_addr,
Note: See TracChangeset for help on using the changeset viewer.