Created CustomTagTemplateBlock to use with CustomTagBlock instead of RawDescriptor.
This commit is contained in:
@@ -9,7 +9,6 @@ XMODULES = [
|
||||
"section = xmodule.backcompat_module:SemanticSectionDescriptor",
|
||||
"slides = xmodule.backcompat_module:TranslateCustomTagDescriptor",
|
||||
"videodev = xmodule.backcompat_module:TranslateCustomTagDescriptor",
|
||||
"custom_tag_template = xmodule.raw_module:RawDescriptor",
|
||||
"raw = xmodule.raw_module:RawDescriptor",
|
||||
]
|
||||
XBLOCKS = [
|
||||
@@ -20,6 +19,7 @@ XBLOCKS = [
|
||||
"course = xmodule.course_module:CourseBlock",
|
||||
"course_info = xmodule.html_module:CourseInfoBlock",
|
||||
"customtag = xmodule.template_module:CustomTagBlock",
|
||||
"custom_tag_template = xmodule.template_module:CustomTagTemplateBlock",
|
||||
"error = xmodule.error_module:ErrorBlock",
|
||||
"hidden = xmodule.hidden_module:HiddenDescriptor",
|
||||
"html = xmodule.html_module:HtmlBlock",
|
||||
|
||||
@@ -21,7 +21,7 @@ from xmodule.x_module import (
|
||||
from xmodule.xml_module import XmlMixin
|
||||
|
||||
|
||||
class CustomTagBlock(
|
||||
class CustomTagTemplateBlock( # pylint: disable=abstract-method
|
||||
RawMixin,
|
||||
XmlMixin,
|
||||
EditingMixin,
|
||||
@@ -30,7 +30,15 @@ class CustomTagBlock(
|
||||
HTMLSnippet,
|
||||
ResourceTemplates,
|
||||
XModuleMixin,
|
||||
): # pylint: disable=abstract-method
|
||||
):
|
||||
"""
|
||||
A block which provides templates for CustomTagBlock. The template name
|
||||
is set on the `impl` attribute of CustomTagBlock. See below for more details
|
||||
on how to use it.
|
||||
"""
|
||||
|
||||
|
||||
class CustomTagBlock(CustomTagTemplateBlock): # pylint: disable=abstract-method
|
||||
"""
|
||||
This module supports tags of the form
|
||||
<customtag option="val" option2="val2" impl="tagname"/>
|
||||
|
||||
Reference in New Issue
Block a user