Ignore:
Timestamp:
24 Jul 2019, 19:11:11 (5 years ago)
Author:
Henrik Bettermann
Message:

ivama: urgently enable "unregister_courses" i.e when course registration has ended... Just that the student will have to pay late_registration before he/she will be enable to register the course form again

File:
1 edited

Legend:

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

    r15483 r15511  
    416416            emit_lock_message(self)
    417417            return
    418         try:
    419             academic_session = grok.getSite()['configuration'][
    420                 str(self.context.level_session)]
    421             if self.context.student.is_postgrad:
    422                 deadline = academic_session.coursereg_deadline_pg
    423             elif self.context.student.current_mode.startswith('dp'):
    424                 deadline = academic_session.coursereg_deadline_dp
    425             elif self.context.student.current_mode in (
    426                 'ug_pt', 'de_pt', 'de_dsh', 'ug_dsh'):
    427                 deadline = academic_session.coursereg_deadline_pt
    428             elif self.context.student.current_mode == 'found':
    429                 deadline = academic_session.coursereg_deadline_found
    430             elif self.context.student.current_mode == 'bridge':
    431                 deadline = academic_session.coursereg_deadline_bridge
    432             else:
    433                 deadline = academic_session.coursereg_deadline
    434         except (TypeError, KeyError):
    435             deadline = None
    436         if deadline and deadline < datetime.now(pytz.utc):
    437             self.flash(_(
    438                 "Course registration has ended. "
    439                 "Unregistration is disabled."), type="danger")
     418        #try:
     419        #    academic_session = grok.getSite()['configuration'][
     420        #        str(self.context.level_session)]
     421        #    if self.context.student.is_postgrad:
     422        #        deadline = academic_session.coursereg_deadline_pg
     423        #    elif self.context.student.current_mode.startswith('dp'):
     424        #        deadline = academic_session.coursereg_deadline_dp
     425        #    elif self.context.student.current_mode in (
     426        #        'ug_pt', 'de_pt', 'de_dsh', 'ug_dsh'):
     427        #        deadline = academic_session.coursereg_deadline_pt
     428        #    elif self.context.student.current_mode == 'found':
     429        #        deadline = academic_session.coursereg_deadline_found
     430        #    elif self.context.student.current_mode == 'bridge':
     431        #        deadline = academic_session.coursereg_deadline_bridge
     432        #    else:
     433        #        deadline = academic_session.coursereg_deadline
     434        #except (TypeError, KeyError):
     435        #    deadline = None
     436        #if deadline and deadline < datetime.now(pytz.utc):
     437        #    self.flash(_(
     438        #        "Course registration has ended. "
     439        #        "Unregistration is disabled."), type="danger")
    440440        elif str(self.context.__parent__.current_level) != self.context.__name__:
    441441            self.flash(_('This is not your current level.'), type="danger")
Note: See TracChangeset for help on using the changeset viewer.