MDL-38851 Admin: Fixed setType notice for portfolio
authorRajesh Taneja <rajesh@moodle.com>
Tue, 23 Apr 2013 06:17:39 +0000 (14:17 +0800)
committerRajesh Taneja <rajesh@moodle.com>
Tue, 23 Apr 2013 06:17:39 +0000 (14:17 +0800)
portfolio/boxnet/lib.php
portfolio/flickr/lib.php
portfolio/mahara/lib.php

index a793767..92bac20 100644 (file)
@@ -112,6 +112,7 @@ class portfolio_plugin_boxnet extends portfolio_plugin_push_base {
 
         $mform->addElement('text', 'apikey', get_string('apikey', 'portfolio_boxnet'));
         $mform->addRule('apikey', get_string('required'), 'required', null, 'client');
+        $mform->setType('apikey', PARAM_RAW_TRIMMED);
         $a = new stdClass();
         $a->servicesurl = 'http://www.box.net/developers/services';
         $a->callbackurl = $CFG->wwwroot . '/portfolio/add.php?postcontrol=1&type=boxnet';
index 2815a0f..6248abe 100644 (file)
@@ -102,8 +102,10 @@ class portfolio_plugin_flickr extends portfolio_plugin_push_base {
         $strrequired = get_string('required');
         $mform->addElement('text', 'apikey', get_string('apikey', 'portfolio_flickr'), array('size' => 30));
         $mform->addRule('apikey', $strrequired, 'required', null, 'client');
+        $mform->setType('apikey', PARAM_RAW_TRIMMED);
         $mform->addElement('text', 'sharedsecret', get_string('sharedsecret', 'portfolio_flickr'));
         $mform->addRule('sharedsecret', $strrequired, 'required', null, 'client');
+        $mform->setType('sharedsecret', PARAM_RAW_TRIMMED);
         $a = new stdClass();
         $a->applyurl = 'http://www.flickr.com/services/api/keys/apply/';
         $a->keysurl = 'http://www.flickr.com/services/api/keys/';
index 77c40d6..b0bbcc6 100644 (file)
@@ -92,7 +92,9 @@ 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->setType('mnethostid', PARAM_INT);
         $mform->addElement('selectyesno', 'enableleap2a', get_string('enableleap2a', 'portfolio_mahara'));
+        $mform->setType('enableleap2a', PARAM_BOOL);
     }
 
     public function instance_sanity_check() {