Commit bf96db8a by Victor Shnayder

Fix course tag name on export of definition

parent 99694fce
...@@ -231,6 +231,8 @@ class XmlDescriptor(XModuleDescriptor): ...@@ -231,6 +231,8 @@ class XmlDescriptor(XModuleDescriptor):
xml_object = self.definition_to_xml(resource_fs) xml_object = self.definition_to_xml(resource_fs)
self.__class__.clean_metadata_from_xml(xml_object) self.__class__.clean_metadata_from_xml(xml_object)
xml_object.tag = self.category
xml_object.set('slug', self.name)
# Put content in a separate file if it's large (has more than 5 descendent tags) # Put content in a separate file if it's large (has more than 5 descendent tags)
if len(list(xml_object.iter())) > 5: if len(list(xml_object.iter())) > 5:
...@@ -244,9 +246,6 @@ class XmlDescriptor(XModuleDescriptor): ...@@ -244,9 +246,6 @@ class XmlDescriptor(XModuleDescriptor):
xml_object.set('filename', self.name) xml_object.set('filename', self.name)
xml_object.set('slug', self.name)
xml_object.tag = self.category
for attr in self.metadata_attributes: for attr in self.metadata_attributes:
attr_map = self.xml_attribute_map.get(attr, AttrMap(attr)) attr_map = self.xml_attribute_map.get(attr, AttrMap(attr))
metadata_key = attr_map.metadata_key metadata_key = attr_map.metadata_key
......
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