## Filters: Collapsible regions

filter_collapsible
Maintained by Jan Eberhardt
Easy way to create collapsible regions within descriptions and text for Moodle.
168 sites
13 fans

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

#### Usage

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.

#### Example

For instance

{collapsible}[read more...]

{collapsible}

will result in following structure:

Please see the screenshots for a more visual example.

### Contributors

• Thu, 19 Mar 2015, 2:32 PM
I will see. Didn't thought about that scenario. If it fits to your js I cannot control. I use Moodle functions for generating the js. So I do just the php programming. But the nesting idea sounds pretty cool ^^
• Thu, 26 Mar 2015, 7:08 PM
Hi Ger, can you please give me an example for what purpose you intend to use nesting collapsible areas. It would be a huge change in code necessary and also the whole handling as well, since I will be forced to introduce start and end tags.

Because of that I hesitate to do these changes.
• Sat, 4 Jul 2015, 11:45 PM
I have installed this plugin, but it is disabled. I can't figure out how to enable it.
• Wed, 30 Sep 2015, 3:25 PM
Cool and lightweight filter: a must-have.
• 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 <>
• Fri, 16 Sep 2016, 6:47 PM
Hi Jan,

thanks for programming the filter

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 ?
• Mon, 5 Dec 2016, 8:42 PM
In Moodle 3.0 it also has some issues or am I doing something wrong?
{collapsible}[anzeigen]

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

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.
• 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.
• Mon, 5 Dec 2016, 9:48 PM
New version 1.02 should fix this issue.
• Wed, 7 Dec 2016, 8:37 PM