From 3508234dd789580fa18db534e46c1e93194f0120 Mon Sep 17 00:00:00 2001 From: farhan Date: Wed, 2 Oct 2024 14:38:05 +0500 Subject: [PATCH] chore: chore --- xmodule/annotatable_block.py | 12 +++++++++++- xmodule/word_cloud_block.py | 4 +--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/xmodule/annotatable_block.py b/xmodule/annotatable_block.py index e41e2b17a52f..473bc934f2f3 100644 --- a/xmodule/annotatable_block.py +++ b/xmodule/annotatable_block.py @@ -11,6 +11,7 @@ from openedx.core.djangolib.markup import HTML, Text from xmodule.editing_block import EditingMixin from xmodule.raw_block import RawMixin +from xmodule.toggles import USE_EXTRACTED_ANNOTATABLE_BLOCK from xmodule.util.builtin_assets import add_webpack_js_to_fragment, add_sass_to_fragment from xmodule.xml_block import XmlMixin from xmodule.x_module import ( @@ -28,7 +29,7 @@ @XBlock.needs('mako') -class AnnotatableBlock( +class _BuiltInAnnotatableBlock( RawMixin, XmlMixin, EditingMixin, @@ -40,6 +41,8 @@ class AnnotatableBlock( Annotatable XBlock. """ + is_extracted = False + data = String( help=_("XML data for the annotation"), scope=Scope.content, @@ -197,3 +200,10 @@ def studio_view(self, _context): add_webpack_js_to_fragment(fragment, 'AnnotatableBlockEditor') shim_xmodule_js(fragment, self.studio_js_module_name) return fragment + +AnnotatableBlock = ( + # TODO: Revert following + # _ExractedAnnotatableBlock if USE_EXTRACTED_ANNOTATABLE_BLOCK.is_enabled() + _BuiltInAnnotatableBlock if USE_EXTRACTED_ANNOTATABLE_BLOCK.is_enabled() + else _BuiltInAnnotatableBlock +) diff --git a/xmodule/word_cloud_block.py b/xmodule/word_cloud_block.py index c4812900d481..2d40ddf58f2c 100644 --- a/xmodule/word_cloud_block.py +++ b/xmodule/word_cloud_block.py @@ -6,9 +6,6 @@ If student have answered - words he entered and cloud. """ -# TODO: Uncomment following once https://github.com/openedx/edx-platform/issues/34840 is done -# from xblocks_contrib import WordCloudBlock as _ExtractedWordCloudBlock - import json import logging @@ -317,6 +314,7 @@ def index_dictionary(self): WordCloudBlock = ( + # TODO: Revert following # _ExractedWordCloudBLock if USE_EXTRACTED_WORD_CLOUD_BLOCK.is_enabled() _BuiltInWordCloudBlock if USE_EXTRACTED_WORD_CLOUD_BLOCK.is_enabled() else _BuiltInWordCloudBlock