MDL-33356 fixed a regression after function form_filemanager_redner() was deleted
authorMarina Glancy <marina@moodle.com>
Mon, 28 May 2012 05:52:32 +0000 (13:52 +0800)
committerMarina Glancy <marina@moodle.com>
Mon, 28 May 2012 05:52:32 +0000 (13:52 +0800)
question/type/essay/renderer.php

index afb52f8..288954f 100644 (file)
@@ -113,7 +113,9 @@ class qtype_essay_renderer extends qtype_renderer {
         $pickeroptions->itemid = $qa->prepare_response_files_draft_itemid(
                 'attachments', $options->context->id);
 
         $pickeroptions->itemid = $qa->prepare_response_files_draft_itemid(
                 'attachments', $options->context->id);
 
-        return form_filemanager_render($pickeroptions) . html_writer::empty_tag(
+        $fm = new form_filemanager($pickeroptions);
+        $filesrenderer = $this->page->get_renderer('core', 'files');
+        return $filesrenderer->render($fm). html_writer::empty_tag(
                 'input', array('type' => 'hidden', 'name' => $qa->get_qt_field_name('attachments'),
                 'value' => $pickeroptions->itemid));
     }
                 'input', array('type' => 'hidden', 'name' => $qa->get_qt_field_name('attachments'),
                 'value' => $pickeroptions->itemid));
     }