diff --git a/xmodule/template_module.py b/xmodule/template_module.py index 86aadcf169..86dbe883f3 100644 --- a/xmodule/template_module.py +++ b/xmodule/template_module.py @@ -147,19 +147,18 @@ class TranslateCustomTagBlock( # pylint: disable=abstract-method resources_dir = None @classmethod - def from_xml(cls, xml_data, system, id_generator): + def parse_xml(cls, node, runtime, _keys, _id_generator): """ Transforms the xml_data from <$custom_tag attr="" attr=""/> to """ - xml_object = etree.fromstring(xml_data) - system.error_tracker(Text('WARNING: the <{tag}> tag is deprecated. ' - 'Instead, use . ') - .format(tag=xml_object.tag)) + runtime.error_tracker(Text('WARNING: the <{tag}> tag is deprecated. ' + 'Instead, use . ') + .format(tag=node.tag)) - tag = xml_object.tag - xml_object.tag = 'customtag' - xml_object.attrib['impl'] = tag + tag = node.tag + node.tag = 'customtag' + node.attrib['impl'] = tag - return system.process_xml(etree.tostring(xml_object)) + return runtime.process_xml(etree.tostring(node))