Course contents block: Difference between revisions
David Mudrak (talk | contribs) m (Adding usage examples) |
David Mudrak (talk | contribs) m (→Installation: The block development moved to git, instructions fixed) |
||
Line 10: | Line 10: | ||
==Installation== | ==Installation== | ||
There is a public source code repository for the block at [https://github.com/mudrd8mz/moodle-block_course_contents]. You can either clone that repository or just download the latest package there. Follow the instructions provided by github for details but this may be what you want: | |||
# cd /var/www/moodlesite/htdocs/blocks | |||
# git clone git://github.com/mudrd8mz/moodle-block_course_contents.git course_contents | |||
If your Moodle dirroot is git checkout too, you may want to add the block directory into the list of ignored files: | |||
# cd /var/www/moodlesite/htdocs | |||
# echo /blocks/course_contents/ >> .git/info/exclude | |||
==Examples== | ==Examples== |
Revision as of 17:29, 6 December 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
There is a public source code repository for the block at [1]. You can either clone that repository or just download the latest package there. Follow the instructions provided by github for details but this may be what you want:
# cd /var/www/moodlesite/htdocs/blocks # git clone git://github.com/mudrd8mz/moodle-block_course_contents.git course_contents
If your Moodle dirroot is git checkout too, you may want to add the block directory into the list of ignored files:
# cd /var/www/moodlesite/htdocs # echo /blocks/course_contents/ >> .git/info/exclude
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 |