Allow optional advertised_start metadata in Course, to let people pre-launch thier courses quietly if desired.

This commit is contained in:
David Ormsbee
2012-10-30 11:06:50 -04:00
parent 2c01bf4a48
commit 535980eb6d

View File

@@ -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