From 3e9437cc4acb5c0da3ed84659fb5ee1aec7c3278 Mon Sep 17 00:00:00 2001 From: Maxim Beder Date: Fri, 28 Oct 2022 11:11:28 +0200 Subject: [PATCH] refactor: remove unused TabsEditingMixin --- xmodule/editing_module.py | 22 ---------------------- xmodule/video_module/video_module.py | 18 +++++++++++++----- 2 files changed, 13 insertions(+), 27 deletions(-) diff --git a/xmodule/editing_module.py b/xmodule/editing_module.py index c37ceba907..ce450c56bd 100644 --- a/xmodule/editing_module.py +++ b/xmodule/editing_module.py @@ -43,25 +43,3 @@ class EditingMixin(EditingFields, MakoTemplateBlockBase): # Add our specific template information (the raw data body) _context.update({'data': self.data}) return _context - - -class TabsEditingMixin(EditingFields, MakoTemplateBlockBase): - """ - Module that provides a raw editing view of its data and children. It does not - perform any validation on its definition---just passes it along to the browser. - - This class is intended to be used as a mixin. - """ - - mako_template = "widgets/tabs-aggregator.html" - js_module_name = "TabsEditingDescriptor" - tabs = [] - - def get_context(self): - _context = MakoTemplateBlockBase.get_context(self) - _context.update({ - 'tabs': self.tabs, - 'html_id': self.location.html_id(), # element_id - 'data': self.data, - }) - return _context diff --git a/xmodule/video_module/video_module.py b/xmodule/video_module/video_module.py index a7aad184ff..7ee3b0c0f8 100644 --- a/xmodule/video_module/video_module.py +++ b/xmodule/video_module/video_module.py @@ -35,8 +35,9 @@ from openedx.core.djangoapps.video_pipeline.config.waffle import DEPRECATE_YOUTU from openedx.core.lib.cache_utils import request_cached from openedx.core.lib.license import LicenseMixin from xmodule.contentstore.content import StaticContent -from xmodule.editing_module import EditingMixin, TabsEditingMixin +from xmodule.editing_module import EditingMixin from xmodule.exceptions import NotFoundError +from xmodule.mako_module import MakoTemplateBlockBase from xmodule.modulestore.inheritance import InheritanceKeyValueStore, own_metadata from xmodule.raw_module import EmptyDataRawMixin from xmodule.validation import StudioValidation, StudioValidationMessage @@ -112,9 +113,8 @@ EXPORT_IMPORT_STATIC_DIR = 'static' @XBlock.needs('mako', 'user') class VideoBlock( VideoFields, VideoTranscriptsMixin, VideoStudioViewHandlers, VideoStudentViewHandlers, - TabsEditingMixin, EmptyDataRawMixin, XmlMixin, EditingMixin, - XModuleToXBlockMixin, HTMLSnippet, ResourceTemplates, XModuleMixin, - LicenseMixin): + EmptyDataRawMixin, XmlMixin, EditingMixin, XModuleToXBlockMixin, HTMLSnippet, + ResourceTemplates, XModuleMixin, LicenseMixin): """ XML source example: