Created the participants_search unit testing file, including
tests for role, keywords, status and enroment method filtering.
Co-authored-by: Michael Hawkins <michaelh@moodle.com>
These function updates are in preparation for the participants_search
class, which will be used to support multiple values per filter when
filtering the participants page.
With the templaterev issue resolved we should enable the prefetch module
when cachejs is enabled to avoid a different experience when cachejs is
enabled vs. disabled.
Previously there was little point in doing this due to a range of other
bugs (string normalisation, and misuse of templaterev).
With these issues resolved we should enabel the caching.
The M.cfg.templaterev variable should only be used to present persistent
caching, not caching of content within the same page load.
Preventing caching of same-page content makes it difficult to develop
for real user experiences as content is slow to load and does not give a
realistic and consistent loading experience.
This change affects the loading of partials specifically which notably
includes the loading spinner. Without this patch the loading icon is
often not seen at all because it does not load in a timely fashion and
the content being loaded is loaded first.
Identically to what we've added to the module generators, let's raise a
coding exception if generating a block or a repository triggers the
theme and output initialisation.
Applying filters on an activity module description when using it as a
new calendar event's description is bad m'kay? We need to store the raw
text and apply the filters only when we actually display the text. That
way, filters (such as multi-language content) may actually fully work
and we do not initialise the theme and output machinery.
Additionally, we need to explicitly set the format of the description
text to HTML (because we have converted it to it already). Otherwise it
defaults to the current user's preferred editor format.
This is still a pragmatic hot-fix solution. The proper solution would be
to pass the raw text, format and embedded files.
The coding exception hint should say it all. Creating an activity module
should not need any output function call. It turned out it can lead to
hard-to-debug bugs and unexpected behaviour. So better to explicitly
fail and let the developer fix the code.
Some blocks (e.g. Calendar) load additional JS modules when returning
content. We need to make sure they aren't asked to generate content
unless the user can actually view the block, or the expected content
required by the JS will not exist in the DOM and can cause exceptions.
- Add MDL codes to @deprecated.
- Add @todo tag for future 4.3 phase 2 deprecation.
- Deprecate global scope functions:
- cron_execute_plugin_type().
- cron_bc_hack_plugin_functions().
(moving them to deprecatelib).
- Document it in main upgrade.txt
H5P editor has a folder with all supported languages in JS files.
A mechanish has been added to let users to translate them using AMOS.
That's how the translations are managed (the order how they are processed):
- If there a JS file for a language, it's loaded.
- If a string has been translated in Moodle (they are placed in
h5plib_vXXX), it will override strings loaded from the JS file.