Your Moodle version

Blocks: Course contents

Maintained by Picture of David Mudrák David Mudrák
Course contents block produces a table of contents for the course - that is a list of all visible sections (topics or weeks) in the course. Clicking at one of these links will display that particular section.

If the section name is defined, it is used in the course contents. Otherwise, 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. Technically spoken, the plain text content of the first non-empty HTML DOM node from the section summary is used as the summary title. If no suitable title can be populated, the current course format's default is used.

You can combine this 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.




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

Comments RSS

Show comments
  • Me, with my new 'slow explosion' hair!
    Fri, Mar 8, 2013, 10:09 PM
    Hi David. The Zip file here download lists 2.4.1 as stable, but the git branch MOODLE_24_STABLE is showing 2.4 (not 2.4.1) and the master branch shows 2.4.1 as ALPHA. Is 2.4.1 STABLE available via git? Thanks.
  • Picture of David Mudrák
    Mon, Mar 11, 2013, 7:21 PM
    Hi Paul. Thanks for letting me know. I forgot to push MOODLE_24_STABLE to github. I just fixed that -

    The master branch declares the version as DEV which is ALPHA - see
  • Picture of David Mudrák
    Thu, Mar 14, 2013, 9:22 PM
    Aaron, the enumeration on/off setting has been added in v2.4.0 version of the block for Moodle 2.4. See the bug #2.
  • Picture of Andreas Panagiotopoulos
    Tue, Aug 6, 2013, 2:29 PM
    Hello David!

    Thank you for this very useful block!

    I have weekly format courses and I would like to show the range of weeks with the short format (for example 5/08/2013 - 11/08/2019), ignoring the summary of each section. How can I do this?


  • Picture of Amanda Doughty
    Tue, Sep 10, 2013, 11:59 PM
    We have this block installed and recently added a Turning Point activity and block. However the two clash as both include class simple_html_dom_node.

    I cannot find anything in Moodle coding standards or any other docs, recommending where a third party library should be installed but I would have thought it should be in /local rather than in a block or mod?

    How would you suggest getting around this kind of clash?
  • Picture of David Mudrák
    Wed, Sep 11, 2013, 12:47 AM
    Hi Amanda, That's a good issue to raise. There is no such a policy I would be aware of. First idea coming to my mind is that at least one of these addons (ideally both) should check if the class already exists and only if not, it would load it. This could still lead to potential problems if each of addons required a specific version of the library, but that should be pretty rare case. Please, report your issue at Github, I'll look at it.
  • Picture of Ioana Gatzka
    Fri, Feb 21, 2014, 12:03 AM
    Hi David

    love the plugin, need it badly smile but I just updated my site to a 2.6.1. Do you have a time line for that?

    Best regards from sunny Switzerland,
  • Picture of David Mudrák
    Fri, Feb 21, 2014, 5:44 AM
    Hi Ioana. I admit I'm late with updating my add-ons for 2.6. Anyway, I believe that the most recent 2.5.x version of the block should just work fine in Moodle 2.6, too.
  • Picture of Tom Wootton
    Wed, May 14, 2014, 2:59 PM
    I really love this plug-in. I just updated to moodle version 2.7 and unfortunately the plugin no longer works. Can you please update it?
  • Picture of David Mudrák
    Fri, May 16, 2014, 6:54 PM
    Hi Tom. I just tested the version v2.6.0 of the block in Moodle 2.7 and it works well for me. What particular troubles did you have?
  • Picture of Can Ülker
    Fri, May 23, 2014, 8:57 PM
    Hi everyone, while searching for a plugin to let our users navigate easier I found this block. I thought it was going to show me both the sections and activities however unfortunately it only shows course content iin terms of sections under a course. Is there any other simple navigation tool that you can recommend? Our basic aim is to make user navigate easier through activities within a particular course. Any help will ne much appreciated. Cheers!
  • Picture of Ioana Gatzka
    Wed, Nov 12, 2014, 10:31 PM
    Hey David

    do you think there might be a chance that this block could replace the Section link block in the core? For me this one makes more sense for the navigation then just the section numbers.

  • Picture of David Mudrák
    Thu, Nov 13, 2014, 3:21 AM
    Hi Ioana. I don't think it would ever get into core. HQ works hard on developing Moodle as a solid infrastructure/framework for plugins. I am happy you find this block useful. But even I personally prefer having it out of the core.
  • Picture of Just H
    Tue, Mar 3, 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, Mar 3, 2015, 6:26 PM
    Thanks! I just released a new version for both 2.7 and 2.8 that also fixes issue #14.
1 2
Please login to post comments