refactor: xmodule/capa_module.py -> xmodule/capa_block.py
This commit is contained in:
@@ -2455,12 +2455,12 @@ class SplitMongoModuleStore(SplitBulkWriteMixin, ModuleStoreWriteBase):
|
||||
new_block_info.defaults = new_block_info.fields
|
||||
|
||||
# <workaround>
|
||||
# CAPA modules store their 'markdown' value (an alternate representation of their content)
|
||||
# CAPA blocks store their 'markdown' value (an alternate representation of their content)
|
||||
# in Scope.settings rather than Scope.content :-/
|
||||
# markdown is a field that really should not be overridable - it fundamentally changes the content.
|
||||
# capa modules also use a custom editor that always saves their markdown field to the metadata,
|
||||
# capa blocks also use a custom editor that always saves their markdown field to the metadata,
|
||||
# even if it hasn't changed, which breaks our override system.
|
||||
# So until capa modules are fixed, we special-case them and remove their markdown fields,
|
||||
# So until capa blocks are fixed, we special-case them and remove their markdown fields,
|
||||
# forcing the inherited version to use XML only.
|
||||
if usage_key.block_type == 'problem' and 'markdown' in new_block_info.defaults:
|
||||
del new_block_info.defaults['markdown']
|
||||
|
||||
Reference in New Issue
Block a user