diff --git a/build/lib/sql_grader/xblocks.py b/build/lib/sql_grader/xblocks.py index b08d18e..d3f6208 100644 --- a/build/lib/sql_grader/xblocks.py +++ b/build/lib/sql_grader/xblocks.py @@ -2,8 +2,12 @@ A custom submission type to evaluate SQL queries """ from xblock.core import XBlock -from xblockutils.resources import ResourceLoader -from xblockutils.studio_editable import StudioEditableXBlockMixin +try: + from xblock.utils.resources import ResourceLoader + from xblock.utils.studio_editable import StudioEditableXBlockMixin +except ModuleNotFoundError: # For backward compatibility with releases older than Quince. + from xblockutils.resources import ResourceLoader + from xblockutils.studio_editable import StudioEditableXBlockMixin from .mixins.dates import EnforceDueDates from .mixins.fragment import XBlockFragmentBuilderMixin diff --git a/requirements/base.in b/requirements/base.in index c0c3f34..567cc15 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -3,6 +3,5 @@ Django XBlock -xblock-utils # TODO: Change this once codejail is published to pypi -e git+https://github.com/openedx/codejail.git@3.0.0#egg=codejail diff --git a/sql_grader/xblocks.py b/sql_grader/xblocks.py index b08d18e..2814b18 100644 --- a/sql_grader/xblocks.py +++ b/sql_grader/xblocks.py @@ -2,8 +2,13 @@ A custom submission type to evaluate SQL queries """ from xblock.core import XBlock -from xblockutils.resources import ResourceLoader -from xblockutils.studio_editable import StudioEditableXBlockMixin +try: + from xblock.utils.resources import ResourceLoader + from xblock.utils.studio_editable import StudioEditableXBlockMixin +except ModuleNotFoundError: + # For backward compatibility with releases older than Quince. + from xblockutils.resources import ResourceLoader + from xblockutils.studio_editable import StudioEditableXBlockMixin from .mixins.dates import EnforceDueDates from .mixins.fragment import XBlockFragmentBuilderMixin