wooclap / moodle-mod_wooclap

Moodle plugin for Wooclap (https://www.wooclap.com/).
2 stars 5 forks source link

Cannot upgrade when not-connected to WooClap (for testing purposes) #11

Closed dustinbrisebois closed 2 years ago

dustinbrisebois commented 2 years ago

https://github.com/wooclap/moodle-mod_wooclap/blob/master/db/upgrade.php#L168

This creates an issue; where the upgrader REQUIRES the wooclap service to be connected (even if it was installed for testing purposes); this should be a return true; and not a hard-fail on the upgrade path.

ndunand commented 2 years ago

This is a duplicate of #9 .

But indeed @tchapeaux it should not fail the whole Moodle upgrade process. We had the same issue on our test platform and had to hack the upgrade code to force the upgrade. Obviously we don't have a product key for every of our testing platforms.

tchapeaux commented 2 years ago

Thanks to both of you for raising this issue again with more context.

I am still not sure I understand something : why do you want to upgrade the plugin on a test platform without it being correctly connected to Wooclap? In that case, none of the plugin features will work, so you will not be able to test much.

About the product keys, if you have an ongoing Wooclap subscription, you can request as many keys as necessary for your tests for no additional fee. This will keep your activities and users data separated between your test and production platforms.

ndunand commented 2 years ago

@tchapeaux we have an ongoing subscription but dont want to go through requesting many keys for each personal (local) Moodle dev platform.

The idea is to upgrade Moodle within the team without necessarily using the wooclap plugin, therefore is the plugin does not work is unimportant, but if we can 't upgrade the whole Moodle platform because of that is a blocker.

cperves commented 2 years ago

@tchapeaux we have an ongoing subscription but dont want to go through requesting many keys for each personal (local) Moodle dev platform.

The idea is to upgrade Moodle within the team without necessarily using the wooclap plugin, therefore is the plugin does not work is unimportant, but if we can 't upgrade the whole Moodle platform because of that is a blocker.

Same problem here, various moodle hosted and deployed with same code but not using every time wooclap plugin Then I can't upgrade moodl plugin

cperves commented 2 years ago

I made a quick fix to take in charge platforms without accesskey set in the wooclap moodle plugin Feel free to review/correct code and use it https://github.com/wooclap/moodle-mod_wooclap/pull/12

mehira-wooclap commented 2 years ago

thank you all for your contribution. We will deploy a fix in the next release.

dfdeagle47 commented 2 years ago

@dustinbrisebois

FYI, we've addressed this issue in the new release here and here. You should now be able to upgrade without the keys, and the migration can be triggered via a CLI script.

For the new release, it shouldn't be necessary to re-trigger this script if you're already on 2021062500 before upgrading the Moodle plugin, but we'll use this process for newer releases if a migration is needed to avoid any issues when upgrading.

Thank you for providing this feedback!