Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
60836459
Commit
60836459
authored
Feb 12, 2015
by
Christina Roberts
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6965 from edx/christina/course-reruns-default
Enable course reruns by default.
parents
ee03612a
0d296990
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
22 deletions
+18
-22
cms/djangoapps/contentstore/tests/test_contentstore.py
+13
-14
cms/djangoapps/contentstore/views/course.py
+1
-1
cms/envs/bok_choy.env.json
+0
-1
cms/envs/common.py
+3
-0
cms/envs/dev.py
+1
-2
cms/envs/devstack.py
+0
-4
No files found.
cms/djangoapps/contentstore/tests/test_contentstore.py
View file @
60836459
...
...
@@ -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
...
...
cms/djangoapps/contentstore/views/course.py
View file @
60836459
...
...
@@ -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'
,
Fals
e
)
'allow_course_reruns'
:
settings
.
FEATURES
.
get
(
'ALLOW_COURSE_RERUNS'
,
Tru
e
)
})
...
...
cms/envs/bok_choy.env.json
View file @
60836459
...
...
@@ -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"
:
""
,
...
...
cms/envs/common.py
View file @
60836459
...
...
@@ -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
...
...
cms/envs/dev.py
View file @
60836459
...
...
@@ -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 vari
u
ous services
# Enable URL that shows information about the status of various services
FEATURES
[
'ENABLE_SERVICE_STATUS'
]
=
True
FEATURES
[
'ALLOW_COURSE_RERUNS'
]
=
True
############################# SEGMENT-IO ##################################
...
...
cms/envs/devstack.py
View file @
60836459
...
...
@@ -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'
,)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment