This commit makes the following improvements to mod_imscp tests:
* Removes unnecessary @javascript and @_file_upload tags from non-JS tests.
* Removes user/enrol data generation from tests that can be performed as admin.
* Removes "I log out" and other unnecessary steps.
In this commit, the following improvements were made to the mod_lti Behat tests:
* Replaced manual steps with data generators to set completion.
* Eliminated unnecessary user and course enrolments data generation as some tests can be performed as an admin.
* Removed the @javascript tag from non-JS tests.
* Updated the LTI data generator to generate an internal Moodle URL in the toolurl field, enabling the use of XML files.
The feature added in 4.1 to lock the modinfo cache does not work when
using Redis, because:
* The API to acquire a cache lock is confusing, and the code did not
check that it successfully acquired a lock before going on to build
the cache anyway.
* Unlike the other types of cache lock, the Redis store did not retry
the lock for a timeout period before giving up and failing.
This change fixes both points.
It is perfectly legitimate to create and/or use a method named `define`
in JS outside of RequireJS.
Unfortunately our requirejs.php wrapper is dumb and does not understand
this.
In the long term we need to stop doing this at all. We really should be
able to already, but every time I try to something prevents it.
In the interim, this change adds a secondary check to see if there is an
existing define which _does_ have the right name in it already.
The previous method of hardcoded filepaths, specifically for events
belonging to core, meant that any events belongs to core subsystems
were omitted (core_customfield, core_h5p, core_payment, etc).
Previously, a set of calculated quiz statistics would only 'last' for
15 minutes. Then they would be considered invalid and not used.
Now, computed statistics are kept indefinitely. Instead, when a new
batch of values are computed for a particular set of settings, older numbers
for the same settings are deleted first. Therefore,
question_stats_cleanup_task is no more.
Previously, when users viewed the question bank, if the quiz statistics
had not already been calculated, we would try to compute them there an then.
This could be very, very slow, leading to session lock problems.
Now, we never try to compute the statistics on the fly. Instead, we rely
on the existing \quiz_statistics\task\recalculate scheduled task to do it.
There is a new method on the column class, for the column to declare any
statistics it requires. The question then efficiently loads all those
statistics in one go, and makes them available as the columns are
rendererd, or do any subsequent processing.