diff --git a/cms/djangoapps/contentstore/utils.py b/cms/djangoapps/contentstore/utils.py index 9109efd292..582123b78f 100644 --- a/cms/djangoapps/contentstore/utils.py +++ b/cms/djangoapps/contentstore/utils.py @@ -77,5 +77,4 @@ def compute_unit_state(unit): def get_date_display(date): - print date, type(date) return date.strftime("%d %B, %Y at %I:%M %p") diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py index 3e49e9f35a..ce476be481 100644 --- a/cms/djangoapps/contentstore/views.py +++ b/cms/djangoapps/contentstore/views.py @@ -10,6 +10,7 @@ import sys import time import tarfile import shutil +from datetime import datetime from collections import defaultdict from uuid import uuid4 from lxml import etree @@ -287,6 +288,7 @@ def edit_unit(request, location): 'draft_preview_link': preview_lms_link, 'published_preview_link': lms_link, 'subsection': containing_subsection, + 'release_date': get_date_display(datetime.fromtimestamp(time.mktime(containing_subsection.start))), 'section': containing_section, 'create_new_unit_template': Location('i4x', 'edx', 'templates', 'vertical', 'Empty'), 'unit_state': unit_state, diff --git a/cms/templates/unit.html b/cms/templates/unit.html index 28948b0ab6..0f4f999599 100644 --- a/cms/templates/unit.html +++ b/cms/templates/unit.html @@ -85,7 +85,7 @@
This unit is scheduled to be released to students on ${subsection.start} with the subsection "${subsection.display_name}"
+This unit is scheduled to be released to students on ${release_date} with the subsection "${subsection.display_name}"