General developer forum

Plugin not required anymore, best way to auto uninstall or make a warning on a "fake" upgrade?

 
Picture of Dragon Dionysius
Re: Plugin not required anymore, best way to auto uninstall or make a warning on a "fake" upgrade?
Plugin developers

Hi Michael

I combined your two answers. For completeness these changes are required: https://github.com/frankkoch/moodle-mod_studentquiz/commit/3b206b962b678da75af328c87d65c2cf6d5b996c

For all systems I had access to, I got the new setting shown, but also the removal of the files during uninstallation didn't work due detected missing permissions. That means, that the upgrade process will automatically install it again (thats how the moodle upgrade works it seems).

So I can't confirm that we'll see this option when uninstall works flawlessly. At least the info gets surely shown when it didn't work, and that's fine for now.

Overall: Removal of question behaviours plugins is not easy for administrators at all, as you can't change the behavior entry in question_attempts by moodle offered functionality. According to https://moodle.org/mod/forum/discuss.php?d=343295, specific conditions must be met in the database. So this upgrade process at least makes sure you can finally uninstall the plugin, as there will be no assignment for it anymore.

 
Average of ratings: -