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
21c6812b
Commit
21c6812b
authored
Aug 07, 2014
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More branch override precedence refinement
parent
f69ef41c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py
+6
-5
No files found.
common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py
View file @
21c6812b
...
...
@@ -39,8 +39,9 @@ class DraftVersioningModuleStore(ModuleStoreDraftAndPublished, SplitMongoModuleS
# create any other necessary things as a side effect: ensure they populate the draft branch
# and rely on auto publish to populate the published branch: split's create course doesn't
# call super b/c it needs the auto publish above to have happened before any of the create_items
# in this
# in this
. The explicit use of SplitMongoModuleStore is intentional
with
self
.
branch_setting
(
ModuleStoreEnum
.
Branch
.
draft_preferred
,
item
.
id
):
# pylint: disable=bad-super-call
super
(
SplitMongoModuleStore
,
self
)
.
create_course
(
org
,
course
,
run
,
user_id
,
runtime
=
item
.
runtime
,
**
kwargs
)
...
...
@@ -160,10 +161,10 @@ class DraftVersioningModuleStore(ModuleStoreDraftAndPublished, SplitMongoModuleS
return
key
.
for_branch
(
ModuleStoreEnum
.
BranchName
.
published
)
elif
revision
==
ModuleStoreEnum
.
RevisionOption
.
draft_only
:
return
key
.
for_branch
(
ModuleStoreEnum
.
BranchName
.
draft
)
elif
key
.
branch
is
not
None
:
return
key
elif
revision
==
None
:
if
self
.
get_branch_setting
(
key
)
==
ModuleStoreEnum
.
Branch
.
draft_preferred
:
elif
revision
is
None
:
if
key
.
branch
is
not
None
:
return
key
el
if
self
.
get_branch_setting
(
key
)
==
ModuleStoreEnum
.
Branch
.
draft_preferred
:
return
key
.
for_branch
(
ModuleStoreEnum
.
BranchName
.
draft
)
else
:
return
key
.
for_branch
(
ModuleStoreEnum
.
BranchName
.
published
)
...
...
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