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.
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.
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.
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).
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.
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.
* 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
* 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
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.