diff --git a/lms/templates/staff_problem_info.html b/lms/templates/staff_problem_info.html index 24ca39783b..4d5cbfea6c 100644 --- a/lms/templates/staff_problem_info.html +++ b/lms/templates/staff_problem_info.html @@ -68,13 +68,17 @@ ${block_content}
[ + % if can_reset_attempts: ${_('Reset Student Attempts')} - % if has_instructor_access: | + % endif + % if has_instructor_access: ${_('Delete Student State')} + % if can_rescore_problem: | ${_('Rescore Student Submission')} % endif + % endif ]
@@ -83,16 +87,17 @@ ${block_content}
is_released = ${is_released} location = ${location.to_deprecated_string() | h} + %for name, field in fields: - + %endfor
${_('Module Fields')}
${name}
${field | h}
${name}
${field | h}
%for name, field in xml_attributes.items(): - + %endfor
${_('XML attributes')}
${name}
${field | h}
${name}
${field | h}
category = ${category | h} diff --git a/openedx/core/lib/xblock_utils.py b/openedx/core/lib/xblock_utils.py index 757230053c..4474b832b3 100644 --- a/openedx/core/lib/xblock_utils.py +++ b/openedx/core/lib/xblock_utils.py @@ -382,6 +382,8 @@ def add_staff_markup(user, has_instructor_access, disable_staff_debug_info, bloc 'block_content': frag.content, 'is_released': is_released, 'has_instructor_access': has_instructor_access, + 'can_reset_attempts': 'attempts' in block.fields, + 'can_rescore_problem': hasattr(block, 'rescore_problem'), 'disable_staff_debug_info': disable_staff_debug_info, } return wrap_fragment(frag, render_to_string("staff_problem_info.html", staff_context))