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:
5924 sites
152 fans
Current versions available: 25

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
  • Mon, Oct 4, 2021, 7:40 PM

    i am using "Collapsed Topics" on 2 plateforms. Both are slower... Both Moodle use Moodle 3.11 (20210517) - Collapsed Topics 3.11.01 (2021061200).

    The global setting of the platform allows activity information. Depending on the user, this option may be disabled or enabled in their course. However, whether the course activates or deactivates this option, the access time to a page varies between 10-20 seconds depending number of activities.... whereas if we use the standard format we arrive at 0-2 seconds of access time.

    What should we do to improve this time? we cannot force users (Prof and student = +27'000 users) to turn off activity information stuff.

    On our 2nd platform we have added a visual overlay to have 4 tabs (only 1 tab use collapse Topics). It will take us again some development time to modify version In the old version both platforms had the same access time even with our slight visual addition.

    Thanks for your helps !
  • Gareth J Barnard
    Mon, Oct 4, 2021, 9:22 PM
    a) Upgrade from to (+) as that has 'Add caching to activity meta information in the hope of improving performance'.
    b) Turn off activity information at the 'course setting' level - only one person needs to do this, not 27001 users! (Prof and student = +27'000 users). Thus it does not depend on the 'User' but the setting on the course. Or if your CT courses are following 'Default' then turn off the global setting.
    c) With the code in, it should only be slower the first time the page is acceessed and when the enrolments change etc. A stable course with no such admin changes will be faster after the first page load, assuming that Moodle caching has not been disabled.
    d) If you have to stick with and you want to disable it globally, then comment out the code in 'course_renderer.php', around the comment '//Get further information'.
  • Mon, Oct 11, 2021, 9:29 PM
    Hello! Our instance of 3.9.6 Moodle has a display issue for activity module information. All "show 'module' information" settings for the plugin are turned on. These details are visible to the instructor when in course view mode but they disappear when editing mode is on. This didn't behave this way We have the latest version installed (2020071811). This is occurring in both our custom theme and a standard boost theme. A previous instance of Moodle 3.8.4 with plugin (2019111702) shows these details in both viewing and editing modes.
  • Gareth J Barnard
    Mon, Oct 11, 2021, 9:55 PM
    Dear Eric,

    Version is working as intended.

  • Tue, Oct 19, 2021, 2:51 AM
    Good day Gareth,
    I wonder if I can make the case that instructors are mostly working in Moodle with Editing Mode on, and therefore cannot see the important "Due date" labels on their activities when it would be helpful to see those dates. Might you consider allowing admins to set the visibility of these date labels while in editing mode? Screenshots just so we are on the same page:
    Thank you for considering!
  • Gareth J Barnard
    Tue, Oct 19, 2021, 3:08 AM
    Dear Nathan,

    I see what you mean, however the 'due dates' are removed in M3.11+ in favour of the core ones. This the M3.11 version of Collapsed Topics uses the core functionality for that instead of its own. The core ones do show when editing mode is on.

    Therefore there is no mileage in me spending the time on this, as I'm expending effort on getting to the point where I can create an M4.0 version of the format as the course format API has changed radically.

  • Tue, Oct 26, 2021, 6:11 AM
    Hi Gareth,
    Thank you for your quick reply! And for developing the Collapsed Topics plugin. Super helpful! I just logged in to sandbox, which has Moodle 3.11 and noticed that the student view does *not* show due date information to the student. I wonder if I am misunderstanding your reply above. I thought you were saying newer versions of Moodle included due date information as part of the "core" setup. However, I don't see due dates in the demo sandbox. Sorry if I am misunderstanding. Screenshot of what I see here:
    Thanks for any clarification you can offer. I do realize I am using the Topics format in the sandbox, but I figured that would show due dates on the student view at least, and thus would be available in your new Collapsed Topics format, if based on core.
  • Gareth J Barnard
    Tue, Oct 26, 2021, 6:36 AM
    Dear Nathan,

    I don't know what you did wrong, but I created a course on, created an assignment with a due date on a topics course, added the student and the due date displays underneath the activity. Therefore, cannot replicate.

  • Tue, Nov 2, 2021, 6:37 AM
    Hi Gareth, I figured maybe my using "" was the cause of the inconsistency, but even on I cannot get the due date labels to show on the course page. I log in as admin or teacher, password sandbox, add an assignment with due date of November 6, log out, log in as student, and no due dates show in course page. Screenshots here if you want to see if you can show me what is different about your setup:
    Hoping we can figure this out together.
  • Wed, Nov 10, 2021, 5:42 AM
    I heard from Helen at Moodle HQ that I'd missed a Course Setting that needed to be enabled to show activity due dates:
    Courses | Course default settings | Show activity dates moodlecourse | showactivitydates - need to enable for each course. Thanks Helen, and Gareth for the help!
  • Gareth J Barnard
    Wed, Nov 10, 2021, 7:24 PM
    Dear Nathan,


  • Thu, Feb 24, 2022, 2:56 AM
    Will this plugin be available for Moodle 4.0?
  • Thu, Apr 7, 2022, 4:17 PM
    Hi there, when will version for moodle 4.0 be released and tested?
  • Gareth J Barnard
    Thu, Sep 8, 2022, 6:31 PM
    This is a test comment!
  • Thu, Sep 15, 2022, 12:36 AM
    Hi, installed the version of the plugin on the new Moodle 4.0.4 , and was getting this on the /admin/category.php?category=format_topcoll page:

    Invalid get_string() identifier: 'versionstable' or component 'format_grid'. Perhaps you are missing $string['versionstable'] = ''; in /lang/en/format_grid.php?

    line 356 of \lib\classes\string_manager_standard.php: call to debugging()
    line 7354 of \lib\moodlelib.php: call to core_string_manager_standard->get_string()
    line 131 of \course\format\topcoll\classes\admin_setting_information.php: call to get_string()
    line 120 of \admin\category.php: call to format_topcoll\admin_setting_information->output_html()

    The string was missing in the blue info banner, which says

    Release, version 2022041701 on Moodle 4.0.4 (Build: 20220912)

    Just the placeholder in that last line.

    $string['versionstable'] = 'Stable version - Could contain bugs. Check on a test server before installing on your production server.';
    in file

    Could NOT see a file named "format_grid.php" at all in the topcoll plugin's folder.

    I saw in \course\format\topcoll\classes\admin_setting_information.php

    the line
    $context['maturity'] = get_string('versionstable', 'format_grid');
    might need changing to
    $context['maturity'] = get_string('versionstable', 'format_topcoll');

    I tested the above locally, and the warning's gone, the string is retrieved.
    HTH, Cheers.
Please login to post comments