refactor: remove unused StudioEditableModule
This commit is contained in:
@@ -8,7 +8,7 @@ import logging
|
||||
from web_fragments.fragment import Fragment
|
||||
from xblock.core import XBlock
|
||||
from xblock.fields import Boolean, List, Scope, String
|
||||
from xmodule.studio_editable import StudioEditableModule
|
||||
from xmodule.studio_editable import StudioEditableBlock
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -87,7 +87,7 @@ class LibraryRoot(XBlock):
|
||||
child_context['show_preview'] = self.show_children_previews
|
||||
child_context['can_edit_visibility'] = False
|
||||
child = self.runtime.get_block(child_key)
|
||||
child_view_name = StudioEditableModule.get_preview_view_name(child)
|
||||
child_view_name = StudioEditableBlock.get_preview_view_name(child)
|
||||
|
||||
if str(child.location) == force_render:
|
||||
child_context['show_preview'] = True
|
||||
|
||||
@@ -25,7 +25,7 @@ class StudioEditableBlock(XBlockMixin):
|
||||
if can_reorder:
|
||||
context['reorderable_items'].add(child.location)
|
||||
context['can_add'] = can_add
|
||||
rendered_child = child.render(StudioEditableModule.get_preview_view_name(child), context)
|
||||
rendered_child = child.render(StudioEditableBlock.get_preview_view_name(child), context)
|
||||
fragment.add_fragment_resources(rendered_child)
|
||||
|
||||
contents.append({
|
||||
@@ -48,9 +48,6 @@ class StudioEditableBlock(XBlockMixin):
|
||||
return AUTHOR_VIEW if has_author_view(block) else STUDENT_VIEW
|
||||
|
||||
|
||||
StudioEditableModule = StudioEditableBlock
|
||||
|
||||
|
||||
def has_author_view(descriptor):
|
||||
"""
|
||||
Returns True if the xmodule linked to the descriptor supports "author_view".
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Tests for StudioEditableModule.
|
||||
Tests for StudioEditableBlock.
|
||||
"""
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ from xmodule.tests.test_vertical import BaseVerticalBlockTest
|
||||
from xmodule.x_module import AUTHOR_VIEW
|
||||
|
||||
|
||||
class StudioEditableModuleTestCase(BaseVerticalBlockTest):
|
||||
class StudioEditableBlockTestCase(BaseVerticalBlockTest):
|
||||
"""
|
||||
Class containing StudioEditableModule tests.
|
||||
Class containing StudioEditableBlock tests.
|
||||
"""
|
||||
|
||||
def test_render_reorderable_children(self):
|
||||
|
||||
Reference in New Issue
Block a user