Filters: Collapsible regions

Maintained by Picture of Jan Eberhardt Jan Eberhardt
Easy way to create collapsible regions within descriptions and text for Moodle.
199 sites
18 fans

Easy way to create collapsible regions within descriptions and text for Moodle.


To start or end a collapsible region use the keyword '{collapsible}'. If the starting tag is followed by squared brackets the text within these brackets is shown instead of a general "Click-to-expand"-message.


For instance

{collapsible}[read more...]

Your text/HTML here.


will result in following structure:

Please see the screenshots for a more visual example.


Screenshot #0
Screenshot #1
Screenshot #2


Picture of Jan Eberhardt
Jan Eberhardt (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS


  • Picture of Edward Bethel
    Tue, 1 Mar 2016, 12:44 AM
    Rob Cole, I don't know if you've figured this one out yet, but to enable this plugin. Go to Site administration > Plugins > Filters. You should see the list of filter plugins. If Collapsible regions is disabled, you can toggle to <> or <>
  • Picture of Arne Peters
    Fri, 16 Sep 2016, 6:47 PM
    Hi Jan,

    thanks for programming the filter smile

    Unfortunately it seems not to work under Moodle 3.1.2. The collapsible regions do appear, but I can´t change the title from "Zum Erweitern oder Zusammenfassen klicken" to something else.

    If I write:
    "{collapsible}[Neuer Titel] blablablablablablablablablablabla {collapsible}"

    I will get:
    "Zum Erweitern oder Zusammenfassen klicken" > |Title
    [Neuer Titel] blablablablablablablablablablabla |Text

    Am I doing something wrong or does it simply not work with my moodle version ?
  • Picture of Stefan Meier
    Mon, 5 Dec 2016, 8:42 PM
    In Moodle 3.0 it also has some issues or am I doing something wrong?

    Wenn Ladung sich bewegt also "auf kollektiver Reise" ist, dann sprechen wir von elektrischem Strom. Eine Strömung von Elektronen also.

    results in the button "anzeigen" and only showing the word "Wenn"

    If I copy the example code you provided the html text which should be revealed does not show.

    May be the plugin need changes for v3 and above
    Would be great to have this plugin available.
  • Picture of Jan Eberhardt
    Mon, 5 Dec 2016, 9:29 PM
    That was a bug for which Zhengliang Wu and Rex Lorenzo submitted a bugfix via Github. I updated the Git repository recently but didn't do it for the downloads.
  • Picture of Jan Eberhardt
    Mon, 5 Dec 2016, 9:48 PM
    New version 1.02 should fix this issue.
  • Ricardo Caiado
    Wed, 7 Dec 2016, 8:37 PM
    Any upgrade to Moodle 3.2?
  • Picture of Jan Eberhardt
    Wed, 7 Dec 2016, 10:20 PM
    I had no possibility to test the plugin on 3.0+ systems. Therefore I can't assure, if it's going to work. You may try version 1.02 on your Moodle and report issues (I recommend Github for reporting them) I can work on it.
  • Picture of Stefan Meier
    Thu, 8 Dec 2016, 12:02 AM
    Now it works on both my 3.0 and 3.1 servers
    Jan, You rock!
  • Picture of Bert van der Hooft
    Sat, 8 Apr 2017, 7:45 PM
    It breaks when using more than one collapsible on a onetopic page.
  • Picture of Jan Eberhardt
    Mon, 10 Apr 2017, 4:39 AM
    Could you please specify which Moodle version you are using and how it "breaks"? Please notice, that you cannot nest collapsible regions.
  • Picture of Jan Eberhardt
    Mon, 10 Apr 2017, 4:39 AM
    Also there is an issue page at the Github repository for reporting bugs.
  • Émerger ou submerger ? Telle est la question !
    Sun, 14 May 2017, 3:43 PM
    Exactly what I need ! big grin
    Will it work on 3.2 ?
  • Picture of Jan Eberhardt
    Tue, 16 May 2017, 4:40 PM
    Idk... but since it works on 3.1 feel free to try out. The HTML/JS is made by Moodle core function, which means that it should work even if there have been major upgrades to themes.
  • Picture of Bert van der Hooft
    Wed, 27 Dec 2017, 9:37 PM
    It breaks editing (settings of activities) and rol down menu in dashboard in Moodle 3.4.
    Any expectation on moodle 3.4 version?
  • Picture of Alexandre Bento Martins
    Thu, 8 Feb 2018, 2:17 AM
    Any upgrade to MOODLE 3.4?
Page: 1 2 ()

Commenting temporarily disabled