Skip to content

Commit

Permalink
refactor: address PR reviews for less changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mariajgrimaldi committed Feb 28, 2024
1 parent 5a2199f commit e552d66
Showing 1 changed file with 34 additions and 33 deletions.
67 changes: 34 additions & 33 deletions cms/templates/js/staff-lock-editor.underscore
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,49 @@
<%- gettext('Section Visibility') %>
<% } %>
</h3>
<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>
<% if (enableHideFromTOCUI) { %>
<div class="list-fields list-input content-visibility" role="group" aria-labelledby="content_visibility_label">
<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 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='staff-lock-description'> <%- gettext('It is visible to learners, ensuring that all learners can view its contents.') %> </p>
<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>
<% } %>
<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>
</form>

0 comments on commit e552d66

Please sign in to comment.