Display real course start date in course about page
This commit is contained in:
@@ -29,7 +29,7 @@ class CourseDescriptor(SequenceDescriptor):
|
||||
|
||||
def has_started(self):
|
||||
return time.gmtime() > self.start
|
||||
|
||||
|
||||
@classmethod
|
||||
def id_to_location(cls, course_id):
|
||||
org, course, name = course_id.split('/')
|
||||
@@ -39,6 +39,10 @@ class CourseDescriptor(SequenceDescriptor):
|
||||
def id(self):
|
||||
return "/".join([self.location.org, self.location.course, self.location.name])
|
||||
|
||||
@property
|
||||
def start_date_text(self):
|
||||
return time.strftime("%m/%d/%y", self.start)
|
||||
|
||||
@property
|
||||
def title(self):
|
||||
return self.metadata['display_name']
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
</header>
|
||||
|
||||
<ol class="important-dates">
|
||||
<li><div class="icon start-icon"></div><p>Classes Start</p><span class="start-date">7/12/12</span></li>
|
||||
<li><div class="icon start-icon"></div><p>Classes Start</p><span class="start-date">${course.start_date_text}</span></li>
|
||||
##<li><div class="icon final-icon"></div><p>Final Exam</p><span class="final-date">12/09/12</span></li>
|
||||
##<li><div class="icon length-icon"></div><p>Course Length</p><span class="course-length">15 weeks</span></li>
|
||||
<li><div class="icon number-icon"></div><p>Course Number</p><span class="course-number">${course.number}</span></li>
|
||||
|
||||
Reference in New Issue
Block a user