diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py index 4bbd0b0420..e30280ec62 100644 --- a/common/lib/xmodule/xmodule/course_module.py +++ b/common/lib/xmodule/xmodule/course_module.py @@ -18,6 +18,10 @@ class CourseDescriptor(SequenceDescriptor): def title(self): self.metadata['display_name'] + @property + def instructors(self): + return self.get_about_section("instructors").split("\n") + def get_about_section(self, section_key): """ This returns the snippet of html to be rendered on the course about page, given the key for the section. @@ -41,8 +45,9 @@ class CourseDescriptor(SequenceDescriptor): # Many of these are stored as html files instead of some semantic markup. This can change without effecting # this interface when we find a good format for defining so many snippets of text/html. + # 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']: + 'requirements', 'syllabus', 'textbook', 'faq', 'more_info', 'number', 'instructors']: try: with self.system.resources_fs.open(path("about") / section_key + ".html") as htmlFile: return htmlFile.read() diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index 9d6315e356..403a472d42 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -257,4 +257,4 @@ def course_info(request, course_id): except KeyError: raise Http404("Course not found") - return render_to_response('portal/course_about.html', {'csrf': csrf_token, 'course': course}) + return render_to_response('info.html', {'csrf': csrf_token, 'course': course}) diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index c3fc5bf8de..10d5b4853b 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -48,9 +48,9 @@
-

${course.title}

+

${course.get_about_section("title")}

% for instructor in course.instructors: -

${course.institution}

+

${course.get_about_section('university')}

% endfor
options
diff --git a/lms/urls.py b/lms/urls.py index 201dc7f182..b574c3287f 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -77,7 +77,7 @@ if settings.COURSEWARE_ENABLED: url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/profile$', 'courseware.views.profile', name="profile"), url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/profile/(?P[^/]*)/$', 'courseware.views.profile'), - url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/about$', 'courseware.views.course_info', name="about_course"), + url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/about$', 'student.views.course_info', name="about_course"), ) if settings.ENABLE_MULTICOURSE: