3 if (!defined('MOODLE_INTERNAL')) {
4 die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
7 require_once($CFG->libdir
.'/formslib.php');
9 class groups_import_form
extends moodleform
{
11 function definition() {
12 $mform =& $this->_form
;
13 $data = $this->_customdata
;
15 //fill in the data depending on page params
16 //later using set_data
17 $mform->addElement('header', 'general');
19 $filepickeroptions = array();
20 $filepickeroptions['filetypes'] = '*';
21 $filepickeroptions['maxbytes'] = get_max_upload_file_size();
22 $mform->addElement('filepicker', 'userfile', get_string('import'), null, $filepickeroptions);
24 $mform->addElement('hidden', 'id');
26 $this->add_action_buttons(true, get_string('importgroups', 'core_group'));
28 $this->set_data($data);