portfolio MDL-22264 add leap2a option for the mahara plugin

This commit is contained in:
Penny Leach
2010-05-01 14:40:50 +00:00
parent 38652d9076
commit c5b149f89b
2 changed files with 7 additions and 2 deletions
@@ -23,6 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['enableleap2a'] = 'Enable Leap2a Portfolio support (requires Mahara 1.3)';
$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, SSO_SP subscribed, and portfolio subscribed <b>and</b> published.';
$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_nomnetauth'] = 'The mnet authentication plugin is disabled, but is required for this service';
+6 -2
View File
@@ -63,11 +63,14 @@ class portfolio_plugin_mahara extends portfolio_plugin_pull_base {
}
public static function get_allowed_config() {
return array('mnethostid');
return array('mnethostid', 'enableleap2a');
}
public function supported_formats() {
return array(PORTFOLIO_FORMAT_FILE, PORTFOLIO_FORMAT_LEAP2A);
if ($this->get_config('enableleap2a')) {
return array(PORTFOLIO_FORMAT_FILE, PORTFOLIO_FORMAT_LEAP2A);
}
return array(PORTFOLIO_FORMAT_FILE);
}
public function expected_time($callertime) {
@@ -89,6 +92,7 @@ class portfolio_plugin_mahara extends portfolio_plugin_pull_base {
}
$mform->addElement('select', 'mnethostid', get_string('mnethost', 'portfolio_mahara'), $hosts);
$mform->addRule('mnethostid', $strrequired, 'required', null, 'client');
$mform->addElement('selectyesno', 'enableleap2a', get_string('enableleap2a', 'portfolio_mahara'));
}
public function instance_sanity_check() {