Re-applied bugfix #24214, but behind a waffle flag. The change gates timed exams for audit learners. We would like to limit access to timed exams to verified learners. However, some of the instructors would like to make their content free for all users, including graded content/timed exams (hence the Feature-Based Enrollment "FBE" exemption). As a result, we will be rolling the gated timed exams functionality out behind a waffle flag now, add the FBE exemption when we figure out how, and gradually turn the waffle flag on for everyone.
143 lines
5.6 KiB
HTML
143 lines
5.6 KiB
HTML
<%page expression_filter="h"/>
|
|
<%! from django.utils.translation import pgettext, ugettext as _ %>
|
|
|
|
<div id="sequence_${element_id}" class="sequence" data-id="${item_id}"
|
|
data-position="${position}" data-ajax-url="${ajax_url}"
|
|
data-next-url="${next_url}" data-prev-url="${prev_url}"
|
|
data-save-position="${'true' if save_position else 'false'}"
|
|
data-show-completion="${'true' if show_completion else 'false'}"
|
|
>
|
|
% if not exclude_units:
|
|
|
|
% if banner_text:
|
|
<div class="pattern-library-shim alert alert-information subsection-header" tabindex="-1">
|
|
<span class="pattern-library-shim icon alert-icon fa fa-info-circle" aria-hidden="true"></span>
|
|
<span class="sr">${_('Important!')} </span>
|
|
<div class="pattern-library-shim alert-message">
|
|
<p class="pattern-library-shim alert-copy">
|
|
${banner_text}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
% endif
|
|
% endif
|
|
% if not gated_sequence_fragment:
|
|
<div class="sequence-nav">
|
|
<button class="sequence-nav-button button-previous">
|
|
<span class="icon fa fa-chevron-prev" aria-hidden="true"></span>
|
|
## Translators: A button for showing the Previous Unit
|
|
<span class="sequence-nav-button-label">${pgettext('unit', 'Previous')}</span>
|
|
</button>
|
|
<button class="sequence-nav-button button-next">
|
|
## Translators: A button for showing the Next Unit
|
|
<span class="sequence-nav-button-label">${pgettext('unit', 'Next')}</span>
|
|
<span class="icon fa fa-chevron-next" aria-hidden="true"></span>
|
|
</button>
|
|
<nav class="sequence-list-wrapper" aria-label="${_('Sequence')}">
|
|
<ol id="sequence-list" role="tablist">
|
|
% if gated_content['gated']:
|
|
<li>
|
|
<button class="active nav-item tab" title="${_('Content Locked')}" id="tab_0" role="tab" tabindex="-1" aria-selected="true" aria-expanded="true" aria-controls="content_locked" disabled>
|
|
<span class="icon fa fa-lock" aria-hidden="true"></span>
|
|
</button>
|
|
</li>
|
|
% else:
|
|
% for idx, item in enumerate(items):
|
|
<li role="presentation">
|
|
<button class="seq_${item['type']} inactive nav-item tab"
|
|
role="tab"
|
|
tabindex="-1"
|
|
aria-selected="false"
|
|
aria-expanded="false"
|
|
aria-controls="seq_content"
|
|
data-index="${idx}"
|
|
data-id="${item['id']}"
|
|
data-element="${idx+1}"
|
|
data-page-title="${item['page_title']}"
|
|
data-path="${item['path']}"
|
|
data-graded="${item['graded']}"
|
|
% if item.get('href'):
|
|
data-href="${item['href']}"
|
|
% endif
|
|
id="tab_${idx}">
|
|
<span class="icon fa seq_${item['type']}" aria-hidden="true"></span>
|
|
% if 'complete' in item:
|
|
<span
|
|
class="fa fa-check-circle check-circle ${"is-hidden" if not item['complete'] else ""}"
|
|
style="color:green"
|
|
aria-hidden="true"
|
|
></span>
|
|
% if item['complete']:
|
|
<span class="sr">${_("Completed")}</span>
|
|
%endif
|
|
% endif
|
|
<span class="fa fa-fw fa-bookmark bookmark-icon ${"is-hidden" if not item['bookmarked'] else "bookmarked"}" aria-hidden="true"></span>
|
|
<div class="sequence-tooltip sr"><span class="sr">${item['type']} </span>${item['page_title']}<span class="sr bookmark-icon-sr"> ${_("Bookmarked") if item['bookmarked'] else ""}</span></div>
|
|
</button>
|
|
</li>
|
|
% endfor
|
|
% endif
|
|
% if exclude_units:
|
|
<li role="presentation">
|
|
<button class="seq_new_button inactive xnav-item tab"
|
|
role="tab"
|
|
tabindex="-1"
|
|
aria-selected="false"
|
|
aria-expanded="false"
|
|
aria-controls="seq_content"
|
|
data-parent="${item_id}"
|
|
data-category="vertical"
|
|
data-default-name="${_('Unit')}"
|
|
>
|
|
<span
|
|
class="fa fa-plus"
|
|
aria-hidden="true"
|
|
></span> New Unit
|
|
</button>
|
|
</li>
|
|
% endif
|
|
</ol>
|
|
</nav>
|
|
</div>
|
|
% endif
|
|
% if not exclude_units:
|
|
% if gated_content['gated']:
|
|
<%include file="_gated_content.html" args="prereq_url=gated_content['prereq_url'], prereq_section_name=gated_content['prereq_section_name'], gated_section_name=gated_content['gated_section_name']"/>
|
|
% elif gated_sequence_fragment:
|
|
<h2 class="hd hd-2 unit-title">
|
|
${sequence_name}<span class="sr">${_("Content Locked")}</span>
|
|
</h2>
|
|
${gated_sequence_fragment | n, decode.utf8}
|
|
% else:
|
|
<div class="sr-is-focusable" tabindex="-1"></div>
|
|
|
|
% for idx, item in enumerate(items):
|
|
<div id="seq_contents_${idx}"
|
|
aria-labelledby="tab_${idx}"
|
|
aria-hidden="true"
|
|
class="seq_contents tex2jax_ignore asciimath2jax_ignore">
|
|
${item['content']}
|
|
</div>
|
|
% endfor
|
|
<div id="seq_content" role="tabpanel"></div>
|
|
% endif
|
|
% else:
|
|
<div id="seq_content" role="tabpanel"></div>
|
|
% endif
|
|
|
|
% if not exclude_units:
|
|
<nav class="sequence-bottom" aria-label="${_('Section')}">
|
|
<button class="sequence-nav-button button-previous">
|
|
<span class="icon fa fa-chevron-prev" aria-hidden="true"></span>
|
|
## Translators: A button for showing the Previous Unit
|
|
<span>${pgettext('unit', 'Previous')}</span>
|
|
</button>
|
|
<button class="sequence-nav-button button-next">
|
|
## Translators: A button for showing the Next Unit
|
|
<span>${pgettext('unit', 'Next')}</span>
|
|
<span class="icon fa fa-chevron-next" aria-hidden="true"></span>
|
|
</button>
|
|
</nav>
|
|
</div>
|
|
% endif
|