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

Remove enrol_mnet plugin from core in Moodle 5.0

XMLWordPrintable

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

      Testing scenario 1: Upgrade without the enrol_mnet plugin present

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

      Testing scenario 2: Upgrade with the enrol_mnet 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 need to configure all the steps, including the "Get remote enrolments going" ones.
      9. Create user1 in site1 and user2 in site2.
      10. Create course1 in site1 and course2 in site2.
      11.  

      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-auth_mnet:

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

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

        git clone https://github.com/moodlehq/moodle-enrol_mnet.git enrol/mnet

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

        git clone https://github.com/moodlehq/moodle-mnetservice_enrol.git mnet/service/enrol

      7. Apply the patch of this issue
      8. Upgrade Moodle
      9. Log in as an admin on site2
      10. Go to Site Administration > Plugins > Plugins Overview.
      11. Verify there is still a mention of "MNet remote enrolments"
      12. Log in as admin on site1
      13. Go to Site Administration > Networking > Remote enrolments client
      14. Verify you see site2 listed
      15. Click on Edit enrolments and verify you a list of courses that site2 offers
      Show
      Testing scenario 1: Upgrade without the enrol_mnet plugin present Start with a non-patched version of Moodle Enable "MNet Authentication" in Site Administration > Plugins > Manage authentication 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 "MNet remote enrolments" Testing scenario 2: Upgrade with the enrol_mnet 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 need to configure all the steps, including the "Get remote enrolments going" ones. Create user1 in site1 and user2 in site2 . Create course1 in site1 and course2 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-auth_mnet : git clone https://github.com/moodlehq/moodle-auth_mnet.git auth/mnet Install the main branch of the following plugin: https://github.com/moodlehq/moodle-enrol_mnet : git clone https://github.com/moodlehq/moodle-enrol_mnet.git enrol/mnet Install the main branch of the following plugin: https://github.com/moodlehq/moodle-mnetservice_enrol : git clone https://github.com/moodlehq/moodle-mnetservice_enrol.git mnet/service/enrol Apply the patch of this issue Upgrade Moodle Log in as an admin on site2 Go to Site Administration > Plugins > Plugins Overview . Verify there is still a mention of "MNet remote enrolments" Log in as admin on site1 Go to Site Administration > Networking > Remote enrolments client Verify you see site2 listed Click on Edit enrolments and verify you a list of courses that site2 offers
    • Hide

      Code verified against automated checks.

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

      More information about this report

      Built on: Sun Jan 26 08:46:33 PM UTC 2025

      Show
      Code verified against automated checks. Checked MDL-84310 using repository: https://github.com/ziegenberg/moodle main (0 errors / 0 warnings) [branch: MDL-84310_remove-enrol_mnet-plugin-from-core-in-moodle50 | CI Job ] More information about this report Built on: Sun Jan 26 08:46:33 PM 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:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 20 minutes
                1h 20m

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