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

Error "Can not create file" when sending the same feedback file to a student.

    XMLWordPrintable

Details

    • MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • MOODLE_31_STABLE, MOODLE_32_STABLE
    • MDL-57576-33-updatefeedbackfile
    • Hide
      1. Create an assignment (allow sending feedback files)
      2. Select "View all submissions"
      3. Select a student (via checkbox), and down the bottom of the page in the "With selected..." section select "Send feedback files"
      4. Try again, same student, same file – it should fail without the patch, succeed after patch.
      5. Extra test: send again another file, different contents, same name. As the student, you should get the new file instead of the old one.
      Show
      Create an assignment (allow sending feedback files) Select "View all submissions" Select a student (via checkbox), and down the bottom of the page in the "With selected..." section select "Send feedback files" Try again, same student, same file – it should fail without the patch, succeed after patch. Extra test: send again another file, different contents, same name. As the student, you should get the new file instead of the old one.

    Description

      If you try to resend the same feedback file to a student, it fails due to:

      ERROR: duplicate key value violates unique constraint "mdl_file_pat_uix"

      The probable cause is not checking if the user already has that file before trying to copy again.

      To reproduce:

      1) Create an assignment (allow sending feedback files)

      2) Select a student, send any file as a feedback file – it should succeed.

      3) Try again, same student, same file – it should fail.

      Attachments

        Activity

          People

            roperto Daniel Thee Roperto
            roperto Daniel Thee Roperto
            Adrian Greeve Adrian Greeve
            David Monllaó David Monllaó
            Marina Glancy Marina Glancy
            Adrian Greeve, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              13/Mar/17