mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 13:38:32 +01:00
c1e639c41a
When a third-party AMD module is provided with an included name we must replace it with a name that we are able to use. The structure of an AMD module define function is: [name], [dependencies], [callback] String, Array, Function Each of these is (strangely) optional. We know that the name is the only String and will always be the first, and we can use AST to remove a provided name before adding the Moodle-specific name. This should be a safe change and not lead to any changes in built code, but will make it easier to include third-party code. An additional logging line is also included to inform developers that a change was made.