"MDL-12304, fix double text"
[moodle-linuxchix.git] / grade / edit / outcome / import_outcomes_form.php
blob449cc217f432bf827297955c73937a2fbd4bf20f
1 <?php /* $Id$ */
3 require_once($CFG->dirroot.'/lib/formslib.php');
5 class import_outcomes_form extends moodleform {
7 function definition() {
8 global $COURSE, $USER;
10 $mform =& $this->_form;
11 //$this->set_upload_manager(new upload_manager('importfile', false, false, null, false, 0, true, true, false));
13 $mform->addElement('hidden', 'action', 'upload');
14 $mform->addElement('hidden', 'id', $COURSE->id);
16 $scope = array();
17 if (($COURSE->id > 1) && has_capability('moodle/grade:manage', get_context_instance(CONTEXT_SYSTEM))) {
18 $mform->addElement('radio', 'scope', get_string('importcustom', 'grades'), null, 'custom');
19 $mform->addElement('radio', 'scope', get_string('importstandard', 'grades'), null, 'global');
20 $mform->setDefault('scope', 'custom');
23 $mform->addElement('file', 'userfile', get_string('importoutcomes', 'grades'));
25 $mform->addElement('submit', 'save', get_string('uploadthisfile'));
29 function get_um() {
30 return $this->_upload_manager;