Changeset 12902


Ignore:
Timestamp:
5 May 2015, 04:37:21 (10 years ago)
Author:
Henrik Bettermann
Message:

We don't need to edit next_matric_integer in the base package.

Adjust interface.

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

Legend:

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

    r12901 r12902  
    782782        _('Add session configuration'),
    783783        _('Remove selected')]
     784    # We don't need to edit next_matric_integer in the base package.
    784785    form_fields = grok.AutoFields(IConfigurationContainer).omit(
    785         'frontpage_dict')
     786        'frontpage_dict', 'next_matric_integer')
    786787
    787788    @action(_('Save'), style='primary')
  • main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py

    r12873 r12902  
    8686        """Create Payment object and set the payment data of a student for
    8787        the payment category specified.
    88 
     88        """
     89
     90    def increaseMatricInteger(student):
     91        """Increase counter for matric numbers.
     92
     93        This counter can be a centrally stored attribute or an attribute of
     94        faculties, departments or certificates. In the base package the counter
     95        is as an attribute of the site configuration object.
     96        """
     97
     98    def constructMatricNumber(student):
     99        """Fetch the matric number counter which fits the student and
     100        construct the new matric number of the student.
     101
     102        In the base package the counter is returned which is as an attribute
     103        of the site configuration object.
    89104        """
    90105
     
    93108
    94109        If the student's matric number is unset a new matric number is
    95         constructed using the next_matric_integer attribute of
    96         the site configuration container and according to the
    97         matriculation number construction rules defined in the
    98         _constructMatricNumber method. The new matric number is set,
    99         the students catalog updated and next_matric_integer
    100         increased by one.
     110        constructed according to the matriculation number construction rules
     111        defined in the constructMatricNumber method. The new matric number is
     112        set, the students catalog updated. The corresponding matric number
     113        counter is increased by one.
    101114
    102115        This method is tested but not used in the base package. It can
    103116        be used in custom packages by adding respective views
    104         and by customizing _composeMatricNumber according to the
    105         university's matriculation number construction rules.
    106 
    107         The method can be disabled by setting next_matric_integer to zero.
     117        and by customizing increaseMatricInteger and constructMatricNumber
     118        according to the university's matriculation number construction rules.
     119
     120        The method can be disabled by setting the counter to zero.
    108121        """
    109122
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r12896 r12902  
    530530        construct the new matric number of the student.
    531531
    532         In the base package the counter value is returned.
     532        In the base package the counter is returned which is as an attribute
     533        of the site configuration object.
    533534        """
    534535        next_integer = grok.getSite()['configuration'].next_matric_integer
Note: See TracChangeset for help on using the changeset viewer.