moodle-tool_mergeusers icon indicating copy to clipboard operation
moodle-tool_mergeusers copied to clipboard

Allow for a local configuration file outside of the admin/tool/mergeusers directory so it can be tracked by git

Open tgmayfield opened this issue 1 year ago • 1 comments

Simple change for a configuration file right next to the mergeusers/ directory.

My project is all tracked in git, and customizations that we make to the merging also need to be included. Those can't be inside a submodule, so this allows for another local configuration file outside the submodule.

tgmayfield avatar Aug 05 '23 00:08 tgmayfield

Hi @tgmayfield ,

Thanks a lot for your contribution. It seems reasonable to provide different ways of loading/overriding default configuration.

However, It seems to me that the patch provided is concrete for your use case, instead of providing a generic way of providing a configurable path.

I can imagine right now of a possible way of providing some settings into the config.php into the $CFG object, like custom setting like $CFG->tool_mergeusers_alternative_config_path or by overriding plugin config into config.php so that a get_config('tool_mergeusers', 'alternative_config_path') would provide a generic path for that. Even though that alternative_config_path setting does not exist for the plugin in settings.php, I think it should work. Actually, I would try this second option in the first place.

I think that a change in that way, for a generic way of searching for an alternative path for a config file would help to include this change.

In addition, the README should be updated to explain this additional way of loading settings for the plugin.

Thanks again,

Jordi

jpahullo avatar Nov 29 '23 22:11 jpahullo