Remove unused RawDescriptor and EmptyDataRawDescriptor.
This commit is contained in:
@@ -4,7 +4,6 @@ from setuptools import find_packages, setup
|
||||
|
||||
XMODULES = [
|
||||
"section = xmodule.backcompat_module:SemanticSectionDescriptor",
|
||||
"raw = xmodule.raw_module:RawDescriptor",
|
||||
]
|
||||
XBLOCKS = [
|
||||
"about = xmodule.html_module:AboutBlock",
|
||||
|
||||
@@ -99,14 +99,6 @@ class RawMixin:
|
||||
return block
|
||||
|
||||
|
||||
class RawDescriptor(RawMixin, XmlDescriptor, XMLEditingDescriptor):
|
||||
"""
|
||||
Module that provides a raw editing view of its data and children. It
|
||||
requires that the definition xml is valid.
|
||||
"""
|
||||
pass # lint-amnesty, pylint: disable=unnecessary-pass
|
||||
|
||||
|
||||
class EmptyDataRawMixin:
|
||||
"""
|
||||
Common code between EmptyDataRawDescriptor and XBlocks converted from XModules.
|
||||
@@ -125,11 +117,3 @@ class EmptyDataRawMixin:
|
||||
if self.data:
|
||||
return etree.fromstring(self.data)
|
||||
return etree.Element(self.category)
|
||||
|
||||
|
||||
class EmptyDataRawDescriptor(EmptyDataRawMixin, XmlDescriptor, XMLEditingDescriptor):
|
||||
"""
|
||||
Version of RawDescriptor for modules which may have no XML data,
|
||||
but use XMLEditingDescriptor for import/export handling.
|
||||
"""
|
||||
pass # lint-amnesty, pylint: disable=unnecessary-pass
|
||||
|
||||
@@ -19,7 +19,6 @@ from xblockutils.studio_editable import StudioEditableXBlockMixin
|
||||
|
||||
from openedx.core.djangolib.markup import HTML, Text
|
||||
from openedx.core.lib.xblock_builtin import get_css_dependencies, get_js_dependencies
|
||||
from xmodule.raw_module import RawDescriptor
|
||||
from xmodule.xml_module import XmlParserMixin
|
||||
|
||||
|
||||
@@ -74,7 +73,7 @@ class DiscussionXBlock(XBlock, StudioEditableXBlockMixin, XmlParserMixin): # li
|
||||
has_author_view = True # Tells Studio to use author_view
|
||||
|
||||
# support for legacy OLX format - consumed by XmlParserMixin.load_metadata
|
||||
metadata_translations = dict(RawDescriptor.metadata_translations)
|
||||
metadata_translations = dict(XmlParserMixin.metadata_translations)
|
||||
metadata_translations['id'] = 'discussion_id'
|
||||
metadata_translations['for'] = 'discussion_target'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user