index ef70a9a..29775c1 100755 --- a/lib/form/filemanager.php +++ b/lib/form/filemanager.php @@ -146,7 +146,12 @@ class MoodleQuickForm_filemanager extends HTML_QuickForm_element { $options->target = $id; $options->accepted_types = $accepted_types; $options->return_types = FILE_INTERNAL; - $options->context = $PAGE->context; + $options->context = new stdClass(); + $options->context->id = $PAGE->context->id; + $options->context->contextlevel = $PAGE->context->contextlevel; + $options->context->instanceid = $PAGE->context->instanceid; + $options->context->path = $PAGE->context->path; + $options->context->depth = $PAGE->context->depth; $html = $this->_getTabs(); $html .= form_filemanager_render($options);