Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion xblocks_contrib/html/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Init for the HtmlBlock.
"""

from .html import HtmlBlock
from .html import HtmlBlock, HtmlBlockMixin
16 changes: 12 additions & 4 deletions xblocks_contrib/html/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,12 @@ def stringify_children(node):
# This makes our block more resilient. It won't crash in test environments
# where the user service might not be available.
@XBlock.wants("user")
class HtmlBlock(LegacyXmlMixin, XBlock):
class HtmlBlockMixin(LegacyXmlMixin, XBlock):
"""
The HTML XBlock.
The HTML XBlock mixin.
This provides the base class for all Html-ish blocks (including the HTML XBlock).
"""

# Indicates that this XBlock has been extracted from edx-platform.
is_extracted = True
display_name = String(
display_name=_("Display Name"),
help=_("The display name for this component."),
Expand Down Expand Up @@ -565,3 +564,12 @@ def definition_to_xml(self, resource_fs):
def non_editable_metadata_fields(self):
"""`use_latex_compiler` should not be editable in the Studio settings editor."""
return super().non_editable_metadata_fields + [HtmlBlock.xml_attributes, HtmlBlock.use_latex_compiler]


class HtmlBlock(HtmlBlockMixin): # pylint: disable=abstract-method
"""
The HTML XBlock.
"""

# Indicates that this XBlock has been extracted from edx-platform.
is_extracted = True