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
    Tue, Mar 20, 2018, 8:34 PM
    Hi Andy,

    Uninstall and reinstall again.

  • Gareth J Barnard
    Tue, Mar 20, 2018, 8:35 PM
    Hi Annalise,

    I can replicate but don't have a solution to solve the problem. Any ideas?

  • Fri, Apr 13, 2018, 4:22 PM
    Great plugin but the number of columns and column orientation doesn't seem to have any affect.

    I'm using plugin version 3.4 (Build: 2017110300) with Moodle 3.4.2 (Build: 20180319). I am using the Moove theme.

    Any help appreciated.
  • Gareth J Barnard
    Fri, Apr 13, 2018, 10:34 PM
    Dear Matt,

    The Moove theme is contributed and uses the Bootstrap V4 system. Willian ( needs to override CT's renderer and set 'bsnewgrid' to true -> or override these methods: as appropriate.

  • Fri, Apr 13, 2018, 10:38 PM
    Thanks Gareth
  • Wed, May 23, 2018, 10:08 PM
    Hi Gareth,
    I was asked in my university to add simple section collapsing to main core course formats (topics and weeks) without all the layout options that you provide in your great plugin. They don't want all the layout options to keep consistency among course in our moodle instance. Consequently, I cloned the core topics format for a start and added collapsing behaviour using bootstrap built in mechanism. Other institutions in my country are interested by this feature, thus I'd like to submit it to the Moodle plugins repository.
    Before doing that I wanted to ask if it is ok for you since the basic functionality is the same as in your plugin. If it's ok for you I'll of cours add your name to the credits.
  • Gareth J Barnard
    Thu, May 24, 2018, 6:54 AM
    Hi Jean-Roch,

    Thank you for letting me know and for the offer of a credit. To be fair the idea of the toggles partially came from ".Net Magazine Issue 186 - Article on Collapsed Tables by Craig Grannell" and other places, see the 'References' section in the format's file. I don't think I should be credited in code, a reference like I've done is just fine. Please do make a note here with the plugins URL when it's published.

    Kind regards,

  • Wed, Jun 6, 2018, 5:06 PM
    Is there a 3.5 version of this course format or are it on it's way?
    Best regards

  • Gareth J Barnard
    Wed, Jun 6, 2018, 7:39 PM
    Hi Per,

    Yes and yes.

  • Mon, Jun 18, 2018, 7:54 PM
    Hi Gareth,
    My plugin has been approved! Here is the plugin URL :
  • Gareth J Barnard
    Mon, Jun 18, 2018, 11:30 PM
    Hi Jean-Roch.

    Awesome smile - I've replied there.

  • Thu, Jun 28, 2018, 5:52 AM
    For those of you who want to disable the 'View Only' button on the right side that hides all sections except this one, I applied this CSS tweak in our use of this plugin and it seems to be working. Still allows editing in editing mode. In styles.css, on line 638 change:
    .course-content ul.ctopics li.section .right .cps_centre img.icon {
    padding-top: 8px;

    to be:
    .course-content ul.ctopics li.section .right .cps_centre img.icon {
    padding-top: 8px;
    /* display none tweaks to hide 'view only' topic button on right*/
    display: none;
  • Thu, Jun 28, 2018, 2:53 PM
    After upgrading the Moodle from 3.0 to 3.4 I have a problem with several courses that used this format of the course. All content went wrong and found in the first unit.
  • Gareth J Barnard
    Thu, Jun 28, 2018, 3:03 PM
    Hi Irith,

    There is no code in the format that could make this happen, must be an upgrade issue on your part with the database. If you disagree, then post before and after screen shots and a copy of the course as it was on Moodle 3.0 on the courses and course formats forum. Or write a detailed instruction on how to create an M3.0 course that after upgrade to M3.4 will be affected. I need to know exactly how to replicate the problem. Also it could be that it appears to you to be in one section when it is not. What's the first unit? Did you experience the same issue with other course formats?

  • Gareth J Barnard
    Thu, Jun 28, 2018, 3:11 PM
    Or Irith, that those courses had content in orphaned sections and you've not realised or understood the core changes to this functionality between M3.0 and M3.4.
Please login to post comments