Skip to content

Commit

Permalink
portfolio MDL-22264 add leap2a option for the mahara plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Penny Leach committed May 1, 2010
1 parent 38652d9 commit c5b149f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions portfolio/mahara/lang/en/portfolio_mahara.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
8 changes: 6 additions & 2 deletions portfolio/mahara/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,14 @@ public static function get_name() {
}

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) {
Expand All @@ -89,6 +92,7 @@ public function admin_config_form(&$mform) {
}
$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() {
Expand Down

0 comments on commit c5b149f

Please sign in to comment.