Files
edx-platform/cms/templates/js/staff-lock-editor.underscore
Maria Grimaldi f544a4825d feat: make hide from TOC a visibility section setting (#33952)
Exposes the hide_from_toc xblock attribute so course authors can configure it as a section visibility option in Studio. Before this change, the Hide from TOC functionality was mainly used by OLX components. Hence, it wasn't available for configuration through the Studio UI. Still, its implementation existed in the platform and could be used by setting the attribute: hide_from_toc=true as part of the OLX definition.
Ref: https://openedx.atlassian.net/wiki/spaces/OEPM/pages/3853975595/Feature+Enhancement+Proposal+Hide+Sections+from+course+outline
2024-02-29 11:13:33 -04:00

55 lines
2.9 KiB
Plaintext

<form>
<h3 class="modal-section-title">
<% if (xblockInfo.isVertical()) { %>
<%- gettext('Unit Visibility') %>
<% } else { %>
<%- gettext('Section Visibility') %>
<% } %>
</h3>
<div class="list-fields list-input content-visibility" role="group" aria-labelledby="content_visibility_label">
<% if (enableHideFromTOCUI) { %>
<div class="modal-section-content no-visibility-option">
<label class="label">
<input type="radio" id="visible_to_learners" name="content-visibility" class="input input-radio" />
<span> <%- gettext('Visible to learners') %> </span>
</label>
<p class='field-message' id='visible-to-learners-description'> <%- gettext('It is visible to learners, ensuring that all learners can view its contents.') %> </p>
</div>
<div class="modal-section-content hide-from-toc">
<% if (!xblockInfo.isVertical()) { %>
<label class="label">
<input type="radio" id="hide_from_toc" name="content-visibility" class="input input-radio" />
<span> <%- gettext('Hide in Course Outline, accessible via Link') %> </span>
</label>
<p class='field-message' id='hide-from-toc-description'> <%- gettext('It is intentionally hidden from standard navigation, ensuring that only individuals with the link can view its contents.') %> </p>
<% if (hideFromTOC) { %>
<p class="tip tip-warning">
<%- gettext('If you make this section visible in the table of content, learners will be able to see its content.') %>
</p>
<% } %>
<% } %>
</div>
<% } %>
<div class="modal-section-content staff-lock">
<label class="label">
<% var inputType = enableHideFromTOCUI ? 'radio' : 'checkbox'; %>
<input type="<%- inputType %>" id="staff_lock" name="content-visibility" class="<%- inputType === 'radio' ? 'input input-radio' : 'input input-checkbox' %>" />
<%- gettext('Hide from learners') %>
</label>
<% if (enableHideFromTOCUI) { %>
<p class='field-message' id='staff-lock-description'> <%- gettext('It is intentionally hidden from learners, ensuring that only the course staff can view its contents.') %> </p>
<% } %>
<% if (hasExplicitStaffLock && !ancestorLocked) { %>
<p class="tip tip-warning">
<% if (xblockInfo.isVertical()) { %>
<%- gettext('If the unit was previously published and released to learners, any changes you made to the unit when it was hidden will now be visible to learners.') %>
<% } else { %>
<% var message = gettext('If you make this %(xblockType)s visible to learners, learners will be able to see its content after the release date has passed and you have published the unit. Only units that are explicitly hidden from learners will remain hidden after you clear this option for the %(xblockType)s.') %>
<%- interpolate(message, { xblockType: xblockType }, true) %>
<% } %>
</p>
<% } %>
</div>
</div>
</form>