Skip to content

Instantly share code, notes, and snippets.

@mudrd8mz
Last active December 15, 2015 02:19
Show Gist options
  • Save mudrd8mz/5186295 to your computer and use it in GitHub Desktop.
Save mudrd8mz/5186295 to your computer and use it in GitHub Desktop.
Simple Moodle YUI3 module
/**
* Check for write permission for the selected plugin type
*
* $this->page->requires->yui_module('moodle-tool_installaddon-permcheck', 'M.tool_installaddon.permcheck.init',
* array(array('aparam' => 'paramvalue')));
*
* @package tool_installaddon
* @subpackage yui
* @author David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
YUI.add('moodle-tool_installaddon-permcheck', function(Y) {
M.tool_installaddon = M.tool_installaddon || {};
M.tool_installaddon.permcheck = {
/**
* @method init
*/
init : function(config) {
Y.log(config);
}
}
}, '@VERSION@', {
requires:['node']
});
@andrewnicols
Copy link

M.tool_installaddon.permcheck = {
init: function(config) {
}
};

$PAGE->requires->yui_module('moodle-tool_installaddon-permcheck', 'M.tool_installaddon.permcheck.init', array(array('foo' => 'bar'));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment