Collapse content in a topic

Collapse content in a topic

by Jared Chapman -
Number of replies: 6

As part of ending the scroll of death, I am trying to collapse content within a topic. I am already using the collapsing topic plug in. I would like to collapse content under a label. Similar to this old plug in: http://moodle.org/mod/data/view.php?d=13&rid=377&filter=1

For example, I would like a label that says: Videos, under that I want to put 10+ videos, but I only want the links to be visible if the Videos lable is clicked. This would act a lot like a tree menu.

Is this possible?

Average of ratings: -
In reply to Jared Chapman

Re: Collapse content in a topic

by Itamar Tzadok -
In reply to Itamar Tzadok

Re: Collapse content in a topic

by Jared Chapman -

Thanks Itamar,

This is really cool, but not quite what I was looking for. It show/hides a paragraph on click. 

What I would like to do is show/hide the resources/activities under the label/heading, like a collapsible tree menu does

Here is an example: http://www.treeview.net/treeviewfiles/demoFrameless.html

In reply to Jared Chapman

Re: Collapse content in a topic

by Itamar Tzadok -

I see. Gareth's collapsed topics format does that in the topic (section) level. So if you put all the links to those videos in one section and use the collpased topics format it would show/hide the paragraph on click.

You can also show topic items in the navigation block which already comes as a collapsable tree.

Building such a hierarchy inside one topic would not be trivial. smile

In reply to Itamar Tzadok

Re: Collapse content in a topic

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Oooohhhh, could you copy the code from the navigation block into a bespoke course format, split it into sections and have it display labels too?

In reply to Itamar Tzadok

Re: Collapse content in a topic

by Jared Chapman -

It looks like Tim Williams did what I am looking for back in 2008, but it has not been updated, I tried to install it but it would not work in 2.2

Here is the link: http://moodle.org/mod/data/view.php?d=13&rid=377&filter=1

Instead of saying Hide/Show content, I would like if it allowed for customizable text, like the label

 

Edit: as I look at that module, it looks like it is not quite the same, it is a hack that adds a link that hides/shows ALL resources together, not in a seperate, organizable way.

 

Perhaps the collapesable label would allow you to add resources and activities in the edit screen for that lable.

So, maybe what I am asking for is a menu resource. Add a collapsible tree menu to the topic, then add resources and activities to the menu.

 

Here is a screen cap of what I am trying to clean up.

In reply to Jared Chapman

Re: Collapse content in a topic

by Itamar Tzadok -

A collapsible tree menu won't work in the topic simply because there is no real hierarchy of resources/activities in the topic. The indentation is merely a visual effect. All the item links reside in one flat list.

The desired cleanup is only an issue if you have several chapters such as the one illustrated above on the same page. But you can have one chapter (topic) per page and then you don't really need to collapse the items.

The one topic per page has just been added to the forthcoming 2.3. In the meantime I think there is a released contributed format which does that (I have developed such a format but it has not been released yet). smile