Commit 799ad92e by Calen Pennington

Add documentation of xmodule template files

parent c69c69d2
...@@ -4,8 +4,18 @@ These templates are used by the CMS to provide baseline content that ...@@ -4,8 +4,18 @@ These templates are used by the CMS to provide baseline content that
can be cloned when adding new modules to a course. can be cloned when adding new modules to a course.
`Template`s are defined in x_module. They contain 3 attributes: `Template`s are defined in x_module. They contain 3 attributes:
metadata: A dictionary with the template metadata metadata: A dictionary with the template metadata. This should contain
data: A JSON value that defines the template content any values for fields
* with scope Scope.settings
* that have values different than the field defaults
* and that are to be editable in Studio
data: A JSON value that defines the template content. This should be a dictionary
containing values for fields
* with scope Scope.content
* that have values different than the field defaults
* and that are to be editable in Studio
or, if the module uses a single Scope.content String field named `data`, this
should be a string containing the contents of that field
children: A list of Location urls that define the template children children: A list of Location urls that define the template children
Templates are defined on XModuleDescriptor types, in the template attribute. Templates are defined on XModuleDescriptor types, in the template attribute.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment