This patch updates the screenshots for boost and classic
themes, displayed in the theme selector.
These images have been created by Mary Cooch.
Co-authored by: Mary Cooch <mary@moodle.com>
There is an edge case in the conversion from old collapse/expand
settings (stored as user preference) to the new ones that can lead
to notices / warnings / errors.
Before PHP 8, they weren't being detected, but now they are.
Basically, if some of the expected components of the preferences
are missing, then some array (array_diff(), array_intersect()..)
operations now are failing, because now those parameter functions
do require to be arrays (so empty strings or nulls aren't allowed).
Also, there were some cases where the old preference was not being
removed ever, so its removal has been moved to a common place at
the end of the function, where it's always evaluated in case
the preference still exists but is empty of contents.
I've tried to cover all the cases I've been able to imagine with
unit tests (empty information, some component not set, all components
not set...), have moved it to a new unit test because the one
already performing some tests with those old preferences was
already too long to add more cases.
MDL-66920 added this field but didn't set defaults for upgrading tool
types. This patch fixes that for any 1.3 tools which don't yet have a
value for this field.
The custom handling of Space and Enter for dropdowns that was added to
aria.js were not needed in the latests Bootstrap versions. So removed
them. Vanilla Bootstrap emulates click when Space or Enter keys are
pressed on a tab.
This change prevents the printing of header when the
moodles page's state is STATE_IN_BODY. Due to the absence
of this check when user entered graded in bulk was causing
errors.
The term 'iscurrent' suggests that something is current, when this may
not be technically true. The term highlight is more appropriate as we
are highlighting content. Whether that content is for the current week
may also be true, but it may be that some course formats allow multiple
sections to be highlighted.
* Fetch only the fields required by the function.
* Quick validation of the passed forum parameter. If the forum parameter
is an object, it should have the forum ID and the course ID.
* Default return when there's no need to show a warning yet.
* Return early if the forum's blockafter or blockperiod attributes
are empty.
* If $cm is not passed in forum_check_throttling(), try to fetch it
using get_fast_modinfo() which avoids DB reads. Fetch it via
get_coursemodule_from_instance() as a last resort (though it's unlikely
to happen).