Previously, a set of calculated quiz statistics would only 'last' for
15 minutes. Then they would be considered invalid and not used.
Now, computed statistics are kept indefinitely. Instead, when a new
batch of values are computed for a particular set of settings, older numbers
for the same settings are deleted first. Therefore,
question_stats_cleanup_task is no more.
This commit implements the communication api updates
when a user is updated. It handles the room membership
when a user is suspended and deleted.
Originally implemented as MDL-76703.
Co-authored-by: David Woloszyn <david.woloszyn@moodle.com>
Co-Authored-By: Safat Shahin <safat.shahin@moodle.com>
This commit implementes the communication api for
enrolment changes for a user, or enrolment method
and triggers the communication api update.
Originally implemented MDL-76703.
Co-authored-by: David Woloszyn <david.woloszyn@moodle.com>
Co-Authored-By: Safat Shahin <safat.shahin@moodle.com>
This commit implements the core communication api in the
core course to create or update matrix roomand its members
according to course settings. This commit will add the
communicaiton room in the course so that users can access
communication room from course.
Originally implemented as MDL-76702, MDL-76705 and MDL-76703.
Co-Authored-By: David Woloszyn <david.woloszyn@moodle.com>
Co-Authored-By: Safat Shahin <safat.shahin@moodle.com>
This commit will implement a matrix communication plugin
to integrate matrix services with core communication.
Originally implemented as MDL-76701, MDL-76702, MDL-77357,
MDL-76705, MDL-77473 and MDL-76708.
Co-Authored-By: Stevani Andolo <stevani.andolo@moodle.com>
Co-Authored-By: David Woloszyn <david.woloszyn@moodle.com>
Co-Authored-By: Safat Shahin <safat.shahin@moodle.com>
This commit will implement the base api for core
communication. This will include the room creation,
room membership, room access url and all associated
api and related interfaces.
Originally implemented as MDL-76702, MDL-76703 and MDL-76705.
Co-Authored-By: David Woloszyn <david.woloszyn@moodle.com>
Co-Authored-By: Safat Shahin <safat.shahin@moodle.com>
The apiBase in .well-known/badgeconnect.json was ignored and it was
causing some failures when connecting or sending badges to an
external backpack.
For OBv2.1, it has been changed to always use the apiBase defined
in the badgeconnect.json backpack provider.
Right now the order of the groups returned by groups_get_user_groups()
is not fixed and, every DB, can return them in any order. While 99%
of times the order will be the creation one, depending of the RDBMS
decisions, they can be returned in any order.
This is specially noticeable with Oracle, but can affect to any DB.
And that makes some tests (expecting a given order) to fail.
This commit fixes the problem by making the order of the groups
deterministic, because that's the way we use to fix these problems.
Alternative is to relax the tests so only values are asserted by
using assertEqualsCanonicalizing().
The password unmask field will have the ability to
be a required field while used the required class.
Originally implemented as MDL-76701.
Co-Authored-By: Safat Shahin <safat.shahin@moodle.com>
A new communication plugin type added to core to implement
the communication provider features.
Original implemented as MDL-76699
Co-Authored-By: Huong Nguyen <huongnv13@gmail.com>
Create a new subsystem for communication and create
associated experimental settings to safely use the
new subsystem.
Originally implemented as MDL-76699.
Co-Authored-By: Huong Nguyen <huongnv13@gmail.com>
While the uses here were not causing too much problem with PHPUnit
execution in any OS, better have them explicitly closed to better
serve as reference for other, future uses anywhere in codebase.
Always that a stream is used, better we close it as soon as possible,
not relying on destructors, gc and friends.
And do it as soon as it's not needed any more. Else, only
_destruct() / shutdown / gc will, and that can be problematic
if many streams are open, or, under some environments like
Windows that consider the stream underlying files still busy,
because they have not been closed.
When the two restore forms for searching courses and categories were
converted to core templates in eb9935c9 they lost the named submit
button, which broke searching.
When we deprecate the use of a file, we often include tests which ensure
that the legacy behaviour is maintained. There are also legacy uses
in the community where people would like to use the deprecated API for a
period.
The issue that we face is that, if the deprecated file is included once,
then it will be included for all other, unrelated, tests. This means
that other tests may not detect cases where the deprecated file was
included.
We can solve these cases by running the test that performs the inclusion
in a deprecated process. This means that the inclusion is only performed
in that isolated process, and other unrelated tests do not include the
file.
However, we also then need to detect which files which are including the
file and which we do not know about.
This change introduces:
- an override to the TestCase::setInIsolation method to define a
constant when the test is running in isolation
- a new function that a file can call when it is included, to make sure
that the test process was isolated, where there is any test.