Skip to content

Commit

Permalink
MDL-38851 Admin: Fixed setType notice for portfolio
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajesh Taneja committed Apr 23, 2013
1 parent 1fe56a2 commit 962b1ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions portfolio/boxnet/lib.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public static function admin_config_form(&$mform) {


$mform->addElement('text', 'apikey', get_string('apikey', 'portfolio_boxnet')); $mform->addElement('text', 'apikey', get_string('apikey', 'portfolio_boxnet'));
$mform->addRule('apikey', get_string('required'), 'required', null, 'client'); $mform->addRule('apikey', get_string('required'), 'required', null, 'client');
$mform->setType('apikey', PARAM_RAW_TRIMMED);
$a = new stdClass(); $a = new stdClass();
$a->servicesurl = 'http://www.box.net/developers/services'; $a->servicesurl = 'http://www.box.net/developers/services';
$a->callbackurl = $CFG->wwwroot . '/portfolio/add.php?postcontrol=1&type=boxnet'; $a->callbackurl = $CFG->wwwroot . '/portfolio/add.php?postcontrol=1&type=boxnet';
Expand Down
2 changes: 2 additions & 0 deletions portfolio/flickr/lib.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ public static function admin_config_form(&$mform) {
$strrequired = get_string('required'); $strrequired = get_string('required');
$mform->addElement('text', 'apikey', get_string('apikey', 'portfolio_flickr'), array('size' => 30)); $mform->addElement('text', 'apikey', get_string('apikey', 'portfolio_flickr'), array('size' => 30));
$mform->addRule('apikey', $strrequired, 'required', null, 'client'); $mform->addRule('apikey', $strrequired, 'required', null, 'client');
$mform->setType('apikey', PARAM_RAW_TRIMMED);
$mform->addElement('text', 'sharedsecret', get_string('sharedsecret', 'portfolio_flickr')); $mform->addElement('text', 'sharedsecret', get_string('sharedsecret', 'portfolio_flickr'));
$mform->addRule('sharedsecret', $strrequired, 'required', null, 'client'); $mform->addRule('sharedsecret', $strrequired, 'required', null, 'client');
$mform->setType('sharedsecret', PARAM_RAW_TRIMMED);
$a = new stdClass(); $a = new stdClass();
$a->applyurl = 'http://www.flickr.com/services/api/keys/apply/'; $a->applyurl = 'http://www.flickr.com/services/api/keys/apply/';
$a->keysurl = 'http://www.flickr.com/services/api/keys/'; $a->keysurl = 'http://www.flickr.com/services/api/keys/';
Expand Down
2 changes: 2 additions & 0 deletions portfolio/mahara/lib.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ public static function admin_config_form(&$mform) {
} }
$mform->addElement('select', 'mnethostid', get_string('mnethost', 'portfolio_mahara'), $hosts); $mform->addElement('select', 'mnethostid', get_string('mnethost', 'portfolio_mahara'), $hosts);
$mform->addRule('mnethostid', $strrequired, 'required', null, 'client'); $mform->addRule('mnethostid', $strrequired, 'required', null, 'client');
$mform->setType('mnethostid', PARAM_INT);
$mform->addElement('selectyesno', 'enableleap2a', get_string('enableleap2a', 'portfolio_mahara')); $mform->addElement('selectyesno', 'enableleap2a', get_string('enableleap2a', 'portfolio_mahara'));
$mform->setType('enableleap2a', PARAM_BOOL);
} }


public function instance_sanity_check() { public function instance_sanity_check() {
Expand Down

0 comments on commit 962b1ba

Please sign in to comment.