Ignore:
Timestamp:
8 Mar 2021, 11:44:54 (4 years ago)
Author:
Henrik Bettermann
Message:

minimumStudentPayments does not apply to JUPEB students.

A student who does not meet the requirement should not be able to Download the Bio Data Slip.

Location:
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py

    r16409 r16410  
    181181
    182182    def render(self):
     183        if not self.context.minimumStudentPayments():
     184            self.redirect(self.url(self.context))
     185            return
    183186        studentview = StudentBasePDFFormPage(self.context.student,
    184187            self.request, self.omit_fields)
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/student.py

    r16409 r16410  
    7272        if self.sponsor in ['bauchi', 'federalgov', 'kano']:
    7373            return True
     74        if self.is_jupeb:
     75            return True
    7476        try:
    7577            certificate = self['studycourse'].certificate
     
    8183                and ticket.p_session >= self.current_session \
    8284                and ticket.p_category in ('schoolfee', 'schoolfee40',
    83                                           'secondinstal', 'clearance',
    84                                           'jupeb_acc'):
     85                                          'secondinstal', 'clearance',):
    8586                total_amount += ticket.amount_auth
    8687        if self.is_fresh:
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/viewlets.py

    r16298 r16410  
    2929from waeup.kofa.students.browser import (
    3030    ExportPDFClearanceSlip, StudyCourseDisplayFormPage,
    31     StudyLevelDisplayFormPage, StudentBaseDisplayFormPage)
     31    StudyLevelDisplayFormPage, StudentBaseDisplayFormPage,
     32    StudentPersonalEditFormPage)
    3233from waeup.kofa.students.viewlets import (
    3334    AddPreviousPaymentActionButton, AddBalancePaymentActionButton,
     
    8081    grok.order(10)
    8182    grok.context(ICustomStudent)
    82     grok.view(StudentBaseDisplayFormPage)
     83    grok.view(StudentPersonalEditFormPage)
    8384    grok.require('waeup.viewStudent')
    8485    text = _('Download bio data slip')
     
    8889    @property
    8990    def target_url(self):
     91        if not self.context.minimumStudentPayments():
     92            return ''
    9093        #if not self.context.is_fresh:
    9194        #    return ''
Note: See TracChangeset for help on using the changeset viewer.