-
Improvement
-
Resolution: Fixed
-
Minor
-
4.4
-
MOODLE_404_STABLE
-
MOODLE_405_STABLE
-
MDL-82359-main -
If your institution does not use certain standard plugins (e.g. book, forum) at the moment it is not possible to install Moodle without those plugins. You can install Moodle, then remove the plugins, but a fresh install gives errors.
This causes problems if you are trying to, for example, run unit tests on your codebase (after removing the plugins) - the errors cause the 'init' script to crash out.
By testing with a somewhat arbitrary large list of plugins to delete, so far I have identified the following problems:
1 If mod_forum is not available then install gives warnings in lib/db/upgradelib.php function make_default_scale because it relies on language strings from forum.
2 If mod_book (and a host of others) are not available then install gives warnings when installing analytics models, because the models defined in lib/db/analytics.php refer to various classes within modules which do not exist.
3 lib/upgradelib.php calls blocks_add_default_course_blocks and blocks_add_default_system_blocks. Both functions fail if any default blocks do not exist.
No doubt there are other problems with specific plugins that I didn't try to uninstall, but I think if we limit the scope of this issue to the ones I tested, other problems can be fixed in other issues later.
For those wondering why we would like to uninstall standard modules, this came about because somebody ran a carbon analyser that said our javascript is really big, so we want to remove some unused plugins in order to avoid killing too many dolphins. 🐬 Tests indicate that by removing a whole stack of plugins we can save approximately 7% of dolphins JavaScript size.There is also a security benefit (reduced footprint) in removing unused code, even if the code is supposed to be disabled.
- has been marked as being related by
-
MDL-83529 Analytics: Upgrade can break if core module is deleted
-
- Closed
-