public static function type_config_form($mform, $classname = 'repository') { $a = new stdClass(); $a->callbackurl = google_oauth::callback_url()->out(false); $mform->addElement('static', null, '', get_string('oauthinfo', 'repository_skydrive', $a)); parent::type_config_form($mform); $strrequired = get_string('required'); $mform->addElement('text', 'clientid', get_string('clientid', 'repository_skydrive')); $mform->addElement('text', 'secret', get_string('secret', 'repository_skydrive')); $mform->addRule('clientid', $strrequired, 'required', null, 'client'); $mform->addRule('secret', $strrequired, 'required', null, 'client'); }
public function admin_config_form(&$mform) { $a = new stdClass; $a->docsurl = get_docs_url('Google_OAuth2_Setup'); $a->callbackurl = google_oauth::callback_url()->out(false); $mform->addElement('static', null, '', get_string('oauthinfo', 'portfolio_googledocs', $a)); $mform->addElement('text', 'clientid', get_string('clientid', 'portfolio_googledocs')); $mform->addElement('text', 'secret', get_string('secret', 'portfolio_googledocs')); $strrequired = get_string('required'); $mform->addRule('clientid', $strrequired, 'required', null, 'client'); $mform->addRule('secret', $strrequired, 'required', null, 'client'); }
public static function admin_config_form(&$mform) { $a = new stdClass(); $a->docsurl = get_docs_url('Google_OAuth_2.0_setup'); $a->callbackurl = google_oauth::callback_url()->out(false); $mform->addElement('static', null, '', get_string('oauthinfo', 'portfolio_picasa', $a)); $mform->addElement('text', 'clientid', get_string('clientid', 'portfolio_picasa')); $mform->setType('clientid', PARAM_RAW_TRIMMED); $mform->addElement('text', 'secret', get_string('secret', 'portfolio_picasa')); $mform->setType('secret', PARAM_RAW_TRIMMED); $strrequired = get_string('required'); $mform->addRule('clientid', $strrequired, 'required', null, 'client'); $mform->addRule('secret', $strrequired, 'required', null, 'client'); }
// // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * Link to CSV course upload * * @package tool * @subpackage uploadcourse * @copyright 2010 Petr Skoda {@link http://skodak.org} * @copyright 2011 Piers Harding * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die; require_once $CFG->libdir . '/googleapi.php'; $a = new stdClass(); $a->docsurl = get_docs_url('Google_OAuth_2.0_setup'); $a->callbackurl = google_oauth::callback_url()->out(false); //default display settings $settings->add(new admin_setting_heading('gradeexport_fusion/displaysettings', get_string('oauthinfo', 'gradeexport_fusion', $a), '')); $settings->add(new admin_setting_configtext('gradeexport_fusion/clientid', get_string('clientid', 'gradeexport_fusion'), get_string('clientiddesc', 'gradeexport_fusion'), '', PARAM_TEXT)); $settings->add(new admin_setting_configtext('gradeexport_fusion/secret', get_string('secret', 'gradeexport_fusion'), get_string('clientiddesc', 'gradeexport_fusion'), '', PARAM_TEXT));
public static function type_config_form($mform, $classname = 'repository') { $a = new stdClass; $a->docsurl = get_docs_url('Google_OAuth_2.0_setup'); $a->callbackurl = google_oauth::callback_url()->out(false); $mform->addElement('static', null, '', get_string('oauthinfo', 'repository_googledocs', $a)); parent::type_config_form($mform); $mform->addElement('text', 'clientid', get_string('clientid', 'repository_googledocs')); $mform->setType('clientid', PARAM_RAW_TRIMMED); $mform->addElement('text', 'secret', get_string('secret', 'repository_googledocs')); $mform->setType('secret', PARAM_RAW_TRIMMED); $strrequired = get_string('required'); $mform->addRule('clientid', $strrequired, 'required', null, 'client'); $mform->addRule('secret', $strrequired, 'required', null, 'client'); }