diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py index 8435cfca9e..7582a8b64f 100644 --- a/common/lib/xmodule/xmodule/course_module.py +++ b/common/lib/xmodule/xmodule/course_module.py @@ -24,7 +24,11 @@ class CourseDescriptor(SequenceDescriptor): @property def title(self): - self.metadata['display_name'] + return self.metadata['display_name'] + + @property + def number(self): + return self.location.course @property def instructors(self): @@ -62,7 +66,7 @@ class CourseDescriptor(SequenceDescriptor): '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() + return htmlFile.read().decode('utf-8') except ResourceNotFoundError: log.exception("Missing about section {key} in course {url}".format(key=section_key, url=self.location.url())) return "! About section missing !" @@ -91,7 +95,7 @@ class CourseDescriptor(SequenceDescriptor): if section_key in ['handouts', 'guest_handouts', 'updates', 'guest_updates']: try: with self.system.resources_fs.open(path("info") / section_key + ".html") as htmlFile: - return htmlFile.read() + return htmlFile.read().decode('utf-8') except ResourceNotFoundError: log.exception("Missing info section {key} in course {url}".format(key=section_key, url=self.location.url())) return "! Info section missing !" diff --git a/lms/templates/course.html b/lms/templates/course.html index bcfcab2526..b79cf02ac7 100644 --- a/lms/templates/course.html +++ b/lms/templates/course.html @@ -9,35 +9,7 @@
-

${course.get_about_section('title')}

-
- -
-
-
-
- -
-
-

An advanced introduction to analog circuits. An advanced introduction to analog circuits.

-
-
- ${course.get_about_section('university')} - 7/23/12 -
-
- -
-

${course.get_about_section('university')}

-
- - -
-
-
- -
-

${course.get_about_section('title')}

+

${course.number} ${course.get_about_section('title')}

diff --git a/lms/templates/portal/course_about.html b/lms/templates/portal/course_about.html index 9b1b616e46..9e3bef53a0 100644 --- a/lms/templates/portal/course_about.html +++ b/lms/templates/portal/course_about.html @@ -11,7 +11,7 @@
-

${course.get_about_section("title")}

${course.get_about_section("university")}

+

${course.number}: ${course.get_about_section("title")}

${course.get_about_section("university")}

@@ -47,6 +47,10 @@

Course staff

+ + ${course.get_about_section("instructors")} + +
diff --git a/lms/urls.py b/lms/urls.py index 34fccc7070..0f4b6a4b88 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -90,7 +90,7 @@ if settings.COURSEWARE_ENABLED: # TODO (vshnayder): there is no student.views.course_info. # Where should this point instead? same as the info view? - url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/about$', + url(r'^courses/(?P[^/]+/[^/]+/[^/]+)$', 'student.views.course_info', name="about_course"), )