Course formats: Collapsed Topics

Maintained by Gareth J Barnard Gareth J Barnard
An interchangeable topic or week based format that solves the issue of the 'Scroll of Death' when a course has many topics.
4792 sites
90 fans

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

Show comments
  • Picture of Irith Herman
    Thu, 28 Jun 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, 28 Jun 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, 28 Jun 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.
  • Picture of Irith Herman
    Thu, 28 Jun 2018, 3:36 PM
    I can not restore the situation to what it was before the upgrade
    But it also happened to me in several courses when I upgraded from 2.5 to 3.0
    I did not receive complaints about courses that were in a different format
  • Gareth J Barnard
    Thu, 28 Jun 2018, 3:42 PM
    Do you have a backup mbz file from M3.0? Did you tell me previously about the 2.5 to 3.0 upgrade issue? I don't have enough information to be able to replicate, please provide what I've asked for in terms of screen shots and replication instructions.
  • Picture of Irith Herman
    Thu, 28 Jun 2018, 3:55 PM
    backup of what? all the moodle?
  • Gareth J Barnard
    Fri, 29 Jun 2018, 2:28 AM
    Hi Irith,

    As previously stated, the mbz (backup file) of a course affected, but the one from you would have made of the course before you undertook the upgrade.

  • Gareth J Barnard
    Fri, 29 Jun 2018, 8:58 PM
    Hi Irith,

    Ok with the limited information available, I've done a test from M3.1 (cannot run M3.0 any more as MySQL version is newer) to M3.5 and cannot replicate where activities / resources are placed in one section when they were once in many. Please post screen shots of the issues on

  • Picture of jose Nicolas
    Thu, 19 Jul 2018, 3:53 AM
    after modify the style.css I need to do sometihng else, or how can I see the changes applied to the course?
  • Gareth J Barnard
    Thu, 19 Jul 2018, 5:55 AM
    Hi Jose,

    Purge all caches.

  • Picture of Steve Radford
    Fri, 27 Jul 2018, 5:03 PM
    Hi Gareth,

    Are you able to explain the difference between this plugin and the Collapsible topics format (format_collapsibletopics) plugin please?

    Thanks in advance,

  • Gareth J Barnard
    Sat, 28 Jul 2018, 1:04 AM
    Hi Steve,

    I see you've already posted the same question here: and got a response. Collapsed Topics supports both Bootstrap 2.3.2 and 4, has remembered toggle states and lots of additional functionality.

  • Picture of Steve Radford
    Mon, 30 Jul 2018, 4:26 PM
    Thanks Gareth
  • Picture of pgmoodle dundee
    Wed, 9 Jan 2019, 12:01 AM
    We are using a plug-in called Collapsed Topics

    Is there a way of changing all topics in all courses from horizontal to vertical all at once?

    Or is the only way by making this change individually in each module?

    Kind regards
  • Gareth J Barnard
    Thu, 10 Jan 2019, 8:11 PM
    Hi Usman,

    Yes there is. Look in the course settings.

    Kind regards,

Please login to post comments