Dear community,
I'm creating a moodle 2.0 form, but a filepicker is not loading. I have no idea what I am doing worng, because there are other forms/filepickers with nearly the same code and there are working.
Code:
class scorm_upload_form extends moodleform {
function definition() {
global $CFG, $USER, $COURSE;
$mform = & $this->_form;
$mform->addElement('header', 'general', get_string("import", "block_myblock"),null,null);
$mform->addElement('filepicker', 'attachment', get_string('file', 'block_myblock'), null, null);
$mform->addElement('hidden', 'courseid');
$mform->setType('courseid', PARAM_INT);
$mform->setDefault('courseid', 0);
$this->add_action_buttons();
}
}
To make my problem more understandable, I add a screenshot.
Thanks in advance,
Flo