Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-79573

Switching communication providers does not manage room memberships correctly

    XMLWordPrintable

Details

    • MOODLE_403_STABLE
    • MOODLE_403_STABLE
    • MDL-79573-master-int
    • Hide

      Setup

      1. Download and set up Andrew's Synapse docker environment: https://github.com/andrewnicols/moodle-synapse
      2. Enable Communication in experimental features, the Matrix specific settings should already be handled by the include you added to config.php in step 1.
      3. Create a new course called "Comm Test", and enrol one student and one teacher in the course. This must be a new course, and enrollments must be completed before starting the testing.
      4. Run the ad-hoc task script with a long keep-alive so you don't need to keep manually running it (if it stops, just re-run it):

        php admin/cli/adhoc_task.php --execute --keep-alive=500

      Testing

      1. Navigate into the course and More > Communication.
      2. Set the provider to Matrix, leaving the room name blank and setting the Topic to "New topic", then save.
      3. Wait a few seconds for the background tasks to complete then refresh the page.
      4. Click the blue communication button at the bottom right of the course and CONFIRM you are taken to the Element client.
      5. Check the Element tab/window and CONFIRM you now see a room called Comm Test.
      6. Click on the Comm Test room in Element and CONFIRM:
        1. The topic says "New topic".
        2. The users you enrolled in the course are all members of the Element room.
        3. The teacher is a moderator (custom level 51) in the room and the student is not.
      7. Keep the Element tab open, we will need to refer back to it.
      8. Back in the Moodle course, again go into More > Communication, then switch the provider to Custom link. Set the link to any valid URL and save.
      9. Wait a few seconds for the background tasks to complete then refresh the page.
      10. Click the blue communication button at the bottom right of the course and CONFIRM you are taken to the URL you set for the provider.
      11. In the Element window CONFIRM all of the members (except for moodlebot) have been removed from the room.
      12. Back in the Moodle course, again go into More > Communication, then switch the provider back to Matrix. Set the Room name to "Second activation" and leave the topic empty, then save.
      13. Wait a few seconds for the background tasks to complete then refresh the page.
      14. Click on the communication button and CONFIRM it again opens the Element web client.
      15. In the Element tab, CONFIRM:
        1. The enrolled users have been re-added to the room, with the correct permissions (teacher = moderator (custom level 51)).
        2. The room has been re-named "Second activation".
        3. There is no longer a topic set on the room.
      16. Back in the Moodle course, again go into More > Communication, then switch the provider to None and save.
      17. Wait a few seconds for the background tasks to complete then refresh the page.
      18. CONFIRM the communication button has been removed from the course, and CONFIRM the users have been removed from the room again in Element.
      19. Back in the Moodle course, again go into More > Communication, then switch the provider to back to Matrix. Set the Room name to "Second activation" and set the topic to "Final step", then save.
      20. Wait a few seconds for the background tasks to complete then refresh the page.
      21. Click on the communication button and CONFIRM it again opens the Element web client.
      22. In the Element tab, CONFIRM:
        1. The enrolled users have been re-added to the room, with the correct permissions (teacher = moderator (custom level 51)).
        2. The room name is "Second activation".
        3. The room topic is "Final step".
      Show
      Setup Download and set up Andrew's Synapse docker environment: https://github.com/andrewnicols/moodle-synapse Enable Communication in experimental features, the Matrix specific settings should already be handled by the include you added to config.php in step 1. Create a new course called "Comm Test", and enrol one student and one teacher in the course. This must be a new course, and enrollments must be completed before starting the testing . Run the ad-hoc task script with a long keep-alive so you don't need to keep manually running it (if it stops, just re-run it): php admin/cli/adhoc_task.php --execute --keep-alive=500 Testing Navigate into the course and More > Communication. Set the provider to Matrix, leaving the room name blank and setting the Topic to "New topic", then save. Wait a few seconds for the background tasks to complete then refresh the page. Click the blue communication button at the bottom right of the course and CONFIRM you are taken to the Element client. Check the Element tab/window and CONFIRM you now see a room called Comm Test . Click on the Comm Test room in Element and CONFIRM : The topic says "New topic". The users you enrolled in the course are all members of the Element room. The teacher is a moderator (custom level 51) in the room and the student is not. Keep the Element tab open, we will need to refer back to it. Back in the Moodle course, again go into More > Communication, then switch the provider to Custom link . Set the link to any valid URL and save. Wait a few seconds for the background tasks to complete then refresh the page. Click the blue communication button at the bottom right of the course and CONFIRM you are taken to the URL you set for the provider. In the Element window CONFIRM all of the members (except for moodlebot) have been removed from the room. Back in the Moodle course, again go into More > Communication, then switch the provider back to Matrix . Set the Room name to "Second activation" and leave the topic empty, then save. Wait a few seconds for the background tasks to complete then refresh the page. Click on the communication button and CONFIRM it again opens the Element web client. In the Element tab, CONFIRM : The enrolled users have been re-added to the room, with the correct permissions (teacher = moderator (custom level 51)). The room has been re-named "Second activation". There is no longer a topic set on the room. Back in the Moodle course, again go into More > Communication, then switch the provider to None and save. Wait a few seconds for the background tasks to complete then refresh the page. CONFIRM the communication button has been removed from the course, and CONFIRM the users have been removed from the room again in Element. Back in the Moodle course, again go into More > Communication, then switch the provider to back to Matrix . Set the Room name to "Second activation" and set the topic to "Final step", then save. Wait a few seconds for the background tasks to complete then refresh the page. Click on the communication button and CONFIRM it again opens the Element web client. In the Element tab, CONFIRM : The enrolled users have been re-added to the room, with the correct permissions (teacher = moderator (custom level 51)). The room name is "Second activation". The room topic is "Final step".
    • 6
    • Team Hedgehog 2023 Sprint 3.3

    Description

      There are two problems related to provider switching and user membership to rooms, as outlined below. Switching to/from "None" does not appear to have these problems.

      1. Users not removed from provider when switching to a different provider

      When you switch from Matrix to custom link, it should trigger the disable actions for Matrix (eg removing users from the room), however this does not happen. It appears to be calling the relevant remove users on the "new" provider (custom link) instead of the "old" one (Matrix), which will not only mean the wrong provider is being used, but that the ad-hoc task will fail, because custom link does not implement user actions.

      2. Users not added to room during room creation, when switching from another provider

      When you start in a new course and first enable custom link, then switch to Matrix (so it is doing the initial room create and add users coming from a different provider, instead of "None"), the first cron will create the room, then queue the user add cron, however no users will be added as the list of user IDs is empty.

      Attachments

        Issue Links

          Activity

            People

              michaelh Michael Hawkins
              michaelh Michael Hawkins
              Safat Shahin Safat Shahin
              Huong Nguyen Huong Nguyen
              Ron Carl Alfon Yu Ron Carl Alfon Yu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 days, 5 hours, 30 minutes
                  3d 5h 30m

                  Clockify

                    Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.