Blocks: Course contents

block_course_contents
Maintained by Picture of David MudrákDavid 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.
1229 sites
376 downloads
68 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.

Background

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).

Screenshots

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

Contributors

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

Comments RSS

Show comments
  • Picture of David Mudrák
    Tue, Oct 17, 2017, 2:53 AM

    Sorry Adan, I am confused. There is actually nothing to be translated really - the block just displays the section names as defined by the teacher.

  • Germán and Temudgin
    Thu, Nov 2, 2017, 11:43 AM
    Will this plugin be available for Moodle 3.4 ?
    It seems to be working well in the current beta smile
  • Picture of David Mudrák
    Sat, Nov 11, 2017, 4:33 AM

    Thanks Germán for testing. I just released a version 5.1.1 that has been tested against Moodle 3.4. There are no functionality changes from the version 5.1. Just the reported coding style violations have been fixed and travis-ci integration updated.

  • Picture of Ray Mizzi
    Thu, Nov 8, 2018, 3:39 PM
    It is not working in a course in my 3.5.
  • Picture of David Mudrák
    Fri, Nov 9, 2018, 4:09 PM

    Ray, can you please go to https://github.com/mudrd8mz/moodle-block_course_contents/issues and describe your particular issue there? I believe it will something trivial as it works in 3.5 as expected.

  • Picture of Bryce Hepburn
    Wed, Nov 14, 2018, 3:19 PM
    Good day, unless im doing something wrong it is only displaying the course name and not the sections in the course content block. im running mooodle 3.4.2 and have installed the latest version of Course Content. Pretty sure i am doing something.
  • Picture of David Mudrák
    Wed, Nov 14, 2018, 4:04 PM

    Bryce, can you please raise it as an issue in the plugin's tracker and provide more details on how the block is configured and how the course looks like. Thanks.

  • Picture of Tim Tarbotton
    Sat, Apr 25, 2020, 1:52 PM
    Hi David, Does this plugin allow for me to have a table of content for my course page essentially? I have different topic sections and within that I have sub topics. Is it possible for both the topic/week title to display along with the sub headings as links?
  • Picture of David Mudrák
    Mon, Apr 27, 2020, 4:03 PM

    Hi Tim. Currently, this plugin would allow you to have the headings only, not subheadings. However, I like that as a feature - and it would also add a value to this block over the standard navigation widgets. How do you have these subheadings implemented in your courses? Is it via HTML headings in the Label instances or so?

  • Picture of Stephanus Schael
    Sat, May 2, 2020, 3:14 PM
    Hello David. Does this plugin work with moodle 3.8.2+ ?
    Thank you!

    Stephanus
  • Picture of Tim Tarbotton
    Sun, May 3, 2020, 6:56 AM
    Hi David, currently we use the topic headings and within each topic section we use labels as sub headings. I was thinking if this plugin could do what Microsoft Words table of contents does that would be awesome. For example, if it picked up H1,H2,H3,H4 headings and somehow had anchor links to these sections. I am not a developer so please excuse me if this is not technically possible or unreasonable. Below is a screenshot of one of our course pages (you might need to slide image across to see table of contents block). Appreciate the help.

  • Picture of David Mudrák
    Wed, May 6, 2020, 2:42 AM

    @Stephanus - sorry the information was not updated for a while. I just tested and it works well in recent Moodle versions.

    @Tim - thank you for the info. I will think about it. As I said, I like the use case and I can see it as an opportunity for the plugin to be pretty useful.

  • Picture of Clare Hayward
    Tue, Jul 28, 2020, 5:06 PM
    Hi, we are upgrading from 3.5 to 3.9 and would like to continue use of this plugin. Will it work on 3.9 or are there plans to release a version for 3.9?
  • Picture of David Mudrák
    Thu, Aug 13, 2020, 1:53 AM

    Hi Clare. I can confirm the latest block version works well with Moodle 3.9 and I just marked it as a supported version.

  • Picture of David Mudrák
    Tue, Sep 22, 2020, 5:55 PM

    @Tim Tarbotton may I ask you to report your use case as a new feature request in the plugin's issue tracker at https://github.com/mudrd8mz/moodle-block_course_contents/issues Thank you in advance.

1 2 3 4 5
Please login to post comments