From 535980eb6dcf8a2bc3dbdb579df66c11641791d8 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Tue, 30 Oct 2012 11:06:50 -0400 Subject: [PATCH] Allow optional advertised_start metadata in Course, to let people pre-launch thier courses quietly if desired. --- common/lib/xmodule/xmodule/course_module.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py index 0a5108590f..de8eddd0b8 100644 --- a/common/lib/xmodule/xmodule/course_module.py +++ b/common/lib/xmodule/xmodule/course_module.py @@ -247,7 +247,8 @@ class CourseDescriptor(SequenceDescriptor): @property def start_date_text(self): - return time.strftime("%b %d, %Y", self.start) + displayed_start = self._try_parse_time('advertised_start') or self.start + return time.strftime("%b %d, %Y", displayed_start) # An extra property is used rather than the wiki_slug/number because # there are courses that change the number for different runs. This allows