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
cea871ec
Commit
cea871ec
authored
Feb 02, 2017
by
Calen Pennington
Committed by
GitHub
Feb 02, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14336 from CredoReference/split_mongo_copy_subdag_fix_asides
Fix asides to copy them during publish operation
parents
9436edf8
5d887adc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
common/lib/xmodule/xmodule/modulestore/split_mongo/split.py
+3
-1
common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py
+6
-2
No files found.
common/lib/xmodule/xmodule/modulestore/split_mongo/split.py
View file @
cea871ec
...
...
@@ -3199,6 +3199,7 @@ class SplitMongoModuleStore(SplitBulkWriteMixin, ModuleStoreWriteBase):
new_block
.
definition
,
destination_version
,
raw
=
True
,
asides
=
new_block
.
asides
,
block_defaults
=
new_block
.
defaults
)
# Extend the block's new edit_info with any extra edit_info fields from the source (e.g. original_usage):
...
...
@@ -3255,11 +3256,12 @@ class SplitMongoModuleStore(SplitBulkWriteMixin, ModuleStoreWriteBase):
:param definition_id: the pointer to the content scoped fields
:param new_id: the structure's version id
:param raw: true if this block already has all references serialized
:param asides: dict information related to the connected xblock asides
"""
if
not
raw
:
block_fields
=
self
.
_serialize_fields
(
category
,
block_fields
)
if
not
asides
:
asides
=
[]
asides
=
{}
document
=
{
'block_type'
:
category
,
'definition'
:
definition_id
,
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py
View file @
cea871ec
...
...
@@ -3395,13 +3395,17 @@ class TestAsidesWithMixedModuleStore(CommonMixedModuleStoreSetup):
_check_asides
(
item
)
# Private -> Public
self
.
store
.
publish
(
item_location
,
self
.
user_id
)
published_block
=
self
.
store
.
publish
(
item_location
,
self
.
user_id
)
_check_asides
(
published_block
)
item
=
self
.
store
.
get_item
(
item_location
)
self
.
assertTrue
(
self
.
store
.
has_published_version
(
item
))
_check_asides
(
item
)
# Public -> Private
self
.
store
.
unpublish
(
item_location
,
self
.
user_id
)
unpublished_block
=
self
.
store
.
unpublish
(
item_location
,
self
.
user_id
)
_check_asides
(
unpublished_block
)
item
=
self
.
store
.
get_item
(
item_location
)
self
.
assertFalse
(
self
.
store
.
has_published_version
(
item
))
_check_asides
(
item
)
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