Blocks: Course contents

Maintained by Picture of David Mudrák David Mudrák
Course contents block displays a list of all visible sections (such as topics or weeks) in the course. Clicking at a link scrolls to that section or displays just that particular section, depending on the course layout setting.
1021 sites
31 fans

Build status

Course contents block is a plugin for Moodle that displays a list of all visible sections (such as topics or weeks) in the course. Clicking at a link scrolls to that section or displays just that particular section, depending on the course layout setting.

If the section name is explicitly defined, it is displayed in the course contents outline. If enabled, the block can eventually extract a suitable section title from the section summary text.


In older Moodle versions, course sections could not be named explicitly. Many teachers used to put headings manually to the course summary text fields. This block did an awesome job that it automagically extracted these headings from the summary fields and generated a nice course contents from them.

This feature is still available but it is less useful in modern Moodle versions where course sections can have explicit section titles defined.

Automatic section title

If the section name is not explicitly defined and the auto title feature is enabled, the block automatically extracts a suitable title for the section from the section summary text.

If the summary starts with a heading (H1, H2, H3, etc), the heading will use such heading text. If the 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.

Technically speaking, the plain text content of the first non-empty HTML DOM node from the section summary can be used as the summary title.

Tips and features

  • Section titles can be enumerated.
  • You can combine the auto title feature with the multi-language filter to generate course contents in the user's language.
  • The block fits nicely into multipage course layout (introduced in Moodle 2.3).


Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4


Picture of David Mudrák
David Mudrák (Lead maintainer)
Picture of Dan Marsden
Dan Marsden: Contributor
Picture of Petr Skoda
Petr Skoda: Contributor
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Just H
    Tue, 3 Mar 2015, 9:31 AM
    FYI - Just added to a 2.8 Moodle install and from initial tests appears to work as advertised.
  • Picture of David Mudrák
    Tue, 3 Mar 2015, 6:26 PM
    Thanks! I just released a new version for both 2.7 and 2.8 that also fixes issue #14.
  • Picture of Aarij Siddiqui
    Fri, 10 Apr 2015, 12:01 AM

    I am having a slight problem in the plugin. It does not show the subtopics (quizzes, pages, etc) in the block, it only displays the main sections. Is there a way that I can also display all the sub topics of the section in the block?

  • Picture of David Mudrák
    Fri, 10 Apr 2015, 2:41 AM
    Hi Aarij. That's a feature, not a bug. The block intentionally displays just the section titles, not their contents. For the full list of section and included activities, you may wish to use the standard Navigation block.
  • Picture of Aarij Siddiqui
    Sat, 11 Apr 2015, 3:23 PM
    Hi David,

    Thanks for the quick reply. Only thing that is preventing me from using the navigation block is the unnecessary options (site pages, badges, etc) it has.

    Your plugin is very neat and regularly updated. I would be glad if you can guide me, how to modify it to display sub topics as well.

  • Picture of David Mudrák
    Thu, 16 Apr 2015, 8:31 PM
    I am sorry but this feature would definitely be out of the intended scope of this block. You may want to check some other plugins here to see if they fit your needs better. Quick googling found for example or
    Also note, in Moodle 2.9, the navigation block is massively simplified and does not contain many of these links any more.
  • Picture of Aarij Siddiqui
    Wed, 29 Apr 2015, 8:32 PM
    Thanks David... I found a work around. But the problem with majority of the plugins is that they are not supported in the latest version of moodle! Which is very unfortunate. If you know how to edit plugins to work in the latest moodle version, I would be glad if you can guide me.
  • Picture of David Mudrák
    Thu, 30 Apr 2015, 2:52 AM

    Well, in many cases, the plugins published here for a version X usually work pretty well in versions X + 1, too. You can try and see.

  • Picture of David Mudrák
    Sat, 30 Jul 2016, 2:10 AM

    New versions 4.0 (for Moodle 2.7, 2.8 and 2.9) and 5.0 (for 3.0 and 3.1) were just released. Among other improvements, the new version provides a way to control how the course contents blocks are displayed in courses, including ability to disable enumeration of items in all block instances. See release notes for more details.

  • Picture of James Fontes
    Thu, 4 Aug 2016, 8:08 AM
    I love this plugin. Installed in a Moodle 3.1 installation. It really helps with navigating a course. Would it be possible to add an option to include the section's dates, as well as the section name, when using the weeks format for a course? That would make this perfect for what I need. Student's could then not only scroll through the list of topics from the course sections, but can look through the dates as well. I found a hack for the lib.php file that would do that outside this plugin, but the hack is not complete and breaks the ability to backup a course.
  • Picture of David Mudrák
    Mon, 8 Aug 2016, 3:12 PM

    Thanks for the suggestion James. Can you please report it as a feature request in the plugin tracker. I think I have an idea that might fit any course format: optionally display the implicit section title (date, topic number etc) even when the section has an explicit title.

  • Picture of Dave Perry
    Thu, 13 Oct 2016, 8:31 PM
    I have just installed this to a test environment using a very recent (two week old) build of 3.1.2. Even with 'attempt to enumerate titles from topic summary' enabled, it failed to do so when tested (I set the topic title to be a whitespace character, so no topic title displays on the page, but the topic title was blank in the block too).
  • Picture of David Mudrák
    Tue, 25 Oct 2016, 4:59 AM

    Sorry to hear you have troubles with the plugin Dave. May I ask you to report the issue with as many details and steps to reproduce as possible at the plugin's issue tracker Thanks in advance.

  • Just wondering . . .
    Sat, 26 Nov 2016, 4:27 PM
    David, are you thinking about an update for Moodle 3.2?
    Anyone: as David says, often version for X works with X+0.1 - has anyone tested?

  • Picture of David Mudrák
    Mon, 28 Nov 2016, 6:17 PM

    I'll try to look at updating my plugins for 3.2 this week. Any help with testing current versions will significantly help, thanks in advance!

1 2 3
Please login to post comments