I'm currently making improvements to the Grid course format for accessibility in M2.5 to be back ported to M2.3 and M2.4. I'm using the YUI Gallery module 'gallery-event-nav-keys' from http://yuilibrary.com/gallery/show/event-nav-keys. I am incorporating it within the format because I want it to work when the Moodle install does not have access to the CDN. So, I looked at the 'yui_modules' method but its specification is:
public function yui_module($modules, $function, array $arguments = null, $galleryversion = null, $ondomready = false)
However the module has no 'init()' function and I did not want to add one and change the code, therefore I'm having to use:
Which then performs a 'use':
And as you can see, I've had to change the name so that it can be found in the folder:
Now, I read up about YUI modules and Shifter on the developer docs and initially created the folder:
But that did not work, even after adding 'moodle-format_grid' frankenstyle prefix which I thought was required.
Ok , what I would like to know please is if I'm doing it correctly or is there a better way?
P.S. The documentation pages I read were:
P.P.S. As this is such a useful module, would it be considered for distribution in core? It makes the task of capturing key presses on a page a doddle so that 'Enter', 'TAB' and 'Shift-TAB' which I'm told are 'Select', 'Next' and 'Previous' respectfully for accessibility.