From: mjollnir_ Date: Tue, 2 Sep 2008 15:28:25 +0000 (+0000) Subject: MDL-16180 - make sure mnet auth is enabled in mahara portfolio plugin sanity check X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=7254f56ef64ce81fa8ec4fda53a459a948242e8f;p=moodle.git MDL-16180 - make sure mnet auth is enabled in mahara portfolio plugin sanity check --- diff --git a/lang/en_utf8/portfolio_mahara.php b/lang/en_utf8/portfolio_mahara.php index cbc8388789..c19aa4d78e 100644 --- a/lang/en_utf8/portfolio_mahara.php +++ b/lang/en_utf8/portfolio_mahara.php @@ -1,8 +1,9 @@ '. 'Subscribe to this service to allow authenticated users in your site to push content to $a
' . '
'; + '
  • Dependency: You must also subscribe to the SSO (Service Provider) service on $a
  • ' . + '
  • Dependency: You must also enable the mnet authentication plugin.

  • '; ?> diff --git a/portfolio/type/mahara/lib.php b/portfolio/type/mahara/lib.php index 0149d5a76b..aa1089431e 100644 --- a/portfolio/type/mahara/lib.php +++ b/portfolio/type/mahara/lib.php @@ -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; }