135 lines
8.5 KiB
HTML
135 lines
8.5 KiB
HTML
<%page expression_filter="h"/>
|
||
<%inherit file="/main.html" />
|
||
<%namespace name='static' file='/static_content.html'/>
|
||
<%!
|
||
|
||
from django.utils.translation import ugettext as _
|
||
from lms.djangoapps.courseware.date_summary import CourseAssignmentDate, TodaysDate, VerificationDeadlineDate, VerifiedUpgradeDeadlineDate
|
||
from openedx.core.djangolib.markup import HTML, Text
|
||
%>
|
||
|
||
<%block name="bodyclass">view-in-course view-progress</%block>
|
||
|
||
<%block name="headextra">
|
||
<%static:css group='style-course-vendor'/>
|
||
<%static:css group='style-course'/>
|
||
</%block>
|
||
|
||
<%block name="pagetitle">${_("{course.display_number_with_default} Course Info").format(course=course)}</%block>
|
||
|
||
<%include file="/courseware/course_navigation.html" args="active_page='dates'" />
|
||
|
||
<main id="main" aria-label="Content" tabindex="-1">
|
||
<div class="container">
|
||
<div class="date-wrapper">
|
||
<section class="course-info" id="course-info-dates">
|
||
<h2 class="hd hd-2 date-title">
|
||
${_("Important Dates")}
|
||
</h2>
|
||
<% has_locked_assignments = any(hasattr(block, 'contains_gated_content') and block.contains_gated_content for block in course_date_blocks if isinstance(block, CourseAssignmentDate)) %>
|
||
% if has_locked_assignments and verified_upgrade_link:
|
||
<div class="upgrade-banner">
|
||
<div class="upgrade-banner-text">
|
||
<strong>${_('You are auditing this course,')}</strong>
|
||
${_(' which means that you are unable to participate in graded assignments.')}
|
||
% if display_reset_dates_text:
|
||
${_(' It looks like you missed some important deadlines based on our suggested schedule. To complete graded assignments as part of this course and shift the past due assignments into the future, you can upgrade today.')}
|
||
% else:
|
||
${_(' To complete graded assignments as part of this course, you can upgrade today.')}
|
||
% endif
|
||
</div>
|
||
<div class="upgrade-button">
|
||
<a href="${verified_upgrade_link}">
|
||
<button type="button">
|
||
% if display_reset_dates_text:
|
||
${_('Upgrade to shift due dates')}
|
||
% else:
|
||
${_('Upgrade now')}
|
||
% endif
|
||
</button>
|
||
</a>
|
||
</div>
|
||
</div>
|
||
% endif
|
||
% if display_reset_dates_text and learner_is_verified:
|
||
<div class="upgrade-banner">
|
||
<div class="upgrade-banner-text">
|
||
<strong>${_('It looks like you missed some important deadlines based on our suggested schedule.')}</strong>
|
||
${_('To keep yourself on track, you can update this schedule and shift the past due assignments into the future. Don’t worry—you won’t lose any of the progress you’ve made when you shift your due dates. ')}
|
||
</div>
|
||
<div class="upgrade-button">
|
||
<form method="post" action="${reset_deadlines_url}">
|
||
<input type="hidden" id="csrf_token" name="csrfmiddlewaretoken" value="${csrf_token}">
|
||
<input type="hidden" name="reset_deadlines_redirect_url_base" value="${reset_deadlines_redirect_url_base}">
|
||
<input type="hidden" name="reset_deadlines_redirect_url_id_dict" value="${reset_deadlines_redirect_url_id_dict}">
|
||
<button class="upgrade-button">${_("Reset my deadlines")}</button>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
% endif
|
||
|
||
<% due_next_set = False %>
|
||
% for block in course_date_blocks:
|
||
<% block_is_verified = (hasattr(block, 'contains_gated_content') and block.contains_gated_content) or isinstance(block, VerificationDeadlineDate) %>
|
||
<% learner_has_access = not block_is_verified or learner_is_verified %>
|
||
<% access_class = '' if learner_has_access else 'no-access' %>
|
||
<% is_assignment = isinstance(block, CourseAssignmentDate) %>
|
||
<% todays_date = 'todays-date' if isinstance(block, TodaysDate) else '' %>
|
||
<% past_date = 'past-date' if block.date and block.date < block.current_time else '' %>
|
||
<% past_due = 'past-due' if learner_is_verified and is_assignment and block.past_due else '' %>
|
||
<% due_in_future = True if learner_is_verified and is_assignment and block.date and block.date >= block.current_time else False %>
|
||
<% not_released = 'not-released' if learner_is_verified and is_assignment and not block.title_html else '' %>
|
||
% if not (learner_is_verified and isinstance(block, VerifiedUpgradeDeadlineDate)):
|
||
<div class="timeline-item">
|
||
<div class="date-circle ${todays_date} ${past_date} ${past_due}"></div>
|
||
<div class="date-content ${todays_date}">
|
||
<div class="timeline-date-content ${not_released}">
|
||
% if block.date:
|
||
<div class="timeline-date">
|
||
<div class="course-date localized_datetime" aria-hidden="true" data-format="shortDate" data-datetime="${block.date}" data-language="${user_language}" data-timezone="${user_timezone}"></div>
|
||
</div>
|
||
% if todays_date:
|
||
<div class="pill today">${_('Today')}</div>
|
||
% endif
|
||
% if not learner_has_access:
|
||
<div class="pill verified"><span class="fa fa-lock verified-icon" aria-hidden="true"></span>${_('Verified Only')}</div>
|
||
% else:
|
||
% if is_assignment and block.complete:
|
||
<div class="pill completed">${_('Completed')}</div>
|
||
% elif is_assignment and block.past_due:
|
||
<div class="pill past-due">${_('Past Due')}</div>
|
||
% elif is_assignment and due_in_future and not due_next_set:
|
||
<div class="pill due-next">${_('Due Next')}</div>
|
||
<% due_next_set = True %>
|
||
% endif
|
||
% if not_released:
|
||
<div class="pill not-released">${_('Not yet released')}</div>
|
||
% endif
|
||
%endif
|
||
% endif
|
||
</div>
|
||
% if not todays_date:
|
||
<div class="timeline-title ${access_class} ${not_released}">
|
||
% if block.title_html and is_assignment and learner_has_access:
|
||
${block.title_html}
|
||
% else:
|
||
${block.title}
|
||
% endif
|
||
</div>
|
||
<div class="timeline-description ${access_class} ${not_released}">
|
||
${block.description}
|
||
</div>
|
||
% endif
|
||
</div>
|
||
</div>
|
||
% endif
|
||
% endfor
|
||
</section>
|
||
</div>
|
||
</div>
|
||
</main>
|
||
|
||
<%static:require_module_async module_name="js/dateutil_factory" class_name="DateUtilFactory">
|
||
DateUtilFactory.transform(iterationKey=".localized_datetime");
|
||
</%static:require_module_async>
|