// 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.
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.