Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-37871

Assignment portfolio export doesn't export files in richhtml format

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.3.4, 2.7.3, 2.8.1
    • Assignment
    • 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');

            Unassigned Unassigned
            jhunt Justin Hunt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.