forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
import_form.php
31 lines (21 loc) · 883 Bytes
/
import_form.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once($CFG->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'));
$this->set_data($data);
}
}