Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions common/lib/xmodule/xmodule/capa_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -1152,10 +1152,11 @@ def from_xml(cls, xml_data, system, org=None, course=None):
Augment regular translation w/ setting the pre-Studio defaults.
"""
problem = super(CapaDescriptor, cls).from_xml(xml_data, system, org, course)
course_policy = system.policy.setdefault('course/{}'.format(system.url_name), {})
# pylint: disable=W0212
if 'showanswer' not in problem._model_data:
if 'showanswer' not in problem._model_data and 'showanswer' not in course_policy:
problem.showanswer = "closed"
if 'rerandomize' not in problem._model_data:
if 'rerandomize' not in problem._model_data and 'rerandomize' not in course_policy:
problem.rerandomize = "always"
return problem

Expand Down