Course contents block: Difference between revisions
Helen Foster (talk | contribs) m (category edit) |
David Mudrak (talk | contribs) m (Adding usage examples) |
||
Line 14: | Line 14: | ||
The source codes of the module live in [[CVS for Administrators|CVS]] [http://cvs.moodle.org/contrib/plugins/blocks/course_contents/ contrib/plugins/blocks/course_contents]. To checkout the module, go to the Moodle blocks/ directory and use: | The source codes of the module live in [[CVS for Administrators|CVS]] [http://cvs.moodle.org/contrib/plugins/blocks/course_contents/ contrib/plugins/blocks/course_contents]. To checkout the module, go to the Moodle blocks/ directory and use: | ||
cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d course_contents contrib/plugins/blocks/course_contents | cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d course_contents contrib/plugins/blocks/course_contents | ||
==Examples== | |||
{| class="nicetable" | |||
! <center>Start of the section summary HTML</center> | |||
! <center>Automatic course contents line</center> | |||
|- | |||
| <nowiki>Welcome!<br />In this course, you will ...</nowiki> | |||
| Welcome! | |||
|- | |||
| <nowiki><h1>Introduction</h1><p>In this course ...</p></nowiki> | |||
| Introduction | |||
|- | |||
| <nowiki><h1><span>Lesson 1</span>: Introduction</h1></nowiki> | |||
| Lesson 1 | |||
|} | |||
==See also== | ==See also== |
Revision as of 20:12, 26 February 2010
Course contents block is similar to the Simple navigation block. It simply produces a list of all visible topic/week in your course. Clicking at one of these links will display that particular week or topic.
The block automatically extracts a suitable title for every week or topic from the section summary. If you start summary with a heading (H1, H2, H3, etc), it will use such heading text. If your summary starts with a bold text, it will be used as a section title. If the summary consists of several paragraphs, the first one will be used. If the summary is empty, a customizable text "Unit X" (where X is the number) is displayed. Technically spoken, the plain text content of the first non-empty HTML DOM node from the section summary is used as the summary title.
The block has been written and is currently maintained by David Mudrak
Installation
- Moodle 1.9 - checkout CVS HEAD branch or download the daily build
The source codes of the module live in CVS contrib/plugins/blocks/course_contents. To checkout the module, go to the Moodle blocks/ directory and use:
cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d course_contents contrib/plugins/blocks/course_contents
Examples
Welcome!<br />In this course, you will ... | Welcome! |
<h1>Introduction</h1><p>In this course ...</p> | Introduction |
<h1><span>Lesson 1</span>: Introduction</h1> | Lesson 1 |