Uploaded image for project: 'Moodle QA'
  1. Moodle QA
  2. MDLQA-17933 Moodle 4.3 QA
  3. MDLQA-18419

CLONE - Users can enrol in courses on another Moodle site using MNet

    XMLWordPrintable

Details

    Description

      The goal of this test is to ensure that it is possible for Moodle users to enrol in courses on another Moodle site using MNet.

      Pre-requisites

      • This test needs to be executed on both the minimum and the maximum PHP supported versions for the master branch (for example, for Moodle 4.2dev, PHP 8.0 and PHP 8.1).

      Setup

      Please note: it's possible that you see some notices during the setup part depending of the debugging levels in your site. You can ignore them as far as the configuration works as expected.

      1. Setup a couple of Moodle sites:
        • site1 running the version to be released (master).
        • site2 running older version, for example: Moodle 4.0.x (MOODLE_400_STABLE)
      2. Ensure that they have different $CFG->sessioncookiepath setting either on config.php or in Administration > Server > Session handling
      3. In both sites, enable and configure MNet as explained in the doc page.
      4. For extra information about MNet enrolments, please refer to the documentation page
      5. Use two different browsers to test this.
      6. Configuring site1 to be able to apply for enrolments, the one using integration master branch:
        1. Go to Admin -> Networking -> Manage peers and in the list click on the "site2" link. In the Services tab tick on "Subscribe" the "Remote enrolment service". And ensure that "Publish" is not ticked. Also, confirm that the FOUR SSO settings (IdP and SP publish and subscribe are ticked from previous test).
        2. This should be set from previous tests, but go to Admin -> Users -> Define roles and ensure that the Authenticated user role has the "moodle/site:mnetlogintoremote" allowed. Allow it if needed to (so we guarantee that all users in "site1" can use MNet SSO/roaming.
        3. Create a couple of users in "site1".
        4. With this, "site1" is ready to apply for remote enrolments in "site2".
      7. Configuring site2 (that will accept remote enrolments, the one using MOODLE_400_STABLE):
        1. Go to Admin -> Plugins -> Manage enrol plugins and enable "MNet remote enrolments"
        2. Go to Admin -> Networking -> Manage peers and in the list click on the "site1" link. In the Services tab tick on "Publish" the "Remote enrolment service". And ensure that "Subscribe" is not ticked. Also, confirm that the FOUR SSO settings (IdP and SP publish and subscribe are ticked from previous test).
        3. Create a couple of courses: Course21 and Course22
        4. In Course21 -> Participants, select "Enrolment methods" and add the "MNet remote enrolments" method, selecting "site1" in the "Remote host" dropdown. Press "Add method".
        5. With this, "site2" is ready to accept remote enrolments from "site1".

      Testing remote enrolments work as expected ("site1" ==> "site2")

      1. In site1, go to Admin -> Networking -> Remote enrolments client.
      2. Verify that you see a table with one entry for site2.
      3. Click on "Edit enrolments" button.
      4. If there is a "Re-fetch" button, click on it.
      5. Verify that in the list of courses from "site2" you see "Course21" but don't see "Course22".
      6. Go to site2 and in Course22 -> Participants, select "Enrolment methods" and add the "MNet remote enrolments" method, selecting "site1" in the "Remote host" dropdown. Press "Add method".
      7. Back to "site1" refresh the "Remote enrolments client" page.
      8. Verify that now both Course21 and Course22 are shown in the list.
      9. Click the "Edit enrolments" button of Course22.
      10. Select a couple of users and "Add" them, so they show on the left column.
      11. In "site2", go to Course22 -> participants
      12. Verify that the 2 users added from site1 are listed now and displayed as "Active"
      13. Click on the little "i" (information).
      14. Verify that you see "MNet remote enrolments (site1)" in the information.
      15. Back to "site1", remove one of the 2 enrolled users. Annotate it.
      16. In "site2", refresh the participants page.
      17. Verify that now only one user is listed and the annotated user in "site1" does not show anymore. Annotate it.
      18. Back to "site1", verify that the "Network servers" is in front page (from previous tests). Add it if missing.
      19. Logout from the admin session.
      20. Login in "site1" as the annotated user (the one remaining from the 2 originally enrolled).
      21. In the front page, click on the "site2" link in the "Networks servers" block.
      22. Verify that the user is automatically roamed to "site2" and you see the "Welcome back userxxx" message.
      23. Go to "My courses".
      24. Verify that Course22 is shown (that means the user in enrolled).
      25. Click in the "Course22" link.
      26. Verify the user access to the course without any problem.
      27. Logout from "site2".
      28. Verify that you're automatically redirected back to "site1" (not logged-in).

      Attachments

        1. step12.png
          step12.png
          347 kB
        2. step14.png
          step14.png
          466 kB
        3. step17.png
          step17.png
          267 kB
        4. step2.png
          step2.png
          28 kB
        5. step22.png
          step22.png
          40 kB
        6. step24.png
          step24.png
          29 kB
        7. step26.png
          step26.png
          28 kB
        8. step28.png
          step28.png
          39 kB
        9. step5.png
          step5.png
          33 kB
        10. step8.png
          step8.png
          40 kB

        Activity

          People

            david.woloszyn@moodle.com David Woloszyn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Clockify

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