Commit 42fbc160 by cahrens

Feedback from code review.

parent ceababbf
...@@ -544,7 +544,7 @@ class CourseDescriptor(CourseFields, SequenceDescriptor): ...@@ -544,7 +544,7 @@ class CourseDescriptor(CourseFields, SequenceDescriptor):
except (ValueError, AttributeError): except (ValueError, AttributeError):
start = time_to_datetime(self.start) start = time_to_datetime(self.start)
now = time_to_datetime(time.gmtime()) now = datetime.utcnow()
return announcement, start, now return announcement, start, now
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<li class="${'active' if 'active' in section and section['active'] else ''} ${'graded' if 'graded' in section and section['graded'] else ''}"> <li class="${'active' if 'active' in section and section['active'] else ''} ${'graded' if 'graded' in section and section['graded'] else ''}">
<a href="${reverse('courseware_section', args=[course_id, chapter['url_name'], section['url_name']])}"> <a href="${reverse('courseware_section', args=[course_id, chapter['url_name'], section['url_name']])}">
<p>${section['display_name']}</p> <p>${section['display_name']}</p>
<p class="subtitle">${section['format']} ${"due " + get_default_time_display(section['due']) if 'due' in section and section['due'] else ''}</p> <p class="subtitle">${section['format']} ${"due " + get_default_time_display(section['due']) if section.get('due') is not None else ''}</p>
</a> </a>
</li> </li>
% endfor % endfor
......
...@@ -62,7 +62,7 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph", ...@@ -62,7 +62,7 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph",
<p> <p>
${section['format']} ${section['format']}
%if 'due' in section and section['due']: %if section.get('due') is not None:
<em> <em>
due ${get_default_time_display(section['due'])} due ${get_default_time_display(section['due'])}
</em> </em>
......
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