Name |
Course contents block |
Module type |
Block |
Author |
David Mudrák |
Released |
2009 |
Maintained |
Actively |
Languages |
Czech, English |
Compliance |
Good |
Documentation |
Online documentation |
Errors |
None |
This is a very simple, but useful block that can automatically extrapolate and show a table of contents, based on the section titles in a course.
Unzip and copy the Course contents block directory into the /moodle/blocks/
directory and visit the Notifications page.
This block was created as a replacement for the Simple Navigation block, which is no longer maintained and doesn't seem to work on recent versions of Moodle.
After the block is installed, it can be added to a course page by turning editing on and selecting Course contents from the Blocks menu.
There is no configuration for the block, which means it cannot be bent to your will, but also means that this block is extremely simple for anyone to use.
One aspect that I thought was slightly annoying was the addition of numbers to each topic title. This happened with both the weekly and topics formats. If you are game, you can remove these numbers with a simple change to the block code.
Open the block's main source code file called block_course_contents.php
and locate the line that outputs the topic numbers. It should be around line 100 and contains the following code.
$text .= "<span class="section-number">$i </span>";
This line can be commented out by adding two forward slashes at the beginning of the line like the following:
// $text .= "<span class="section-number">$i </span>";
After saving this change, when the block is loaded, it will appear without the topic numbers.
Another aspect that cannot be changed, as there is no configuration, is title of the block. "Course contents" is relatively descriptive, but not the most appropriate title in English. To change the title, open the /moodle/blocks/course_contents/lang/en_utf8/block_course_contents.php
file and set a new value for the blockname
string. Alternately you can edit a local version of the language file through the facility at Site Administration | Language | Language Editing.
18.191.68.18