Ignore:
Timestamp:
1 May 2015, 05:45:41 (10 years ago)
Author:
Henrik Bettermann
Message:

Add StudentsUtils.increaseMatricInteger method which allows to use various
matric number counters when computing the matric number.

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

Legend:

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

    r12889 r12896  
    55=======================
    66
     7* Add `StudentsUtils.increaseMatricInteger` method which allows to use various
     8  matric number counters when computing the matric number.
     9
    710* Bypass school fee payment activation code creation if student is allowed
    811  to proceed to next session.
    912
    10 * Convert level into a schema field to be consistent with the documentation.
    11 
    12 * Rename classes StudentPaymentsExporter and BedTicketsExporter to be
     13* Convert `level` into a schema field to be consistent with the documentation.
     14
     15* Rename classes `StudentPaymentsExporter` and `BedTicketsExporter` to be
    1316  in accordance with other exporter names.
    1417
    15 * Add ReportsManager role.
    16 
    17 * Do not automatically allow ImportManagers to import user data.
     18* Add `ReportsManager` role.
     19
     20* Do not automatically allow import managers to import user data.
    1821
    1922* Skip empty rows produced by spreadsheet software.
     
    2124* Add components to  configure a student export jobs in faculties.
    2225
    23 * StudentOnlinePaymentProcessor: Raise DuplicationError if payment
    24   (in state paid) with same p_session and p_category exists.
    25 
    26 * Add new payment state 'waived'. This state can only be set by import
     26* `StudentOnlinePaymentProcessor` : Raise `DuplicationError` if payment
     27  (in state ``paid``) with same `p_session` and `p_category` exists.
     28
     29* Add new payment state ``waived``. This state can only be set by import
    2730  and is only used for the payments overview exporter to
    2831  mark sessions with waived fees.
     
    3336* Student statistic can now be broken down by faculties or by departments.
    3437
    35 * Check if p_id exists in payments_catalog when importing payment tickets in
     38* Check if `p_id` exists in payments catalog when importing payment tickets in
    3639  create mode.
    3740
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r12448 r12896  
    516516        return None, payment
    517517
     518    def increaseMatricInteger(self, student):
     519        """Increase counter for matric numbers.
     520
     521        This counter can be a centrally stored attribute or an attribute of
     522        faculties, departments or certificates. In the base package the counter
     523        is as an attribute of the site configuration object.
     524        """
     525        grok.getSite()['configuration'].next_matric_integer += 1
     526        return
     527
    518528    def constructMatricNumber(self, student):
     529        """Fetch the matric number counter which fits the student and
     530        construct the new matric number of the student.
     531
     532        In the base package the counter value is returned.
     533        """
    519534        next_integer = grok.getSite()['configuration'].next_matric_integer
    520535        if next_integer == 0:
     
    526541
    527542        If the student's matric number is unset a new matric number is
    528         constructed using the next_matric_integer attribute of
    529         the site configuration container and according to the
    530         matriculation number construction rules defined in the
    531         constructMatricNumber method. The new matric number is set,
    532         the students catalog updated and next_matric_integer
    533         increased by one.
     543        constructed according to the matriculation number construction rules
     544        defined in the constructMatricNumber method. The new matric number is
     545        set, the students catalog updated. The corresponding matric number
     546        counter is increased by one.
    534547
    535548        This method is tested but not used in the base package. It can
    536549        be used in custom packages by adding respective views
    537         and by customizing constructMatricNumber according to the
    538         university's matriculation number construction rules.
    539 
    540         The method can be disabled by setting next_matric_integer to zero.
     550        and by customizing increaseMatricInteger and constructMatricNumber
     551        according to the university's matriculation number construction rules.
     552
     553        The method can be disabled by setting the counter to zero.
    541554        """
    542555        if student.matric_number is not None:
     
    552565            return _('Matriculation number exists.'), None
    553566        notify(grok.ObjectModifiedEvent(student))
    554         grok.getSite()['configuration'].next_matric_integer += 1
     567        self.increaseMatricInteger(student)
    555568        return None, matric_number
    556569
Note: See TracChangeset for help on using the changeset viewer.