From 050cb89cf77f9ba2f95682c3c5679594494a4100 Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Thu, 29 Nov 2012 13:24:41 -0500 Subject: [PATCH] fix crash with working with custom tags with XML filestore --- common/lib/xmodule/xmodule/template_module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/template_module.py b/common/lib/xmodule/xmodule/template_module.py index cca2cb0ca8..07ef2c6511 100644 --- a/common/lib/xmodule/xmodule/template_module.py +++ b/common/lib/xmodule/xmodule/template_module.py @@ -3,7 +3,7 @@ from xmodule.raw_module import RawDescriptor from lxml import etree from mako.template import Template from xmodule.modulestore.django import modulestore - +import logging class CustomTagModule(XModule): """ @@ -61,7 +61,7 @@ class CustomTagDescriptor(RawDescriptor): # cdodge: look up the template as a module template_loc = self.location._replace(category='custom_tag_template', name=template_name) - template_module = modulestore().get_item(template_loc) + template_module = modulestore().get_instance(system.course_id, template_loc) template_module_data = template_module.definition['data'] template = Template(template_module_data) return template.render(**params)