diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index 052f4eefe7..ae7ebc3b78 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -644,6 +644,8 @@ class CapaDescriptor(RawDescriptor): # actually use type and points? metadata_attributes = RawDescriptor.metadata_attributes + ('type', 'points') + template_dir_name = 'problem' + # VS[compat] # TODO (cpennington): Delete this method once all fall 2012 course are being # edited in the cms diff --git a/common/lib/xmodule/xmodule/templates/default/empty.json b/common/lib/xmodule/xmodule/templates/default/empty.json deleted file mode 100644 index be5d368dbc..0000000000 --- a/common/lib/xmodule/xmodule/templates/default/empty.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "metadata": { "display_name": "Empty" }, - "data": "", - "children": [] -} diff --git a/common/lib/xmodule/xmodule/templates/default/empty.yaml b/common/lib/xmodule/xmodule/templates/default/empty.yaml new file mode 100644 index 0000000000..a2fb2b5832 --- /dev/null +++ b/common/lib/xmodule/xmodule/templates/default/empty.yaml @@ -0,0 +1,5 @@ +--- +metadata: + display_name: Empty +data: "" +children: [] diff --git a/common/lib/xmodule/xmodule/templates/problem/multiline.yaml b/common/lib/xmodule/xmodule/templates/problem/multiline.yaml new file mode 100644 index 0000000000..94df320bfe --- /dev/null +++ b/common/lib/xmodule/xmodule/templates/problem/multiline.yaml @@ -0,0 +1,7 @@ +--- +metadata: + display_name: Multiline XML +data: | + + +children: [] diff --git a/common/lib/xmodule/xmodule/x_module.py b/common/lib/xmodule/xmodule/x_module.py index f7560c7a55..cf08a0b7b2 100644 --- a/common/lib/xmodule/xmodule/x_module.py +++ b/common/lib/xmodule/xmodule/x_module.py @@ -1,6 +1,6 @@ import logging import pkg_resources -import json +import yaml import os from functools import partial @@ -352,7 +352,7 @@ class ResourceTemplates(object): for template_file in resource_listdir(__name__, dirname): template_content = resource_string(__name__, os.path.join(dirname, template_file)) - template = json.loads(template_content) + template = yaml.load(template_content) templates.append(Template(**template)) return templates