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

File Attachments Downloaded From Assignment Submissions Corrupt

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • 2.2, 2.2.1
    • Assignment (2.2)
    • None
    • MOODLE_22_STABLE
    • Hide

      Currently I have created my own cut down version of pluginfile.php that I call from my own assignment type. I don't like it because it is not as secure, but for now I have no alternative.

      Show
      Currently I have created my own cut down version of pluginfile.php that I call from my own assignment type. I don't like it because it is not as secure, but for now I have no alternative.
    • Hide

      Create an Online Assignment in Moodle 2.1. Using the html editor upload a video file, and insert it into the submissions text area. Save the activity and view the assignment. The video will fail to play, because the file is corrupt.

      Show
      Create an Online Assignment in Moodle 2.1. Using the html editor upload a video file, and insert it into the submissions text area. Save the activity and view the assignment. The video will fail to play, because the file is corrupt.

      When you upload a non text file into an assignment, and later download that file, the file has two new line characters added at the beginning of the byte stream corrupting the file. I have done a lot of testing, because I thought the bug was mine. The file is uploaded correctly and somewhere after pluginfile.php branches processing depending on the activity type, and before the send_stored_file function is called the new line characters are appended. I could not find the location myself, though I tried.

            moodle.com Moodle HQ
            jhunt Justin Hunt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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