-
Bug
-
Resolution: Won't Do
-
Minor
-
None
-
2.3.4, 2.7.3, 2.8.1
-
MOODLE_23_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
When exporting an onlinetext submission from a 2.3 assignment, the html is exported as "assignment.html" but none of the image or other files from the submission's file area are exported. This occurs when the exporting portfolio is using Rich Html format.
I came across this problem when creating a portfolio plugin and noticed the behaviour was different to that of the forum and the 2.2 assignment. It will however be difficult to reproduce using standard portfolio plugins, because they mostly do not support richhtml exports. If necessary I can provide a copy of the portfolio plugin I am developing. (It is called the "blogexport" portfolio because it exports entries to student's blogs.)
The cause of the problem is that when the portfolio_add_button() is called in function render_editor_content() in mod/assign/locallib.php , the 'component' key and value are missing from the passed in parameters. So the files from the submission's filearea cannot be read. It is enough to change this line:
$button->set_callback_options('assign_portfolio_caller', array('cmid' => $this->get_course_module()->id, 'sid' => $submissionid, 'plugin' => $plugintype, 'editor' => $editor, 'area'=>$filearea), '/mod/assign/portfolio_callback.php');
$
to this line:
$button->set_callback_options('assign_portfolio_caller', array('cmid' => $this->get_course_module()->id, 'sid' => $submissionid, 'plugin' => $plugintype, 'component'=>$component,'editor' => $editor, 'area'=>$filearea), '/mod/assign/portfolio_callback.php');
- has a non-specific relationship to
-
MDL-33547 In 2.3 Assignments clicking the "Export to portfolio" link generates an exception
-
- Closed
-