6520 Commits

Author SHA1 Message Date
Jun Pataleta
928ea71887
Merge branch 'MDL-78397' of https://github.com/paulholden/moodle 2023-08-25 11:52:57 +08:00
Andrew Nicols
9bacc7efd8
Merge branch 'MDL-79063-master' of https://github.com/junpataleta/moodle 2023-08-25 00:11:05 +08:00
Jun Pataleta
932306b447
Merge branch 'MDL-77917-master' of https://github.com/andrewnicols/moodle 2023-08-24 23:39:10 +08:00
Andrew Nicols
5a44292a05
Merge branch 'MDL-78291-master' of https://github.com/ferranrecio/moodle 2023-08-24 14:39:37 +08:00
Andrew Nicols
914686bc5e
MDL-77917 communication_matrix: Support server API versions
This commit brings in support for multiple versions of the Matrix
specification.

A Matrix server is compromised of a number of individually versioned API
endpoints, for example:

    /_matrix/client/v3/createRoom
    /_matrix/client/v3/rooms/:roomid/joined_members
    /_matrix/media/v1/create

The combination of a large number of these individually versioned
endpoints forms a Matrix Specification version.

For example:

* the /_matrix/media/v1/create endpoint was created for version 1.7 of the
  specification, and does not exist in earlier versions.
* in the future a new behaviour or parameter may be created for the
  `createRoom` endpoint and a new endpoint created at:

    /_matrix/client/v4/createRoom

A single server can support multiple versions of the Matrix
specification. The server declares the versions of the specification
that it supports using a non-versioned endpoint at
`/_matrix/client/versions`.

As a Matrix client, Moodle should:
* query the server version endpoint
* determine the combination of mutually supported Matrix specification
  versions
* create a client instance of the highest-supported version of the
  specification.

For example, if Moodle (Matrix client) and a remote server have the
following support:

```
Moodle:      1.1  1.2  1.3  1.4  1.5  1.6  1.7
Server:  r0  1.1  1.2  1.3  1.4  1.5  1.6
```

The versions in common are 1.1 through 1.6, and version 1.6 would be
chosen.

To avoid duplication and allow for support of future features more
easily, the Moodle client is written as:
* a set of classes named `v1p1` through `v1p7` (currently) which extend
  the `matrix_client` abstract class; and
* a set if PHP traits which provide the implementation for individual
  versioned endpoints.

Each client version then imports any relevant traits which are present
in that version of the Matrix Specification. For example versions 1.1 to
1.6 do _not_ have the `/_matrix/media/v1/create` endpoint so they do not
import this trait. This trait was introduced in version 1.7, so the
trait is included from that version onwards.

In the future, if an endpoint is created which conflicts with an
existing endpoint, then it would be easy to create a new client version
which uses the existing common traits, and adds the new trait.

Each endpoint is written using a `command` class which extends the
Guzzle implementation of the PSR-7 Request interface. This command
class adds support for easy creation of:
* path parameters within the URI
* query parameters
* body parameters

This is done to avoid complex patterns of Request creation which are
repeated for every client endpoint.
2023-08-24 11:59:25 +08:00
Huong Nguyen
fd9dc16f85
Merge branch 'MDL-78934' of https://github.com/stronk7/moodle 2023-08-24 10:24:40 +07:00
Ilya Tregubov
3a761fd56e
Merge branch 'MDL-76295' of https://github.com/paulholden/moodle 2023-08-24 09:54:21 +08:00
Ilya Tregubov
4bed4ea8f3
Merge branch 'MDL-71212-collapse-expand-all-sections-in-course-index-drawer' of https://github.com/stopfstedt/moodle 2023-08-24 09:22:23 +08:00
Paul Holden
33a63ca639
MDL-76295 reportbuilder: implement default datasource sorting.
Update all existing report sources to use the new default sorting
API from 064eccd4, updating existing tests to assert behaviour.
2023-08-23 15:32:50 +01:00
Sara Arjona
31b0a9cfc7
Merge branch 'MDL-76902' of https://github.com/paulholden/moodle 2023-08-23 22:15:41 +08:00
Paul Holden
db5c663fb9
MDL-76902 course: create categories datasource for custom reporting.
New report source based on the course category entity, joined to the
course, cohort and role assignment/user entities to provide data for
the reportbuilder editor.
2023-08-23 13:42:27 +01:00
Paul Holden
8ca8c92f3c
MDL-78397 course: update module name using API after duplicating.
This ensures that various ancillary tasks are also performed (such
as ensuring the gradebook item name matches).
2023-08-23 09:14:04 +01:00
Sara Arjona
7430208d56
MDL-78884 files: Deprecate size parameter for icons
The parameter $size of the following functions has been deprecated and is not used any more:
  - file_extension_icon
  - file_file_icon
  - file_folder_icon
  - file_mimetype_icon
  - mimeinfo_from_type
  - url_guess_icon

That way, the sized icons (xxxxxxx-yyy.png) can be removed and replaced by SVG, to make it easier
to keep them updated because once they are replaced, there will only be one single file for each
MIME icon.
2023-08-23 07:30:16 +02:00
Ferran Recio
174125dabc MDL-78291 core_courseformat: fix cm visibility behats 2023-08-22 09:39:13 +02:00
Ferran Recio
ee2e084e89 MDL-78291 core_courseformat: availability in activity action menu 2023-08-22 09:39:13 +02:00
Paul Holden
f9bf57c269
Merge branch 'MDL-79071-master' of https://github.com/junpataleta/moodle 2023-08-21 15:32:42 +01:00
Stefan Topfstedt
7b04638c52 MDL-71212 core_course: adds controls to the course index drawer. 2023-08-18 11:00:55 -07:00
Eloy Lafuente (stronk7)
731f64226d
MDL-78934 behat: Replace all the rest of goutte by browserkit
Basically all them are comments.

Only remaining occurrence remaining is
in composer.lock file, because friends-of-behat/mink-extension
still has the old goutte as dev requirement, but that doesn't
affect us at all (no goutte is installed anymore, see the vendor
directory and/or the lock file).
2023-08-18 13:59:17 +02:00
Jun Pataleta
ec02ec88f3
MDL-79071 course: An empty alt text is needed for decorative images 2023-08-18 17:03:05 +08:00
Jun Pataleta
13a8dff553
MDL-79063 course: Use .text-body for 'disabled' elements in move modal
Using the .disabled class for the course module or section that is
being moved does not have sufficient colour contrast against the
background, especially when it is being highlighted.
So instead of using .disabled, just use Bootstrap classes .text-body
and .font-italic which renders the cm/section to be moved in normal
font colour while preserving its italicised look.
2023-08-18 16:28:45 +08:00
Amaia Anabitarte
baecc57095 MDL-78531 administration: New default course settings section 2023-08-18 08:49:09 +02:00
Jun Pataleta
04ee9570ac
Merge branch 'MDL-75762-master' of https://github.com/laurentdavid/moodle 2023-08-17 09:20:12 +02:00
Jun Pataleta
8a75ff0950
Merge branch 'MDL-78938-master' of https://github.com/andrewnicols/moodle 2023-08-17 09:13:20 +02:00
Andrew Nicols
cff6c75289
Merge branch 'MDL-71331' of https://github.com/paulholden/moodle 2023-08-17 09:12:36 +02:00
Sara Arjona
e914149b88
Merge branch 'MDL-78678-master' of https://github.com/aanabit/moodle 2023-08-17 09:10:52 +02:00
Sara Arjona
570cd5748b
Merge branch 'MDL-78666-master' of https://github.com/roland04/moodle 2023-08-17 09:09:16 +02:00
Sara Arjona
871e82c197
Merge branch 'MDL-78203-master' of https://github.com/ferranrecio/moodle 2023-08-17 09:09:16 +02:00
Sara Arjona
a1f108a996
Merge branch 'MDL-78761' of https://github.com/paulholden/moodle 2023-08-17 09:09:15 +02:00
Andrew Nicols
83050a2fb0
MDL-78938 course: Wrap manual completion toggle in pending
This commit makes two changes to reduce random failures in behat:
- wrap the toggling of manually configured completion in pendingjs
- set the loading spinner content without forcing the completion toggle
  ws to wait for the loading spinner to update.
2023-08-16 20:01:29 +08:00
Laurent David
310122010e MDL-75762 core_courseformat: Fix course menu when back
* When we select an activity in a course and go to its page, the
back button recovers the scroll position correctly but should
also recover the course menu position

Note: for now the menu position is the topmost item in the page
2023-08-14 07:23:12 +02:00
Laurent David
cced0e77f6 MDL-75762 core_courseformat: Use page scroll instead of section
* The scroll value is not restored when we navigate into activities as only a
section of the page was scrolled.
* Remove the overflow for the page section so the full page is scrolled
* Restore side menu navigation synchronisation
2023-08-14 07:22:06 +02:00
Ferran Recio
fc37e6ca92 MDL-78203 lib: document new components 2023-08-11 17:24:18 +02:00
Ferran Recio
cb541081bd MDL-78203 core_courseformat: groupmode action menu item 2023-08-11 17:24:18 +02:00
Amaia Anabitarte
269f64b8bf MDL-78678 course: Highlight all types of modules when scrolling 2023-08-11 11:30:10 +02:00
Jun Pataleta
e99eacb4f6
MDL-78528 course: Use h2 to avoid skipped headings
Use h2 headings instead of h3 for the activity headings to avoid having
skipped headings on the Default activity completion page.
2023-08-10 18:32:22 +07:00
Jun Pataleta
44787c35bc
Merge branch 'MDL-78528-master' of https://github.com/sarjona/moodle 2023-08-10 18:32:22 +07:00
Sara Arjona
769e915a8f
Merge branch 'MDL-76123' of https://github.com/paulholden/moodle 2023-08-10 18:31:51 +07:00
Mikel Martín
fd48f18ef9 MDL-78666 core_courseformat: Add empty state in conditions dialog 2023-08-10 12:52:07 +02:00
Sara Arjona
a2db0747cc
MDL-78528 course: Deprecate unused methods
The method core_course_bulk_activity_completion_renderer::edit_default_completion()
has been deprecated and will be removed in Moodle 4.7.
2023-08-09 09:12:44 +02:00
Sara Arjona
2e41286ad3
MDL-78528 course: Display all forms in default activity completion page
This commit displays all the module forms together in the default
activity completion page:

- The checkboxes have been removed. Now the activity names are
displayed as accordions.
- Module names have been changed from plural to singular.
- The activity completion form is displayed below each module name,
when the chevron icon is expanded. The cancel button is not displayed.
- The CSS has been updated to meet the prototype styling.
2023-08-09 09:12:44 +02:00
Sara Arjona
274db7f747
MDL-78528 completion: Add suffix support to avoid duplicated ids 2023-08-09 09:12:43 +02:00
Huong Nguyen
cb1d6106c6
Merge branch 'MDL-78286-master' of https://github.com/roland04/moodle 2023-08-08 21:34:32 +07:00
Mikel Martín
848a90d1e5 MDL-78286 core_courseformat: Add direct link to edit completion settings 2023-08-08 16:22:55 +02:00
Paul Holden
6d9a45f388
MDL-76123 course: multilingual module icon alt text attribute. 2023-08-08 13:44:31 +01:00
Sara Arjona
565d6a45a3
Merge branch 'MDL-78879' of https://github.com/paulholden/moodle 2023-08-08 13:04:30 +02:00
Jun Pataleta
51e86626d1
Merge branch 'MDL-77174-master' of https://github.com/andrewnicols/moodle 2023-08-08 15:15:32 +08:00
Huong Nguyen
aeeb1653c0
Merge branch 'MDL-78553-master' of https://github.com/davewoloszyn/moodle 2023-08-03 09:44:24 +07:00
David Woloszyn
317251a978 MDL-78553 core_communication: Move settings to their own page 2023-08-03 12:36:04 +10:00
Ilya Tregubov
5fdb8446fd
Merge branch 'MDL-78755' of https://github.com/paulholden/moodle 2023-08-03 09:30:28 +08:00
Paul Holden
34ab8329e7
MDL-78755 course: default participant source conditions and sorting.
Ensure the default state of the report source shows only active user
enrolments, and implements sorting for consistency.
2023-08-02 14:49:26 +01:00