Skip to content

Commit

Permalink
MCKIN-28611 - Nested blocks imports fix (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
xitij2000 committed Dec 21, 2020
2 parents b7f7a04 + d8ad55d commit ebd3c97
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions problem_builder/mentoring.py
Expand Up @@ -335,9 +335,9 @@ def allowed_nested_blocks(self):
"""
additional_blocks = []
try:
from xmodule.video_module.video_module import VideoDescriptor
from xmodule.video_module.video_module import VideoBlock
additional_blocks.append(NestedXBlockSpec(
VideoDescriptor, category='video', label=_(u"Video")
VideoBlock, category='video', label=_(u"Video")
))
except ImportError:
pass
Expand All @@ -358,7 +358,7 @@ def allowed_nested_blocks(self):
pass

try:
from ooyala_player import OoyalaPlayerBlock
from ooyala_player.ooyala_player import OoyalaPlayerBlock
additional_blocks.append(NestedXBlockSpec(
OoyalaPlayerBlock, category='ooyala-player', label=_(u"Ooyala Player")
))
Expand Down
6 changes: 3 additions & 3 deletions problem_builder/step.py
Expand Up @@ -136,9 +136,9 @@ def allowed_nested_blocks(self):
"""
additional_blocks = []
try:
from xmodule.video_module.video_module import VideoDescriptor
from xmodule.video_module.video_module import VideoBlock
additional_blocks.append(NestedXBlockSpec(
VideoDescriptor, category='video', label=_(u"Video")
VideoBlock, category='video', label=_(u"Video")
))
except ImportError:
pass
Expand All @@ -151,7 +151,7 @@ def allowed_nested_blocks(self):
pass

try:
from ooyala_player import OoyalaPlayerBlock
from ooyala_player.ooyala_player import OoyalaPlayerBlock
additional_blocks.append(NestedXBlockSpec(
OoyalaPlayerBlock, category='ooyala-player', label=_(u"Ooyala Player")
))
Expand Down
2 changes: 1 addition & 1 deletion problem_builder/tests/unit/utils.py
Expand Up @@ -68,7 +68,7 @@ def assert_allowed_nested_blocks(self, block, message_blocks=[]):
'xmodule.video_module': xmodule_mock.video_module,
'xmodule.video_module.video_module': xmodule_mock.video_module.video_module,
'imagemodal': Mock(),
'ooyala_player': Mock(),
'ooyala_player.ooyala_player': Mock(),
}
with patch.dict(modules, fake_modules):
self.assertEqual(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -28,7 +28,7 @@

# Constants #########################################################

VERSION = '4.1.7'
VERSION = '4.1.8'

# Functions #########################################################

Expand Down

0 comments on commit ebd3c97

Please sign in to comment.