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
0099ee09
Commit
0099ee09
authored
Sep 05, 2013
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify repr by naming
parent
b81e5504
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
common/lib/xmodule/xmodule/modulestore/split_mongo/split.py
+6
-6
No files found.
common/lib/xmodule/xmodule/modulestore/split_mongo/split.py
View file @
0099ee09
...
...
@@ -1129,11 +1129,11 @@ class SplitMongoModuleStore(ModuleStoreBase):
"""
return
{}
def
inherit_settings
(
self
,
block_map
,
block
,
inheriting_settings
=
None
):
def
inherit_settings
(
self
,
block_map
,
block
_json
,
inheriting_settings
=
None
):
"""
Updates block with any inheritable setting set by an ancestor and recurses to children.
Updates block
_json
with any inheritable setting set by an ancestor and recurses to children.
"""
if
block
is
None
:
if
block
_json
is
None
:
return
if
inheriting_settings
is
None
:
...
...
@@ -1143,11 +1143,11 @@ class SplitMongoModuleStore(ModuleStoreBase):
# NOTE: this should show the values which all fields would have if inherited: i.e.,
# not set to the locally defined value but to value set by nearest ancestor who sets it
# ALSO NOTE: no xblock should ever define a _inherited_settings field as it will collide w/ this logic.
block
.
setdefault
(
'_inherited_settings'
,
{})
.
update
(
inheriting_settings
)
block
_json
.
setdefault
(
'_inherited_settings'
,
{})
.
update
(
inheriting_settings
)
# update the inheriting w/ what should pass to children
inheriting_settings
=
block
[
'_inherited_settings'
]
.
copy
()
block_fields
=
block
[
'fields'
]
inheriting_settings
=
block
_json
[
'_inherited_settings'
]
.
copy
()
block_fields
=
block
_json
[
'fields'
]
for
field_name
in
inheritance
.
InheritanceMixin
.
fields
:
if
field_name
in
block_fields
:
inheriting_settings
[
field_name
]
=
block_fields
[
field_name
]
...
...
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