libdir.'/formslib.php'); class groups_import_form extends moodleform { function definition() { $mform =& $this->_form; $data = $this->_customdata; //fill in the data depending on page params //later using set_data $mform->addElement('header', 'general'); $filepickeroptions = array(); $filepickeroptions['filetypes'] = '*'; $filepickeroptions['maxbytes'] = get_max_upload_file_size(); $mform->addElement('filepicker', 'userfile', get_string('import'), null, $filepickeroptions); $mform->addElement('hidden', 'id'); $this->add_action_buttons(true, get_string('importgroups', 'core_group')); $this->set_data($data); } }