* get rid of six.text_type(s) * get rid of six.b() * get rid of six.string_types * get rid of six.PY2/six.PY3 * get rid of six.iteritems() and six.viewvalues()
162 lines
6.3 KiB
HTML
162 lines
6.3 KiB
HTML
<%page expression_filter="h"/>
|
|
<%namespace name='static' file='/static_content.html'/>
|
|
<%!
|
|
from django.utils.translation import gettext as _
|
|
from openedx.core.djangolib.markup import HTML
|
|
from openedx.core.djangolib.js_utils import js_escaped_string
|
|
%>
|
|
|
|
## The JS for this is defined in xqa_interface.html
|
|
${block_content | n, decode.utf8}
|
|
%if 'detached' not in tags:
|
|
% if edit_link:
|
|
<div>
|
|
<a href="${edit_link}">Edit</a>
|
|
% if xqa_key:
|
|
/ <a href="#${element_id}_xqa-modal" onclick="javascript:getlog('${element_id}', {
|
|
'location': '${location}',
|
|
'xqa_key': '${xqa_key}',
|
|
'category': '${category}',
|
|
'user': '${user}'
|
|
})" id="${element_id}_xqa_log">QA</a>
|
|
% endif
|
|
</div>
|
|
% endif
|
|
% if not disable_staff_debug_info:
|
|
<div class="wrap-instructor-info">
|
|
<a class="instructor-info-action" href="#${element_id}_debug" rel="leanModal" id="${element_id}_trig">${_("Staff Debug Info")}</a>
|
|
|
|
% if settings.FEATURES.get('ENABLE_STUDENT_HISTORY_VIEW') and \
|
|
location.block_type == 'problem':
|
|
<a class="instructor-info-action" href="#${element_id}_history" rel="leanModal" id="${element_id}_history_trig">${_("Submission history")}</a>
|
|
% endif
|
|
</div>
|
|
% endif
|
|
|
|
<div aria-hidden="true" role="dialog" tabindex="-1" id="${element_id}_xqa-modal" class="modal xqa-modal">
|
|
<div class="inner-wrapper">
|
|
<header>
|
|
<h2>${_("{platform_name} Content Quality Assessment").format(platform_name=settings.PLATFORM_NAME)}</h2>
|
|
</header>
|
|
|
|
<form id="${element_id}_xqa_form" class="xqa_form">
|
|
<label for="${element_id}_xqa_entry">${_("Comment")}</label>
|
|
<input tabindex="0" id="${element_id}_xqa_entry" type="text" placeholder="${_('comment')}">
|
|
<label for="${element_id}_xqa_tag">${_("Tag")}</label>
|
|
<span style="color:black;vertical-align: -10pt">${_('Optional tag (eg "done" or "broken"):')} </span>
|
|
<input id="${element_id}_xqa_tag" type="text" placeholder="${_('tag')}" style="width:80px;display:inline">
|
|
<div class="submit">
|
|
<button name="submit" type="submit">${_('Add comment')}</button>
|
|
</div>
|
|
<hr>
|
|
<div id="${element_id}_xqa_log_data"></div>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div aria-hidden="true" role="dialog" tabindex="-1" class="modal staff-modal" id="${element_id}_debug" >
|
|
<div class="inner-wrapper">
|
|
<header>
|
|
<h2>${_('Staff Debug:')} ${dict(fields)['display_name']}</h2>
|
|
</header>
|
|
|
|
<hr />
|
|
<div class="staff_actions">
|
|
<h3>${_('Actions')}</h3>
|
|
<div>
|
|
<label for="sd_fu_${location.block_id}">${_('Username')}:</label>
|
|
<input type="text" tabindex="0" id="sd_fu_${location.block_id}" placeholder="${user.username}"/>
|
|
</div>
|
|
% if can_override_problem_score:
|
|
<div>
|
|
<label for="sd_fs_${location.block_id}">${_('Score (for override only)')}:</label>
|
|
<input type="text" tabindex="0" id="sd_fs_${location.block_id}" placeholder="0"/>
|
|
<label for="sd_fs_${location.block_id}"> / ${max_problem_score}</label>
|
|
</div>
|
|
% endif
|
|
<div data-location="${location}" data-location-name="${location.block_id}" data-course-id="${location.course_key}">
|
|
[
|
|
% if can_reset_attempts:
|
|
<button type="button" class="btn-link staff-debug-reset">${_('Reset Learner\'s Attempts to Zero')}</button>
|
|
|
|
|
% endif
|
|
<button type="button" class="btn-link staff-debug-sdelete">${_('Delete Learner\'s State')}</button>
|
|
% if can_rescore_problem:
|
|
|
|
|
<button type="button" class="btn-link staff-debug-rescore">${_('Rescore Learner\'s Submission')}</button>
|
|
|
|
|
<button type="button" class="btn-link staff-debug-rescore-if-higher">${_('Rescore Only If Score Improves')}</button>
|
|
|
|
|
% endif
|
|
% if can_override_problem_score:
|
|
<button type="button" class="btn-link staff-debug-override-score">${_('Override Score')}</button>
|
|
% endif
|
|
]
|
|
</div>
|
|
<div id="result_${location.block_id}"></div>
|
|
</div>
|
|
|
|
<div class="staff_info" style="display:block">
|
|
is_released = ${is_released}
|
|
location = ${str(location)}
|
|
|
|
<table summary="${_('Module Fields')}">
|
|
<tr><th>${_('Module Fields')}</th></tr>
|
|
%for name, field in fields:
|
|
<tr><td style="width:25%">${name}</td><td><pre style="display:inline-block; margin: 0; overflow-wrap: anywhere;">${field}</pre></td></tr>
|
|
%endfor
|
|
</table>
|
|
<table>
|
|
<tr><th>${_('XML attributes')}</th></tr>
|
|
%for name, field in xml_attributes.items():
|
|
<tr><td style="width:25%">${name}</td><td><pre style="display:inline-block; margin: 0; overflow-wrap: anywhere;">${field}</pre></td></tr>
|
|
%endfor
|
|
</table>
|
|
category = ${category}
|
|
</div>
|
|
%if render_histogram:
|
|
<div id="histogram_${element_id}" class="histogram" data-histogram="${histogram}"></div>
|
|
%endif
|
|
</div>
|
|
</div>
|
|
|
|
<div aria-hidden="true" role="dialog" tabindex="-1" class="modal history-modal" id="${element_id}_history">
|
|
<div class="inner-wrapper">
|
|
<header>
|
|
<h2>${_("Submission History Viewer")}</h2>
|
|
</header>
|
|
<form id="${element_id}_history_form">
|
|
<label for="${element_id}_history_student_username">${_("Learner's {platform_name} email address or username:").format(platform_name=settings.PLATFORM_NAME)}</label>
|
|
<input tabindex="0" id="${element_id}_history_student_username" type="text" placeholder="${_('Enter the learner email address or username')}"/>
|
|
<input type="hidden" id="${element_id}_history_location" value="${location}"/>
|
|
<div class="submit">
|
|
<button name="submit" type="submit">${_("View History")}</button>
|
|
</div>
|
|
</form>
|
|
|
|
<div id="${element_id}_history_text" class="staff_info" style="display:block">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
// assumes courseware.html's loaded this method.
|
|
$(function () {
|
|
setup_debug('${element_id | n, js_escaped_string}',
|
|
%if edit_link:
|
|
'${edit_link | n, js_escaped_string}',
|
|
%else:
|
|
null,
|
|
%endif
|
|
{
|
|
'location': '${location | n, js_escaped_string}',
|
|
'xqa_key': '${xqa_key | n, js_escaped_string}',
|
|
'category': '${category | n, js_escaped_string}',
|
|
'user': '${user | n, js_escaped_string}'
|
|
}
|
|
);
|
|
});
|
|
</script>
|
|
%endif
|