From 28fc3ec18ae9564963931938bfe2ad2ca9eb3a35 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Tue, 17 Jul 2012 10:54:21 -0400 Subject: [PATCH] Add overview.html, a simple one page place where course staff can control a course about page. --- common/lib/xmodule/xmodule/course_module.py | 3 +- lms/templates/course.html | 2 +- lms/templates/portal/course_about.html | 68 ++------------------- 3 files changed, 9 insertions(+), 64 deletions(-) diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py index 7582a8b64f..5f74873465 100644 --- a/common/lib/xmodule/xmodule/course_module.py +++ b/common/lib/xmodule/xmodule/course_module.py @@ -42,6 +42,7 @@ class CourseDescriptor(SequenceDescriptor): """ This returns the snippet of html to be rendered on the course about page, given the key for the section. Valid keys: + - overview - title - university - number @@ -63,7 +64,7 @@ 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']: + 'requirements', 'syllabus', 'textbook', 'faq', 'more_info', 'number', 'instructors', 'overview']: try: with self.system.resources_fs.open(path("about") / section_key + ".html") as htmlFile: return htmlFile.read().decode('utf-8') diff --git a/lms/templates/course.html b/lms/templates/course.html index b79cf02ac7..ab6067c6ea 100644 --- a/lms/templates/course.html +++ b/lms/templates/course.html @@ -19,7 +19,7 @@
-

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

+ ${course.get_about_section('short_description')}
${course.get_about_section('university')} diff --git a/lms/templates/portal/course_about.html b/lms/templates/portal/course_about.html index 9e3bef53a0..8d10938993 100644 --- a/lms/templates/portal/course_about.html +++ b/lms/templates/portal/course_about.html @@ -32,71 +32,15 @@
-
-

About this course

-

${course.get_about_section("description")}

-
- -
-

Course staff

- - ${course.get_about_section("instructors")} - - -
- -
-

Requirements

-

${course.get_about_section("requirements")}

-
- -
-

Syllabus

-

${course.get_about_section("syllabus")}

-
- -
-

Textbook

- ${course.get_about_section("textbook")} -
- -
-

Frequently Asked Questions

-

${course.get_about_section("faq")}

-
- + ${course.get_about_section("overview")}