portfolio MDL-22264 add leap2a option for the mahara plugin
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user