From 42fbc1600655c27671eb3a58779ef9081f5defc7 Mon Sep 17 00:00:00 2001 From: cahrens Date: Tue, 2 Apr 2013 14:10:56 -0400 Subject: [PATCH] Feedback from code review. --- common/lib/xmodule/xmodule/course_module.py | 2 +- lms/templates/courseware/accordion.html | 2 +- lms/templates/courseware/progress.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py index caf5225318..ed5a37e580 100644 --- a/common/lib/xmodule/xmodule/course_module.py +++ b/common/lib/xmodule/xmodule/course_module.py @@ -544,7 +544,7 @@ class CourseDescriptor(CourseFields, SequenceDescriptor): except (ValueError, AttributeError): start = time_to_datetime(self.start) - now = time_to_datetime(time.gmtime()) + now = datetime.utcnow() return announcement, start, now diff --git a/lms/templates/courseware/accordion.html b/lms/templates/courseware/accordion.html index 453474aee0..da774a4486 100644 --- a/lms/templates/courseware/accordion.html +++ b/lms/templates/courseware/accordion.html @@ -11,7 +11,7 @@
  • ${section['display_name']}

    -

    ${section['format']} ${"due " + get_default_time_display(section['due']) if 'due' in section and section['due'] else ''}

    +

    ${section['format']} ${"due " + get_default_time_display(section['due']) if section.get('due') is not None else ''}

  • % endfor diff --git a/lms/templates/courseware/progress.html b/lms/templates/courseware/progress.html index d2d1490e98..f94e7651f0 100644 --- a/lms/templates/courseware/progress.html +++ b/lms/templates/courseware/progress.html @@ -62,7 +62,7 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph",

    ${section['format']} - %if 'due' in section and section['due']: + %if section.get('due') is not None: due ${get_default_time_display(section['due'])}