% 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) { %>
<%- 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') %> <% } %> <% } %>
<%- gettext('Graded as:') %> <%- gradingType %> - <%- exam_value %> <%- exam_value %> <% if (xblockInfo.get('due_date')) { %> <%- gettext('Due:') %> <%- xblockInfo.get('due_date') %> <% } %>
<%- gettext('Graded as:') %> <%- gradingType %> <% if (xblockInfo.get('due_date') && !course.get('self_paced')) { %> <%- gettext('Due:') %> <%- xblockInfo.get('due_date') %> <% } %>
<%- gettext("You haven't added any content to this course yet.") %> <%- addChildLabel %>