Collapsed Topics

Course formats ::: format_topcoll
Maintained by Gareth J BarnardGareth J Barnard
An interchangeable topic or week based format that solves the issue of the 'Scroll of Death' when a course has many topics.
Latest release:
6042 sites
145 fans
Current versions available: 23

An interchangeable topic or week (day for 2.3.1+) based format that solves the issue of the 'Scroll of Death' when a course has many topics / weeks. All sections except zero have a toggle that displays that section. One or more sections can be displayed at any given time. Toggles are persistent on a per browser session per course basis but can be made to persist longer by a small code change. Full installation instructions, code adapt-ions and credits are included in the '' file.

If you have a course with more than fifty two sections then currently the toggle persistence will not work for the fifty third section and above.  Then you need to upgrade to the Moodle 2.5 version+.


The format comes with NO support.  Please see the 'Support' section in '' file that comes with the format.  This is because the format is complex and I regret that I don't have the time / resources to freely assist with questions pertaining to specific enhancements / changes / knowledge improvement.

I will investigate genuine bugs and issue fixes in a timescale set by myself.  When reporting issues you MUST clearly state the full version and release of both Moodle and the Collapsed Topics format as contained within their 'version.php' files - if not it takes me longer to figure out, often resulting in me asking for the details anyway and slowing the process of solving your problem down.  It really helps to read the 'Reporting Issues' section in the '' file and upload and describe in detail the issue you are having on the 'Course formats' forum.


NEW: 'The Complete Guide to Collapsed Topics' (and 'Blurb') book is now available, covering: installation, upgrade, uninstallation, course and global features, resetting, capabilities, language strings, overriding icons / styles in a theme and adding a new icon set.

The Complete Guide to Collapsed Topics book

The Complete Guide to Collapsed Topics book on a book stand

Inside the Complete Guide to Collapsed Topics.

NOTE: The latest version incorporates functionality to support new UK / EU Cookie Law which is implemented as a user acceptance in the 1.9 version and no 'cookie' is used at all in 2.x versions.

Screen casts:

Privacy API support starts with V3.3.1.2 for M3.3 and V3.4.0.2 for M3.4 where the API has been implemented in the minor release of Moodle.


Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5
Screenshot #6
Screenshot #7


Gareth J Barnard
Gareth J Barnard (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS


  • Gareth J Barnard
    Mon, Aug 12, 2019, 11:43 PM
    Dear Eric,

    From your description, that situation should be both course format and theme independent. Thus should also occur in the Topics format. Please post on the courses and course format's forum - - stating Moodle version after testing with the Topics format too for peer review. Then that issue can be raised in the Moodle Tracker.


  • Wed, Sep 25, 2019, 12:03 AM
    I'm new to Moodle and know very little about how to work with things like plugins, etc. but this was fairly simple and I'm grateful for the work that you've put in to make it possible!

    I'm wondering if anyone knows how to make it so that with this format, the titles of the topics on the menu that is typically to the left of the screen can also function as links to open those sections? With the "1 Topic per page" settings of the regular topics format, you could see all the topics from the main page, but then only one at a time when you clicked on them. I don't need that to be the case, but I did like having the option for students to click on the topic on the left-menu to have that topic open up on the right... Is that remotely possible?
  • Gareth J Barnard
    Wed, Sep 25, 2019, 1:27 AM
    Hi Shannon,

    With the links, currently not. I changed the format from core as the 'Course layout' setting could be confusing. However is 'linkcoursesections' admin setting enabled so that the navigation links act as anchor links?

  • Mon, Feb 10, 2020, 7:14 PM
    I have added a piece of javascript to a client's theme to handle the opening of sections with the nav drawer items. It's quite simple.

    window.onhashchange = function() {
    $(location.hash + ' .toggledsection').addClass('sectionopen');
  • Gareth J Barnard
    Tue, Feb 11, 2020, 3:27 AM
    Hi Virgil,

    Nice idea, but it does not take into account the toggle persistence functionality.

  • Gareth J Barnard
    Tue, Feb 11, 2020, 3:30 AM
    PS.... and the toggle is wrong because you've not set 'toggle_open'.
  • Thu, Mar 12, 2020, 6:33 PM
    We have recently found out that Collapsed Topics are shown differently in our Internet Explorer/Microsoft Edge (the segments are not shown completeley or sometimes twisted) - in Firefox or Chrome Browser they appear normal. Is there any known issue with different browsers? We use Windows 10, Moodle 3.8, Collapsed Topics is also updatet on Version 3.8.
  • Gareth J Barnard
    Sat, Mar 14, 2020, 9:07 PM
    Hi Lisa,

    Please could you post a screen shot here: - with exact version information of both Moodle and CT along with steps to replicate.

  • Thu, Mar 26, 2020, 4:25 AM
    Would it be possible to increase maximum number of sections? Currently it is possible to set it to 56, but I receieved a requirement to have more.
  • Thu, Mar 26, 2020, 5:51 AM
    Hi, when editing is turned on in the course the section names are hard to read the text is getting different colour then what is specified in the settings. We also have a similar issue when loading courses on mobile. The section name colour is too dark and I can find a place to change it.
  • Gareth J Barnard
    Thu, Mar 26, 2020, 5:57 AM
    Dear Shaun,

    This will be down to other CSS somewhere that is out of the control of the format. Please investigate and solve locally.

    Kind regards,

  • Gareth J Barnard
    Thu, Mar 26, 2020, 6:00 AM
    Dear Milan,

    The format uses the core settings for the number of sections, hunt out a core 'maxsections' type setting as an administrator.

    Kind regards,

  • Wed, Apr 22, 2020, 7:27 PM
    I install it on Moodle 3.8.2 and my moodle get "error/generalexceptionmessage". I can't access my moodle. I have to replace moodle's folder with fresh moodle download and replace the config file with my old config. The moodle then detect the faulty plugin (with it's database) and remove them.
  • Gareth J Barnard
    Thu, Apr 30, 2020, 6:32 PM
    Dear Liko,

    Where there any errors in the PHP error log?

    Please post details on

  • Tue, May 5, 2020, 7:39 PM
    Dear Gareth

    Post there already since the error occurred but no one respond
Please login to post comments