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

Remove block_mnet_hosts plugin from core in Moodle 5.0

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 5.0
    • MNet
    • MOODLE_500_STABLE
    • MDL-84309_remove-block_mnet_hosts-plugin-from-core-in-moodle50
    • Hide

      Testing scenario 1: Upgrade without the block_mnet_hosts plugin present

      1. Start with a non-patched version of Moodle
      2. Apply the patch of this issue
      3. Upgrade Moodle
      4. Log in as an admin
      5. Go to Site Administration> Plugins > Plugins Overview.
      6. Verify there is no longer a mention of "Network servers"

      Testing scenario 2: Upgrade with the block_mnet_hosts plugin present

      The goal of this test is to ensure that connected Moodle sites using MNet allow an administrator of site1 to enrol users that are "native" to site1 in remote courses in site2, and vice versa.

      Setup

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

      1. Setup a couple of Moodle sites:
        • site1 running an older version, for example: Moodle 4.4.x (MOODLE_404_STABLE).
        • site2 running the version to be released (main).
      2. In the file /etc/ssl/openssl.cnf search for the section openssl_init and make the following changes, so this part of the file looks like the following:

        [openssl_init]
        providers = provider_sect
         
        [provider_sect]
        default = default_sect
        legacy = legacy_sect
         
        [default_sect]
        activate = 1
         
        [legacy_sect]
        activate = 1
        

      3. Run the following command and verify it does not throw an error:

        echo -ne "test" | openssl rc4-40 -K 7465737473 -nosalt -e -nopad | xxd
        

      4. Make sure you have basic network connectivity between the two sites.  eg. you can curl/wget the URL for site1 from site2 and vice versa
      5. Make sure that the IP and port of both sites are not blocked. Navigate to: Administration > Security > HTTP security and make sure the site IP and ports are not in "cURL blocked hosts list " and "cURL allowed ports list ". (you can just clear both lists)
      6. Ensure that they have different $CFG->sessioncookiepath settings either on config.php or in Site Administration > Server > Session handling
      7. In both sites, enable and configure MNet as explained in the doc page.
      8. Please note: You don't need to configure the "Get remote enrolments going" steps, only the "Get user roaming going" ones.
      9. Create user1 in site1 and user2 in site2.

      Testing

      1. Start with a non-patched version of Moodle
      2. Enable MNet in Site Administration > General > Advanced features and set "Networking" to On.
      3. Enable "MNet Authentication" in Site Administration > Plugins > Manage authentication
      4. Install the main branch of the following plugin: https://github.com/moodlehq/moodle-block_mnet_hosts:

        git clone https://github.com/moodlehq/moodle-block_mnet_hosts.git blocks/mnet_hosts

      5. Install the main branch of the following plugin: https://github.com/moodlehq/moodle-auth_mnet:

        git clone https://github.com/moodlehq/moodle-auth_mnet.git auth/mnet

      6. Apply the patch of this issue
      7. Upgrade Moodle
      8. Log in as an admin
      9. Go to Site Administration> Plugins > Plugins Overview.
      10. Verify there is still a mention of 'Network servers'
      11. Log in as user1 in site1 and go to "Site home".
      12. In the "Network servers" block (that has been added as per the configuration instructions, click on site2.
      13. Verify that now you are welcome to site2 as user1.
      14. Log in as user2 in site2 and go to "Site home".
      15. In the "Network servers" block (that has been added as per the configuration instructions, click on site1.
      16. Verify that now you are welcome to site1 as user2.
      17. Verify that now user1 and user2 do exist in both sites and SSO/roaming between them works as expected.
      Show
      Testing scenario 1: Upgrade without the block_mnet_hosts plugin present Start with a non-patched version of Moodle Apply the patch of this issue Upgrade Moodle Log in as an admin Go to Site Administration> Plugins > Plugins Overview . Verify there is no longer a mention of "Network servers" Testing scenario 2: Upgrade with the block_mnet_hosts plugin present The goal of this test is to ensure that connected Moodle sites using MNet allow an administrator of site1 to enrol users that are "native" to site1 in remote courses in site2, and vice versa. Setup Please note: it's possible that you see some notices during the setup part depending on the debugging levels in your site. You can ignore them as long as the configuration works as expected. Setup a couple of Moodle sites: site1 running an older version, for example: Moodle 4.4.x (MOODLE_404_STABLE). site2 running the version to be released (main). In the file /etc/ssl/openssl.cnf search for the section openssl_init and make the following changes, so this part of the file looks like the following: [openssl_init] providers = provider_sect   [provider_sect] default = default_sect legacy = legacy_sect   [default_sect] activate = 1   [legacy_sect] activate = 1 Run the following command and verify it does not throw an error: echo -ne "test" | openssl rc4-40 -K 7465737473 -nosalt -e -nopad | xxd Make sure you have basic network connectivity between the two sites.  eg. you can curl/wget the URL for site1 from site2 and vice versa Make sure that the IP and port of both sites are not blocked. Navigate to: Administration > Security > HTTP security and make sure the site IP and ports are not in "cURL blocked hosts list " and "cURL allowed ports list ". (you can just clear both lists) Ensure that they have different $CFG->sessioncookiepath settings either on config.php or in Site Administration > Server > Session handling In both sites, enable and configure MNet as explained in the doc page. Please note: You don't need to configure the "Get remote enrolments going" steps, only the "Get user roaming going" ones. Create user1 in site1 and user2 in site2 . Testing Start with a non-patched version of Moodle Enable MNet in Site Administration > General > Advanced features and set "Networking" to On . Enable "MNet Authentication" in Site Administration > Plugins > Manage authentication Install the main branch of the following plugin: https://github.com/moodlehq/moodle-block_mnet_hosts : git clone https://github.com/moodlehq/moodle-block_mnet_hosts.git blocks/mnet_hosts Install the main branch of the following plugin: https://github.com/moodlehq/moodle-auth_mnet : git clone https://github.com/moodlehq/moodle-auth_mnet.git auth/mnet Apply the patch of this issue Upgrade Moodle Log in as an admin Go to Site Administration> Plugins > Plugins Overview . Verify there is still a mention of 'Network servers' Log in as user1 in site1 and go to "Site home". In the "Network servers" block (that has been added as per the configuration instructions, click on site2 . Verify that now you are welcome to site2 as user1. Log in as user2 in site2 and go to "Site home". In the "Network servers" block (that has been added as per the configuration instructions, click on site1 . Verify that now you are welcome to site1 as user2 . Verify that now user1 and user2 do exist in both sites and SSO/roaming between them works as expected.
    • Hide

      Code verified against automated checks.

      Checked MDL-84309 using repository: https://github.com/ziegenberg/moodle

      More information about this report

      Built on: Sat Feb 15 08:56:36 PM UTC 2025

      Show
      Code verified against automated checks. Checked MDL-84309 using repository: https://github.com/ziegenberg/moodle main (0 errors / 0 warnings) [branch: MDL-84309_remove-block_mnet_hosts-plugin-from-core-in-moodle50 | CI Job ] More information about this report Built on: Sat Feb 15 08:56:36 PM UTC 2025
    • Hide

      Launching automatic jobs for branch MDL-84309_remove-block_mnet_hosts-plugin-from-core-in-moodle50

      Built on: Mon Feb 17 01:42:13 AM UTC 2025

      Show
      Launching automatic jobs for branch MDL-84309 _remove-block_mnet_hosts-plugin-from-core-in-moodle50 https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62472/ Behat (NonJS - boost and classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62473/ Behat (Firefox - boost / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62474/ Behat (Firefox - classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62475/ App tests (stable app version) / complete) Built on: Mon Feb 17 01:42:13 AM UTC 2025
    • 2

      MNet has been deprecated for many years now. The removal of MNet will start with removing MNet plugins according to the plugin removal process.

      Related tasks

      TODO-1: Announced in the following places:

      TODO-2: extract the code from Moodle LMS and place it into its own Git repository, marking it as archived

            Daniel Ziegenberg Daniel Ziegenberg
            Daniel Ziegenberg Daniel Ziegenberg
            David Woloszyn David Woloszyn
            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 - 43 minutes
                43m

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