Commit 89cf7ee9 by Gregory Martin Committed by GitHub

Merge pull request #14022 from edx/yro_add-unset-dateutils

instructor dash course start and end
parents 1f987f18 2d60c65e
......@@ -48,7 +48,6 @@ from certificates.models import (
)
from certificates import api as certs_api
from bulk_email.models import BulkEmailFlag
from util.date_utils import get_default_time_display
from class_dashboard.dashboard_data import get_section_display_name, get_array_section_has_problem
from .tools import get_units_with_due_date, title_or_url
......@@ -430,8 +429,8 @@ def _section_course_info(course, access):
'course_display_name': course.display_name,
'has_started': course.has_started(),
'has_ended': course.has_ended(),
'start_date': get_default_time_display(course.start),
'end_date': get_default_time_display(course.end) or _('No end date set'),
'start_date': course.start,
'end_date': course.end,
'num_sections': len(course.children),
'list_instructor_tasks_url': reverse('list_instructor_tasks', kwargs={'course_id': unicode(course_key)}),
}
......
......@@ -2,7 +2,6 @@
<%namespace name='static' file='../static_content.html'/>
<%!
from django.core.urlresolvers import reverse
from util.date_utils import get_time_display
from django.utils.translation import ugettext as _
from django.conf import settings
from openedx.core.djangolib.markup import HTML, Text
......
......@@ -66,14 +66,17 @@ from openedx.core.djangolib.markup import HTML, Text
<li class="field text is-not-editable" id="field-course-start-date">
<label for="course-start-date">${_("Course Start Date:")}</label>
<b>${ section_data['start_date'] }</b>
<b class="localized-datetime" data-datetime="${section_data['start_date']}" data-timezone="${user_timezone}" data-language="${user_language}"></b>
</li>
<li class="field text is-not-editable" id="field-course-end-date">
<label for="course-end-date">${_("Course End Date:")}</label>
<b>${ section_data['end_date'] }</b>
% if course.end is None:
<b>${_("No end date set")}</b>
% else:
<b class="localized-datetime" data-datetime="${section_data['end_date']}" data-timezone="${user_timezone}" data-language="${user_language}"></b>
% endif
</li>
<li class="field text is-not-editable" id="field-course-started">
<label for="start-date">${_("Has the course started?")}</label>
......@@ -110,8 +113,8 @@ from openedx.core.djangolib.markup import HTML, Text
)}
</p>
%endif
</div>
</div>
%if settings.FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'):
<div class="running-tasks-container action-type-container">
......
......@@ -126,3 +126,7 @@ from django.core.urlresolvers import reverse
</main>
</div>
</div>
<%static:require_module_async module_name="js/dateutil_factory" class_name="DateUtilFactory">
DateUtilFactory.transform(iterationKey=".localized-datetime");
</%static:require_module_async>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment