74 Commits

Author SHA1 Message Date
David Woloszyn
9658ba6710 MDL-81951 communication_matrix: Fix suspended users ignored bug 2024-08-07 04:12:45 +00:00
David Woloszyn
90c1a7613c MDL-81951 communication_matrix: New trait for power levels
A more reliable way of obtaining room power levels is now used in the
new trait get_room_power_levels_v3. This makes
get_room_powerlevels_from_sync_v3 less needed, but not necessarily
redundant. The names of the containing methods have been adjusted to
make better sense of which trait they belong to.
2024-08-07 04:12:45 +00:00
Andrew Nicols
d96e7816d1
Merge branch 'MDL-81932-main' of https://github.com/safatshahin/moodle 2024-07-18 11:29:33 +08:00
Stevani Andolo
db0d4ab677 MDL-80947 communication_customlink: Check before customlink update 2024-07-08 07:19:30 +08:00
Safat
efc7c6d872 MDL-81932 communication_customlink: Fix behat tests 2024-07-04 17:09:38 +10:00
Safat
c9887d8e59 MDL-81932 communication_matrix: Fix behat tests 2024-07-04 17:09:38 +10:00
Huong Nguyen
bd9631bda5
Merge branch 'MDL-81125-main-alt' of https://github.com/andrewnicols/moodle 2024-05-21 15:33:09 +07:00
Andrew Nicols
0964cd5b69
MDL-81125 core: Update upgrade.txt files to document new upgrade notes 2024-05-20 22:26:45 +08:00
Stevani Andolo
e5c3199dff MDL-80583 communication_matrix: Ignore unreachable matrix server 2024-05-20 15:09:54 +08:00
David Woloszyn
74a6ed82b3 MDL-80849 communication_matrix: Prevent numeric usernames 2024-04-29 10:30:29 +10:00
Jun Pataleta
78e5814a0f
MDL-81616 upgrade: add the 4.4.0 separation line to all upgrade scripts 2024-04-20 21:01:04 +08:00
Jun Pataleta
a180dba314
MDL-81549 versions: bump all versions and requires near release 2024-04-17 00:03:29 +08:00
Daniel Ziegenberg
08027e408c
MDL-81281 phpunit: assertObjectHasAttribute is deprecated
To be integrated as part of MDL-81266

When running PHPUnit 9.6 we get the following deprecation warnings:
"assertObjectHasAttribute() is deprecated and will be removed in PHPUnit
10. Refactor your test to use assertObjectHasProperty() instead."

So we replace all instances of assertObjectHasAttribute with
assertObjectHasProperty.

PHPUnit justifies the change with:
> PHPUnit currently refers to "fields" (see above) as "attributes". This
> is (or will become) confusing considering the introduction of
> attributes in PHP 8 and their support in PHPUnit.  PHPUnit will be
> changed to use the term "property" instead of "attribute" where "field"
> is meant.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2024-03-25 16:21:45 +01:00
Eloy Lafuente (stronk7)
361dfe8145
MDL-75952 general: Since php81, refection->setAccessible() is no-op
Refereces:
- https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
- https://www.php.net/manual/en/reflectionproperty.setaccessible.php
- https://www.php.net/manual/en/reflectionmethod.setaccessible.php

As of PHP 8.1.0, calling this method has no effect; all methods are
invokable by default. So, let's remove all uses from core, they are
no-op.
2024-03-10 21:15:00 +01:00
David Woloszyn
aad5b7ee5f MDL-80832 communication_matrix: Fix regression caused by MDL-80403 2024-02-07 14:09:39 +11:00
Huong Nguyen
f090dc6236 Merge branch 'MDL-80403-main' of https://github.com/davewoloszyn/moodle 2024-01-18 10:24:51 +07:00
David Woloszyn
edffece53c MDL-80403 communication_matrix: Fixed convert power levels to array
The curent patch revealed a bug inside set_matrix_power_levels
where returned user power levels contained an array of objects.
Other methods were failing and giving incorrect responses
as they were expecting arrays.
2023-12-19 12:57:20 +11:00
Safat
e7586331a2 MDL-78689 communication_matrix: Add support for sync provider feature 2023-12-19 11:18:27 +11:00
David Woloszyn
e52a4ef6e5 MDL-80403 communication_matrix: Update membership checks membership 2023-12-14 14:48:48 +11:00
Helen Foster
de4f02d809 MDL-80221 lang: Import fixed English strings (en_fix) 2023-11-22 22:48:47 +01:00
Paul Holden
fd3ae99540
MDL-79728 communication_matrix: deprecate refresh token config strings. 2023-11-06 13:37:11 +00:00
David Woloszyn
4ecea7c09f MDL-79460 communication_matrix: Re-enabled tests that use new sync route 2023-10-31 09:31:54 +07:00
Jun Pataleta
7fed0da5a3
Merge branch 'MDL-79614-master' of https://github.com/safatshahin/moodle 2023-10-11 11:04:09 +08:00
Jun Pataleta
9beff03a96
MDL-79626 upgrade: add the 4.3.0 separation line to all upgrade scripts 2023-10-10 10:44:17 +08:00
Safat
f3dba5b195 MDL-79614 communication_matrix: Add missing call for sync flag 2023-10-06 17:46:08 +11:00
Michael Hawkins
329a9e97d2
MDL-79573 communication: Support new records for each provider type
Previously, we replaced information in the same communication record
in the database, now there will be a unique record per provider.
This ensures when switching between different providers, the correct
actions such as room member management can be actioned for the correct
provider.

This also includes the required updates for the instances to no
longer assume a provider must be enabled to be relevant. Specifying a
provider is optional to fetch a specific provider instance, the default
will use the currently enabled provider.
2023-10-06 09:54:32 +08:00
Huong Nguyen
0d6204d29c
Merge branch 'MDL-79581-master' of https://github.com/andrewnicols/moodle 2023-10-05 11:37:09 +07:00
Andrew Nicols
5ee0a5f760
MDL-79581 core_communication: Linting fixes 2023-10-04 20:37:58 +08:00
Andrew Nicols
166d137407
MDL-79581 communication_matrix: Use the contextid from the API 2023-10-04 20:37:57 +08:00
Andrew Nicols
99c1543aa8
MDL-79581 communication: Context is a mandatory field
The API was incorrectly assuming that all uses of the API were for a
course, and that the instanceid of the communication instance was a
course id. These assumptions are both entirely wrong.

The API is intended to support a range of uses including use at the
site, user, and activity levels.

Furthermore, if a group were to be used, then the instanceid should be
of that group's id, and therefore the contextid would need to be fetched
or that group's course instead.

The only solution here is to add a new contextid field to the table, and
implement it all parts of the API.
2023-10-04 20:37:57 +08:00
Jun Pataleta
94bc2cd38b
MDL-79551 versions: bump all versions and requires near release 2023-10-04 13:57:17 +08:00
Sara Arjona
f1721161c3
Merge branch 'MDL-79490' of https://github.com/paulholden/moodle 2023-09-28 10:46:17 +02:00
Stevani Andolo
a78921005f
MDL-78750 communication_matrix: Dynamic settings 2023-09-28 07:51:35 +02:00
Andrew Nicols
9a4a2df0e4
MDL-78750 communication: Fix missing test properties 2023-09-27 14:12:53 +08:00
Andrew Nicols
9739399741
Merge branch 'MDL-78750-master-int' of https://github.com/stevandoMoodle/moodle 2023-09-27 14:09:13 +08:00
meirzamoodle
6246db3d30 MDL-79100 core_communication: Update communication-related lang strings 2023-09-26 12:12:38 +07:00
Stevani Andolo
d644c3d89d MDL-78750 communication_matrix: Dynamic settings 2023-09-26 09:55:54 +08:00
Paul Holden
acc510ced7
MDL-79490 communication_matrix: include required test library. 2023-09-25 18:31:52 +01:00
Huong Nguyen
9a517653b1
MDL-78129 communication_matrix: Remove Behat test
This change requires a change in the mock server which we don't have
    time to do before Beta. This will be done in the coming days and this
    commit content reverted.
This one will be re-introduced in MDL-79460
2023-09-22 13:17:21 +07:00
Huong Nguyen
436e522cd8
MDL-78129 communication_matrix: Skip Behat test
This change requires a change in the mock server which we don't have
time to do before Beta. This will be done in the coming days and this
commit content reverted.
2023-09-22 11:42:28 +07:00
Andrew Nicols
84cfc8beeb
MDL-78129 communication: Fix all phpcs isuses
This is a brand new subsystem, plugin-type, and plugin. They are written
from the ground up by us. They should not contain any coding style
violations.
2023-09-22 11:08:04 +08:00
Andrew Nicols
2a096dc5ad
MDL-78129 communication_matrix: Skip unit test
This change requires a change in the mock server which we don't have
time to do before Beta. This will be done in the coming days and this
commit content reverted.
2023-09-22 10:51:50 +08:00
Andrew Nicols
07e0094f8c
MDL-78129 communication_matrix: Persist any user with a non-moodle power level 2023-09-22 10:44:04 +08:00
Andrew Nicols
01a3461bbb
MDL-78129 communication_matrix: Simplify power level setting
This change introduces a new API call to fetch the current power levels.

The result of this are used to fetch current admin users so as not to
remove them.

The update of existing users is simplified to only set users who do not
have the default level.
2023-09-22 10:44:04 +08:00
Andrew Nicols
eb991355fe
MDL-78129 communication_matrix: Stop marking users as synced
No need to sync users for role changes.

Power level changes do not need to happen after being added to a room.
They can happen in any order and persist after a user is removed.
2023-09-22 10:44:04 +08:00
Andrew Nicols
01679678cf
MDL-78129 communication_matrix: Coding style fixes 2023-09-22 10:44:03 +08:00
Andrew Nicols
2dc30d662e
MDL-78129 communication_matrix: Tidy up API calls 2023-09-22 10:44:03 +08:00
Safat
e9743431a6
MDL-78129 communication_matrix: Add support for matrix power level 2023-09-22 10:44:02 +08:00
David Woloszyn
24cdc908ba MDL-78798 core_communication: Corrected outdated versions and references 2023-09-11 11:16:22 +10:00
Huong Nguyen
bd372a63d2
Merge branch 'MDL-78619-master' of https://github.com/mickhawkins/moodle 2023-09-07 15:19:18 +07:00