Skip to content

Commit

Permalink
refactor: migrate from xblock-utils package to xblock.utils
Browse files Browse the repository at this point in the history
  • Loading branch information
farhan committed Oct 26, 2023
1 parent 99f5f93 commit b4ead02
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
8 changes: 6 additions & 2 deletions build/lib/sql_grader/xblocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@

Django
XBlock
xblock-utils
# TODO: Change this once codejail is published to pypi
-e git+https://github.com/openedx/[email protected]#egg=codejail
9 changes: 7 additions & 2 deletions sql_grader/xblocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b4ead02

Please sign in to comment.