Skip to content

Commit

Permalink
Merge pull request #2199 from openedx/xblock2
Browse files Browse the repository at this point in the history
XBlock 2.0 support
  • Loading branch information
feanil committed Mar 29, 2024
2 parents 8c79958 + 7d68cf6 commit 72b6504
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 23 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.6.0'
__version__ = '6.6.1'
2 changes: 1 addition & 1 deletion openassessment/xblock/openassessmentblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ def workbench_scenarios():
]

@classmethod
def parse_xml(cls, node, runtime, keys, id_generator):
def parse_xml(cls, node, runtime, keys):
"""Instantiate XBlock object from runtime XML definition.
Inherited by XBlock core.
Expand Down
4 changes: 1 addition & 3 deletions openassessment/xblock/test/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,7 @@ def load_scenario(self, xml_path):
Returns:
XBlock
"""
block_id = self.runtime.parse_xml_string(
self.load_fixture_str(xml_path), self.runtime.id_generator
)
block_id = self.runtime.parse_xml_string(self.load_fixture_str(xml_path))
return self.runtime.get_block(block_id)

def request(
Expand Down
4 changes: 2 additions & 2 deletions openassessment/xblock/test/test_export_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_export_import(self, xblock):
self.runtime.export_to_xml(xblock, output_buffer)

# Re-import the XBlock
block_id = self.runtime.parse_xml_string(output_buffer.getvalue(), self.runtime.id_generator)
block_id = self.runtime.parse_xml_string(output_buffer.getvalue())
new_block = self.runtime.get_block(block_id)

# Check that the values of all fields are the same
Expand All @@ -39,7 +39,7 @@ def test_teams_export_import(self, xblock):
self.runtime.export_to_xml(xblock, output_buffer)

# Re-import the XBlock
block_id = self.runtime.parse_xml_string(output_buffer.getvalue(), self.runtime.id_generator)
block_id = self.runtime.parse_xml_string(output_buffer.getvalue())
new_block = self.runtime.get_block(block_id)

# Check that we've loaded exported team settings correctly
Expand Down
8 changes: 3 additions & 5 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ loremipsum==1.0.5
# via
# -c requirements/constraints.txt
# -r requirements/base.in
lxml==5.1.0
lxml==4.9.4
# via
# -r requirements/base.in
# edx-i18n-tools
Expand Down Expand Up @@ -203,10 +203,8 @@ webencodings==0.5.1
# html5lib
webob==1.8.7
# via xblock
xblock==1.10.0
# via
# -c requirements/constraints.txt
# -r requirements/base.in
xblock==2.0.0
# via -r requirements/base.in

# The following packages are considered to be unsafe in a requirements file:
# setuptools
3 changes: 1 addition & 2 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ setuptools<60.0
# incremental upgrade plan.
django-simple-history<=3.1.1

# xblock==1.10.0 upgrade causes test failures which need to be fixed separately
xblock==1.10.0
lxml<5.0.0 # xblock-sdk

# backports.zoneinfo is only needed for Python < 3.9
backports.zoneinfo; python_version<'3.9'
11 changes: 8 additions & 3 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ loremipsum==1.0.5
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
lxml==5.1.0
lxml==4.9.4
# via
# -r requirements/test.txt
# edx-i18n-tools
Expand Down Expand Up @@ -542,12 +542,17 @@ werkzeug==3.0.1
# via
# -r requirements/test.txt
# moto
xblock==1.10.0
wrapt==1.11.2
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# aws-xray-sdk
xblock==2.0.0
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# xblock-sdk
xblock-sdk==0.7.0
xblock-sdk==0.9.0
# via -r requirements/test.txt
xmltodict==0.13.0
# via
Expand Down
11 changes: 8 additions & 3 deletions requirements/test-acceptance.txt
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ loremipsum==1.0.5
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
lxml==5.1.0
lxml==4.9.4
# via
# -r requirements/test.txt
# edx-i18n-tools
Expand Down Expand Up @@ -506,12 +506,17 @@ werkzeug==3.0.1
# via
# -r requirements/test.txt
# moto
xblock==1.10.0
wrapt==1.11.2
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# aws-xray-sdk
xblock==2.0.0
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# xblock-sdk
xblock-sdk==0.7.0
xblock-sdk==0.9.0
# via -r requirements/test.txt
xmltodict==0.13.0
# via
Expand Down
10 changes: 7 additions & 3 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ loremipsum==1.0.5
# via
# -c requirements/constraints.txt
# -r requirements/base.txt
lxml==5.1.0
lxml==4.9.4
# via
# -r requirements/base.txt
# edx-i18n-tools
Expand Down Expand Up @@ -435,12 +435,16 @@ webob==1.8.7
# xblock-sdk
werkzeug==3.0.1
# via moto
xblock==1.10.0
wrapt==1.11.2
# via
# -c requirements/constraints.txt
# aws-xray-sdk
xblock==2.0.0
# via
# -c requirements/constraints.txt
# -r requirements/base.txt
# xblock-sdk
xblock-sdk==0.7.0
xblock-sdk==0.9.0
# via -r requirements/test.in
xmltodict==0.13.0
# via moto
Expand Down

0 comments on commit 72b6504

Please sign in to comment.