I've just been 'given' the plugin I developed for my current employer as they're not going to be using Moodle much longer, so that I can maintain it myself. One condition was that I remove all references to the company from the plugin, functions and all (which is not a problem as it's not a huge plugin). Let's say the plugin is called `local_companyplugin`.
I have effectively renamed the plugin to `local_plugin`. The issue I have is that when I try to upload a new version of the plugin with 'company' removed, the Moodle plugin database is still expecting the plugin to be called `local_companyplugin`, and complains about:
- Component declared in version.php file: local_plugin does not match the expected component: local_companyplugin
- Important English language file not found. Searching for file companyplugin/lang/en/local_companyplugin.php
So, can I fundamentally rename the plugin, or so I need to deprecate this one and register a new one?
Hi Richard. That's a fair question, and I've missed such things before, but in this case it was automatically pulling the code from GitHub.
Hmm, I've just tagged and uploaded a slightly older version of the plugin (basically the commit before I renamed everything) and that was accepted just fine. Maybe I should deprecate this plugin and register a new one.
Here's how I managed the change from mod_attforblock to mod_attendance - it might be useful?
It's a bit nasty and is really an abuse of verison.php but worked ok - I then eventually removed it from version.php