Not all AMD modules need an explicit function call to start working. The
patch makes the function name optional, in which case the js_call_amd()
simply loads the module.
When using $page->context it calls magic_get_context() in lib/pagelib.php.
This method sets the context to context_system::instance() if it is currently
null and returns that as the context. However, when installing a new site
context_system::instance() also returns null.
This includes:
- Changing PHPUnit's bootstrap to use https://www...
- Modify all existing expectations to the new wwwroot.
- Amend some tests now with different defaults because of is_https()
- Added a note to main upgrade.php about the change.
This was is pre-loading some modules which are not used in boost:
* Block docking
* Popup Help
The other pre-loaded requirements were used for YUI dialogues and
modals. With time we are moving away from these, so rather than
'pre-loading' we can let the yui loader do its job.
All moodle less files are converted to sass with layouts etc
written as mustache templates.
Bootstrap 4 sass files are imported to scss/bootstrap.
Part of MDL-55071
Changing the error message that is displayed to users when they
upload a file that is greater than the maximum upload size. Does not
include all upload cases; focuses on those most used by students.
This patch replaces backslash characters in the generated jQuery
plugin URL to forward slashes when slasharguments is disabled and
the Moodle server is running on IIS.
Thanks to Ryan Panning <Ryan.Panning@district196.org> for
reporting this issue and for suggesting a fix.
I have added a JS module to handle skiplinks to send
the focus to the end of the block. This improves the function
and allows the user to better tab through the page.
We previously had a global Y (simpleyui) and a separate Y created
to put Y in scope for all our modules. This meant that we had 2
separate sandboxes for YUI, which means that modules are duplicated,
and events do not fire across YUI instances.
This change merges the 2 instances, so any code refering to Y will
get the same instance of YUI (amd code, yui modules, static init code etc).
Thanks to Andrew Nicols!
It turns out that, after all these years, we've been doing it wrong.
The YUI Loader should be loaded at the top of the body, not in the head.
Having it in the head means that the body has not yet loaded, and we see
a number of minor issues for scripts which happen very early in the load
process. One of these is the creation of invalid HTML from the YUI loader
because it is not able to insert in the body as it has not yet been
created.
To be safe, we must move all JS to the same point (because of unknown
dependencies between them). These should be placed as early in the body as
possible.
We also change the way in which the legacy YUI css modules are loaded.
In several places we only want to output a certain bit of HTML (e.g. the
contents on the mod chooser) once per page.
This used to be done with a static variable in the function, which
meant the logic was once per PHP-script execution, not once-per-page.
Now there is a new bit of API in page_requirements_manager to handle
this properly.
The moodlesimple (former simpleyui) rollup is included by a slightly
different mechanism to the the other YUI modules and this was missed off
the original yuipatchlevel implementation.