Merge pull request #309 from MITx/feature/tutorials_fix
Add optional hide_from_toc attribute to XML elements
This commit is contained in:
@@ -104,7 +104,8 @@ class HTMLSnippet(object):
|
||||
"""
|
||||
Return the html used to display this snippet
|
||||
"""
|
||||
raise NotImplementedError("get_html() must be provided by specific modules")
|
||||
raise NotImplementedError("get_html() must be provided by specific modules - not present in {0}"
|
||||
.format(self.__class__))
|
||||
|
||||
|
||||
class XModule(HTMLSnippet):
|
||||
|
||||
@@ -88,7 +88,7 @@ class XmlDescriptor(XModuleDescriptor):
|
||||
# The attributes will be removed from the definition xml passed
|
||||
# to definition_from_xml, and from the xml returned by definition_to_xml
|
||||
metadata_attributes = ('format', 'graceperiod', 'showanswer', 'rerandomize',
|
||||
'start', 'due', 'graded', 'name', 'slug')
|
||||
'start', 'due', 'graded', 'name', 'slug', 'hide_from_toc')
|
||||
|
||||
# A dictionary mapping xml attribute names to functions of the value
|
||||
# that return the metadata key and value
|
||||
|
||||
Reference in New Issue
Block a user