Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
21c6812b
Commit
21c6812b
authored
10 years ago
by
Don Mitchell
Browse files
Options
Downloads
Patches
Plain Diff
More branch override precedence refinement
parent
f69ef41c
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py
+6
-5
6 additions, 5 deletions
...ib/xmodule/xmodule/modulestore/split_mongo/split_draft.py
with
6 additions
and
5 deletions
common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py
+
6
−
5
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment