Changeset 14534 for main/waeup.aaue


Ignore:
Timestamp:
12 Feb 2017, 19:55:31 (8 years ago)
Author:
Henrik Bettermann
Message:

Show imported gpa values on manage pages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py

    r14533 r14534  
    5151    StudyCourseTranscriptPage,
    5252    DownloadScoresView,
    53     StudentRequestPasswordPage
     53    StudentRequestPasswordPage,
     54    StudyCourseManageFormPage
    5455    )
    5556from kofacustom.nigeria.students.browser import (
     
    7980    ICustomPGStudentClearance,
    8081    ICustomCourseTicket,
    81     ICustomStudentBase)
     82    ICustomStudentBase,
     83    ICustomStudentStudyCourse)
    8284from waeup.aaue.interswitch.browser import gateway_net_amt
    8385from waeup.aaue.interfaces import MessageFactory as _
     
    303305        return text + 'Transaction Charge.'
    304306
     307class CustomStudyCourseManageFormPage(StudyCourseManageFormPage):
     308    """ Page to edit the student study course data
     309    """
     310    grok.context(ICustomStudentStudyCourse)
     311
     312    @property
     313    def form_fields(self):
     314        if self.context.is_postgrad:
     315            form_fields = grok.AutoFields(ICustomStudentStudyCourse).omit(
     316                'previous_verdict')
     317        else:
     318            form_fields = grok.AutoFields(ICustomStudentStudyCourse)
     319        form_fields['imported_cgpa'].for_display = True
     320        return form_fields
     321
    305322class CustomStudyLevelDisplayFormPage(StudyLevelDisplayFormPage):
    306323    """ Page to display student study levels
     
    328345    """
    329346    grok.context(ICustomStudentStudyLevel)
     347
     348    form_fields = grok.AutoFields(ICustomStudentStudyLevel).omit(
     349        'validation_date', 'validated_by', 'total_credits', 'gpa', 'level',
     350        'total_credits_s1', 'total_credits_s2')
     351
     352    form_fields['imported_gpa'].for_display = True
     353    form_fields['imported_cgpa'].for_display = True
    330354
    331355class CustomStudyLevelEditFormPage(StudyLevelEditFormPage):
Note: See TracChangeset for help on using the changeset viewer.