All the setup/teardown/pre/post/conditions template methods
now are required to return void. This was warned with phpunit 7
and now is enforced.
At the same time, fix a few wrong function names,
provider data and param types, return statements...
Adds filtering on the completion criteria form to ensure we are only
selecting actual course instances of this type. Prior to this change
we would also get NULL values from unrelated criteria types.
The "Ok" (with lower-case "k") string was added in MDL-68409 to keep
backwards compatibility with YUI alerts that had it hard-coded. But we
should not need to explain to translators why we have two OK strings
like this and why they use different wording.
Additionally, there would be inconsistency in Behat tests and everywhere
depending on which "OK" or "Ok" string is used for buttons.
So instead, this patch changes the hard-coded 'Ok' string in the YUI and
we should stick to "OK" from now on everywhere.
Applying filters on an activity module description when using it as a
new calendar event's description is bad m'kay? We need to store the raw
text and apply the filters only when we actually display the text. That
way, filters (such as multi-language content) may actually fully work
and we do not initialise the theme and output machinery.
Additionally, we need to explicitly set the format of the description
text to HTML (because we have converted it to it already). Otherwise it
defaults to the current user's preferred editor format.
This is still a pragmatic hot-fix solution. The proper solution would be
to pass the raw text, format and embedded files.
span is not a valid content wrapper tag.
Moreover, according to W3C validation service report, it is not valid to
have div elements as children of a span element.
We can safely replace span with div here because the element's css class
is .action and display of .action is set to flex in both boost and
classic themes.
Passing parameters to implode() in reverse order is deprecated, use
implode($glue, $parts) instead of implode($parts, $glue).
This commit corresponds to phpunit and manual detections, core files.
This commit shifts the content of legacy completion_cron_criteria()
and completion_cron_completions() functions to completion_regular_task.
Also, those functions are deleted as part of this commit.
core_completion_get_activities_completion_status was not returning
completion information for users with the teacher role only (when it
wasn’t a role allowed to track completion).
The core_completion_get_activities_completion_status was getting the
progress for all users on the course called, and then discarding all
the records but one.
This change ensures that only progress for the user we are interested in
is retrieved from the database.
This has a side benefit of removing a full table scan from the query
finding the users inside the get_progress_all() method.
Triggering a fatal error in an adhoc task is bad. It will be retried indefinitely.
Even though we are not sure how to get a module instance without a course module record,
it is possible and should not kill the Moodle site.
- Icon generation logic moved to the course renderer.
- Web service should return the completion info only, not HTML.
- JS modified to handle icon rendering in relevant cases.
Changes:
- Activities with auto completion and a completion status overridden to
COMPLETION_COMPLETE are no longer processed by normal completion
triggers.
- All activities can still be completed by students when their
completion status has been overridden to COMPLETION_INCOMPLETE, via
either auto or manual triggers.
- Completion unit tests updated