Ignore:
Timestamp:
2 Jul 2015, 10:06:52 (9 years ago)
Author:
Henrik Bettermann
Message:

More docs.

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

    r13123 r13133  
    378378        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    379379        self.context.description_dict = html2dict(description, portal_language)
    380         # Always refresh title. So we can change titles
    381         # if APP_TYPES_DICT has been edited.
    382         apptypes_dict = getUtility(IApplicantsUtils).APP_TYPES_DICT
    383         title = apptypes_dict[self.context.prefix][0]
    384         #self.context.title = u'%s %s/%s' % (
    385         #    title, self.context.year, self.context.year + 1)
    386380        self.flash(_('Form has been saved.'))
    387381        fields_string = ' + '.join(changed_fields)
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py

    r13104 r13133  
    9797            application_category=(appcat,appcat))
    9898        resultlist = getUtility(
    99             IApplicantsUtils).filterCertificates(context, result)
     99            IApplicantsUtils).sortCertificates(context, result)
    100100        return resultlist
    101101
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py

    r13123 r13133  
    3333    grok.implements(IApplicantsUtils)
    3434
     35    #: A dictionary containing application type names, titles and
     36    #: access code prefixes (meanwhile deprecated).
    3537    APP_TYPES_DICT = {
    3638      'app': ['General Studies', 'APP'],
     
    3840      }
    3941
     42    #: A dictionary which maps widget names to headlines.
     43    #: The headline is rendered in forms and on pdf slips above the
     44    #: respective display or input widget.
    4045    SEPARATORS_DICT = {
    4146      'form.course1': _(u'Desired Study Courses'),
     
    4550    def setPaymentDetails(self, container, payment, applicant):
    4651        """Set the payment data of an applicant.
     52        In contrast to its `StudentsUtils` counterpart, the payment ticket
     53        must exist and is an argument of this method.
    4754        """
    4855        timestamp = ("%d" % int(time()*10000))[1:]
     
    7582
    7683    def getApplicantsStatistics(self, container):
    77         """Count applicants in containers.
     84        """Count applicants in applicants containers.
    7885        """
    7986        state_stats = {INITIALIZED:0, STARTED:0, PAID:0, SUBMITTED:0,
     
    9097        return state_stats, None
    9198
    92     def filterCertificates(self, context, resultset):
    93         """Filter and sort certificates in AppCatCertificateSource.
     99    def sortCertificates(self, context, resultset):
     100        """Sort already filtered certificates in `AppCatCertificateSource`.
     101        Display also current course even if certificate in the academic
     102        section has been removed.
    94103        """
    95104        resultlist = sorted(resultset, key=lambda value: value.code)
    96105        curr_course = context.course1
    97106        if curr_course is not None and curr_course not in resultlist:
    98             # display also current course even if certificate has been removed
    99107            resultlist = [curr_course,] + resultlist
    100108        return resultlist
    101109
    102110    def getCertTitle(self, context, value):
    103         """Compose the titles in AppCatCertificateSource.
     111        """Compose the titles in `AppCatCertificateSource`.
    104112        """
    105113        return "%s - %s" % (value.code, value.title)
Note: See TracChangeset for help on using the changeset viewer.