Grid format V4.0.1.0 for Moodle 4.0 released

Grid format V4.0.1.0 for Moodle 4.0 released

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

Hello,

I have updated the Grid format for Moodle 4.0 as follows:

Version 4.0.1.0 for Moodle 4.0 version 2022041900.00 (Build: 20220419) and above within the MOODLE_400_STABLE branch until the next release:

with:

  1. Tidy and refactor code.
  2. More Behat tests.
  3. Highlighted section.
  4. Improved restore code.

I strongly suggest that this version is installed on a test server first!  Ensure that you have multiple backups of all data before using.  Even better, run on an install on a virtual machine.

If you find this post useful, then please mark it so.  Please report any issues with this version ONLY here.

Gareth

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

Re: Grid format V4.0.1.0 for Moodle 4.0 released

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
I've been told of an issue in a particular installation where there were records in the format_grid_icon table that related to courses that no longer existed (shouldn't happen) and that caused the upgrade script to fail during the creation of the images in the new file area that the format uses. Therefore I've created https://raw.githubusercontent.com/gjb2048/moodle-format_grid/c058a98b067e012cbd39a121c8ea48951db6dc37/db/upgrade.php which is a direct replacement for the version in V4.0.1.0 to cope when there is an error the first time you perform the upgrade, and subsequently needing to update again. Because the format version has not changed, i.e. updated, then the update element will execute again, detect that you already have a 'format_grid_image' table, delete and recreate it, then cope with what might of happened. I've only tested this 'once' and only where I manipulated the data in the database to mimic what I was told. Therefore, as usual, I cannot stress enough that you need to test first on a test server that is a direct replicant of your production server to ensure that everything should be fine when you update on production and always have a backup or more!  Note: The 'format_grid_icon' must still be there for the second run to operate as it should.
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Grid format V4.0.1.0 for Moodle 4.0 released

by Gary Lebowitz -
Hi Gareth,

After reading your message here and talking with Ken Task about the risks involved in upgrading to Moodle 4.0.4+ with a production server, I've done what both of you suggest and turned my 10-year-old Dell laptop into a sandbox for testing purposes. Just installed 4.0.4+ and it's working fine. And I'm about to download your latest release of Grid format for 4.0 and test it and test it and test it on this test machine.... My question: for how long should I do my testing? I'll be using for test purposes several restored NU backups of a couple of courses on a 3.11.2 build that uses your "old" Grid format (that I never bothered to update to the latest version for 3.11.2 after first contacting you several months ago about this) and see how things go. I suppose I should keep my eye on Moodle for any notices people post about how their testing of the new version of the Grid format it working. Regards, Gary
In reply to Gary Lebowitz

Re: Grid format V4.0.1.0 for Moodle 4.0 released

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

Please hold off testing as I'll be making a new release this weekend. Watch this space. As for how long, that's a 'how long is a piece of string' question, i.e. 'as long as it needs to be for the job', and therefore you test for as long as you're confident that the software works with your data.

G