Commit 3053caec by Matthew Mongeau

Get course about page working.

parent 949efb62
from path import path
from xmodule.modulestore import Location
from xmodule.seq_module import SequenceDescriptor, SequenceModule
import logging
log = logging.getLogger("mitx.courseware")
class CourseDescriptor(SequenceDescriptor):
module_class = SequenceModule
......@@ -45,7 +42,7 @@ class CourseDescriptor(SequenceDescriptor):
# this interface when we find a good format for defining so many snippets of text/html.
if section_key in ['short_description', 'description', 'key_dates', 'video', 'course_staff_short', 'course_staff_extended',
'requirements', 'syllabus', 'textbook', 'faq', 'more_info']:
'requirements', 'syllabus', 'textbook', 'faq', 'more_info', 'number']:
try:
with self.system.resources_fs.open(path("about") / section_key + ".html") as htmlFile:
return htmlFile.read()
......
......@@ -257,4 +257,4 @@ def course_info(request, course_id):
except KeyError:
raise Http404("Course not found")
return render_to_response('info.html', {'csrf': csrf_token, 'course': course})
return render_to_response('portal/course_about.html', {'csrf': csrf_token, 'course': course})
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