The core API function user_create_user() did not check the case when the
given username was empty.
Also adding a missing string 'usernamelowercase' for the existing lower
case check and unit tests.
To be consistent with the web administration UI, we should not allow to
create invalid user records with empty username, lastname or firstname
via the web services.
Added groupid to grade_plugin_return tracking, modified constructor
to use query params as defaults if passed-in params not supplied,
used groupid tracking in core reports.
grade_get_graded_users_select also fixed to use gpr (otherwise using
it breaks when course current group has changed between render and
submit).
Fixed coding style issue in gpr constructor & documented properties.
Added upgrade.txt noting gpr changes.
This will allow the use of other storage systems implemented
in plugins.
It also allows for disabling the built in DB based profiling, which
will be useful when using an external target to not waste DB storage.
Support use of a token for access to pluginfile.php when rewriting text
content.
This is primarily intended for notifications where the user is unlikely
to be logged into Moodle when receiving the notification.
Previously the test was assuming that the user last ping, when
accessing to a chat should match the first (enter) system message
sent to the chat. And that's ok 99% of times but, if seconds advance
between the creation of the chat_users record and the chat_messages
one, then they don't match.
So now, the assumption is not used anymore and the expectation
is the timestamp of that first (enter) system message, explicitly.
Before the patch, queries like:
SELECT 1 FROM dual UNION SELECT 2 FROM dual
were failing badly, with everything but the first numeric element
being ignored by the optimization.
So, being conservative, now we reduce the query being analysed,
ignoring any subquery, inline view (anything within parenthesis
in general) and, in the remaining query, if a boolean query (UNION,
MINUS, INTERSECT...) is found, we don't apply any optimization.