@const is not a valid phpdoc tag and @var should be used to
document both classes properties and constants (no matter how
weird that may sound, heh).
Link to (draft right now) PHP-FIG:
https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc-tags.md#518-var
So, with this commit we are just replacing all uses by the correct
@var one. Note that the type is entirely optional, in fact I think
that there isn't much need of it for constants because it's obvious
for both humans and machines which the type is. But, as far as it's
also correct to specify it, we haven't modified that detail.
The only detail modified are the cases where the constant name was
specified in the phpdoc, that's not needed, hence, the names have
been removed from there when present (a couple of cases).
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
The password unmask field will have the ability to
be a required field while used the required class.
Originally implemented as MDL-76701.
Co-Authored-By: Safat Shahin <safat.shahin@moodle.com>
During install/upgrade, caching is disabled. This change provides a
way to temporarily enable caching (using in-memory cache storage only)
within a specific function; caches are deleted afterwards.
Adding this to two locations improves install performance quite a lot.
Caching is not enabled during the parts of plugin installation that
can vary for individual plugins (install.php/upgrade.php) as these
might be relying on its absence, for example by making direct database
changes.
This partially reverts MDL-73270, where some useful environmental
checks and notifications in the admin UI were added to inform
about different parts of Moodle relying on the "unsupported"
php-xmlrpc extension.
Since then, some changes have happened in core, only available
for Moodle 4.1 and up (see the MDL-70889 mini-epic). Namely:
- MNet (SSO, roaming, auth, enrol and Mahara portfolio) are not
using the php-xmlrpc extension anymore, but a pure php library.
- The xmlrpc webservices protocol, has been move from core to
the plugins directory, although it continues using the php-xmlrpc
extension.
Because of that here we are removing all the checks and notifications
related with MNet (not using the extension anymore), but keeping the
webservice plugin ones (still using the extension). Surely if some day the
protocol stops using the extension, we'll be able to remove the
corresponding checks too. But that's future.
Note the associated lang strings have been also removed (not deprecated)
because they were highly specific and hardly reusable:
- xmlrpcmaharaenabled
- xmlrpcmnetauthenticationenabled
- xmlrpcmnetenabled
And very same applies, because MNet doesn't contain anything deprecated
or not supported anymore, hence, straight deletion, to the function:
- mnet_get_deprecation_notice()
Also, related tests using any of the removed stuff above have been deleted.
In the other side, the "check_xmlrpc_usage" continues existing and
being used both by environment checks and admin notifications but,
as commented above, now it only looks for the xmlrpc webservice
protocol now.
Following MDL-45184 this now finally deprecates and removes the class
\admin_setting_managelicenses. Please use \tool_licensemanager\manager
instead.
Following MDL-45184 this now finally deprecates and removes the
function license_manager::add(). Please use license_manager::save()
instead.
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
Re-factor existing code to make use of file manager class that renders
these details for us by default.
Co-authored-by: Simey Lameze <simey@moodle.com>
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.