From 9ee79a572913eb527e11fd7e7e90d89e4c19e990 Mon Sep 17 00:00:00 2001 From: "J. Cliff Dyer" Date: Fri, 17 Mar 2017 12:40:19 -0400 Subject: [PATCH] Ensure ScorableXBlocks have rescore button. --- openedx/core/lib/xblock_utils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openedx/core/lib/xblock_utils/__init__.py b/openedx/core/lib/xblock_utils/__init__.py index 4474b832b3..73b46f2b01 100644 --- a/openedx/core/lib/xblock_utils/__init__.py +++ b/openedx/core/lib/xblock_utils/__init__.py @@ -383,7 +383,7 @@ def add_staff_markup(user, has_instructor_access, disable_staff_debug_info, bloc 'is_released': is_released, 'has_instructor_access': has_instructor_access, 'can_reset_attempts': 'attempts' in block.fields, - 'can_rescore_problem': hasattr(block, 'rescore_problem'), + 'can_rescore_problem': any(hasattr(block, rescore) for rescore in ['rescore_problem', 'rescore']), 'disable_staff_debug_info': disable_staff_debug_info, } return wrap_fragment(frag, render_to_string("staff_problem_info.html", staff_context))