From d8ff25c2ec26a2b9e9b488269d14cea83b925925 Mon Sep 17 00:00:00 2001 From: Muhammad Farhan Khan Date: Thu, 18 Jul 2024 18:36:38 +0500 Subject: [PATCH] refactor: deprecate WordCloudXBlock and extract it to xblocks-contrib repo --- setup.py | 2 +- xmodule/assets/word_cloud/src/js/word_cloud_main.js | 2 +- xmodule/word_cloud_block.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index bf662b563c7f..03464bbcd324 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ "video = xmodule.video_block:VideoBlock", "videoalpha = xmodule.video_block:VideoBlock", "videodev = xmodule.template_block:TranslateCustomTagBlock", - "word_cloud = xmodule.word_cloud_block:WordCloudBlock", + "word_cloud_deprecated = xmodule.word_cloud_block:WordCloudBlock", "wrapper = xmodule.wrapper_block:WrapperBlock", ] XBLOCKS_ASIDES = [ diff --git a/xmodule/assets/word_cloud/src/js/word_cloud_main.js b/xmodule/assets/word_cloud/src/js/word_cloud_main.js index 61677c9de046..b246240d775c 100644 --- a/xmodule/assets/word_cloud/src/js/word_cloud_main.js +++ b/xmodule/assets/word_cloud/src/js/word_cloud_main.js @@ -37,7 +37,7 @@ function generateUniqueId(wordCloudId, counter) { export default class WordCloudMain { constructor(el) { // eslint-disable-next-line no-undef - this.wordCloudEl = $(el).find('.word_cloud'); + this.wordCloudEl = $(el).find('.word_cloud_deprecated'); // Get the URL to which we will post the users words. this.ajax_url = this.wordCloudEl.data('ajax-url'); diff --git a/xmodule/word_cloud_block.py b/xmodule/word_cloud_block.py index 26a2c38c5cfc..c82c0f1a8e52 100644 --- a/xmodule/word_cloud_block.py +++ b/xmodule/word_cloud_block.py @@ -257,7 +257,7 @@ def student_view(self, context): # lint-amnesty, pylint: disable=unused-argumen 'ajax_url': self.ajax_url, 'display_name': self.display_name, 'instructions': self.instructions, - 'element_class': self.location.block_type, + 'element_class': 'word_cloud_deprecated', 'element_id': self.location.html_id(), 'num_inputs': self.num_inputs, 'submitted': self.submitted,