Converting these tests to use an onlinetext submission and drop the JS
requirement means that they are much less susceptible to runtime issues,
and not susceptible to those caused by JS at all.
This random failure was happening because of the time required to render
and interact with the file picker which sometimes exceeded 2 seconds,
depending on the speed of the machine running the tests.
Converting these tests to use an onlinetext submission and drop the JS
requirement means that they are much less susceptible to runtime issues,
and not susceptible to those caused by JS at all.
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.
If a statically accelerated cache returns an empty array then the value
was still fetched from the non-static cache store.
The check of the `$result` should be strictly checked against `false`,
which is the value used if no value was found.
When creating a course, a manual enrolment instance is added by default. The instance settings should inherit the values of those
for the manual enrolment plugin and properly calculate its extra settings. The 'expirynotify' setting wasn't inherited correctly
in case it had 'Enroller + Enrolled' value.
A functional test was added to test the behaviour of settings inheritance.
One of the resource settings, the file type, has been moved to the
activity badge near the activity name.
The rest of the information will be displayed using the afterlink
feature.
However, for now, the activity page still displays all the information
together (that's why resource_get_optional_details() supports now one
new parameter, $showtype, to define whether the file type should be
displayed or not).
The new activity card design proposed for Moodle 4.3 differentiates badge
information from other HTML content (displayed using the afterlink feature).
This commit adds a new activitybadge class that can be extended by any
module to display any content in a badge near the activity name. These
are the main features:
- The badge content is always plain text (no HTML).
- The badge style can be set (by default is initialized with badge-none,
but it can be set by any module).
- An optional URL to redirect the user when the badge is clicked.
- An optional ID to add the element in case the module wants to add some
JS to the badge events.
- Optionally, any other extra HTML attributes to the badge element (for
example, data attributes).