From 4c82f35e2dfb959a0e29c0b1bcd97a116eb0e183 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Wed, 18 Jul 2012 15:23:19 -0400 Subject: [PATCH] Put data_dir into metadata for all XModuleDescriptors loaded from xml --- common/lib/xmodule/xmodule/modulestore/xml.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/modulestore/xml.py b/common/lib/xmodule/xmodule/modulestore/xml.py index 9b486c6e8d..4c5fe43e1d 100644 --- a/common/lib/xmodule/xmodule/modulestore/xml.py +++ b/common/lib/xmodule/xmodule/modulestore/xml.py @@ -129,6 +129,8 @@ class XMLModuleStore(ModuleStore): module = XModuleDescriptor.load_from_xml(etree.tostring(xml_data), self, org, course, xmlstore.default_class) log.debug('==> importing module location %s' % repr(module.location)) + module.metadata['data_dir'] = course_dir + xmlstore.modules[module.location] = module if xmlstore.eager: @@ -145,7 +147,6 @@ class XMLModuleStore(ModuleStore): XMLParsingSystem.__init__(self, **system_kwargs) course_descriptor = ImportSystem(self).process_xml(etree.tostring(course_data)) - course_descriptor.metadata['data_dir'] = course_dir log.debug('========> Done with course import') return course_descriptor