From 98910a2d49bf28a365e09d4076320ad47eecc2c7 Mon Sep 17 00:00:00 2001 From: Calen Pennington <calen.pennington@gmail.com> Date: Tue, 24 Jul 2012 14:46:46 -0400 Subject: [PATCH] Address review comments --- lms/djangoapps/courseware/courses.py | 3 ++- lms/envs/common.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/courseware/courses.py b/lms/djangoapps/courseware/courses.py index 087cb9c2eba..c2c391b08e1 100644 --- a/lms/djangoapps/courseware/courses.py +++ b/lms/djangoapps/courseware/courses.py @@ -36,7 +36,8 @@ def check_course(course_id, course_must_be_open=True, course_required=True): except (KeyError, ItemNotFoundError): raise Http404("Course not found.") - if course_must_be_open and not (course.has_started() or settings.MITX_FEATURES['DISABLE_START_DATES']): + started = course.has_started() or settings.MITX_FEATURES['DISABLE_START_DATES'] + if course_must_be_open and not started: raise Http404("This course has not yet started.") return course diff --git a/lms/envs/common.py b/lms/envs/common.py index 6082314a156..22e5fcf993e 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -41,6 +41,9 @@ MITX_FEATURES = { 'DISPLAY_HISTOGRAMS_TO_STAFF' : True, 'REROUTE_ACTIVATION_EMAIL' : False, # nonempty string = address for all activation emails 'DEBUG_LEVEL' : 0, # 0 = lowest level, least verbose, 255 = max level, most verbose + + ## DO NOT SET TO True IN THIS FILE + ## Doing so will cause all courses to be released on production 'DISABLE_START_DATES': False, # When True, all courses will be active, regardless of start date } -- GitLab