Changeset 14698 for main


Ignore:
Timestamp:
21 Jun 2017, 22:12:04 (8 years ago)
Author:
Henrik Bettermann
Message:

Add score_editing_enabled field which is not used in base package but can be used in custom packages enable/disable score editing for subgroups of students.

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

Legend:

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

    r14539 r14698  
    149149    """A source for filtering groups of students
    150150    """
    151     #: name of dict to deliver from kofa utils.
    152151    DICT_NAME = 'DISABLE_PAYMENT_GROUP_DICT'
     152
     153
     154class EnableScoreEditingGroupSource(ContextualDictSourceFactoryBase):
     155    """A source for filtering groups of students
     156    """
     157    DICT_NAME = 'ENABLE_SCORE_EDITING_GROUP_DICT'
     158
    153159
    154160# Define a validation method for email addresses
     
    738744    current_academic_session = schema.Choice(
    739745        title = _(u'Current Academic Session'),
    740         description = _(u'Session for which score editing is allowed'),
     746        description = _(u'Session for which score editing is enabled'),
    741747        source = academic_sessions_vocab,
    742748        default = None,
    743749        required = False,
    744750        readonly = False,
     751        )
     752
     753    score_editing_enabled = schema.List(
     754        title = _(u'Score editing enabled (not used)'),
     755        value_type = schema.Choice(
     756            source = EnableScoreEditingGroupSource(),
     757            ),
     758        required = False,
     759        defaultFactory=list,
    745760        )
    746761
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r14685 r14698  
    12031203        self.browser.getLink("Add balance payment ticket").click()
    12041204
    1205         # Palance payment form is provided
     1205        # Balance payment form is provided
    12061206        self.assertEqual(self.student.current_session, 2004)
    12071207        self.browser.getControl(name="form.p_category").value = ['schoolfee']
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py

    r14638 r14698  
    139139        }
    140140
     141    ENABLE_SCORE_EDITING_GROUP_DICT = {} # not configured in base package
     142
    141143    DISABLE_PAYMENT_GROUP_DICT = {
    142144        'sf_all': 'School Fee - All Students',
     
    200202
    201203    MODE_GROUPS = {
     204        'All': ('all',),
     205        'Undergraduate Full-Time': ('ug_ft',),
     206        'Undergraduate Part-Time': ('ug_pt',),
     207        'Postgraduate Full-Time': ('pg_ft',),
     208        'Postgraduate Part-Time': ('pg_pt',),
     209        }
     210
     211    SCORE_EDITING_GROUP_DICT = {
    202212        'All': ('all',),
    203213        'Undergraduate Full-Time': ('ug_ft',),
Note: See TracChangeset for help on using the changeset viewer.