Communication: Difference between revisions

From MoodleDocs
mNo edit summary
(updated this page thanks Safat and others in MDL-80217)
Line 1: Line 1:
{{New features}}
{{Communication}}


If the [[Experimental settings|experimental setting]] 'Enable communication providers' (enablecommunicationsubsystem) is checked, admins can offer a way for teachers and learners to communicate within the courses.
{{New features}}If the [[Experimental settings|experimental setting]] 'Enable communication providers' (enablecommunicationsubsystem) is checked, admins can offer a way for teachers and learners to communicate within the courses.


Currently, there are two communication providers available:
Currently, there are two communication providers available:
 
#[[Matrix]] - This creates a Matrix Element room accessible from a Moodle course and with related user management.
#[https://en.wikipedia.org/wiki/Matrix_(protocol) Matrix] - Creates Matrix Element room accessible from a Moodle course, including user management.
#[[Custom link]] - This offers a field to add a URL to an existing service (e.g. an existing Matrix room, Telegram or Google Meet).
#Custom link - URL only to existing service (e.g. an existing Matrix room, Telegram or Google Meet).




Line 14: Line 13:
Teachers can access course communication options by navigating to a course and selecting ''More > Communication''. To enable communication for your course, ensure your admin has enabled and configured the feature (see 'Site administration settings' below).
Teachers can access course communication options by navigating to a course and selecting ''More > Communication''. To enable communication for your course, ensure your admin has enabled and configured the feature (see 'Site administration settings' below).


=== Providers===
The different communication integrations are known as providers. Each provider can have their own settings and can be modified in a course from ''Course navigation > More > Communication.''
The different communication integrations are known as providers. Each provider can have their own settings and can be modified in a course from ''Course navigation > More > Communication.''
[[File:course_provider.png|alt=Course communication providers|700x700px]]
[[File:course_provider.png|alt=Course communication providers|700x700px]]


===Matrix===
After saving the changes, a Communication room will be automatically created when the ad-hoc tasks are run.
If the admin has configured your site to use a Matrix server, the option to select Matrix as a provider will be available. Choosing Matrix will prompt you to enter in a room name and room topic. Some values are provider specific and will vary between providers:
 
=====Room name=====
Providing a room name is option. If no room name is entered the course name will be used.
 
===== Room topic=====
The room topic is also optional and effectively works as a description for the room. As explained above, Matrix has its own set of individual settings and room topic is one of them.
 
[[File:MatrixProvider.png|alt=Course communication settings for Matrix|700x700px]]
 
===Saving your changes===
After saving the changes, a Matrix room will be automatically created when the ad-hoc tasks are run.


Any changes to Matrix's communication settings will not be immediate. Changes are also handled via ad-hoc tasks and will be determined by how frequently these tasks are run on the site.
Any changes to communication settings will not be immediate. Changes are also handled via ad-hoc tasks and will be determined by how frequently these tasks are run on the site.


=====Pending status=====
=====Pending status=====
When your Matrix room has been saved, but the ad-hoc task has not yet completed, you will see a notification indicating that your room will be ready soon.
When your Communication room has been saved, but the ad-hoc task has not yet completed, you will see a notification indicating that your room will be ready soon.


[[File:Room creation pending.png|alt=Room creation pending|700x700px]]
[[File:Room creation pending.png|alt=Room creation pending|700x700px]]


=====Ready status=====
=====Ready status=====
When viewing the course page after the ad-hoc task has run, you should see a notification indicating that the Matrix room is now ready. To access the newly created room, look for the communication icon towards the bottom of the page (refer to 'Room/service access' section below for more details).
When viewing the course page after the ad-hoc task has run, you should see a notification indicating that the Communication room is now ready. To access the newly created room, look for the communication icon towards the bottom of the page (refer to 'Room/service access' section below for more details).


[[File:Room creation done.png|alt=Room creation complete|border|700x700px]]
[[File:Room creation done.png|alt=Room creation complete|border|700x700px]]
===Room moderators===
Room moderators will have elevated privileges in Matrix rooms. There is a hierarchy that is determined by the roles assigned in Moodle. In order of privilege, they are:
#Admin
#Managers, teachers, non-editing teachers
#Students
Teachers, non-editing teachers and managers will automatically have the moderator capability in the Matrix room. This role (communication/matrix:moderator) can be changed in the ''Define role'' settings in Site administration.
===Custom link===
If you have an existing communication provider that is not connected to Moodle LMS, the 'Custom link' can be set as the provider. Simply provide a URL in the 'Custom link URL' field and save your changes. Use the room access icon to access your communication room (see Room/service access below for more details).
Please note, the 'Custom link' provider does not intend to have any integration with the provider. This allows everyone to use the communication provider regardless of the plugin being available in Moodle LMS.
[[File:CustomLink.png|alt=Custom link settings]]


===Room/service access===
===Room/service access===
Line 78: Line 47:


[[File:Manage_communication_providers.png|alt=Managing communication providers|700x700px]]
[[File:Manage_communication_providers.png|alt=Managing communication providers|700x700px]]
===Configuring Matrix===
The Matrix communication provider allows Moodle LMS courses to have an associated room in a [https://element.io/ Matrix Element] instance. It also provides user management by synchronising participants in a course with the associated Matrix Element room.
Currently, the integration supports the [https://github.com/matrix-org/synapse Synapse] homeserver for setting up the provider service, and the [https://element.io/ Matrix Element] messaging client for accessing the room. To configure your Moodle LMS instance with Matrix you will need the following:
* URL of the Synapse homeserver
* API access token for a Synapse admin user
* URL of an Element web server to use
[[File:HomeserverURL.png|alt=Configuring Matrix provider|700x700px]]
To configure your Moodle LMS instance to use the Matrix provider:
#Enter the URL of your Synapse server in the 'Homeserver URL' field (matrixhomeserverurl)
#Enter the Synapse server API Access token in the 'Access token' field (matrixaccesstoken). See 'Synapse API access token generation' below.
#Enter the URL of the Element web server in the 'Element web URL' field (matrixelementurl)
#Click Save changes.
====Synapse API access token generation====
To generate an API access token for Moodle LMS, you need access to a terminal and use an existing username and password for the admin of your Synapse server instance.
* The username will need to be formatted as follows: '''@<username_on_homeserver>:<homeserver_domain>'''
* Password is the admin user's regular password.
To generate an access token to be used with Moodle LMS, enter the following into a terminal:<pre>
curl -XPOST -d '{"type":"m.login.password", "user":"@admin:synapse", "password":"secretpass"}' "https://synapse:8008/_matrix/client/r0/login"
</pre>
The returned value will look something like this:<pre>
{"user_id":"@admin:synapse","access_token":"syt_YWRtaW4_OQNsHwWoObhseRAWmUCs_2T29if","home_server":"synapse","device_id":"JPAIBCQCSB"}
</pre>
The ''access_token'' field is the API access token to use in the Moodle LMS Matrix communication provider settings.
==Data flow between Moodle LMS and Matrix==
*The current implementation uses the Moodle Course Communication settings to set the room name and room topic for the Matrix room. If those fields are empty, the course name is used as the room name and the room topic is kept empty.
*Matrix usernames are generated using Moodle usernames and are necessary for adding Matrix users to a room.
*Authentication to Matrix is handled from Moodle LMS.
*Users are only created in Matrix if they have not been created yet, or no mapping to that user is recorded with Moodle LMS.
The following diagram shows the flow of data between Moodle LMS and Matrix.
[[File:Communication_data_flow_diagram.png|alt=Communication data flow diagram]]


==Capabilities==
==Capabilities==
*[[Capabilities/communication/matrix:moderator| Matrix moderator]].
*[[Capabilities/moodle/course:configurecoursecommunication| Configure course communication settings]].
*[[Capabilities/moodle/course:configurecoursecommunication| Configure course communication settings]].


*[[es:Comunicación]]
*[[es:Comunicación]]
*[[de:Kommunikation]]
*[[de:Kommunikation]]

Revision as of 11:33, 19 February 2024


New feature
in Moodle 4.3!
If the experimental setting 'Enable communication providers' (enablecommunicationsubsystem) is checked, admins can offer a way for teachers and learners to communicate within the courses.

Currently, there are two communication providers available:

  1. Matrix - This creates a Matrix Element room accessible from a Moodle course and with related user management.
  2. Custom link - This offers a field to add a URL to an existing service (e.g. an existing Matrix room, Telegram or Google Meet).


Course communication

Course settings

Teachers can access course communication options by navigating to a course and selecting More > Communication. To enable communication for your course, ensure your admin has enabled and configured the feature (see 'Site administration settings' below).

The different communication integrations are known as providers. Each provider can have their own settings and can be modified in a course from Course navigation > More > Communication. Course communication providers

After saving the changes, a Communication room will be automatically created when the ad-hoc tasks are run.

Any changes to communication settings will not be immediate. Changes are also handled via ad-hoc tasks and will be determined by how frequently these tasks are run on the site.

Pending status

When your Communication room has been saved, but the ad-hoc task has not yet completed, you will see a notification indicating that your room will be ready soon.

Room creation pending

Ready status

When viewing the course page after the ad-hoc task has run, you should see a notification indicating that the Communication room is now ready. To access the newly created room, look for the communication icon towards the bottom of the page (refer to 'Room/service access' section below for more details).

Room creation complete

Room/service access

Once all the ad-hoc tasks for communication have finished running, and the room is created, the room will be available from a 'sticky' icon on the relevant course pages. Look for the icon towards the bottom of you screen above the information icon. This icon is available to anyone who has access to the course, regardless of their capability.

Access your room/service

Site administration settings

Communication providers are currently an experimental feature and must be enabled by an admin. To enable communication providers:

  1. Navigate to Site administration > Development > Experimental > Experimental settings.
  2. Check the 'Enable communication providers' checkbox (enablecommunicationsubsystem).
  3. Click the 'Save changes' button.
  4. Once the communication providers experimental setting is enabled go to Site administration > Plugins > Communication > Manage communication providers to configure your provider.


Managing communication providers

Admins will be able to access a new section: Site administration > Plugins > Communication > Manage communication providers. From this page, admins can configure the installed communication provider plugins.

Managing communication providers

Capabilities