]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-16180 - make sure mnet auth is enabled in mahara portfolio plugin sanity check
authormjollnir_ <mjollnir_>
Tue, 2 Sep 2008 15:28:25 +0000 (15:28 +0000)
committermjollnir_ <mjollnir_>
Tue, 2 Sep 2008 15:28:25 +0000 (15:28 +0000)
lang/en_utf8/portfolio_mahara.php
portfolio/type/mahara/lib.php

index cbc8388789b76a09239c70ba24f5a3c57aae56e8..c19aa4d78e6a43a89a3a176544ae7114446c11fc 100644 (file)
@@ -1,8 +1,9 @@
 <?php
 
-$string['err_nomnethosts'] = 'This plugin relies on Moodle Networking peers with SSO IDP published, and portfolio and SSO SP subscribed.  Any instances of this plugin has been set to not visible until this is fixed - you will need to set them to visible again manually. They cannot be used before this happens.';
+$string['err_nomnethosts'] = 'This plugin relies on Moodle Networking peers with SSO IDP published, and portfolio and SSO SP subscribed, as well as the mnet authentication plugin.  Any instances of this plugin has been set to not visible until this is fixed - you will need to set them to visible again manually. They cannot be used before this happens.';
 $string['err_networkingoff'] = 'Moodle Networking is off entirely. Please enable it before trying to configure this pugin.  Any instances of this plugin have been set to not visible until this is fixed - you will need to set them to visible again manully.  They cannot be used until this happens';
 $string['err_invalidhost'] = 'This plugin is misconfigured to point to an invalid (or deleted) mnet host.  This plugin relies on Moodle Networking peers with SSO IDP published, and portfolio and SSO_SP subscribed.';
+$string['err_nomnetauth'] = 'The mnet authentication plugin is disabled, but is required for this service';
 $string['failedtojump'] = 'Failed to start communication with remote server';
 $string['failedtoping'] = 'Failed to start communication with remote server: $a';
 $string['mnethost'] = 'Moodle Networking Host';
@@ -12,5 +13,6 @@ $string['pf_name'] = 'Portfolio services';
 $string['pf_description'] = 'Allow users to push Moodle content to this host<br />'.
                                  'Subscribe to this service to allow authenticated users in your site to push content to $a<br />' .
                                  '<ul><li><em>Dependency</em>: You must also <strong>publish</strong> the SSO (Identify Provider) service to $a.</li>' .
-                                 '<li><em>Dependency</em>: You must also <strong>subscribe</strong> to the SSO (Service Provider) service on $a</li></ul><br />';
+                                 '<li><em>Dependency</em>: You must also <strong>subscribe</strong> to the SSO (Service Provider) service on $a</li>' .
+                                 '<li><em>Dependency</em>: You must also enable the mnet authentication plugin.</li></ul><br />';
 ?>
index 0149d5a76be6a52aaa798901ea7cce4acf9c0ee3..aa1089431e960f65f7f2976a1d865424b115a9ca 100644 (file)
@@ -3,6 +3,7 @@
 define('PORTFOLIO_MAHARA_ERR_NETWORKING_OFF', 'err_networkingoff');
 define('PORTFOLIO_MAHARA_ERR_NOHOSTS', 'err_nomnethosts');
 define('PORTFOLIO_MAHARA_ERR_INVALIDHOST', 'err_invalidhost');
+define('PORTFOLIO_MAHARA_ERR_NOMNETAUTH', 'err_nomnetauth');
 
 require_once($CFG->dirroot . '/lib/portfoliolib.php');
 require_once($CFG->dirroot . '/mnet/lib.php');
@@ -76,6 +77,9 @@ class portfolio_plugin_mahara extends portfolio_plugin_pull_base {
         if (!isset($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode != 'strict') {
             $errorcode =  PORTFOLIO_MAHARA_ERR_NETWORKING_OFF;
         }
+        if (!is_enabled_auth('mnet')) {
+            $errorcode = PORTFOLIO_MAHARA_ERR_NOMNETAUTH;
+        }
         if (!self::get_mnet_hosts()) {
             $errorcode =  PORTFOLIO_MAHARA_ERR_NOHOSTS;
         }