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

Attempting to delete a teacher response file will delete a student's submission

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Assignment (2.2)
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      In the file '/mod/assignment/type/upload/assignment.class.php', in the function 'delete_responsefile', the line of code:

      if ($file = $fs->get_file($this->context->id, 'assignment_submission', $userid, '/', $file)) {

      Should, as far as I can tell, read:

      if ($file = $fs->get_file($this->context->id, 'assignment_response', $userid, '/', $file)) {

      Otherwise, a student's work could be deleted, instead of the teacher's response (assuming they shared the same filename). The best case, would be a simple error message.

        Attachments

          Activity

            People

            • Assignee:
              nebgor Aparup Banerjee
              Reporter:
              davosmith Davo Smith
              Tester:
              Nobody
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10