filepicker is not loading

filepicker is not loading

by Flo Jungwirth -
Number of replies: 5

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

Attachment filepicker error.jpg
Average of ratings: -
In reply to Flo Jungwirth

Re: filepicker is not loading

by Stephen Mc Guinness -

Hi Flo,

Are you seeing any server side errors in your PHP error logs?

Stephen Mc Guinness
Enovation Solutions

In reply to Stephen Mc Guinness

Re: filepicker is not loading

by Flo Jungwirth -

No, there are no error logs in this regard.

Flo

In reply to Flo Jungwirth

Re: filepicker is not loading

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Do you have Firebug or a similar Javascript debugger installed? I've had javascript errors elsewhere in the page cause the HTML Editor and Filepicker not to load, so it might be worth checking the javascript console.

In reply to Flo Jungwirth

Re: filepicker is not loading

by Sumit Negi -

Hi flo,

I have faced same problem. Finally i got a solution for it. Please ensure that did you set footer for page or not. 

echo $OUTPUT->footer(); 

Thanks 

sumit negi