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:
5903 sites
135 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
  • Gareth J Barnard
    Tue, Feb 2, 2021, 12:06 AM
    Dear Amiran,

    I don't fully know the answer, but I think your best bet is to post on the Quiz forum ->

    Kind regards,

  • Picture of Dani Steiner
    Tue, Mar 9, 2021, 7:57 PM
    Dear Gareth
    With Moodle 3.9 and PHP 7.4.3 with Debugging-Mode ON we face the following issue.
    When we use the collapsed topic as a course format and then display a single topic ("View only 'Topic 1' "), obove the topic is this message appearing: “Notice: Trying to access array offset on value of type null in /var/www/html/moodle/course/format/topcoll/renderer.php on line 415”.
    After a search-engine research I have the impression, that PHP 7.4 is more strict than PHP 7.2 was and therefore showing this message, while PHP 7.2 was more "accommodating". Am I wrong and there is another way to fix this?
    Kind regards, Dani
  • Gareth J Barnard
    Tue, Mar 9, 2021, 8:10 PM
    Dear Dani,

    Ok... What version of CT are you running please?

  • Picture of Dani Steiner
    Tue, Mar 9, 2021, 10:28 PM
    Dear Gareth,
    We're using version (on test-moodle 3.9.4+ (Build: 20210122))

    Our "real" moodle server has the same moodle version but PHP 7.2
    Kind regard, Dani
  • Gareth J Barnard
    Wed, Mar 10, 2021, 12:42 AM
    Thanks Dani,

    It took me a little while to update to PHP 7.4 so I could replicate the issue. The CT version number helps as it allows me to be sure of the actual line. I'll do a fix soon.

    Out of curiosity, why are you running version which is designed for Moodle 3.8 on Moodle 3.9 when the readme file says otherwise?

  • Gareth J Barnard
    Wed, Mar 10, 2021, 1:03 AM
    Dear Dani,

    This is the patch that will work on all versions of CT from 3.8.x to 3.10.x.

  • Picture of Dani Steiner
    Wed, Mar 10, 2021, 2:10 AM
    Dear Gareth,

    Thanks a lot. That was very quick.
    To your question: When I install the plugin for our test-server over the Moodle plugins directory, it shows for whatever reasons that its v3.8 and not v3.9.4+. Therefore, I mistakenly took the v3.8 "installer" zip.
    Thanks again for your much-appreciated support.
  • Picture of Ben Girard
    Fri, Mar 19, 2021, 5:10 AM
    Is there a way to add spaces between the collapsed topics and hide the circle at the end of the collapsed bar?
  • Gareth J Barnard
    Fri, Mar 19, 2021, 5:54 AM
    Dear Ben,

    A -> Use CSS.
    B -> Use the 'View single section enabled' setting in the course format settings of the course settings.

  • Picture of Prashad Wang
    Sun, Mar 21, 2021, 6:54 AM
    Hello. I am in the middle of updating Moodle. I'm getting this error when viewing a course with Collapsed Topics:

    Coding error detected, it must be fixed by a programmer: Request for an unknown renderer format_topcoll, course, general
  • Gareth J Barnard
    Sun, Mar 21, 2021, 7:03 AM
    Dear Prashad,

    You've probably deleted the renderer.php file or something like that.

  • Picture of Patrick Walther
    Sat, Apr 10, 2021, 5:48 PM
    Hi Gareth,

    thanks for all your work. When will this plugin be ready for moodle 3.9+ ?
  • Gareth J Barnard
    Sat, Apr 10, 2021, 7:52 PM
    Dear Patrick,

    ???? It has been for ages! ->

  • Picture of John Joubert
    Fri, Apr 16, 2021, 9:39 PM
    Greetings Gareth.
    When using this plugin - we get four extra blocks in the course (when the course is created with Collapsed Topics format). Or, when we import a course, and import into Collapsed Topics. The "extra" blocks are: "Search Forums", "Latest News", "Upcoming Events", and "Recent Activity". We really like the Collapsed Topics Format - however, is there a way to turn off the blocks so that they don't appear in the courses by default? We're even have a bit of "extra issues" when we create courses using the Ellucian ILP interface- we get two each of the 4 blocks instead of just one of each of the blocks. So - a few questions:
    1) Are the 4 blocks even supposed to be there?
    2) If they are supposed to be there - Is there a way to turn them off?
    3) Any idea why duplicates are being created at times?
    4) Any suggestions for troubleshooting these issues?

    Love the tool, thanks for the work that you do for the community.
  • Gareth J Barnard
    Fri, Apr 16, 2021, 11:56 PM
    Dear John,

    1) Yes.
    2) See the config.php file in the format.
    3) No.
    4) See 2.

    Kind regards,

Please login to post comments