Closed brendanheywood closed 3 years ago
ie instead of mutating a setting it should return content in:
https://docs.moodle.org/dev/Output_callbacks#before_standard_html_head
or
https://docs.moodle.org/dev/Output_callbacks#before_footer
depending on which setting was chosen. Its really not clear to me why this is an admin choice, this should be just done right and in code as it affects the way other scripts load and wether they are instrumented etc. But that can be a different issue
I have decided to retire location as part of this issue please have a look https://github.com/catalyst/moodle-tool_webanalytics/pull/41 I wish the code has more unit tests. I may add them later. But I tested everything locally and it works as expected.
Since ages there was new callbacks added so we can just inject html head content on the fly and never touch this setting, and the ugly cleanup of the old setting contents