webservice MDL-17135 remove old Moodleforms for service admin page

This commit is contained in:
jerome
2009-10-19 15:12:49 +00:00
parent 1d1b17f25e
commit 9199f8d323
4 changed files with 0 additions and 59 deletions
-56
View File
@@ -1,56 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// 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/>.
/**
* Web services admin UI forms
*
* @package webservice
* @copyright 2009 Moodle Pty Ltd (http://moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once $CFG->libdir.'/formslib.php';
class external_service_functions_form extends moodleform {
function definition() {
global $CFG, $USER, $DB;
$mform = $this->_form;
$data = $this->_customdata;
$mform->addElement('header', 'addfunction', get_string('addfunction', 'webservice'));
$select = "name NOT IN (SELECT s.functionname
FROM {external_services_functions} s
WHERE s.externalserviceid = :sid
)";
$functions = $DB->get_records_select_menu('external_functions', $select, array('sid'=>$data['id']), 'name', 'id, name');
$mform->addElement('select', 'fid', get_string('name'), $functions);
$mform->addElement('hidden', 'id');
$mform->setType('id', PARAM_INT);
$mform->addElement('hidden', 'action');
$mform->setType('action', PARAM_ACTION);
$this->add_action_buttons(true);
$this->set_data($data);
}
}