Automatic installer.php lang files by installer_builder (20070726)
[moodle-linuxchix.git] / course / import / groups / import_form.php
blobf0a7f1a6d019547db0bca8ec2cc57f4779f49244
1 <?php // $Id$
3 require_once($CFG->libdir.'/formslib.php');
5 class course_import_groups_form extends moodleform {
7 function definition() {
9 global $CFG, $USER;
10 $mform =& $this->_form;
11 $maxuploadsize = $this->_customdata['maxuploadsize'];
12 $strimportgroups = get_string("importgroups");
14 $this->set_upload_manager(new upload_manager('userfile', true, false, '', false, $maxuploadsize, true, true));
15 //$this->set_max_file_size('', $maxuploadsize);
17 $mform->addElement('header', 'general', '');//fill in the data depending on page params
18 //later using set_data
19 // buttons
21 $mform->addElement('file', 'userfile', '');
22 $mform->setHelpButton('userfile', array('attachment', get_string('attachment', 'forum'), 'forum'));
25 $this->add_action_buttons(false, $strimportgroups);
28 function get_import_name(){
29 if ($this->is_submitted() and $this->is_validated()) {
30 // return the temporary filename to process
31 return $this->_upload_manager->files['userfile']['tmp_name'];
32 }else{
33 return NULL;