Changeset 13133 for main


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

More docs.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/docs/source/userdocs/customization.rst

    r13132 r13133  
    109109The central `KofaUtils` utility contains not only most dictionaries
    110110used for sources (see :py:class:`API
    111 <waeup.kofa.utils.utils.KofaUtils>`) but also configuration
    112 attributes like
     111<waeup.kofa.utils.utils.KofaUtils>`) but also **configuration
     112attributes** like
    113113
    114114.. autoattribute:: waeup.kofa.utils.utils.KofaUtils.PORTAL_LANGUAGE
     
    121121   :noindex:
    122122
    123 Customizable utility methods are:
    124 
    125 .. automethod:: waeup.kofa.utils.utils.KofaUtils.sendContactForm()
    126    :noindex:
    127 
    128 .. automethod:: waeup.kofa.utils.utils.KofaUtils.fullname()
    129    :noindex:
    130 
    131 .. automethod:: waeup.kofa.utils.utils.KofaUtils.genPassword()
    132    :noindex:
    133 
    134 .. automethod:: waeup.kofa.utils.utils.KofaUtils.sendCredentials()
    135    :noindex:
    136 
    137 .. automethod:: waeup.kofa.utils.utils.KofaUtils.getPaymentItem()
    138    :noindex:
    139 
    140 Students Utils
    141 --------------
    142 
    143 `StudentsUtils` contains the following configuration attributes:
     123Customizable **utility methods** are:
     124
     125.. automethod:: waeup.kofa.utils.utils.KofaUtils.sendContactForm
     126   :noindex:
     127
     128.. automethod:: waeup.kofa.utils.utils.KofaUtils.fullname
     129   :noindex:
     130
     131.. automethod:: waeup.kofa.utils.utils.KofaUtils.genPassword
     132   :noindex:
     133
     134.. automethod:: waeup.kofa.utils.utils.KofaUtils.sendCredentials
     135   :noindex:
     136
     137.. automethod:: waeup.kofa.utils.utils.KofaUtils.getPaymentItem
     138   :noindex:
     139
     140Students Utilities
     141------------------
     142
     143`StudentsUtils` contains the following **configuration attributes**:
    144144
    145145.. autoattribute:: waeup.kofa.students.utils.StudentsUtils.STUDENT_ID_PREFIX
     
    161161   :noindex:
    162162
    163 Customizable utility methods are:
    164 
    165 .. automethod:: waeup.kofa.students.utils.StudentsUtils.getReturningData()
    166    :noindex:
    167 
    168 .. automethod:: waeup.kofa.students.utils.StudentsUtils.setReturningData()
    169    :noindex:
    170 
    171 .. automethod:: waeup.kofa.students.utils.StudentsUtils.setPaymentDetails()
    172    :noindex:
    173 
    174 .. automethod:: waeup.kofa.students.utils.StudentsUtils.setBalanceDetails()
    175    :noindex:
    176 
    177 .. automethod:: waeup.kofa.students.utils.StudentsUtils.increaseMatricInteger()
    178    :noindex:
    179 
    180 .. automethod:: waeup.kofa.students.utils.StudentsUtils.constructMatricNumber()
    181    :noindex:
    182 
    183 .. automethod:: waeup.kofa.students.utils.StudentsUtils.setMatricNumber()
    184    :noindex:
    185 
    186 .. automethod:: waeup.kofa.students.utils.StudentsUtils.getAccommodationDetails()
    187    :noindex:
    188 
    189 .. automethod:: waeup.kofa.students.utils.StudentsUtils.selectBed()
    190    :noindex:
    191 
    192 .. automethod:: waeup.kofa.students.utils.StudentsUtils.renderPDFAdmissionLetter()
    193    :noindex:
    194 
    195 .. automethod:: waeup.kofa.students.utils.StudentsUtils.getPDFCreator()
    196    :noindex:
    197 
    198 .. automethod:: waeup.kofa.students.utils.StudentsUtils.renderPDF()
    199    :noindex:
    200 
    201 .. automethod:: waeup.kofa.students.utils.StudentsUtils.renderPDFTranscript()
    202    :noindex:
    203 
    204 .. automethod:: waeup.kofa.students.utils.StudentsUtils.maxCredits()
    205    :noindex:
    206 
    207 .. automethod:: waeup.kofa.students.utils.StudentsUtils.getBedCoordinates()
    208    :noindex:
    209 
    210 
    211 Applicants Utils
    212 ----------------
    213 
    214 
     163Customizable **utility methods** are:
     164
     165.. automethod:: waeup.kofa.students.utils.StudentsUtils.getReturningData
     166   :noindex:
     167
     168.. automethod:: waeup.kofa.students.utils.StudentsUtils.setReturningData
     169   :noindex:
     170
     171.. automethod:: waeup.kofa.students.utils.StudentsUtils.setPaymentDetails
     172   :noindex:
     173
     174.. automethod:: waeup.kofa.students.utils.StudentsUtils.setBalanceDetails
     175   :noindex:
     176
     177.. automethod:: waeup.kofa.students.utils.StudentsUtils.increaseMatricInteger
     178   :noindex:
     179
     180.. automethod:: waeup.kofa.students.utils.StudentsUtils.constructMatricNumber
     181   :noindex:
     182
     183.. automethod:: waeup.kofa.students.utils.StudentsUtils.setMatricNumber
     184   :noindex:
     185
     186.. automethod:: waeup.kofa.students.utils.StudentsUtils.getAccommodationDetails
     187   :noindex:
     188
     189.. automethod:: waeup.kofa.students.utils.StudentsUtils.selectBed
     190   :noindex:
     191
     192.. automethod:: waeup.kofa.students.utils.StudentsUtils.renderPDFAdmissionLetter
     193   :noindex:
     194
     195.. automethod:: waeup.kofa.students.utils.StudentsUtils.getPDFCreator
     196   :noindex:
     197
     198.. automethod:: waeup.kofa.students.utils.StudentsUtils.renderPDF
     199   :noindex:
     200
     201.. automethod:: waeup.kofa.students.utils.StudentsUtils.renderPDFTranscript
     202   :noindex:
     203
     204.. automethod:: waeup.kofa.students.utils.StudentsUtils.maxCredits
     205   :noindex:
     206
     207.. automethod:: waeup.kofa.students.utils.StudentsUtils.getBedCoordinates
     208   :noindex:
     209
     210
     211Applicants Utililties
     212---------------------
     213
     214`ApplicantsUtils` contains the following **configuration attributes**:
     215
     216.. autoattribute:: waeup.kofa.applicants.utils.ApplicantsUtils.APP_TYPES_DICT
     217   :noindex:
     218
     219.. autoattribute:: waeup.kofa.applicants.utils.ApplicantsUtils.SEPARATORS_DICT
     220   :noindex:
     221
     222Customizable **utility methods** are:
     223
     224.. automethod:: waeup.kofa.applicants.utils.ApplicantsUtils.setPaymentDetails
     225   :noindex:
     226
     227.. automethod:: waeup.kofa.applicants.utils.ApplicantsUtils.getApplicantsStatistics
     228   :noindex:
     229
     230.. automethod:: waeup.kofa.applicants.utils.ApplicantsUtils.sortCertificates
     231   :noindex:
     232
     233.. automethod:: waeup.kofa.applicants.utils.ApplicantsUtils.getCertTitle
     234   :noindex:
  • 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.