diff --git a/lms/djangoapps/courseware/courses.py b/lms/djangoapps/courseware/courses.py index 878f12e2dd..087cb9c2eb 100644 --- a/lms/djangoapps/courseware/courses.py +++ b/lms/djangoapps/courseware/courses.py @@ -36,7 +36,7 @@ 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(): + if course_must_be_open and not (course.has_started() or settings.MITX_FEATURES['DISABLE_START_DATES']): raise Http404("This course has not yet started.") return course diff --git a/lms/envs/common.py b/lms/envs/common.py index 3b005c5dbe..6082314a15 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -41,6 +41,7 @@ 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 + 'DISABLE_START_DATES': False, # When True, all courses will be active, regardless of start date } # Used for A/B testing diff --git a/lms/envs/dev.py b/lms/envs/dev.py index ff4e853c12..487ccfb3e7 100644 --- a/lms/envs/dev.py +++ b/lms/envs/dev.py @@ -13,6 +13,8 @@ from .logsettings import get_logger_config DEBUG = True TEMPLATE_DEBUG = True +MITX_FEATURES['DISABLE_START_DATES'] = True + WIKI_ENABLED = True LOGGING = get_logger_config(ENV_ROOT / "log", diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index b0d4308253..ca3b273fc3 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -65,7 +65,7 @@
<% - if course.has_started(): + if course.has_started() or settings.MITX_FEATURES['DISABLE_START_DATES']: course_target = reverse('info', args=[course.id]) else: course_target = reverse('about_course', args=[course.id])