diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py index 33c222bd7c..2b6232d366 100644 --- a/common/lib/xmodule/xmodule/course_module.py +++ b/common/lib/xmodule/xmodule/course_module.py @@ -250,6 +250,10 @@ class CourseDescriptor(SequenceDescriptor): displayed_start = self._try_parse_time('advertised_start') or self.start return time.strftime("%b %d, %Y", displayed_start) + @property + def end_date_text(self): + return time.strftime("%b %d, %Y", self.end) + # An extra property is used rather than the wiki_slug/number because # there are courses that change the number for different runs. This allows # courses to share the same css_class across runs even if they have diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index 01baade6f7..1d36f8f958 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -137,7 +137,15 @@
Course Completed - Nov 6, 2012
++ % if course.has_ended(): + Course Completed - ${course.end_date_text} + % elif course.has_started(): + Course Started - ${course.start_date_text} + % else: # hasn't started yet + Course Starts - ${course.start_date_text} + % endif +
View Courseware