-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.5
-
MOODLE_405_STABLE
While upgrading mod_equella https://github.com/openequella/moodle-mod_openEQUELLA to the latest version we have noticed failing core unit tests. See https://github.com/openequella/moodle-mod_openEQUELLA/issues/110
However, during investigation we realised that actually core API incorrectly saves repository configuration to config_plugin table here https://github.com/moodle/moodle/blob/main/repository/lib.php#L311 It uses $this->_typename without prefixing it to plugin type so for equella it looks like set_config($name, $value, 'equella');
mod_equella code has changed as part of https://github.com/openequella/moodle-mod_openEQUELLA/commit/7225e988e5c4d1fa17a615069adcedcf85dc9509 and now they store config properly. This exposed core issues with repository configs.
Steps to replicate:
- Bring mod_equella code from https://github.com/openequella/moodle-mod_openEQUELLA
- Initialise unit tests env
- Run following core unit tests vendor/bin/phpunit repository/tests/generator_test.php
- Confirm it fails