Commit 588f115b by David Ormsbee

Add support for optional end_date, effort, and prerequisites info on course_about

parent 23460730
......@@ -85,7 +85,8 @@ class CourseDescriptor(SequenceDescriptor):
# TODO: Remove number, instructors from this list
if section_key in ['short_description', 'description', 'key_dates', 'video', 'course_staff_short', 'course_staff_extended',
'requirements', 'syllabus', 'textbook', 'faq', 'more_info', 'number', 'instructors', 'overview']:
'requirements', 'syllabus', 'textbook', 'faq', 'more_info', 'number', 'instructors', 'overview',
'effort', 'end_date', 'prerequisites']:
try:
with self.system.resources_fs.open(path("about") / section_key + ".html") as htmlFile:
return htmlFile.read().decode('utf-8')
......
......@@ -72,10 +72,23 @@
</header>
<ol class="important-dates">
<li><div class="icon number-icon"></div><p>Course Number</p><span class="course-number">${course.number}</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>
## End date should come from course.xml, but this is a quick hack
% if course.get_about_section("end_date"):
<li><div class="icon final-icon"></div><p>Classes End</p><span class="final-date">${course.get_about_section("end_date")}</span></li>
% endif
% if course.get_about_section("effort"):
<li><div class="icon"></div><p>Estimated Effort</p><span class="start-date">${course.get_about_section("effort")}</span></li>
% endif
% if course.get_about_section("prerequisites"):
<li><div class="icon"></div><p>Prerequisites</p><span class="start-date">${course.get_about_section("prerequisites")}</span></li>
% endif
##<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>
</ol>
</section>
</section>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment