blob: e193c7a732b90a120efab97a4033ea7eed84aead (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?php
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/formslib.php');
class mod_sqlbox_form extends moodleform {
public function definition() {
$mform = &$this->_form;
$mform->addElement('header', 'sqlbox_general', 'SQLBox');
$mform->addElement('textarea', 'sqlbox_query', 'SQL Query', 'rows="15" cols="60"');
$mform->addElement('submit', 'sqlbox_button', 'Submit');
}
public function set_query($query) {
$mform = &$this->_form;
$mform->setDefault("sqlbox_query", $query);
}
}
?>
|