Ignore:
Timestamp:
2 Nov 2016, 07:14:58 (8 years ago)
Author:
Henrik Bettermann
Message:

Replace course_registration_allowed by course_registration_forbidden method.

File:
1 edited

Legend:

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

    r14226 r14247  
    15921592            emit_lock_message(self)
    15931593            return
    1594         elif not self.context.course_registration_allowed:
     1594        try:
     1595            deadline = grok.getSite()['configuration'][
     1596                str(self.context.level_session)].coursereg_deadline
     1597        except (TypeError, KeyError):
     1598            deadline = None
     1599        if deadline and deadline < datetime.now(pytz.utc):
    15951600            self.flash(_(
    15961601                "Course registration has ended. "
     
    27242729                mapping = {'a':max_credits}), type="warning")
    27252730            return
    2726         if not self.context.course_registration_allowed:
    2727             self.flash(_(
    2728                 "Course registration has ended. "
    2729                 "Please pay the late registration fee."), type="warning")
    2730             #self.redirect(self.url(self.context))
     2731        msg = self.context.course_registration_forbidden
     2732        if msg:
     2733            self.flash(msg, type="warning")
    27312734            return
    27322735        IWorkflowInfo(self.context.student).fireTransition(
Note: See TracChangeset for help on using the changeset viewer.