|
|
|
|
@@ -26,6 +26,31 @@ from openedx.core.djangolib.markup import HTML
|
|
|
|
|
</div>
|
|
|
|
|
% endif
|
|
|
|
|
|
|
|
|
|
<div class="problem-action-buttons-wrapper">
|
|
|
|
|
% if demand_hint_possible:
|
|
|
|
|
<span class="problem-action-button-wrapper">
|
|
|
|
|
<button type="button" class="hint-button problem-action-btn btn-default btn-small" data-value="${_('Hint')}" ${'' if should_enable_next_hint else 'disabled'}>${_('Hint')}</button>
|
|
|
|
|
</span>
|
|
|
|
|
% endif
|
|
|
|
|
% if save_button:
|
|
|
|
|
<span class="problem-action-button-wrapper">
|
|
|
|
|
<button type="button" class="save problem-action-btn btn-default btn-small" data-value="${_('Save')}">
|
|
|
|
|
<span aria-hidden="true">${_('Save')}</span>
|
|
|
|
|
<span class="sr">${_("Save your answer")}</span>
|
|
|
|
|
</button>
|
|
|
|
|
</span>
|
|
|
|
|
% endif
|
|
|
|
|
% if reset_button:
|
|
|
|
|
<span class="problem-action-button-wrapper">
|
|
|
|
|
<button type="button" class="reset problem-action-btn btn-default btn-small" data-value="${_('Reset')}"><span aria-hidden="true">${_('Reset')}</span><span class="sr">${_("Reset your answer")}</span></button>
|
|
|
|
|
</span>
|
|
|
|
|
% endif
|
|
|
|
|
% if answer_available:
|
|
|
|
|
<span class="problem-action-button-wrapper">
|
|
|
|
|
<button type="button" class="show problem-action-btn btn-default btn-small" aria-describedby="${ short_id }-problem-title"><span class="show-label">${_('Show answer')}</span></button>
|
|
|
|
|
</span>
|
|
|
|
|
% endif
|
|
|
|
|
</div>
|
|
|
|
|
<div class="submit-attempt-container">
|
|
|
|
|
<button type="button" class="submit btn-brand" data-submitting="${ submit_button_submitting }" data-value="${ submit_button }" data-should-enable-submit-button="${ should_enable_submit_button }" aria-describedby="submission_feedback_${short_id}" ${'' if should_enable_submit_button else 'disabled'}>
|
|
|
|
|
<span class="submit-label">${ submit_button }</span>
|
|
|
|
|
@@ -33,28 +58,30 @@ from openedx.core.djangolib.markup import HTML
|
|
|
|
|
|
|
|
|
|
% if submit_disabled_cta:
|
|
|
|
|
% if submit_disabled_cta.get('event_data'):
|
|
|
|
|
<button class="submit-cta-link-button btn-brand" onclick="emit_event(${submit_disabled_cta['event_data']})">${submit_disabled_cta['link_name']}
|
|
|
|
|
<span class="submit-cta-description" tabindex="0" role="note" aria-label="description">
|
|
|
|
|
<span data-tooltip="${submit_disabled_cta['description']}" data-tooltip-show-on-click="true"
|
|
|
|
|
class="fa fa-info-circle fa-lg" aria-hidden="true">
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="sr">(${submit_disabled_cta['description']})</span>
|
|
|
|
|
<button class="submit-cta-link-button btn-default btn-small" onclick="emit_event(${submit_disabled_cta['event_data']})">
|
|
|
|
|
${submit_disabled_cta['link_name']}
|
|
|
|
|
</button>
|
|
|
|
|
<span class="submit-cta-description" tabindex="0" role="note" aria-label="description">
|
|
|
|
|
<span data-tooltip="${submit_disabled_cta['description']}" data-tooltip-show-on-click="true"
|
|
|
|
|
class="fa fa-info-circle fa-lg" aria-hidden="true">
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="sr">(${submit_disabled_cta['description']})</span>
|
|
|
|
|
% else:
|
|
|
|
|
<form class="submit-cta" method="post" action="${submit_disabled_cta['link']}">
|
|
|
|
|
<input type="hidden" id="csrf_token" name="csrfmiddlewaretoken" value="${csrf_token}">
|
|
|
|
|
% for form_name, form_value in submit_disabled_cta['form_values'].items():
|
|
|
|
|
<input type="hidden" name="${form_name}" value="${form_value}">
|
|
|
|
|
% endfor
|
|
|
|
|
<button class="submit-cta-link-button btn-brand">${submit_disabled_cta['link_name']}
|
|
|
|
|
<span class="submit-cta-description" tabindex="0" role="note" aria-label="description">
|
|
|
|
|
<span data-tooltip="${submit_disabled_cta['description']}" data-tooltip-show-on-click="true"
|
|
|
|
|
class="fa fa-info-circle fa-lg" aria-hidden="true">
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="sr">(${submit_disabled_cta['description']})</span>
|
|
|
|
|
<button class="submit-cta-link-button btn-default btn-small">
|
|
|
|
|
${submit_disabled_cta['link_name']}
|
|
|
|
|
</button>
|
|
|
|
|
<span class="submit-cta-description" tabindex="0" role="note" aria-label="description">
|
|
|
|
|
<span data-tooltip="${submit_disabled_cta['description']}" data-tooltip-show-on-click="true"
|
|
|
|
|
class="fa fa-info-circle fa-lg" aria-hidden="true">
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="sr">(${submit_disabled_cta['description']})</span>
|
|
|
|
|
</form>
|
|
|
|
|
% endif
|
|
|
|
|
% endif
|
|
|
|
|
@@ -65,32 +92,6 @@ from openedx.core.djangolib.markup import HTML
|
|
|
|
|
<span class="sr">${_("Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.")}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="problem-action-buttons-wrapper">
|
|
|
|
|
% if demand_hint_possible:
|
|
|
|
|
<span class="problem-action-button-wrapper">
|
|
|
|
|
<button type="button" class="hint-button problem-action-btn btn-default btn-small" data-value="${_('Hint')}" ${'' if should_enable_next_hint else 'disabled'}><span class="icon fa fa-question" aria-hidden="true"></span>${_('Hint')}</button>
|
|
|
|
|
</span>
|
|
|
|
|
% endif
|
|
|
|
|
% if save_button:
|
|
|
|
|
<span class="problem-action-button-wrapper">
|
|
|
|
|
<button type="button" class="save problem-action-btn btn-default btn-small" data-value="${_('Save')}">
|
|
|
|
|
<span class="icon fa fa-floppy-o" aria-hidden="true"></span>
|
|
|
|
|
<span aria-hidden="true">${_('Save')}</span>
|
|
|
|
|
<span class="sr">${_("Save your answer")}</span>
|
|
|
|
|
</button>
|
|
|
|
|
</span>
|
|
|
|
|
% endif
|
|
|
|
|
% if reset_button:
|
|
|
|
|
<span class="problem-action-button-wrapper">
|
|
|
|
|
<button type="button" class="reset problem-action-btn btn-default btn-small" data-value="${_('Reset')}"><span class="icon fa fa-refresh" aria-hidden="true"></span><span aria-hidden="true">${_('Reset')}</span><span class="sr">${_("Reset your answer")}</span></button>
|
|
|
|
|
</span>
|
|
|
|
|
% endif
|
|
|
|
|
% if answer_available:
|
|
|
|
|
<span class="problem-action-button-wrapper">
|
|
|
|
|
<button type="button" class="show problem-action-btn btn-default btn-small" aria-describedby="${ short_id }-problem-title"><span class="icon fa fa-info-circle" aria-hidden="true"></span><span class="show-label">${_('Show Answer')}</span></button>
|
|
|
|
|
</span>
|
|
|
|
|
% endif
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<%include file="problem_notifications.html" args="
|
|
|
|
|
notification_type='warning',
|
|
|
|
|
|