Enable course reruns by default.
TNL-1380
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -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": "",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ##################################
|
||||
|
||||
|
||||
@@ -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',)
|
||||
|
||||
Reference in New Issue
Block a user