Commit 400ff494 by Don Mitchell

Remove presumption of user's intent for imported xml attrs

Moved to xlint rather than setting to old default.
parent 2d085c42
...@@ -1155,20 +1155,6 @@ class CapaDescriptor(CapaFields, RawDescriptor): ...@@ -1155,20 +1155,6 @@ class CapaDescriptor(CapaFields, RawDescriptor):
path[8:], path[8:],
] ]
@classmethod
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 and 'showanswer' not in course_policy:
problem.showanswer = "closed"
if 'rerandomize' not in problem._model_data and 'rerandomize' not in course_policy:
problem.rerandomize = "always"
return problem
@property @property
def non_editable_metadata_fields(self): def non_editable_metadata_fields(self):
non_editable_fields = super(CapaDescriptor, self).non_editable_metadata_fields non_editable_fields = super(CapaDescriptor, self).non_editable_metadata_fields
......
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