Skip to content

Commit

Permalink
chore: remove disable on assessment out of order (#2153)
Browse files Browse the repository at this point in the history
* chore: remove disable on assessment out of order

* chore: update test

* chore: update html tag

* chore: version bump
  • Loading branch information
leangseu-edx authored Jan 9, 2024
1 parent dae4b35 commit 732f122
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 29 deletions.
2 changes: 1 addition & 1 deletion openassessment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Initialization Information for Open Assessment Module
"""

__version__ = '6.0.22'
__version__ = '6.0.23'
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% spaceless %}
{% if show_survey %}
<div id="openassessment_hotjar"></div>
<script>
<script type="text/javascript">
// check to see if hotjar is available, then trigger hotjar event
const hasWindow = typeof window !== 'undefined';
if (hasWindow && window.hj) {
Expand Down
21 changes: 0 additions & 21 deletions openassessment/xblock/openassessmentblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,23 +633,6 @@ def student_view(self, context=None): # pylint: disable=unused-argument
}
)

@property
def uses_default_assessment_order(self):
"""
Determine if our steps have been reordered (omission of steps is fine)
"""
mfe_supported_step_ordering = ['student-training', 'self-assessment', 'peer-assessment', 'staff-assessment']

last_step_index = 0
for assessment_step in self.assessment_steps:
step_index = mfe_supported_step_ordering.index(assessment_step)

if step_index < last_step_index:
return False
last_step_index = step_index

return True

@property
def mfe_views_supported(self):
"""
Expand Down Expand Up @@ -678,10 +661,6 @@ def mfe_views_supported(self):
if self.allow_latex:
return False

# Assessment step reordering is currently unsupported
if not self.uses_default_assessment_order:
return False

return True

def ora_blocks_listing_view(self, context=None):
Expand Down
4 changes: 1 addition & 3 deletions openassessment/xblock/test/test_openassessment.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,9 +743,7 @@ def test_mfe_views_supported__latex(self, xblock, mock_value, expected_supported
@scenario('data/assessment_steps_reordered.xml')
def test_mfe_views_supported__rearranged_steps(self, xblock):
# Given this ORA has rearranged our assessment steps
# When I see if MFE views are supported
# Then they are unsupported for team assignments
self.assertFalse(xblock.mfe_views_supported)
self.assertTrue(xblock.mfe_views_supported)


class TestDates(XBlockHandlerTestCase):
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "edx-ora2",
"version": "6.0.22",
"version": "6.0.23",
"repository": "https://github.com/openedx/edx-ora2.git",
"dependencies": {
"@edx/frontend-build": "8.0.6",
Expand Down

0 comments on commit 732f122

Please sign in to comment.