mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-14232 group import moved to group UI, fixed regressions and improved coding style - in future we should definitely improve the navigation structure of groups interface
This commit is contained in:
parent
19eb73cdf3
commit
81ed4632fc
4 changed files with 74 additions and 137 deletions
31
group/import_form.php
Normal file
31
group/import_form.php
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue