LMSouq
moodle-core Open

How to include external JavaScript on my Moodle page?

SO
Solace
1 month ago
3 views
Problem Description
In Moodle, while we use `$PAGE->requires->js_init_call()` to include a JS function defined in our plugin's `module.js` file, **how can I include *external Javascript resources***, which we normally include in the `<head>` tags like: <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>mypage</title> <script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/yahoo-dom-event/yahoo-dom-event.js"></script> <script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/element/element-beta-min.js"></script> <script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/connection/connection-min.js"></script> <script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/tabview/tabview-min.js"></script> </head>

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base