Skip to content

Commit

Permalink
chore: Update block identifier and element class assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
farhan committed Jan 27, 2025

Verified

This commit was signed with the committer’s verified signature.
mchack-work Michael Cardell Widerkrantz
1 parent 000dee1 commit f1e4d36
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion xblocks_contrib/word_cloud/static/js/src/word_cloud.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Javascript for WordCloudXBlock. */

const blockIdentifier = '.word_cloud_block';
const blockIdentifier = '._word_cloud_extracted';
// Dimensions of the box where the word cloud will be drawn.
const width = 635;
const height = 635;
5 changes: 3 additions & 2 deletions xblocks_contrib/word_cloud/word_cloud.py
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
If student have answered - words he entered and cloud.
"""
import json
import uuid

from web_fragments.fragment import Fragment
from xblock.core import XBlock
@@ -131,8 +132,8 @@ def student_view(self, context=None): # pylint: disable=W0613
"templates/word_cloud.html", {
'display_name': self.display_name,
'instructions': self.instructions,
'element_class': self.scope_ids.usage_id.block_type,
'element_id': self.scope_ids.usage_id.html_id(),
'element_class': self.scope_ids.block_type,
'element_id': uuid.uuid1(0),
'num_inputs': self.num_inputs,
'range_num_inputs': range(self.num_inputs),
'submitted': self.submitted,

0 comments on commit f1e4d36

Please sign in to comment.