Commit 7351317c by Vik Paruchuri

Fix tag naming

parent e9d24ad7
...@@ -655,7 +655,7 @@ class OpenEndedDescriptor(XmlDescriptor, EditingDescriptor): ...@@ -655,7 +655,7 @@ class OpenEndedDescriptor(XmlDescriptor, EditingDescriptor):
} }
""" """
for child in ['rubric', 'prompt', 'oeparam']: for child in ['openendedrubric', 'prompt', 'openendedparam']:
if len(xml_object.xpath(child)) != 1: if len(xml_object.xpath(child)) != 1:
raise ValueError("Open Ended definition must include exactly one '{0}' tag".format(child)) raise ValueError("Open Ended definition must include exactly one '{0}' tag".format(child))
...@@ -663,9 +663,9 @@ class OpenEndedDescriptor(XmlDescriptor, EditingDescriptor): ...@@ -663,9 +663,9 @@ class OpenEndedDescriptor(XmlDescriptor, EditingDescriptor):
"""Assumes that xml_object has child k""" """Assumes that xml_object has child k"""
return stringify_children(xml_object.xpath(k)[0]) return stringify_children(xml_object.xpath(k)[0])
return {'rubric': parse('rubric'), return {'rubric': parse('openendedrubric'),
'prompt': parse('prompt'), 'prompt': parse('prompt'),
'oeparam': parse('oeparam'), 'oeparam': parse('openendedparam'),
} }
...@@ -678,7 +678,7 @@ class OpenEndedDescriptor(XmlDescriptor, EditingDescriptor): ...@@ -678,7 +678,7 @@ class OpenEndedDescriptor(XmlDescriptor, EditingDescriptor):
child_node = etree.fromstring(child_str) child_node = etree.fromstring(child_str)
elt.append(child_node) elt.append(child_node)
for child in ['rubric', 'prompt', 'oeparam']: for child in ['openendedrubric', 'prompt', 'openendedparam']:
add_child(child) add_child(child)
return elt return elt
......
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