diff --git a/openassessment/__init__.py b/openassessment/__init__.py index 6b3bf1c0ba..4cf01b7c02 100644 --- a/openassessment/__init__.py +++ b/openassessment/__init__.py @@ -2,4 +2,4 @@ Initialization Information for Open Assessment Module """ -__version__ = '6.0.13' +__version__ = '6.0.14' diff --git a/openassessment/xblock/openassessmentblock.py b/openassessment/xblock/openassessmentblock.py index 861b9cd68d..e739395677 100644 --- a/openassessment/xblock/openassessmentblock.py +++ b/openassessment/xblock/openassessmentblock.py @@ -658,6 +658,7 @@ def mfe_views_supported(self): Unsupported use-cases: 1) Team assignments 2) Assignments with reordered assessment steps + 3) ORAs with leaderboards Returns: - False if we are in one of these unsupported configurations. @@ -672,6 +673,10 @@ def mfe_views_supported(self): if not self.uses_default_assessment_order: return False + # We currently don't support leaderboards + if self.leaderboard_show != 0: + return False + return True def ora_blocks_listing_view(self, context=None): diff --git a/openassessment/xblock/test/test_openassessment.py b/openassessment/xblock/test/test_openassessment.py index 136664c33b..7743b4881b 100644 --- a/openassessment/xblock/test/test_openassessment.py +++ b/openassessment/xblock/test/test_openassessment.py @@ -723,6 +723,18 @@ def test_mfe_views_supported__rearranged_steps(self, xblock): # Then they are unsupported for team assignments self.assertFalse(xblock.mfe_views_supported) + @ddt.unpack + @ddt.data((0, True), (5, False)) + @patch.object(openassessmentblock.OpenAssessmentBlock, 'leaderboard_show', new_callable=PropertyMock) + @scenario('data/simple_self_staff_scenario.xml') + def test_mfe_views_supported__leaderboard(self, xblock, mock_value, expected_supported, mock_leaderboard_show): + # Given I'm on / not on an ORA with a leaderboard + mock_leaderboard_show.return_value = mock_value + + # When I see if MFE views are supported + # Then they are unsupported for ORAs with leaderboards + self.assertEqual(xblock.mfe_views_supported, expected_supported) + class TestDates(XBlockHandlerTestCase): """ Test Assessment Dates. """ diff --git a/package-lock.json b/package-lock.json index 44b2b76cb7..f74604fe38 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "edx-ora2", - "version": "6.0.11", + "version": "6.0.14", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "edx-ora2", - "version": "6.0.11", + "version": "6.0.14", "dependencies": { "@edx/frontend-build": "8.0.6", "@edx/paragon": "^20.9.2", diff --git a/package.json b/package.json index 31052c315a..87e8ef498f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "edx-ora2", - "version": "6.0.13", + "version": "6.0.14", "repository": "https://github.com/openedx/edx-ora2.git", "dependencies": { "@edx/frontend-build": "8.0.6",