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

Access a Matrix room from a Moodle Course

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • 4.2
    • Course
    • MOODLE_402_STABLE
    • MDL-76705-master
    • Hide

      Environment setup

      Setup the environment using the following link: https://github.com/mattporritt/moodle-docker
      (Feel free to reach out for any issues)

      Make sure you have access to the following information:

      Test scenario

      1. Login to Moodle as admin
      2. Navigate to Site admin > Development > Experimental settings and enable 'Enable communication subsystem'
      3. Navigate to Site admin > Plugins > Communication > Manage communication providers and ensure 'Matrix' is enabled.
      4. Navigate to Site admin > Plugins > Communication > Matrix
      5. Add the access token (available from the environment setup)
      6. Add the refresh token if available, otherwise paste the access token
      7. Add the element server url (available from the environment setup)
      8. Save your changes
      9. Navigate to Site admin > HTTP Security
      10. Add the Synapse port to 'cURL allowed ports list' (e.g. 8008)
      11. Navigate to the create a new course form
      12. Add all the required information in form
      13. Go to the communication section
      14. Set communication provider to 'Matrix'
      15. Enter a name for the provider room
      16. Save changes
      17. Run the ad-hoc task or the cron itself
      18. Navigate to your course page
      19. CONFIRM there is a new icon above the '?' icon in the bottom right of your window.
      20. Click the new icon
      21. CONFIRM that it launches element in a new browser window
      22. Log in with your admin account details if prompted.
      23. CONFIRM the newly created room is displayed
      24. Enrol a student and a teacher into the course
      25. Log in as that student and navigate to the course
      26. CONFIRM there is a new icon above the '?' icon in the bottom right of your window.
      27. Click the new icon
      28. CONFIRM that it launches element in a new browser window (you will NOT have access as a student. Room membership is out of scope in this issue and will be handled in MDL-76703)
      29. Login to Moodle as admin
      30. Navigate to Site admin > Development > Experimental settings and disable 'Enable communication subsystem'
      31. Navigate back to one of your courses that previously had a button that took you to the chat room.
      32. CONFIRM you can no longer see this icon/button above the '?' icon.

      Unit test

      1. Setup the mock server using following repository: https://github.com/stevandoMoodle/matrixsynapse_mock
      2. Standup up a Moodle instance using this tracker
      3. Go to the config.php
      4. Add the following line after $CFG->wwwroot:
        define('TEST_COMMUNICATION_MATRIX_MOCK_SERVER', "http://localhost:8001/hash" . sha1($CFG->wwwroot));
      5. Initialize phpunit
      6. Run the following testsuite:
        vendor/bin/phpunit --testsuite communication_matrix_testsuite
      7. CONFIRM the tests ran successfully
      8. Run the following testsuite:
        vendor/bin/phpunit --testsuite core_communication_testsuite
      9. CONFIRM the tests ran successfully

       

      Show
      Environment setup Setup the environment using the following link:  https://github.com/mattporritt/moodle-docker (Feel free to reach out for any issues) Make sure you have access to the following information: Element web URL (e.g. https://element:8081) Home server URL (e.g. https://synapse:8008 ) Access token, generated using the same account used to login to element client Refresh token (optional) Test scenario Login to Moodle as admin Navigate to  Site admin > Development > Experimental settings  and enable 'Enable communication subsystem' Navigate to  Site admin > Plugins > Communication > Manage communication providers and ensure 'Matrix' is enabled. Navigate to  Site admin > Plugins > Communication > Matrix Add the access token (available from the environment setup) Add the refresh token if available, otherwise paste the access token Add the element server url (available from the environment setup) Save your changes Navigate to  Site admin > HTTP Security Add the Synapse port to 'cURL allowed ports list' (e.g. 8008) Navigate to the create a new course form Add all the required information in form Go to the communication section Set communication provider to 'Matrix' Enter a name for the provider room Save changes Run the ad-hoc task or the cron itself Navigate to your course page CONFIRM  there is a new icon above the '?' icon in the bottom right of your window. Click the new icon CONFIRM that it launches element in a new browser window Log in with your admin account details if prompted. CONFIRM the newly created room is displayed Enrol a student and a teacher into the course Log in as that student and navigate to the course CONFIRM  there is a new icon above the '?' icon in the bottom right of your window. Click the new icon CONFIRM that it launches element in a new browser window (you will NOT have access as a student. Room membership is out of scope in this issue and will be handled in MDL-76703 ) Login to Moodle as admin Navigate to  Site admin > Development > Experimental settings and disable 'Enable communication subsystem' Navigate back to one of your courses that previously had a button that took you to the chat room. CONFIRM you can no longer see this icon/button above the '?' icon. Unit test Setup the mock server using following repository: https://github.com/stevandoMoodle/matrixsynapse_mock Standup up a Moodle instance using this tracker Go to the config.php Add the following line after $CFG->wwwroot: define('TEST_COMMUNICATION_MATRIX_MOCK_SERVER', "http://localhost:8001/hash" . sha1($CFG->wwwroot)); Initialize phpunit Run the following testsuite: vendor/bin/phpunit --testsuite communication_matrix_testsuite CONFIRM the tests ran successfully Run the following testsuite: vendor/bin/phpunit --testsuite core_communication_testsuite CONFIRM the tests ran successfully  
    • 6
    • Team Hedgehog Sprint 2.1, Team Hedgehog Sprint 2.2

      There should be a clear action from the Moodle course main page and from the main page of any activity in the course that takes the user to the related Matrix chat room.

      There is a Figma prototype which outlines the UX for this functionality. There is also consideration about if the user is accessing Moodle via a web browser or by the Moodle mobile app.

      It makes sense that if the organisation has a Matrix web client available, this should open in a separate web browser tab and the user be taken to that.

      If Moodle can determine that a user has a Matrix client such as Element installed as an app we could also direct the user to that. (Note: Directing to a dedicated app is out of scope for phase 1, as the initial implementation will only support the web client.)

      Using the Matrix API we should be able to determine if the user has ever accessed the organisations Matrix before or not. 

      It would be worth exploring in depth what we can do on the Moodle side to make this workflow as easy as we can for users.

      User stories:

      1. As a student I want to be able to join the Matrix chat for my course from the main course page in Moodle. So I can communicate with the peers in my course and ask my teacher questions.
      2. As a student I want to be able to join the Matrix chat for my course from any Moodle activity main page. So I can communicate with the peers in my course and ask my teacher questions.
      3. As a teacher I want to be able to join the Matrix chat for my course from the main course page in Moodle. So I can communicate with my students.
      4. As a teacher I want to be able to join the Matrix chat for my course from any Moodle activity main page. So I can communicate with my students.

        1. new_comm_icon_poc.png
          111 kB
          David Woloszyn
        2. new_comm_link_poc.png
          80 kB
          David Woloszyn

            david.woloszyn@moodle.com David Woloszyn
            matt.porritt@moodle.com Matt Porritt
            Safat Shahin Safat Shahin
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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