Prior to this patch the debugging mode (when enabled) would trigger
on everywhere, regardless of whether or not READ_ONLY_SESSION is defined.
This patch modifies that behaviour so that the debugging only kicks in
if READ_ONLY_SESSION is defined and set to true.
Implementing these functions as final does not prevent the object to be
cloned or serialized, so the comment to them was wrong.
However having these functions not public breaks in PHP 8.0.
It still does not make sense to clone or serialise file_system or external_settings classes
but there are a lot of classes in moodle that should not be cloned, no reason to have
a specific solution here.
If two different plugin types (e.g. theme, local) implement
override_webservice_execution callbacks, then all of them except
the 'last' plugin type do not work correctly.
When called with a list of course IDs, this change makes it preload
the contexts and categories before further processing. This saves a
number of queries, depending on how many courses you call it for.
(Typically the function is called with a list of all your enrolled
courses.)
The change may also improve performance for other web services that
call the validate_courses function.
The new configuration flag $CFG->forceclean overrides the noclean
option when calling format_text() so that the text is always
and unconditionally cleaned.
The add/roles thing was only converted to bootstrap 2/4 markup and the yui left in place.
The modal for adding users to a course was unsavable so I rewrote it with an mform in a popup, still calling
the same (barely) modified ajax script.
The webservice for searching cohorts was taken from admin/tool/lp and moved into /cohort. I added a generic "cohort"
mform element at the same time.
The webservice for searching for users was taken from the original ajax script.
The variables AJAX_SCIRPT, CLI_SCRIPT, WS_SERVER are always defined (and set to false)
when webpages are rendered, hence the check of 'defined' is invalid
We should be detecting when we are treating files that are linked to
external repositories.
For doing that we'd need to return some additional fields via Web
Services:
- isexternalfile
- mimetype (google docs files use an special one)
- repositorytype (the repository plugin name)
Private tokens are generated at the same time that the token.
They must be stored safely by the ws client, and they must be transmitted only via https.