Commit 0099ee09 by Don Mitchell

Clarify repr by naming

parent b81e5504
...@@ -1129,11 +1129,11 @@ class SplitMongoModuleStore(ModuleStoreBase): ...@@ -1129,11 +1129,11 @@ class SplitMongoModuleStore(ModuleStoreBase):
""" """
return {} 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 return
if inheriting_settings is None: if inheriting_settings is None:
...@@ -1143,11 +1143,11 @@ class SplitMongoModuleStore(ModuleStoreBase): ...@@ -1143,11 +1143,11 @@ class SplitMongoModuleStore(ModuleStoreBase):
# NOTE: this should show the values which all fields would have if inherited: i.e., # 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 # 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. # 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 # update the inheriting w/ what should pass to children
inheriting_settings = block['_inherited_settings'].copy() inheriting_settings = block_json['_inherited_settings'].copy()
block_fields = block['fields'] block_fields = block_json['fields']
for field_name in inheritance.InheritanceMixin.fields: for field_name in inheritance.InheritanceMixin.fields:
if field_name in block_fields: if field_name in block_fields:
inheriting_settings[field_name] = block_fields[field_name] inheriting_settings[field_name] = block_fields[field_name]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment