|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00003 if (!defined('MOODLE_INTERNAL')) { 00004 die('Direct access to this script is forbidden.'); 00005 } 00006 00007 require_once($CFG->libdir.'/formslib.php'); 00008 00009 class groups_import_form extends moodleform { 00010 00011 function definition() { 00012 $mform =& $this->_form; 00013 $data = $this->_customdata; 00014 00015 //fill in the data depending on page params 00016 //later using set_data 00017 $mform->addElement('header', 'general'); 00018 00019 $filepickeroptions = array(); 00020 $filepickeroptions['filetypes'] = '*'; 00021 $filepickeroptions['maxbytes'] = get_max_upload_file_size(); 00022 $mform->addElement('filepicker', 'userfile', get_string('import'), null, $filepickeroptions); 00023 00024 $mform->addElement('hidden', 'id'); 00025 00026 $this->add_action_buttons(true, get_string('importgroups', 'core_group')); 00027 00028 $this->set_data($data); 00029 } 00030 } 00031