When installing the plugin in the old-school way 🙂 , I mean, by placing the plugin in the local dir on the server first and then accessing the site, you start observing an error with accessing the plugin's database table. This is because the plugin isn't installed yet, the table isn't created as well, but the plugin has already started listening to Moodle's events, even without having been installed.
The solution would be to introduce a plugin's setting to enable/disable listening to events, and set it as 'disabled' by default. This would in general allow to control the plugin's listening to Moodle's events. Sometimes you may want to disable it even after installing the pluign for some reason.
Cheers!
When installing the plugin in the old-school way 🙂 , I mean, by placing the plugin in the
localdir on the server first and then accessing the site, you start observing an error with accessing the plugin's database table. This is because the plugin isn't installed yet, the table isn't created as well, but the plugin has already started listening to Moodle's events, even without having been installed.The solution would be to introduce a plugin's setting to enable/disable listening to events, and set it as 'disabled' by default. This would in general allow to control the plugin's listening to Moodle's events. Sometimes you may want to disable it even after installing the pluign for some reason.
Cheers!