Co-authored-by: Stevani Andolo <stevani.andolo@moodle.com>
Including in this commit:
- Added a new counter called attemptsavailable for ad-hoc task
- PHPUnit test for the new feature
The new quick form field uses a choice list to display a dropdown
component inside a form. Apart from que quick form code, the patch also
include a small improvement to the choicelist class to disable empty
values. This small patch is needed because the quickform field won't
allow empty values.
The backup/view.php page has been created to display the list of
course reuse actions available for users.
That way, the "Course reuse" option in the secondary navigation
will display this page instead of redirecting to the first action
available.
Apart from that, the headers for all the Course reuse actions have
been homogenised and the tertiary navigation selector has been included,
to replace headers and make it easier navigate between actions.
This resolves accessibility issues where Moodle language pack codes
didn't always map to correspondingly named iso6391 codes.
Where this value is defined in the language configuration, it will
now be used.
This admin setting allows you to display a check anywhere in the admin
tree. It uses a webservice to execute the check, so the impact on the
admin tree performance is as low as possible.
Checks do not necessarily need to be registered in the plugins callback
to be shown here, allowing customisation of what is shown in the
settings versus the reports.
The PSR-4 specification does not preclude a single namespaces from
having multiple sources. This is the case for several PSR standards
including standard packagist packages distributed by PSR:
- PSR-7 - HTTP Message Interfaces: \Psr\Http\Message
- PSR-17 - HTTP Factories: \Psr\Http\Message
- PSR-15 - http-server-handler: \Psr\Http\Server
- PSR-15 - http-server-middleware: \Psr\Http\Server
This is a Moodle version of a proposed function `array_keys_filter`.
Since this method has not yet been created in upstream PHP, I have
elected to name it with a Moodle prefix as the signature is not known.
In the future, if and when this method is created, we can replace its
content with new method and deprecate it.
Preserve existing `enhance` method return of jQuery style promises to
allow calling code to continue relying on that (e.g. when calling old
style `.done` and `.fail`).
Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
* Make sure that we respect the fullnamedisplay and alternativefullnameformat
parameters to decide on the initials for a given user
* Add further tests
Co-authored-by: Tatsunori Uchino <tats.u@live.jp>
When bulk-updating course module visibility, set_coursemodule_visibily
was triggering a partial cache purge and rebuild for each course module.
This potentially led to 2 cache sets each requiring a lock to be
acquired and released per course module, plus any other cache updates
for other changes to the course in the same request.
This adds a new $rebuildcache paramter to the
set_coursemodule_visibilty, which is true by default to retain the
existing behaviour. If set false, it will skip doing the partial purge
and rebuild for that course module, and it is up to the calling code to
ensure the cache is updated as requried.
To assist with this, there is a new
course_modinfo::purge_course_module_cache_multiple() method, which
allows multiple course modules to be purged from the cache in a single
cache set.
Basically the changes imply that:
- For some tests that are using reflection, we need to ensure
that the backup controller is passed.
- And, whenever used explicitly in tests, it has to be destroyed.
(note that this leaves out tests running get_package(), because
that method now instantiates and destroys the controller by itself.
only tests that get a controller need to destroy it).
- Move from some old functions to the new ones introduced in the issue.