Ignore:
Timestamp:
6 Feb 2022, 22:01:22 (3 years ago)
Author:
Henrik Bettermann
Message:

Redirect after Plagiarism Test payment.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/students
Files:
1 added
1 edited

Legend:

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

    r16509 r16782  
    2727    REQUESTED, IExtFileStore, IKofaUtils, IObjectHistory)
    2828from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget
    29 from waeup.kofa.browser.layout import action, KofaEditFormPage, UtilityView
     29from waeup.kofa.browser.layout import action, KofaEditFormPage, UtilityView, KofaPage
    3030from waeup.kofa.students.browser import (
    3131    StudentBaseEditFormPage,
     
    920920            self.context.student, studentview,
    921921            omit_fields=self.omit_fields,)
     922
     923class PlagTestInfoPage(KofaPage):
     924    "Landing page after plagiation test payment"
     925    grok.context(ICustomStudentOnlinePayment)
     926    grok.name('plagtestinfo')
     927    grok.require('waeup.handleStudent')
     928
     929    def update(self):
     930        if self.context.p_state != 'paid' \
     931            or self.contest.p_category != 'plag_test':
     932            self.flash(_('Forbidden'), type="danger")
     933            self.redirect(self.url(self.context))
     934        return super(PlagTestInfoPage, self).update()
Note: See TracChangeset for help on using the changeset viewer.