3 require_once($CFG->dirroot
.'/lib/formslib.php');
5 class import_outcomes_form
extends moodleform
{
7 function definition() {
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
);
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'));
30 return $this->_upload_manager
;