Not all global search configurations offer the same results as the
default course search does.
The default course search will return courses that the user can see
the details of even if they can see them via a category, even if
they are not enrolled and cannot enrol themselves on it.
The equivalent global search configuration is:
* Global search is enabled
* The course indexing is enabled
* All the name and summary of all courses are included in the results
This patch will only let global search replace the default course
search when those criteria are met.
It will also display on the global search configuration page if global
search will replace the legacy course search.
Where the autolodaer is not registered (ABORT_AFTER_CONFIG and
installation), some adminlib classes, traits, and interfaces need to be
manually loaded.
In order to be consistent with the majority of plugin management
pages, add the `dimmed_text` class to table rows to indicate that
a given plugin is disabled.
This class would belong more appropriately within the 'user' API
(core_user) instead of within the 'core' API, since it is
directly related to user data.
Since the class has only just been added to Moodle, now is a good
time to move it.
No need to have a dedicated admin_setting_managewebservicetokens admin
setting subclass, and yet do not use almost any of its features. So the
patch merges the list and the forms handling into a single external
page.
Similarly, it feels like overkill to have a renderer method for a
simple confirmation widget - especially given that the URLs were
hard-coded in it. So that one was dropped.
In all cases changes have been kept to a minimum while not making
the code completely horrible. For example, there are many instances
where it would probably be better to rewrite a query entirely, but
I have not done that (in order to reduce the risk of changes).
Currently admin_setting_configselect has lazy-loading support via a
callback function (so you don't have to make pointless single-use
classes for each unusual setting), but this is not present in other
similar types.
This commit adds identical support to
admin_setting_configmulticheckbox.
The patch introduces a new admin_setting fiela type that can be used for
specifying comma separated list of countries. The field has inbuilt
validation so that only valid country codes can be inserted.
Rename the string identifier to filetypesnotallowed, copy all the
existing translations in AMOS and deprecate the original string to be
eventually removed.
AMOS BEGIN
CPY [filetypesnotwhitelisted,core_form],[filetypesnotallowed,core_form]
AMOS END
The admin_setting_configselect admin setting did not support validation.
It was possible to validate only by using a subclass.
This change allows validation by a callback function. It also makes it
slightly easier to handle validation in a subclass if you want to do
that.
The main advantage is for cases where a setting is not generic but
is only ever going to be required in one place, and it creates
unnecessary clutter to make a new subclass.
The admin_setting_configselect admin setting already supported lazy
loading, but this was only available for subclasses. This change
means you can use it directly within the admin setting.
The main advantage is for cases where a setting is not generic but
is only ever going to be required in one place, and it creates
unnecessary clutter to make a new subclass.