When clicked, disable the "Edit mode" button just before doing a
redirection. It's been reported that after clicling several times the
button, an inconsistent state between the button and the editing mode is
achieved. The patch mitigates the issue.
When we unlock completion criteria and save changes 'viewed' criteria
still should be completed if user has viewed activity before. Seems
that that was broken by recent changes. Fixing here.
For hidden grade items we used to mark students as completed if
they have any grade. But this was not working correctly when we
also set pass grade for activity and completion criteria based
on pass grade. So we will have these completion states
Competion criteria 'Receive grade':
No grade - COMPLETION_INCOMPLETE
Grade visible, achieved passing grade - COMPLETION_COMPLETE_PASS
Grade visible, failed passing grade - COMPLETION_COMPLETE_FAIL
Grade hidden - COMPLETION_COMPLETE
Completion criteris 'Receive passing grade'
No grade - COMPLETION_INCOMPLETE
Grade visible, achieved passing grade - COMPLETION_COMPLETE_PASS
Grade visible, failed passing grade - COMPLETION_COMPLETE_FAIL
Grade hidden, achieved passing grade - COMPLETION_COMPLETE_PASS
Grade hidden, failed passing grade - COMPLETION_COMPLETE_FAIL_HIDDEN
This commit merges the fix and test for the incorrect counting of
words in essay type questions. The issue is due <span> tags not being
counted as inline tags.
Due to missing `AND k.script = 'rss'` condition, the query did not make
use of the existing script-value compound index defined for the table.
So it had to perform the full sequential scan for all rows when
searching for the token. This had serious performance issues on sites
with many users, especially in case on non-existing token / key.
Whenever some plugin is missing from disk but installed, the plugins
page (and the upgrade) shows them as "missing from disk". Still, the
code tries to do things with their directory that, now, is null.
That was silently defaulting to '' in previous php versions, but
php81 emits a deprecated warning. So we have to check for them.
Right now, any E_DEPRECATED, E_USER_DEPRECATED error type leads
to exception in behat runs, because the behat error handled is
not aware of them. See MDL-38041 for the initial implementation.
We don't want that to happen and they must behave like other "low"
error types (notices, warnings...), that will be reported in logs
or output, but won't trigger any exception, so the test can continue.
This commit just adds those 2 "new" error types to the handler,
providing the very same behaviour for them than the rest.