diff --git a/cms/djangoapps/contentstore/tests/test_contentstore.py b/cms/djangoapps/contentstore/tests/test_contentstore.py index b804ed07cb..a6ca0aa2f4 100644 --- a/cms/djangoapps/contentstore/tests/test_contentstore.py +++ b/cms/djangoapps/contentstore/tests/test_contentstore.py @@ -1679,24 +1679,23 @@ class RerunCourseTest(ContentStoreTestCase): self.verify_rerun_course(rerun_course_key, rerun_of_rerun_course_key, rerun_of_rerun_data['display_name']) def test_rerun_course_fail_no_source_course(self): - with mock.patch.dict('django.conf.settings.FEATURES', {'ALLOW_COURSE_RERUNS': True}): - existent_course_key = CourseFactory.create().id - non_existent_course_key = CourseLocator("org", "non_existent_course", "non_existent_run") - destination_course_key = self.post_rerun_request(non_existent_course_key) + existent_course_key = CourseFactory.create().id + non_existent_course_key = CourseLocator("org", "non_existent_course", "non_existent_run") + destination_course_key = self.post_rerun_request(non_existent_course_key) - # Verify that the course rerun action is marked failed - rerun_state = CourseRerunState.objects.find_first(course_key=destination_course_key) - self.assertEquals(rerun_state.state, CourseRerunUIStateManager.State.FAILED) - self.assertIn("Cannot find a course at", rerun_state.message) + # Verify that the course rerun action is marked failed + rerun_state = CourseRerunState.objects.find_first(course_key=destination_course_key) + self.assertEquals(rerun_state.state, CourseRerunUIStateManager.State.FAILED) + self.assertIn("Cannot find a course at", rerun_state.message) - # Verify that the creator is not enrolled in the course. - self.assertFalse(CourseEnrollment.is_enrolled(self.user, non_existent_course_key)) + # Verify that the creator is not enrolled in the course. + self.assertFalse(CourseEnrollment.is_enrolled(self.user, non_existent_course_key)) - # Verify that the existing course continues to be in the course listings - self.assertInCourseListing(existent_course_key) + # Verify that the existing course continues to be in the course listings + self.assertInCourseListing(existent_course_key) - # Verify that the failed course is NOT in the course listings - self.assertInUnsucceededCourseActions(destination_course_key) + # Verify that the failed course is NOT in the course listings + self.assertInUnsucceededCourseActions(destination_course_key) def test_rerun_course_fail_duplicate_course(self): existent_course_key = CourseFactory.create().id diff --git a/cms/djangoapps/contentstore/views/course.py b/cms/djangoapps/contentstore/views/course.py index 92e9df5230..ebac9c21a1 100644 --- a/cms/djangoapps/contentstore/views/course.py +++ b/cms/djangoapps/contentstore/views/course.py @@ -459,7 +459,7 @@ def course_listing(request): 'course_creator_status': _get_course_creator_status(request.user), 'rerun_creator_status': GlobalStaff().has_user(request.user), 'allow_unicode_course_id': settings.FEATURES.get('ALLOW_UNICODE_COURSE_ID', False), - 'allow_course_reruns': settings.FEATURES.get('ALLOW_COURSE_RERUNS', False) + 'allow_course_reruns': settings.FEATURES.get('ALLOW_COURSE_RERUNS', True) }) diff --git a/cms/envs/bok_choy.env.json b/cms/envs/bok_choy.env.json index c24495433d..2be0a45e66 100644 --- a/cms/envs/bok_choy.env.json +++ b/cms/envs/bok_choy.env.json @@ -74,7 +74,6 @@ "SUBDOMAIN_BRANDING": false, "SUBDOMAIN_COURSE_LISTINGS": false, "ALLOW_ALL_ADVANCED_COMPONENTS": true, - "ALLOW_COURSE_RERUNS": true, "ENABLE_CONTENT_LIBRARIES": true }, "FEEDBACK_SUBMISSION_EMAIL": "", diff --git a/cms/envs/common.py b/cms/envs/common.py index fbc8eb311a..a56691c57b 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -144,6 +144,9 @@ FEATURES = { # Enable the courseware search functionality 'ENABLE_COURSEWARE_INDEX': False, + + # Enable course reruns, which will always use the split modulestore + 'ALLOW_COURSE_RERUNS': True, } ENABLE_JASMINE = False diff --git a/cms/envs/dev.py b/cms/envs/dev.py index a82da4cfcd..f0c639be9b 100644 --- a/cms/envs/dev.py +++ b/cms/envs/dev.py @@ -163,9 +163,8 @@ DEBUG_TOOLBAR_CONFIG = { # Stacktraces slow down page loads drastically (for pages with lots of queries). DEBUG_TOOLBAR_MONGO_STACKTRACES = False -# Enable URL that shows information about the status of variuous services +# Enable URL that shows information about the status of various services FEATURES['ENABLE_SERVICE_STATUS'] = True -FEATURES['ALLOW_COURSE_RERUNS'] = True ############################# SEGMENT-IO ################################## diff --git a/cms/envs/devstack.py b/cms/envs/devstack.py index 1b8f94c92a..abb9abfa01 100644 --- a/cms/envs/devstack.py +++ b/cms/envs/devstack.py @@ -40,10 +40,6 @@ FEATURES['ALLOW_ALL_ADVANCED_COMPONENTS'] = True # By default don't use a worker, execute tasks as if they were local functions CELERY_ALWAYS_EAGER = True -################################ COURSE RERUNS ################################ - -FEATURES['ALLOW_COURSE_RERUNS'] = True - ################################ DEBUG TOOLBAR ################################ INSTALLED_APPS += ('debug_toolbar', 'debug_toolbar_mongo') MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',)