Commit 3e84de32 by Alan Boudreault

Better fix for MentoringBlock attributes saving.

parent b1e05c75
......@@ -127,7 +127,7 @@ class LightChildrenMixin(XBlockWithChildrenFragmentsMixin):
return
node = etree.parse(StringIO(self.xml_content)).getroot()
LightChildrenMixin.init_block_from_node(self, node, {})
LightChildrenMixin.init_block_from_node(self, node, node.items())
def get_children_objects(self):
"""
......
......@@ -179,7 +179,7 @@ class MentoringBlock(XBlockWithLightChildren):
xml_content = submissions['xml_content']
try:
xml = etree.parse(StringIO(xml_content))
etree.parse(StringIO(xml_content))
except etree.XMLSyntaxError as e:
response = {
'result': 'error',
......@@ -191,14 +191,6 @@ class MentoringBlock(XBlockWithLightChildren):
}
self.xml_content = xml_content
try:
self.url_name = xml.getroot().attrib['url_name']
except KeyError as e:
response = {
'result': 'error',
'message': 'mentoring "url_name" attribute is missing'
}
log.debug(u'Response from Studio: {}'.format(response))
return response
......
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