Skip to content

Commit

Permalink
feat: Serialize tag data in OpenAssessmentBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
yusuf-musleh committed Feb 5, 2024
1 parent 78fa034 commit fb2b60f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion openassessment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Initialization Information for Open Assessment Module
"""

__version__ = '6.0.31'
__version__ = '6.0.32'
6 changes: 6 additions & 0 deletions openassessment/xblock/openassessmentblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,12 @@ def add_xml_to_node(self, node):
"""
serialize_content_to_xml(self, node)

# Serialize and add tag data if any
if hasattr(self, 'serialize_tag_data') and callable(self.serialize_tag_data): # pylint: disable=no-member
tag_data = self.serialize_tag_data() # pylint: disable=no-member

Check warning on line 1079 in openassessment/xblock/openassessmentblock.py

View check run for this annotation

Codecov / codecov/patch

openassessment/xblock/openassessmentblock.py#L1079

Added line #L1079 was not covered by tests
if tag_data:
node.set('tags-v1', tag_data)

Check warning on line 1081 in openassessment/xblock/openassessmentblock.py

View check run for this annotation

Codecov / codecov/patch

openassessment/xblock/openassessmentblock.py#L1081

Added line #L1081 was not covered by tests

def render_error(self, error_msg):
"""
Render an error message.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "edx-ora2",
"version": "6.0.31",
"version": "6.0.32",
"repository": "https://github.com/openedx/edx-ora2.git",
"dependencies": {
"@edx/frontend-build": "8.0.6",
Expand Down

0 comments on commit fb2b60f

Please sign in to comment.