diff --git a/common/lib/xmodule/xmodule/abtest_module.py b/common/lib/xmodule/xmodule/abtest_module.py index 6261945a5b..3091b6ec02 100644 --- a/common/lib/xmodule/xmodule/abtest_module.py +++ b/common/lib/xmodule/xmodule/abtest_module.py @@ -66,7 +66,7 @@ class ABTestModule(XModule): class ABTestDescriptor(RawDescriptor, XmlDescriptor): module_class = ABTestModule -# template_dir_name = "abtest" + template_dir_name = "abtest" def __init__(self, system, definition=None, **kwargs): """ diff --git a/common/lib/xmodule/xmodule/template_module.py b/common/lib/xmodule/xmodule/template_module.py index 13eab038ec..4df1c4ee3a 100644 --- a/common/lib/xmodule/xmodule/template_module.py +++ b/common/lib/xmodule/xmodule/template_module.py @@ -38,6 +38,7 @@ class CustomTagModule(XModule): class CustomTagDescriptor(RawDescriptor): """ Descriptor for custom tags. Loads the template when created.""" module_class = CustomTagModule + template_dir_name = 'customtag' @staticmethod def render_template(system, xml_data): diff --git a/common/lib/xmodule/xmodule/templates.py b/common/lib/xmodule/xmodule/templates.py index dcb731b135..ce37df929f 100644 --- a/common/lib/xmodule/xmodule/templates.py +++ b/common/lib/xmodule/xmodule/templates.py @@ -31,8 +31,6 @@ def all_templates(): templates = defaultdict(list) for category, descriptor in XModuleDescriptor.load_classes(): - if category == 'course': - logging.debug(descriptor.templates()) templates[category] = descriptor.templates() return templates @@ -67,7 +65,13 @@ def update_templates(): template_location = Location('i4x', 'edx', 'templates', category, Location.clean_for_url_name(template.metadata['display_name'])) try: - json_data = {'definition': {'data': template.data, 'children' : template.children}} + json_data = { + 'definition': { + 'data': template.data, + 'children': template.children + }, + 'metadata': template.metadata + } json_data['location'] = template_location.dict() XModuleDescriptor.load_from_json(json_data, TemplateTestSystem()) diff --git a/common/lib/xmodule/xmodule/templates/course/empty.yaml b/common/lib/xmodule/xmodule/templates/course/empty.yaml index b0af998ddd..cb2f3bcec6 100644 --- a/common/lib/xmodule/xmodule/templates/course/empty.yaml +++ b/common/lib/xmodule/xmodule/templates/course/empty.yaml @@ -1,5 +1,6 @@ --- metadata: display_name: Empty + start: 2020-10-10T10:00 data: { 'textbooks' : [ ], 'wiki_slug' : null } children: []