moodle/group/import_form.php

32 lines
883 B
PHP
Raw Normal View History

<?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 {
2007-05-08 15:44:37 +00:00
function definition() {
2010-06-08 06:00:45 +00:00
$mform =& $this->_form;
$data = $this->_customdata;
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');
2010-06-08 06:00:45 +00:00
$filepickeroptions = array();
$filepickeroptions['filetypes'] = '*';
$filepickeroptions['maxbytes'] = get_max_upload_file_size();
2010-06-08 06:00:45 +00:00
$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);
2007-05-08 15:44:37 +00:00
}
}