91 Commits

Author SHA1 Message Date
Safat
f070a165e3 MDL-81595 core_communication: Fix provider switching active flag update 2024-04-18 22:21:00 +10:00
Huong Nguyen
27ada55bab
Merge branch 'MDL-81391-main' of https://github.com/davewoloszyn/moodle 2024-04-10 11:30:51 +07:00
Huong Nguyen
e168c1d089
MDL-81333 core_communication: Coding style fixups
- Remove superflous coverage information
 - Use language string for group room name format
2024-04-09 10:24:09 +07:00
David Woloszyn
07ffa049a9 MDL-81391 core_communication: Check processor before using its methods 2024-04-08 17:08:05 +10:00
David Woloszyn
e169cf6188 MDL-81333 core_communication: Group room name formatting 2024-04-04 13:06:51 +11:00
Huong Nguyen
b283ca354e
Merge branch 'MDL-78551-main' of https://github.com/safatshahin/moodle 2024-03-26 10:08:06 +07:00
Safat
abed8cddbf MDL-78551 core_communication: Add hook listeners 2024-03-26 13:53:39 +11: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
Safat
a946b09410 MDL-78689 core_communication: Add 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
Huong Nguyen
73769bdd4f
Merge branch 'MDL-79573-master-int' of https://github.com/mickhawkins/moodle 2023-10-06 13:04:36 +07:00
Michael Hawkins
acc48db386
MDL-79573 communication: Load form data for the correct provider fields 2023-10-06 11:10:09 +08:00
Ilya Tregubov
2b4041f93c
Merge branch 'MDL-79586-master' of https://github.com/safatshahin/moodle 2023-10-06 10:25:39 +08: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
Safat
75cae1dede MDL-79586 communication: Restrict the use of non-configured providers 2023-10-05 16:53:50 +11: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
369fee885f
MDL-78750 communication_matrix: Fixed available providers 2023-09-28 09:13:22 +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
Huong Nguyen
bd323aede7
Merge branch 'MDL-78129-master' of https://github.com/andrewnicols/moodle 2023-09-22 10:29:54 +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