Ignore:
Timestamp:
16 Jun 2021, 11:54:39 (3 years ago)
Author:
Henrik Bettermann
Message:

Add course grading system source.

Location:
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/browser/pages.py

    r14742 r16508  
    2020
    2121import grok
     22from zope.component import getUtility
     23from waeup.kofa.interfaces import IKofaUtils
    2224from waeup.kofa.browser.pages import (
    2325    SessionConfigurationAddFormPage,
     
    5759        return
    5860
     61    def _set_grading_sys(self):
     62        grading_sys = getUtility(IKofaUtils).GRADING_SYSTEM_DICT
     63        self.grading_sys = sorted(grading_sys.items())
     64        return
     65
    5966    def update(self):
    6067        super(NigeriaSourcesOverview, self).update()
     
    6370        self._set_exam_types()
    6471        self._set_lgas()
     72        self._set_grading_sys()
    6573        return
    6674
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/browser/viewlets.py

    r12956 r16508  
    6262    source_name = 'exam_types'
    6363    title = _('Higher Qualification Examination Types')
     64
     65class GradingSysSource(InstTypesSource):
     66    """Available grading systems for the sources overview page.
     67    """
     68    grok.order(10)
     69    name = 'GradingSystems'
     70    source_name = 'grading_sys'
     71    title = _('Nigerian Course Grading Systems')
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interfaces.py

    r16484 r16508  
    115115    DICT_NAME = 'DISABILITIES_DICT'
    116116
     117class GradingSystemSource(ContextualDictSourceFactoryBase):
     118    """A application category source delivers all special handling categories
     119    provided for accommodation booking.
     120    """
     121    #: name of dict to deliver from kofa utils.
     122    DICT_NAME = 'GRADING_SYSTEM_DICT'
    117123
    118124class ICustomSessionConfiguration(ISessionConfiguration):
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/utils/utils.py

    r16491 r16508  
    318318        }
    319319
     320    GRADING_SYSTEM_DICT = {
     321        'A': 'Regular Course Grading System (2018/2019 till date)',
     322        'B': 'Old Course Grading System (2012/2013 - 2017/2018)',
     323        }
    320324
    321325    @property
Note: See TracChangeset for help on using the changeset viewer.