Changeset 15511 for main/waeup.aaue/trunk/src/waeup/aaue/students
- Timestamp:
- 24 Jul 2019, 19:11:11 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py
r15483 r15511 416 416 emit_lock_message(self) 417 417 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_pg423 elif self.context.student.current_mode.startswith('dp'):424 deadline = academic_session.coursereg_deadline_dp425 elif self.context.student.current_mode in (426 'ug_pt', 'de_pt', 'de_dsh', 'ug_dsh'):427 deadline = academic_session.coursereg_deadline_pt428 elif self.context.student.current_mode == 'found':429 deadline = academic_session.coursereg_deadline_found430 elif self.context.student.current_mode == 'bridge':431 deadline = academic_session.coursereg_deadline_bridge432 else:433 deadline = academic_session.coursereg_deadline434 except (TypeError, KeyError):435 deadline = None436 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") 440 440 elif str(self.context.__parent__.current_level) != self.context.__name__: 441 441 self.flash(_('This is not your current level.'), type="danger")
Note: See TracChangeset for help on using the changeset viewer.