From 55266f6e96b14bfe07dc79408c8289a554b394cb Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Fri, 26 Apr 2013 13:39:22 -0400 Subject: [PATCH] add a overview.yaml template and also clone that template into a newly created course --- cms/djangoapps/contentstore/views.py | 6 +++ cms/templates/settings.html | 53 ------------------ .../xmodule/templates/about/overview.yaml | 54 +++++++++++++++++++ 3 files changed, 60 insertions(+), 53 deletions(-) create mode 100644 common/lib/xmodule/xmodule/templates/about/overview.yaml diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py index 603010f5b4..bc74b028a8 100644 --- a/cms/djangoapps/contentstore/views.py +++ b/cms/djangoapps/contentstore/views.py @@ -1498,6 +1498,12 @@ def create_new_course(request): new_course = modulestore('direct').clone_item(template, dest_location) + # clone a default 'about' module as well + + about_template_location = Location(['i4x', 'edx', 'templates', 'about', 'overview']) + dest_about_location = dest_location._replace(category='about', name='overview') + modulestore('direct').clone_item(about_template_location, dest_about_location) + if display_name is not None: new_course.display_name = display_name diff --git a/cms/templates/settings.html b/cms/templates/settings.html index a4355c98c5..0a647c632e 100644 --- a/cms/templates/settings.html +++ b/cms/templates/settings.html @@ -180,59 +180,6 @@ from contentstore import utils Introductions, prerequisites, FAQs that are used on your course summary page (formatted in HTML) - -
  • diff --git a/common/lib/xmodule/xmodule/templates/about/overview.yaml b/common/lib/xmodule/xmodule/templates/about/overview.yaml new file mode 100644 index 0000000000..0f6aec0af8 --- /dev/null +++ b/common/lib/xmodule/xmodule/templates/about/overview.yaml @@ -0,0 +1,54 @@ +--- +metadata: + display_name: overview + +data: | +
    +

    About This Course

    +

    Include your long course description here. The long course description should contain 150-400 words.

    + +

    This is paragraph 2 of the long course description. Add more paragraphs as needed. Make sure to enclose them in paragraph tags.

    +
    + +
    +

    Prerequisites

    +

    Add information about course prerequisites here.

    +
    + +
    +

    Course Staff

    +
    +
    + +
    + +

    Staff member name

    +

    Biography of instructor/staff member

    +
    + +
    +
    + +
    + +

    Staff member name

    +

    Biography of instructor/staff member

    +
    +
    + +
    +
    +

    Frequently Asked Questions

    +
    +

    Do I need to buy a textbook?

    +

    No, a free online version of Chemistry: Principles, Patterns, and Applications, First Edition by Bruce Averill and Patricia Eldredge will be available, though you can purchase a printed version (published by FlatWorld Knowledge) if you’d like.

    +
    + +
    +

    Question #2

    +

    Your answer would be displayed here.

    +
    +
    +
    +
    +children: [] \ No newline at end of file