Add a setting for a label resource to be collapsable

Add a setting for a label resource to be collapsable

by Pavel Sokolov -
Number of replies: 7

There is a contributed resource type named 'Label Collapsed' (https://moodle.org/mod/forum/discuss.php?d=190563). It enables to create label that can be expanded and collapsed on the page. This feature has been appreciated by a number of users, so I thought it might be worth to integrate this functionality in to a standard Label resource as an option within settings.

Therefore, I would like to see what do others think about that. I am thinking of spending some time on that and would like to check if it would be worth it.

I have opened an issue on tracker in advance: https://tracker.moodle.org/browse/MDL-43336

Average of ratings: -
In reply to Pavel Sokolov

Re: Add a setting for a label resource to be collapsable

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

I think anything that has the potential to clean up the page is promising.  As long as it is just an option - I think that most of us promote the label as a way to post information that we want students to be aware of and would not want them missing it because it was minimized.

In reply to Emma Richardson

Re: Add a setting for a label resource to be collapsable

by Scott Hardwick -

I think this would be ok with most people, but I think they would probably desire there to be a dropdown box that you chose one of these three options from:

Standard (Non-Collapsible)  {This item would never have a +/- }

Collapsible, initially Expanded {This item would have a +/- }

Collapsible, initially Collapsed {This item would have a +/- }

As Emma mentioned, I put some important stuff in labels that I don't want there to even be a way to collapse it and somehow the student miss it (or use the collapsibility as an excuse).

Also while discussing labels, I would also REALLY like labels and item descriptions that show on the main page to be editable on the mainpage!  This seems in the spirit of allowing us to rename resources and activities directly on the main page.

In reply to Scott Hardwick

Re: Add a setting for a label resource to be collapsable

by Pavel Sokolov -
As Emma mentioned, I put some important stuff in labels that I don't want there to even be a way to collapse it and somehow the student miss it (or use the collapsibility as an excuse).
 

But then you would be able to choose something like 'collapsable: false' within the settings, wouldn't you?

The resource already exists, the thing I propose is to merge the functionality with the original Label resource with no harm to users.

I agree that inline editing would be great.

In reply to Pavel Sokolov

Re: Add a setting for a label resource to be collapsable

by Pavel Sokolov -

Hi,

I have now created a patch implementing this feature and submitted it to Moodle Tracker (https://tracker.moodle.org/browse/MDL-43336). Please feel free to take a look if you want to!

In reply to Pavel Sokolov

Re: Add a setting for a label resource to be collapsable

by Pavel Sokolov -

It seems that this feature didn't catch any attention of anyone, though it is a really handy one. Maybe it I update this thread, someone will notice.

In reply to Pavel Sokolov

Re: Add a setting for a label resource to be collapsable

by Anu Laitakari -
Hi Pavel,

Does the original contrib code still work?
We have version 2.3.

Thanks,
Anu