2009-11-04 08:11:02 +00:00
|
|
|
<?php
|
2006-12-20 08:05:26 +00:00
|
|
|
|
2010-05-13 02:02:05 +00:00
|
|
|
if (!defined('MOODLE_INTERNAL')) {
|
|
|
|
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
|
|
|
|
}
|
|
|
|
|
2006-12-20 08:05:26 +00:00
|
|
|
require_once($CFG->libdir.'/formslib.php');
|
|
|
|
|
2010-10-12 08:34:52 +00:00
|
|
|
class groups_import_form extends moodleform {
|
2006-12-20 08:05:26 +00:00
|
|
|
|
2007-05-08 15:44:37 +00:00
|
|
|
function definition() {
|
2010-06-08 06:00:45 +00:00
|
|
|
$mform =& $this->_form;
|
2010-10-12 08:34:52 +00:00
|
|
|
$data = $this->_customdata;
|
2006-12-28 15:43:47 +00:00
|
|
|
|
2010-06-08 06:00:45 +00:00
|
|
|
//fill in the data depending on page params
|
2007-05-08 15:44:37 +00:00
|
|
|
//later using set_data
|
2010-06-08 06:00:45 +00:00
|
|
|
$mform->addElement('header', 'general');
|
2006-12-28 15:43:47 +00:00
|
|
|
|
2010-06-08 06:00:45 +00:00
|
|
|
$filepickeroptions = array();
|
|
|
|
$filepickeroptions['filetypes'] = '*';
|
2010-10-12 08:34:52 +00:00
|
|
|
$filepickeroptions['maxbytes'] = get_max_upload_file_size();
|
2010-06-08 06:00:45 +00:00
|
|
|
$mform->addElement('filepicker', 'userfile', get_string('import'), null, $filepickeroptions);
|
2006-12-28 15:43:47 +00:00
|
|
|
|
2010-10-12 08:34:52 +00:00
|
|
|
$mform->addElement('hidden', 'id');
|
|
|
|
|
|
|
|
$this->add_action_buttons(true, get_string('importgroups'));
|
|
|
|
|
|
|
|
$this->set_data($data);
|
2007-05-08 15:44:37 +00:00
|
|
|
}
|
2006-12-20 08:05:26 +00:00
|
|
|
}
|
2009-11-04 08:11:02 +00:00
|
|
|
|