Collapsed Topics updated from V405.0.3 to V405.0.4 for Moodle 4.5

Collapsed Topics updated from V405.0.3 to V405.0.4 for Moodle 4.5

by Gareth J Barnard -
Number of replies: 0
Core developers სურათი Particularly helpful Moodlers სურათი Plugin developers სურათი

Hello,

I've released an updated 'release candidate' version of the Collapsed Topics course format for Moodle 4.5 as follows:

Release 405.0.4 for Moodle 4.5 version 2024100700.00 (Build: 20241007) and above within the MOODLE_405_STABLE branch until the next release:

with:

  1. Fix 'allow_stealth_module_visibility' still using 'numsections'.
  2. Fix missing '$USER' global when editing the course settings.

Important:

This is still a 'release candidate' because of 'Subsection support' which has been incredibly difficult to support to the extent that I've had to wave a 'white flag' and remove the 'numsections' setting.  The course format API has been broken apart into so many interconnected small pieces (each tending to have separate PHP, JS and Mustache files), https://moodledev.io/docs/4.5/apis/plugintypes/format#format-output-classes-and-templates and https://moodledev.io/docs/4.5/apis/plugintypes/format#the-course-editor-structure, that it is difficult at times to understand and keep in working memory what is going on and where a given element of functionality is implemented to the extent where it can be overridden and changed.  Thus the format will now operate as 'Topics' does in terms of number of sections management.  Collapsed Topics was only ever designed to operate on sections and as such sees sub-sections as different entities not related to the number of sections in a course.  Collapsed Topics will now not allow you to have as many 'Sub sections' as you want - as was in V405.0.2 - due to increased chance of course restore failure, see: MDL-84874.  Additional tracker issues of interest for this are: MDL-84038 and MDL-84291.

Because of the removal of 'numsections', this has an impact on backup and restore, which I've tested.  However with such a change brings risk and a greater chance of error, thus I cannot stress enough that you MUST test and be sure that the format works as expected before it goes anywhere near a production server.  I found with the Grid format that once 'numsections' was removed that it was tricky to go back, and therefore it would be unlikely even with the flexibility I like of being able to set the number of sections both as a course setting and add / remove in the course itself.

I have refactored the whole toggle state preference JavaScript such that it no longer uses YUI.  This I hope will help to keep the format going for many years to come as older technologies are removed from core.

Note: Always install on a test server to confirm that the format does what you want it to do before updating or installing on a production server!  And as 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 this 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'.

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

Thank you,

Gareth

რეიტინგების საშუალო: -