Collapsed Topics format for Moodle 4.3 updated to version 403.1.1

Collapsed Topics format for Moodle 4.3 updated to version 403.1.1

by Gareth J Barnard -
Number of replies: 12
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello,

I have updated the Collapsed Topics format as follows:

Release 403.1.1 for Moodle 4.3 version 2023100900.00 (Build: 20231009) and above within the 4.3 branch until the next release:

with:

  1. Fix 'Orphaned Section still appear in Index Drawer' - #146.
  2. Fix 'Deprecated warnings in PHP 8.2' - #147, a big thanks to [PhMemmel](https://github.com/PhMemmel) for the patch in #148.

This release could contain bugs and so I strongly recommend that you check on a test server first!  Not sure how to set one up?  Then look at the 'Installer packages' on https://download.moodle.org/releases/latest/. Ensure that you have multiple backups of all data before using.  Please report any issues. i.e. 'bugs' with these releases ONLY here.    Ensure that you have multiple backups of all data before using.  Please report any issues. i.e. 'bugs' with these release ONLY here.  Before doing so please read 'Reporting issues' on the 'Information' tab on the course format 'Settings' under 'Site administration' -> 'Plugins' -> 'Course formats' -> 'Collapsed Topics'.

Please note that in light of MDLSITE-7418 I have renamed the 'master' branch to 'main' on GitHub for Foundation and indeed my other plugins.  Thus, if you have a fork, then please update the parent.

If you find this post useful, then please mark it so.

Gareth

Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Collapsed Topics format for Moodle 4.3 updated to version 403.1.1

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Thanks, Gareth. Everything looks well on my experimental Moodle, Moodle 4.3.3+ (Build: 20240308), PHP 8.1.13. Yep, I had noticed the problems with PHP8.2 and knew you would be on top of it.
In reply to Rick Jerz

Re: Collapsed Topics format for Moodle 4.3 updated to version 403.1.1

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

Thank you, but the credit goes to 'PhMemmel'.

Kind regards,

Gareth
In reply to Gareth J Barnard

Re: Collapsed Topics format for Moodle 4.3 updated to version 403.1.1

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Yep, PhMemmel helped fix that PHP 8.2 problem, but I will still credit you for your great Collapsed Topic plugin. 😀  Having a great Moodle LMS involves the efforts of many folks!  Thanks for all that you have done, Gareth.
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Collapsed Topics format for Moodle 4.3 updated to version 403.1.1

by Björn Wiskamp -

Good day,

Firstly, I would like to thank you for the excellent format. We have been using it at our school for a very long time and are thrilled.

We are currently using Release 403.1.1, Version 2023100701 on Moodle 4.3.3+ (Build: 20240326).

We have just upgraded from an outdated version of Moodle 4.1.x and a then-compatible version of Collapsed Topics to this version.

I have noticed that indentation is now only possible once, meaning that elements can only be shifted left once and then right again. In our old version, it was possible to indent elements more than once.

Will it be possible to have multiple indentations again in the future, as some colleagues structured their courses this way?

Have a lovely day ahead, and thank you very much for the brilliant format.

Best regards,

Björn Wiskamp

Average of ratings: Useful (1)
In reply to Björn Wiskamp

Re: Collapsed Topics format for Moodle 4.3 updated to version 403.1.1

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I am unsure what you mean.

Below is a screenshot of my activities and resources in Moodle 4.4.
Attachment Indent  CT.jpeg
In reply to Rick Jerz

Re: Collapsed Topics format for Moodle 4.3 updated to version 403.1.1

by Nathan Lind -
Picture of Particularly helpful Moodlers
Rick,
I believe Björn is talking about the "Move Right" option which was temporarily removed in some versions of Moodle, then brought back, but only in 3rd party course formats (and only with 1 level of indentation), then brought back to Moodle core as a short-term solution, prior to a future (4.5 or 4.6?) version of Moodle having true hierarchy options with sections and subsections (albeit still with only 1 level of Move Right indentation.
Average of ratings: Useful (2)
In reply to Nathan Lind

Re: Collapsed Topics format for Moodle 4.3 updated to version 403.1.1

by Björn Wiskamp -
Hello Rick and Nathan, thank you for your responses.
I was referring to the "Move Right" option, which previously allowed for an indentation of more than one position. My colleagues had used this extensively in our old Moodle (2.x) to structure the courses.

When we upgraded to 4.1.X, this was gone but was brought back with "Collapsed Topics." Now, with the latest update, this option is limited to a single indentation.

Have I understood correctly that this limitation has nothing to do with "Collapsed Topics," but is rather a change in Moodle itself?
Will there be a new way of structuring in future Moodle versions beyond 4.5+++?
In reply to Björn Wiskamp

Re: Collapsed Topics format for Moodle 4.3 updated to version 403.1.1

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Dear Björn,

Sorry for the delayed reply, but this area is rather complex.  Ok the one indentation limit is enforced by Moodle core here: https://github.com/moodle/moodle/blob/MOODLE_403_STABLE/course/lib.php#L1722 as CT uses components.  However, even changing the code to allow more doesn't seem to work as that line only affects the menu items and being in that file cannot be overridden by the format or indeed a theme.  Following on from that there is the JS mechanism that forms a part of the update https://moodledev.io/docs/4.3/apis/plugintypes/format#the-course-editor-structure which is quite complex, then there is the SCSS / CSS classes, which even if you use 'indent-2' (testing with the browser) then the 'indented' class prevents it having an effect, thus a theme change if a solution to the menu UI is even possible or at least the format avoiding / overriding classes.
 
This all seems to be a core UI usability decision.  It might be possible to find a solution as the control menu for a course module seems to be overridable by a course format, but as I've demonstrated that is only one part of the problem.  Therefore perhaps something to raise with Moodle HQ / Moodle User Group etc?
 
Gareth
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Collapsed Topics format for Moodle 4.3 updated to version 403.1.1

by Björn Wiskamp -
Hello Gareth,

thank you for the detailed explanation and once again for the ingenious course format. So the omission of the option is not a feature of the course format, but a deliberate limitation of the Moodle core.

In any case, I will set up a test environment and play around a bit with the code you mentioned. If I make any new experiences here, I would of course share them here in the forum.

I have created an account in the Moodle Tracker and will continue to follow the process and support a possible adaptation.

Thank you in any case for everything.

Björn
In reply to Björn Wiskamp

Re: Collapsed Topics format for Moodle 4.3 updated to version 403.1.1

by Nathan Lind -
Picture of Particularly helpful Moodlers
Hi Björn,
Here is a link to the long-term hierarchy noodle tracker item, In case you’re interested in engaging HQ.

Moodle / Epic MDL-76888
Course hierarchy (Long-term solution)
https://tracker.moodle.org/browse/MDL-76888
Average of ratings: Useful (2)
In reply to Nathan Lind

Re: Collapsed Topics format for Moodle 4.3 updated to version 403.1.1

by Björn Wiskamp -
Hello Nathan,

Thank you very much for the link.

I immediately created an account and gave the topic a vote. In any case, I will continue to follow the whole thing and hope for a new and clean solution for the hierarchy in Moodle courses.

Perhaps my colleagues and I will also have to think about how we can better organize our courses differently.

In any case, thanks for the productive conversation in the forum.

Björn