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.
1214 sites
345 downloads
69 fans
Current versions available: 11

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

Comments

  • Picture of Dan Cox
    Sat, Dec 1, 2012, 12:42 AM
    Hi,

    Thanks for this block - I like the way it gives users a quick, easy way of navigating the course and also getting an overview of its contents.

    I have tried to add the block to the front page in order to then make it appear on every course main page, but it does not appear in the Add a Block drop down menu on the front page. Is there an alternative way of making it appear on every course main page?

    Thanks,

    Dan
  • Picture of David Mudrák
    Tue, Dec 4, 2012, 4:33 PM
    Hi Dan. Please search the Moodle Docs for "Sticky blocks". In Moodle 2.x, you should create an instance in a course and then set it to appear in every such a place (i.e. course).
  • Picture of Dan Cox
    Sun, Dec 9, 2012, 3:06 AM
    Hi David, thanks for your reply. Moodle Docs pointed me here: http://docs.moodle.org/23/en/Sticky_blocks, which points me towards http://docs.moodle.org/23/en/Managing_blocks which, unless I'm missing something, instructs me to add a block to the front page in order for it to appear throughout the site. Unfortunately I can't do this. I also tried adding the block to any of the admin pages but could not.

    If I'm missing something, could you please let me know? Dan
  • Picture of David Mudrák
    Mon, Dec 10, 2012, 6:14 PM
    See http://docs.moodle.org/23/en/Block_settings#Where_this_block_appears - you should create the "master" instance of the block in a course and then set its "Display on page types" setting
  • Picture of Dan Cox
    Mon, Dec 10, 2012, 6:23 PM
    Thanks, I tried that - chose "Any type of course main page", however it is not appearing on every course main page throughout the site.
  • Picture of David Mudrák
    Tue, Dec 11, 2012, 12:56 AM
    Ah right. Sorry I did not realize that. I forgot that the procedure to make the block appear at every course main page is 1) add it to the front page and then 2) at any course main page, edit the setting and amend the "Display on page types". But the current code did not enable adding to the front page. This was fixed in the version 2.4.0 of the block, released just today. Please note that it requires Moodle 2.4 though and I do not plan to backport this. Thanks for raising this.
  • Picture of Sabuj Sabuj
    Mon, Dec 31, 2012, 5:05 PM
    For Moodle 2.4 I was having a issue. Please check the solve in issue tracker here https://github.com/mudrd8mz/moodle-block_course_contents/issues/8#issuecomment-11774323 if that helps someone.
  • monia
    Tue, Jan 8, 2013, 7:13 PM
    Hi David,

    I am using Moodle 2.4, the block works well as do not show the hidden topics.

    The problem that I am having is the following:
    The block is not visible in the front page menu "Add a block". I don't need to add the block in the front page but in all the course pages. I have created an instance in one course and chosen "Display in any page". The problem is that it doesn't create the instances in the other pages. i have tried also to choose the other options.

    Do you suggest to add the block manually in each course page or there is another solution?

    Regards
    Monia
  • Picture of David Mudrák
    Thu, Jan 10, 2013, 6:21 AM
    Hi Monia. Are you sure you are using the version of the block for Moodle 2.4? IIRC I tested putting the block at the front page before releasing the version and it worked...
  • Picture of Jeff White
    Tue, Feb 26, 2013, 9:30 PM
    Great plugin! Was able to get it to work with Moodle 2.4 but in 2.2 it will not show up on the add block in a course despite it being seen in the plugin overview and managed blocks.

    Slight request for collapsed course formats. Would it be possible for it to expand the section when you click on the link if the section is collapsed beforehand?
  • Picture of Aaron Metz
    Wed, Feb 27, 2013, 8:13 AM
    Many thanks for this contribution fellas, I promote the use of this mod with our teachers and it is well integrated into courses.

    Hoping you can help me with this query from one of our moodle champions;
    ------------------------------------------------------------------------------------------------
    The Course Content Bar defaults to NUMBERING the sections in Moodle 1, 2, 3, 4

    If Moodle were completely linear for me and if I was not using ORPHANS this would be great.

    Right now it is confusing my students a bit.

    Question:

    Is there a way to get rid of the sequential numbering in the Course Contents bar?
  • 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 - https://github.com/mudrd8mz/moodle-block_course_contents/blob/MOODLE_24_STABLE/version.php

    The master branch declares the version as DEV which is ALPHA - see https://github.com/mudrd8mz/moodle-block_course_contents/blob/master/version.php
  • 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?

    Regards,

    Andreas
Please login to post comments