mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merge branch 'MDL-36334-master' of https://github.com/andrewnicols/moodle
This commit is contained in:
commit
a66aea5c67
@ -1260,15 +1260,18 @@ class enrol_user_button extends single_button {
|
||||
* @param string|array $modules One or more modules to require
|
||||
* @param string $function The JS function to call
|
||||
* @param array $arguments An array of arguments to pass to the function
|
||||
* @param string $galleryversion The YUI gallery version of any modules required
|
||||
* @param string $galleryversion Deprecated: The gallery version to use
|
||||
* @param bool $ondomready If true the call is postponed until the DOM is finished loading
|
||||
*/
|
||||
public function require_yui_module($modules, $function, array $arguments = null, $galleryversion = '2010.04.08-12-35', $ondomready = false) {
|
||||
public function require_yui_module($modules, $function, array $arguments = null, $galleryversion = null, $ondomready = false) {
|
||||
if ($galleryversion != null) {
|
||||
debugging('The galleryversion parameter to yui_module has been deprecated since Moodle 2.3.');
|
||||
}
|
||||
|
||||
$js = new stdClass;
|
||||
$js->modules = (array)$modules;
|
||||
$js->function = $function;
|
||||
$js->arguments = $arguments;
|
||||
$js->galleryversion = $galleryversion;
|
||||
$js->ondomready = $ondomready;
|
||||
$this->jsyuimodules[] = $js;
|
||||
}
|
||||
@ -1312,7 +1315,7 @@ class enrol_user_button extends single_button {
|
||||
*/
|
||||
public function initialise_js(moodle_page $page) {
|
||||
foreach ($this->jsyuimodules as $js) {
|
||||
$page->requires->yui_module($js->modules, $js->function, $js->arguments, $js->galleryversion, $js->ondomready);
|
||||
$page->requires->yui_module($js->modules, $js->function, $js->arguments, null, $js->ondomready);
|
||||
}
|
||||
foreach ($this->jsinitcalls as $js) {
|
||||
$page->requires->js_init_call($js->function, $js->extraarguments, $js->ondomready, $js->module);
|
||||
|
Loading…
x
Reference in New Issue
Block a user