Skip to content

Commit

Permalink
Merge pull request #33 from msaqib52/saqib/MCKIN-5939
Browse files Browse the repository at this point in the history
MCKIN-5939: Enables mobile support
  • Loading branch information
msaqib52 authored Sep 20, 2017
2 parents d9ac0bc + 9f81086 commit 3b5cb38
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions image_explorer/image_explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class ImageExplorerBlock(XBlock): # pylint: disable=no-init
</image_explorer>
"""))

@XBlock.supports("multi_device") # Mark as mobile-friendly
def student_view(self, context):
"""
Player view, displayed to the student
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def package_data(pkg, root_list):

setup(
name='xblock-image-explorer',
version='0.4.2',
version='0.4.3',
description='XBlock - Image Explorer',
packages=['image_explorer'],
install_requires=[
Expand Down
13 changes: 13 additions & 0 deletions tests/unit/test_image_explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,16 @@ def test_student_view_data(self):

student_view_data = self.image_explorer_block.student_view_data()
self.assertEqual(student_view_data, expected_image_explorer_data)

def test_student_view_multi_device_support(self):
"""
Test student_view multi device support is set
"""
self.assertEqual(
self.image_explorer_block.has_support(
getattr(self.image_explorer_block, 'student_view', None),
'multi_device'
),
True
)

0 comments on commit 3b5cb38

Please sign in to comment.