Translate metadata names that are coming in from the policy file as well as from xml attributes

This commit is contained in:
Calen Pennington
2013-03-12 15:33:18 -04:00
parent e786ed2f51
commit 8ace7eeb2d

View File

@@ -268,7 +268,7 @@ class XmlDescriptor(XModuleDescriptor):
"""
for attr in policy:
attr_map = cls.xml_attribute_map.get(attr, AttrMap())
metadata[attr] = attr_map.from_xml(policy[attr])
metadata[cls._translate(attr)] = attr_map.from_xml(policy[attr])
@classmethod
def from_xml(cls, xml_data, system, org=None, course=None):