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

Review which parts of MDL-73270 need to be reverted for 4.1

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major Major
    • 4.1
    • 4.1
    • General
    • MOODLE_401_STABLE
    • MOODLE_401_STABLE
    • Hide

      Prerequisites

      1. Ability to install different Moodle versions and plugins (git).
      2. Ability to edit (hack) one file for easier testing.

      A) Before the patch: MNet

      1. Install master branch from moodle.git
      2. Install the webservice_xmlrpc plugin

        git clone https://github.com/moodlehq/moodle-webservice_xmlrpc.git webservice/xmlrpc
        

      3. Visit admin/index.php to get the plugin installed.
      4. Go to Admin -> General -> Advanced features
      5. Enable "Networking" (On).
      6. Enable "Portfolios" (tick).
      7. Save changes.
      8. Go to Admin -> Networking -> and visit all the links there:
        1. Settings
        2. Manage peers
        3. SSO access control
        4. Remote enrolment client
        5. XML-RPC hosts
        6. Profile fields
        7. All hosts
      9. Verify that in all the links above you see a "It has been detected that the Moodle Networking is enabled on your site" notification.
      10. Go to Admin -> Plugins -> Manage authentication
      11. Enable the "MNet authentication"
      12. Verify that you see a "It has been detected that the MNet authentication is enabled on your site" notification.
      13. To save us from some heavy configuration, apply these changes to the portfolio/mahara/lib.php file:

        diff --git a/portfolio/mahara/lib.php b/portfolio/mahara/lib.php
        index ee725bd2c07..64907fbd3ad 100644
        --- a/portfolio/mahara/lib.php
        +++ b/portfolio/mahara/lib.php
        @@ -91,13 +91,13 @@ class portfolio_plugin_mahara extends portfolio_plugin_pull_base {
                     $hosts[$host->id] = $host->name;
                 }
                 $mform->addElement('select', 'mnethostid', get_string('mnethost', 'portfolio_mahara'), $hosts);
        -        $mform->addRule('mnethostid', $strrequired, 'required', null, 'client');
                 $mform->setType('mnethostid', PARAM_INT);
                 $mform->addElement('selectyesno', 'enableleap2a', get_string('enableleap2a', 'portfolio_mahara'));
                 $mform->setType('enableleap2a', PARAM_BOOL);
             }
         
             public function instance_sanity_check() {
        +        return 0;
                 // make sure the host record exists since we don't have referential integrity
                 if (!is_enabled_auth('mnet')) {
                     return PORTFOLIO_MAHARA_ERR_NOMNETAUTH;
        @@ -117,6 +117,7 @@ class portfolio_plugin_mahara extends portfolio_plugin_pull_base {
             }
         
             public static function plugin_sanity_check() {
        +        return 0;
                 global $CFG, $DB;
                 $errorcode = 0;
                 if (!isset($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode != 'strict') {
        

      14. Go to Admin -> Plugins -> Manage portfolios
      15. "Enable and visible" the "Mahara ePortfolio".
      16. In the form that appears, "Save" changes.
      17. Verify that the "Mahara ePortfolio" is now "Enabled and visible".
      18. Go to "admin/index.php"
      19. You may be redirected to a page with some profile field settings, just "Save" it without modifying anything.
      20. Verify that now you're in the admin notifications page.
      21. Verify that you see a "It has been detected that the Mahara ePortfolio is enabled on your site" notification.
      22. Go to Admin -> Server -> Environment
      23. *Verify" that you see a "4.1 upwards" version.
      24. Verify that you see a "It has been detected that the Mahara ePortfolio is enabled on your site" notification.

      B) Before the patch: XML-RPC WS

      1. Continue with the same site than in previous test.
      2. Go to Admin -> Server -> Web services -> Overview
      3. Click on "Enable web services" and enable them. Save changes.
      4. Go to Admin -> Server -> Web services -> Overview again.
      5. Verify that "Enable web services" shows a "Yes" status.
      6. Click on "Enable protocols" and enable the REST protocol.
      7. Now, enable the "XML-RPC protocol and verify that you see a "It has been detected that the XML-RPC Web Service protocol is enabled on your site" notification.
      8. Go to Admin -> Server -> Environment
      9. *Verify" that you see a "4.1 upwards" version.
      10. Verify that you see a "It has been detected that the XML-RPC Web Service protocol is enabled on your site" notification.

      C) After the patch: MNet

      1. Upgrade the site to the master branch from integration.git
      2. Go to Admin -> Networking -> and visit all the links there:
        1. Settings
        2. Manage peers
        3. SSO access control
        4. Remote enrolment client
        5. XML-RPC hosts
        6. Profile fields
        7. All hosts
      3. Verify that none of them show a "It has been detected that the Moodle Networking is enabled on your site" notification.
      4. Go to Admin -> Plugins -> Manage authentication
      5. Verify that "MNet authentication" is enabled (from previous tests).
      6. Verify that you don't see a "It has been detected that the MNet authentication is enabled on your site" notification.

      D) After the patch: XML-RPC WS

      1. Continue with the same site than in previous test.
      2. Go to Admin -> Server -> Environment
      3. Verify that you see a "4.1 upwards" version.
      4. Verify that you see a "It has been detected that the XML-RPC Web Service protocol is enabled on your site" notification.
      5. Go to "admin/index.php".
      6. Verify that you see a "It has been detected that the XML-RPC Web Service protocol is enabled on your site" notification.
      7. Go to Admin -> Server -> Web services -> Overview
      8. Verify that the "XML-RPC protocol" is enabled.
      9. Verify that you see a "It has been detected that the XML-RPC Web Service protocol is enabled on your site" notification.
      10. Disable the "XML-RPC protocol".
      11. Verify that the notification is gone.
      12. Go to Admin -> Server -> Environment
      13. Verify that you see a "4.1 upwards" version.
      14. Verify that you don't see any XML-RPC notification.
      15. Go to "admin/index.php".
      16. Verify that you don't see any XML-RPC notification.
      Show
      Prerequisites Ability to install different Moodle versions and plugins (git). Ability to edit (hack) one file for easier testing. A) Before the patch: MNet Install master branch from moodle.git Install the webservice_xmlrpc plugin git clone https://github.com/moodlehq/moodle-webservice_xmlrpc.git webservice/xmlrpc Visit admin/index.php to get the plugin installed. Go to Admin -> General -> Advanced features Enable "Networking" (On). Enable "Portfolios" (tick). Save changes. Go to Admin -> Networking -> and visit all the links there: Settings Manage peers SSO access control Remote enrolment client XML-RPC hosts Profile fields All hosts Verify that in all the links above you see a "It has been detected that the Moodle Networking is enabled on your site" notification. Go to Admin -> Plugins -> Manage authentication Enable the "MNet authentication" Verify that you see a "It has been detected that the MNet authentication is enabled on your site" notification. To save us from some heavy configuration, apply these changes to the portfolio/mahara/lib.php file: diff --git a/portfolio/mahara/lib.php b/portfolio/mahara/lib.php index ee725bd2c07..64907fbd3ad 100644 --- a/portfolio/mahara/lib.php +++ b/portfolio/mahara/lib.php @@ -91,13 +91,13 @@ class portfolio_plugin_mahara extends portfolio_plugin_pull_base { $hosts[$host->id] = $host->name; } $mform->addElement('select', 'mnethostid', get_string('mnethost', 'portfolio_mahara'), $hosts); - $mform->addRule('mnethostid', $strrequired, 'required', null, 'client'); $mform->setType('mnethostid', PARAM_INT); $mform->addElement('selectyesno', 'enableleap2a', get_string('enableleap2a', 'portfolio_mahara')); $mform->setType('enableleap2a', PARAM_BOOL); } public function instance_sanity_check() { + return 0; // make sure the host record exists since we don't have referential integrity if (!is_enabled_auth('mnet')) { return PORTFOLIO_MAHARA_ERR_NOMNETAUTH; @@ -117,6 +117,7 @@ class portfolio_plugin_mahara extends portfolio_plugin_pull_base { } public static function plugin_sanity_check() { + return 0; global $CFG, $DB; $errorcode = 0; if (!isset($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode != 'strict') { Go to Admin -> Plugins -> Manage portfolios "Enable and visible" the "Mahara ePortfolio". In the form that appears, "Save" changes. Verify that the "Mahara ePortfolio" is now "Enabled and visible". Go to "admin/index.php" You may be redirected to a page with some profile field settings, just "Save" it without modifying anything. Verify that now you're in the admin notifications page. Verify that you see a "It has been detected that the Mahara ePortfolio is enabled on your site" notification. Go to Admin -> Server -> Environment *Verify" that you see a "4.1 upwards" version. Verify that you see a "It has been detected that the Mahara ePortfolio is enabled on your site" notification. B) Before the patch: XML-RPC WS Continue with the same site than in previous test. Go to Admin -> Server -> Web services -> Overview Click on "Enable web services" and enable them. Save changes. Go to Admin -> Server -> Web services -> Overview again. Verify that "Enable web services" shows a "Yes" status. Click on "Enable protocols" and enable the REST protocol. Now, enable the "XML-RPC protocol and verify that you see a "It has been detected that the XML-RPC Web Service protocol is enabled on your site" notification. Go to Admin -> Server -> Environment *Verify" that you see a "4.1 upwards" version. Verify that you see a "It has been detected that the XML-RPC Web Service protocol is enabled on your site" notification. C) After the patch: MNet Upgrade the site to the master branch from integration.git Go to Admin -> Networking -> and visit all the links there: Settings Manage peers SSO access control Remote enrolment client XML-RPC hosts Profile fields All hosts Verify that none of them show a "It has been detected that the Moodle Networking is enabled on your site" notification. Go to Admin -> Plugins -> Manage authentication Verify that "MNet authentication" is enabled (from previous tests). Verify that you don't see a "It has been detected that the MNet authentication is enabled on your site" notification. D) After the patch: XML-RPC WS Continue with the same site than in previous test. Go to Admin -> Server -> Environment Verify that you see a "4.1 upwards" version. Verify that you see a "It has been detected that the XML-RPC Web Service protocol is enabled on your site" notification. Go to "admin/index.php". Verify that you see a "It has been detected that the XML-RPC Web Service protocol is enabled on your site" notification. Go to Admin -> Server -> Web services -> Overview Verify that the "XML-RPC protocol" is enabled. Verify that you see a "It has been detected that the XML-RPC Web Service protocol is enabled on your site" notification. Disable the "XML-RPC protocol". Verify that the notification is gone. Go to Admin -> Server -> Environment Verify that you see a "4.1 upwards" version. Verify that you don't see any XML-RPC notification. Go to "admin/index.php". Verify that you don't see any XML-RPC notification.

      In MDL-73270 a bunch of warns were added when uses of the xmlrpc extension are detected.

      With the replacement happening in MDL-70889, surely some of those warnings don't have sense anymore.

      Visit them and consider which ones are worth being kept.

        1. MDL-76053_after MNet_1.webm
          2.56 MB
        2. MDL-76053_after MNet_2.png
          MDL-76053_after MNet_2.png
          105 kB
        3. MDL-76053_after XMLRPC_1.png
          MDL-76053_after XMLRPC_1.png
          159 kB
        4. MDL-76053_after XMLRPC_2.png
          MDL-76053_after XMLRPC_2.png
          159 kB
        5. MDL-76053_after XMLRPC_3.png
          MDL-76053_after XMLRPC_3.png
          139 kB
        6. MDL-76053_after XMLRPC_4.png
          MDL-76053_after XMLRPC_4.png
          91 kB
        7. MDL-76053_after XMLRPC_5.png
          MDL-76053_after XMLRPC_5.png
          80 kB
        8. MDL-76053_after XMLRPC_6.png
          MDL-76053_after XMLRPC_6.png
          159 kB
        9. MDL-76053_after XMLRPC_7.png
          MDL-76053_after XMLRPC_7.png
          171 kB
        10. MDL-76053_after XMLRPC_8.png
          MDL-76053_after XMLRPC_8.png
          140 kB
        11. MDL-76053_before MNet_1.webm
          1.97 MB
        12. MDL-76053_before MNet_2.png
          MDL-76053_before MNet_2.png
          106 kB
        13. MDL-76053_before MNet_3.png
          MDL-76053_before MNet_3.png
          62 kB
        14. MDL-76053_before MNet_4.png
          MDL-76053_before MNet_4.png
          138 kB
        15. MDL-76053_before MNet_5.png
          MDL-76053_before MNet_5.png
          160 kB
        16. MDL-76053_before MNet_6.png
          MDL-76053_before MNet_6.png
          170 kB
        17. MDL-76053_before XMLRPC_1.png
          MDL-76053_before XMLRPC_1.png
          144 kB
        18. MDL-76053_before XMLRPC_2.png
          MDL-76053_before XMLRPC_2.png
          91 kB
        19. MDL-76053_before XMLRPC_3.png
          MDL-76053_before XMLRPC_3.png
          160 kB
        20. MDL-76053_before XMLRPC_4.png
          MDL-76053_before XMLRPC_4.png
          170 kB

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Carlos Escobedo Carlos Escobedo
            Jun Pataleta Jun Pataleta
            Angelia Dela Cruz Angelia Dela Cruz
            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 day, 2 hours, 30 minutes
                1d 2h 30m

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