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
9e6249dd
Commit
9e6249dd
authored
Jan 26, 2015
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable split for new courses.
parent
61f86369
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
21 deletions
+44
-21
cms/djangoapps/contentstore/views/course.py
+1
-4
cms/envs/common.py
+33
-7
lms/envs/common.py
+10
-10
No files found.
cms/djangoapps/contentstore/views/course.py
View file @
9e6249dd
...
@@ -664,10 +664,7 @@ def _create_new_course(request, org, number, run, fields):
...
@@ -664,10 +664,7 @@ def _create_new_course(request, org, number, run, fields):
Returns the URL for the course overview page.
Returns the URL for the course overview page.
Raises DuplicateCourseError if the course already exists
Raises DuplicateCourseError if the course already exists
"""
"""
store_for_new_course
=
(
store_for_new_course
=
modulestore
()
.
default_modulestore
.
get_modulestore_type
()
settings
.
FEATURES
.
get
(
'DEFAULT_STORE_FOR_NEW_COURSE'
)
or
modulestore
()
.
default_modulestore
.
get_modulestore_type
()
)
new_course
=
create_new_course_in_store
(
store_for_new_course
,
request
.
user
,
org
,
number
,
run
,
fields
)
new_course
=
create_new_course_in_store
(
store_for_new_course
,
request
.
user
,
org
,
number
,
run
,
fields
)
return
JsonResponse
({
return
JsonResponse
({
'url'
:
reverse_course_url
(
'course_handler'
,
new_course
.
id
),
'url'
:
reverse_course_url
(
'course_handler'
,
new_course
.
id
),
...
...
cms/envs/common.py
View file @
9e6249dd
...
@@ -35,7 +35,7 @@ import sys
...
@@ -35,7 +35,7 @@ import sys
import
lms.envs.common
import
lms.envs.common
# Although this module itself may not use these imported variables, other dependent modules may.
# Although this module itself may not use these imported variables, other dependent modules may.
from
lms.envs.common
import
(
from
lms.envs.common
import
(
USE_TZ
,
TECH_SUPPORT_EMAIL
,
PLATFORM_NAME
,
BUGS_EMAIL
,
DOC_STORE_CONFIG
,
ALL_LANGUAGES
,
WIKI_ENABLED
,
MODULESTORE
,
USE_TZ
,
TECH_SUPPORT_EMAIL
,
PLATFORM_NAME
,
BUGS_EMAIL
,
DOC_STORE_CONFIG
,
DATA_DIR
,
ALL_LANGUAGES
,
WIKI_ENABLED
,
update_module_store_settings
,
ASSET_IGNORE_REGEX
,
COPYRIGHT_YEAR
update_module_store_settings
,
ASSET_IGNORE_REGEX
,
COPYRIGHT_YEAR
)
)
from
path
import
path
from
path
import
path
...
@@ -112,9 +112,6 @@ FEATURES = {
...
@@ -112,9 +112,6 @@ FEATURES = {
# Turn off Advanced Security by default
# Turn off Advanced Security by default
'ADVANCED_SECURITY'
:
False
,
'ADVANCED_SECURITY'
:
False
,
# Modulestore to use for new courses
'DEFAULT_STORE_FOR_NEW_COURSE'
:
None
,
# Turn off Video Upload Pipeline through Studio, by default
# Turn off Video Upload Pipeline through Studio, by default
'ENABLE_VIDEO_UPLOAD_PIPELINE'
:
False
,
'ENABLE_VIDEO_UPLOAD_PIPELINE'
:
False
,
...
@@ -130,9 +127,7 @@ FEATURES = {
...
@@ -130,9 +127,7 @@ FEATURES = {
'ENABLE_EDXNOTES'
:
False
,
'ENABLE_EDXNOTES'
:
False
,
# Enable support for content libraries. Note that content libraries are
# Enable support for content libraries. Note that content libraries are
# only supported in courses using split mongo. Change the setting
# only supported in courses using split mongo.
# DEFAULT_STORE_FOR_NEW_COURSE to be 'split' to have future courses
# and libraries created with split.
'ENABLE_CONTENT_LIBRARIES'
:
False
,
'ENABLE_CONTENT_LIBRARIES'
:
False
,
# Milestones application flag
# Milestones application flag
...
@@ -314,6 +309,37 @@ XBLOCK_SELECT_FUNCTION = prefer_xmodules
...
@@ -314,6 +309,37 @@ XBLOCK_SELECT_FUNCTION = prefer_xmodules
############################ Modulestore Configuration ################################
############################ Modulestore Configuration ################################
MODULESTORE_BRANCH
=
'draft-preferred'
MODULESTORE_BRANCH
=
'draft-preferred'
MODULESTORE
=
{
'default'
:
{
'ENGINE'
:
'xmodule.modulestore.mixed.MixedModuleStore'
,
'OPTIONS'
:
{
'mappings'
:
{},
'stores'
:
[
{
'NAME'
:
'split'
,
'ENGINE'
:
'xmodule.modulestore.split_mongo.split_draft.DraftVersioningModuleStore'
,
'DOC_STORE_CONFIG'
:
DOC_STORE_CONFIG
,
'OPTIONS'
:
{
'default_class'
:
'xmodule.hidden_module.HiddenDescriptor'
,
'fs_root'
:
DATA_DIR
,
'render_template'
:
'edxmako.shortcuts.render_to_string'
,
}
},
{
'NAME'
:
'draft'
,
'ENGINE'
:
'xmodule.modulestore.mongo.DraftMongoModuleStore'
,
'DOC_STORE_CONFIG'
:
DOC_STORE_CONFIG
,
'OPTIONS'
:
{
'default_class'
:
'xmodule.hidden_module.HiddenDescriptor'
,
'fs_root'
:
DATA_DIR
,
'render_template'
:
'edxmako.shortcuts.render_to_string'
,
}
}
]
}
}
}
############################ DJANGO_BUILTINS ################################
############################ DJANGO_BUILTINS ################################
# Change DEBUG/TEMPLATE_DEBUG in your environment settings files, not here
# Change DEBUG/TEMPLATE_DEBUG in your environment settings files, not here
DEBUG
=
False
DEBUG
=
False
...
...
lms/envs/common.py
View file @
9e6249dd
...
@@ -627,6 +627,16 @@ MODULESTORE = {
...
@@ -627,6 +627,16 @@ MODULESTORE = {
'mappings'
:
{},
'mappings'
:
{},
'stores'
:
[
'stores'
:
[
{
{
'NAME'
:
'split'
,
'ENGINE'
:
'xmodule.modulestore.split_mongo.split_draft.DraftVersioningModuleStore'
,
'DOC_STORE_CONFIG'
:
DOC_STORE_CONFIG
,
'OPTIONS'
:
{
'default_class'
:
'xmodule.hidden_module.HiddenDescriptor'
,
'fs_root'
:
DATA_DIR
,
'render_template'
:
'edxmako.shortcuts.render_to_string'
,
}
},
{
'NAME'
:
'draft'
,
'NAME'
:
'draft'
,
'ENGINE'
:
'xmodule.modulestore.mongo.DraftMongoModuleStore'
,
'ENGINE'
:
'xmodule.modulestore.mongo.DraftMongoModuleStore'
,
'DOC_STORE_CONFIG'
:
DOC_STORE_CONFIG
,
'DOC_STORE_CONFIG'
:
DOC_STORE_CONFIG
,
...
@@ -643,17 +653,7 @@ MODULESTORE = {
...
@@ -643,17 +653,7 @@ MODULESTORE = {
'data_dir'
:
DATA_DIR
,
'data_dir'
:
DATA_DIR
,
'default_class'
:
'xmodule.hidden_module.HiddenDescriptor'
,
'default_class'
:
'xmodule.hidden_module.HiddenDescriptor'
,
}
}
},
{
'NAME'
:
'split'
,
'ENGINE'
:
'xmodule.modulestore.split_mongo.split_draft.DraftVersioningModuleStore'
,
'DOC_STORE_CONFIG'
:
DOC_STORE_CONFIG
,
'OPTIONS'
:
{
'default_class'
:
'xmodule.hidden_module.HiddenDescriptor'
,
'fs_root'
:
DATA_DIR
,
'render_template'
:
'edxmako.shortcuts.render_to_string'
,
}
}
},
]
]
}
}
}
}
...
...
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