31180 Commits

Author SHA1 Message Date
Jun Pataleta
88495c2f4b Merge branch 'MDL-75576' of https://github.com/timhunt/moodle 2023-05-16 10:02:13 +08:00
Tim Hunt
60dbaa0065 MDL-75576 quiz/question statistics: don't expire by time
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.
2023-05-15 10:01:27 +01:00
Andrew Nicols
9d8e8d5c5c
Merge branch 'MDL-78156' of https://github.com/stronk7/moodle 2023-05-15 12:28:36 +08:00
Andrew Nicols
e657e342d4
Merge branch 'MDL-77576-master-mvp' of https://github.com/safatshahin/moodle 2023-05-15 12:16:14 +08:00
Safat
ab3c78e873 MDL-77576 core_user: Update room membership on user update
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>
2023-05-11 13:35:16 +10:00
David Woloszyn
86ab66e60a MDL-77576 core_enrol: Implement communication api
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>
2023-05-11 13:35:16 +10:00
Safat
ad5c10016a MDL-77576 core_course: Implement communication api
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>
2023-05-11 13:35:16 +10:00
Safat
9a060a6d8d MDL-77576 communication_matrix: Create Matrix plugin
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>
2023-05-11 13:35:16 +10:00
Safat
ca1e5d0beb MDL-77576 core_communication: Add core communication api
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>
2023-05-11 13:35:16 +10:00
Jake Dallimore
01cea25154
Merge branch 'MDL-75552-master' of https://github.com/sarjona/moodle 2023-05-11 11:23:14 +08:00
Jun Pataleta
ad82a95633 Merge branch 'MDL-78065-master' of https://github.com/HuongNV13/moodle 2023-05-09 22:42:42 +08:00
Andrew Nicols
bd214de282 MDL-75552 badges: move apiBase consumption to backpack
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.
2023-05-09 08:50:42 +02:00
Eloy Lafuente (stronk7)
e12c760a12 MDL-78156 groups: Make groups_get_user_groups() order deterministic
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().
2023-05-08 18:18:54 +02:00
Safat
37539dca0c MDL-77576 core: Add password unmask required field
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>
2023-05-05 14:42:43 +10:00
Huong Nguyen
ec5663f1a4 MDL-77576 core: Register a new communication plugin-type
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>
2023-05-05 14:41:30 +10:00
Huong Nguyen
163b4134df MDL-77576 core: Register new communication sub-system
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>
2023-05-05 14:41:28 +10:00
Paul Holden
2b6d7d300a
MDL-71413 user: final removal of deprecated profile field methods. 2023-05-04 14:16:05 +01:00
Jake Dallimore
3abb8c4a28 Merge branch 'MDL-78002' of https://github.com/stronk7/moodle 2023-05-04 10:07:07 +08:00
Laurent David
4a91802a44 MDL-77781 core_completion: Completion view must be deleted too
When resetting a course, completion view entries should also be
deleted

Co-authored-by: Georg Moser <georg@moser.link>
2023-05-03 14:27:54 +02:00
Jake Dallimore
4bcb6a19bf Merge branch 'MDL-77384' of https://github.com/paulholden/moodle 2023-05-03 16:51:58 +08:00
Sara Arjona
60143dff4f Merge branch 'MDL-77312' of https://github.com/paulholden/moodle 2023-05-03 09:59:12 +02:00
Sara Arjona
29301517d4 Merge branch 'MDL-78049-master' of https://github.com/PhMemmel/moodle 2023-05-03 09:45:12 +02:00
Jake Dallimore
d2b655cbf2 Merge branch 'MDL-78052-master' of https://github.com/sarjona/moodle 2023-05-03 12:06:33 +08:00
Sara Arjona
29102c91b9 Merge branch 'MDL-77858' of https://github.com/paulholden/moodle 2023-05-02 16:49:43 +02:00
Ilya Tregubov
a7c42e69f4 Merge branch 'MDL-78025' of https://github.com/timhunt/moodle 2023-05-02 11:42:45 +08:00
Huong Nguyen
3ac2f99ca3 MDL-78065 tiny_link: Fix cannot create link for selection text 2023-05-02 10:23:07 +07:00
Eloy Lafuente (stronk7)
e4eb21e0ea MDL-78002 phpunit: Ensure that all uses of psr streams are closed
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.
2023-04-29 23:05:06 +02:00
Eloy Lafuente (stronk7)
2b61e95a69 MDL-78002 moodlenet: Always close the request stream explicitly
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.
2023-04-29 20:33:57 +02:00
Sara Arjona
46190f1b05 MDL-78052 theme: Update FontAwesome to 6.4.0
This version also fixes a regression in 6.3.0 where a number of
icons weren't centered properly in their viewboxes.
2023-04-27 12:52:01 +02:00
Philipp Memmel
31bad4ffcd MDL-78049 core_external: Run test_all_external_info in separate process 2023-04-27 08:27:07 +02:00
Tim Hunt
35695831ff MDL-78025 questions: improve the comment on question_references.version 2023-04-26 15:29:39 +01:00
Tim Hunt
6a4341549d MDL-78025 questions: fix PHPdoc on question_require_capability_on 2023-04-26 15:29:39 +01:00
Tim Hunt
25596a50e5 MDL-78025 questions: questions_in_use should check question_references
This avoids the needs for plugins to do separate queries, which is
easier for them, and better performing.
2023-04-26 15:29:38 +01:00
Tim Hunt
37e8115d68 MDL-78025 question: move hiding logic into question_delete_question
This logic belongs in the API, so it is applied consistently.

Also this avoids calling the expensive function questions_in_use
twice per question.
2023-04-26 10:49:32 +01:00
Ilya Tregubov
dd4a990fe0 Merge branch 'master_MDL-76929' of https://github.com/mattporritt/moodle 2023-04-26 09:27:58 +08:00
Sara Arjona
49d013efd6 Merge branch 'MDL-77313' of https://github.com/paulholden/moodle 2023-04-25 15:18:26 +02:00
Paul Holden
b495ba0cec
Merge branch 'MDL-78007-master' of https://github.com/HuongNV13/moodle 2023-04-25 12:36:07 +01:00
Paul Holden
de3d17ea93
MDL-77384 check: clarify statistics check name. 2023-04-25 09:04:29 +01:00
Paul Holden
c5c9185801
MDL-77312 files: exclude drafts when determining license usage. 2023-04-24 11:07:32 +01:00
Paul Holden
1dbeca84f6
MDL-77313 restore: re-add field to indicate course/category search.
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.
2023-04-24 11:04:20 +01:00
Paul Holden
8a6065f5fc
MDL-77858 javascript: correct core/notification exception imports. 2023-04-24 10:44:07 +01:00
Huong Nguyen
1d4c1d9c65 MDL-78007 tiny_media: Fix wrong condition for the Tiny Media
Including in this commit:
 - Switched to Tiny editor in manually_mark_question.feature
2023-04-24 15:53:41 +07:00
Jun Pataleta
9095bb0ef9 MDL-78000 upgrade: add the 4.2.0 separation line to all upgrade scripts 2023-04-22 23:17:50 +08:00
Jun Pataleta
8dd488cb5b Merge branch 'MDL-77989-master' of https://github.com/andrewnicols/moodle 2023-04-21 13:44:51 +08:00
Andrew Nicols
1a53cbbae4 MDL-77989 testing: Add test file isolation helper
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.
2023-04-21 13:33:56 +08:00
Ilya Tregubov
04bf346ca3 Merge branch 'MDL-77903' of https://github.com/Chocolate-lightning/moodle 2023-04-21 13:18:14 +08:00
Jun Pataleta
19022cd940 Merge branch 'MDL-77927-master' of https://github.com/stevandoMoodle/moodle 2023-04-21 13:11:43 +08:00
Mathew May
f9c6548189 MDL-77903 gradereport_grader: Keyboard accessibility 2023-04-21 13:09:25 +08:00
Jun Pataleta
4bf6bb37c2 MDL-77927 core: Delete other mod_assignment subplugins
Non-core mod_assignment subplugin data may still be present on the
database. We need to make sure to remove these too during upgrade.
2023-04-21 12:32:10 +08:00
Jun Pataleta
0720524804 MDL-77927 core: mod_assignment subplugins environment check 2023-04-21 12:32:06 +08:00