<% var releasedToStudents = xblockInfo.get('released_to_students'); var visibilityState = xblockInfo.get('visibility_state'); var published = xblockInfo.get('published'); var prereq = xblockInfo.get('prereq'); var statusMessage = null; var statusType = null; if (prereq) { var prereqDisplayName = ''; _.each(xblockInfo.get('prereqs'), function (p) { if (p.block_usage_key == prereq) { prereqDisplayName = p.block_display_name; return false; } }); statusType = 'gated'; statusMessage = interpolate( gettext('Prerequisite: %(prereq_display_name)s'), {prereq_display_name: prereqDisplayName}, true ); } if (staffOnlyMessage) { statusType = 'staff-only'; statusMessage = gettext('Contains staff only content'); } else if (visibilityState === 'needs_attention') { if (xblockInfo.isVertical()) { statusType = 'warning'; if (published && releasedToStudents) { statusMessage = gettext('Unpublished changes to live content'); } else if (!published) { statusMessage = gettext('Unpublished units will not be released'); } else { statusMessage = gettext('Unpublished changes to content that will release in the future'); } } } var statusIconClass = ''; if (statusType === 'warning') { statusIconClass = 'fa-file-o'; } else if (statusType === 'error') { statusIconClass = 'fa-warning'; } else if (statusType === 'staff-only') { statusIconClass = 'fa-lock'; } else if (statusType === 'gated') { statusIconClass = 'fa-lock'; } var gradingType = gettext('Ungraded'); if (xblockInfo.get('graded')) { gradingType = xblockInfo.get('format') } var is_proctored_exam = xblockInfo.get('is_proctored_exam'); var is_practice_exam = xblockInfo.get('is_practice_exam'); if (is_proctored_exam) { if (is_practice_exam) { var exam_value = gettext('Practice proctored Exam'); } else { var exam_value = gettext('Proctored Exam'); } } else { var exam_value = gettext('Timed Exam'); } %> <% if (parentInfo) { %>
  • <% if (xblockInfo.isHeaderVisible()) { %>
    <% if (includesChildren) { %>

    <% } else { %>

    <% } %> <% if (xblockInfo.isVertical()) { %> <%- xblockInfo.get('display_name') %> <% } else { %> "> <%- xblockInfo.get('display_name') %> <% } %>

    <% if (!xblockInfo.isVertical()) { %> <% if (xblockInfo.get('explanatory_message') !=null) { %>
    <%- xblockInfo.get('explanatory_message') %>
    <% } else { %>

    <%- gettext('Release Status:') %> <% if (!course.get('self_paced')) { %> <% if (xblockInfo.get('released_to_students')) { %> <%- gettext('Released:') %> <% } else if (xblockInfo.get('release_date')) { %> <%- gettext('Scheduled:') %> <% } else { %> <%- gettext('Unscheduled') %> <% } %> <% if (xblockInfo.get('release_date')) { %> <%- xblockInfo.get('release_date') %> <% } %> <% } %>

    <% } %> <% if (xblockInfo.get('is_time_limited')) { %>

    <%- gettext('Graded as:') %> <%- gradingType %> - <%- exam_value %> <%- exam_value %> <% if (xblockInfo.get('due_date')) { %> <%- gettext('Due:') %> <%- xblockInfo.get('due_date') %> <% } %>

    <% } else if (xblockInfo.get('due_date') || xblockInfo.get('graded')) { %>

    <%- gettext('Graded as:') %> <%- gradingType %> <% if (xblockInfo.get('due_date') && !course.get('self_paced')) { %> <%- gettext('Due:') %> <%- xblockInfo.get('due_date') %> <% } %>

    <% } %>

    <% if (xblockInfo.get('hide_after_due')) { %> <% if (course.get('self_paced')) { %> <%- gettext("Subsection is hidden after course end date") %> <% } else { %> <%- gettext("Subsection is hidden after due date") %> <% } %> <% } %>

    <% } %> <% if (statusMessage) { %>

    <%- statusMessage %>

    <% } %>
    <% } %> <% } %> <% if (!parentInfo && xblockInfo.get('child_info') && xblockInfo.get('child_info').children.length === 0) { %>

    <%- gettext("You haven't added any content to this course yet.") %> <%- addChildLabel %>

    <% } else if (!xblockInfo.isVertical()) { %>
    <% if (childType) { %> <% if (xblockInfo.isChildAddable()) { %> <% } %> <% } %>
    <% } %> <% if (parentInfo) { %>
  • <% } %>