Closed reseaucanope closed 2 years ago
Hello Canopé ! Merci pour ce retour / thanks for your return ! :)
Concerning broken class : indeed, it's useless... I will merge this modification.
Concerning upgrade file : new upgrade point should be 2021110404, no ? I studied other upgrade files in other Moodle plugins, last upgrade point must be the same as in version.php file. Are you ok on this ? But I understood what you mean : upgrade point should be at the end of code every time I had "if ($oldversion < xxxx...".
Olivier
Hi, The upgrade savepoint have to be in a "if" and the version have to be the same. Each if have to be in a chronological order
Below is an example of the correct way to do and upgrade file
if ($oldversion < 2021110403) {
// upgrade code
upgrade_mod_savepoint(true, 2021110403, 'stickynotes');
}
if ($oldversion < 2021110404) {
// upgrade code
upgrade_mod_savepoint(true, 2021110404, 'stickynotes');
}
Every upgrade.php files are made like this, you can use the official plugin as an example like the mod_forum activity.
OK understood. I must just make a modification, for the plugin is now in 2021110404 version. I commit your changes, and will juste change a detail in the upgrade.php code.
Fix some coding error in the upgrade file. Removing a broken class