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

    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-57576-33-updatefeedbackfile

      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

            Assignee:
            roperto Daniel Thee Roperto
            Reporter:
            roperto Daniel Thee Roperto
            Peer reviewer:
            Adrian Greeve
            Integrator:
            David Monllaó
            Tester:
            Marina Glancy
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/Mar/17