Moodle
  1. Moodle
  2. MDL-7218

workshop_list_student_submissions: unable to get submission

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.5.3, 1.7.7, 1.8.10, 1.9.6
    • Fix Version/s: 1.9.7
    • Component/s: Workshop
    • Labels:
      None
    • Rank:
      27881

      Description

      At my institution, a Workshop activity has been setup to allow students to peer assess work. Each student is allocated three assignments to peer assess upon submitting their own assignment.

      However, when students are attempting to peer assess, students see the message: "workshop_list_student_submissions: unable to get submission".

      As yet, I have not been able to see if this bug has been reported or fixed – I have searched the Moodle Bug Tracker. A discussion took place at http://moodle.org/mod/forum/discuss.php?d=30234 which suggested a "hack".

      1. submissions.php
        19 kB
        Stanislav Tsymbalov

        Issue Links

          Activity

          Nitin Parmar created issue -
          Hide
          Slobodan Jovcic added a comment -

          Bug is still present in 1.8.2. Be careful with the "hack", read more of the discussion for warnings.

          Show
          Slobodan Jovcic added a comment - Bug is still present in 1.8.2. Be careful with the "hack", read more of the discussion for warnings.
          Stanislav Tsymbalov made changes -
          Field Original Value New Value
          Attachment submissions.php [ 16530 ]
          Hide
          Stanislav Tsymbalov added a comment -

          Bug description:
          If user delete submission - assessments are not deleted.
          Assessments reading from SQL-database which links to non-existent sumbissions - therefore message appears "workshop_list_student_submissions: unable to get submission".

          In order to delete assessments correctly, you need:

          1. File "mod/workshop/submissions.php", line:
          delete_records("workshop_assessments", "submissionid", $submission->id);
          move out of the cicle:
          if ($assessments = workshop_get_assessments($submission, 'ALL')) {
          }

          2. or replace by the attached file (for Moodle 1.8.2)

          Show
          Stanislav Tsymbalov added a comment - Bug description: If user delete submission - assessments are not deleted. Assessments reading from SQL-database which links to non-existent sumbissions - therefore message appears "workshop_list_student_submissions: unable to get submission". In order to delete assessments correctly, you need: 1. File "mod/workshop/submissions.php", line: delete_records("workshop_assessments", "submissionid", $submission->id); move out of the cicle: if ($assessments = workshop_get_assessments($submission, 'ALL')) { } 2. or replace by the attached file (for Moodle 1.8.2)
          David Mudrak made changes -
          Assignee Eloy Lafuente (stronk7) [ stronk7 ] David Mudrak [ mudrd8mz ]
          David Mudrak made changes -
          Summary Peer Assessment bug workshop_list_student_submissions: unable to get submission
          Affects Version/s 1.9.6 [ 10340 ]
          Affects Version/s 1.8.10 [ 10350 ]
          Affects Version/s 1.7.7 [ 10315 ]
          Component/s Workshop [ 10065 ]
          Component/s Database SQL/XMLDB [ 10131 ]
          Martin Dougiamas made changes -
          Fix Version/s 1.9.7 [ 10360 ]
          Martin Dougiamas made changes -
          Priority Major [ 3 ] Blocker [ 1 ]
          David Mudrak made changes -
          Link This issue is duplicated by MDL-20668 [ MDL-20668 ]
          Hide
          David Mudrak added a comment -

          Thanks to Stanislav for spotting this. For the record, here is my analysis of the bug.
          The assessment may be in three states:
          1. "hot", just created but not completed (timecreated is in the future)
          2. "warm" just created and still capable of being edited, and
          3. "cold" after the editing time
          The problem is with the "hot" records as their "timecreated" field is set to +1 year in the future (grrrr wtf design). Such records are not returned by workshop_get_assessments(). If a submission is linked with "hot" assessments only and it submission is deleted, the hot assessments records are not cleaned-up. If there is at least one warm or cold assessment, the clean-up procedure within the foreach cycle runs and no records are left (which is IMHO the reason for why this is hard to reproduce).
          The Stanislav's fix removes the assessment records regardless their temperature. I will add a clean-up code into the upgrade.php so that all orphaned records are removed during the upgrade and hopefully no others are created.

          Show
          David Mudrak added a comment - Thanks to Stanislav for spotting this. For the record, here is my analysis of the bug. The assessment may be in three states: 1. "hot", just created but not completed (timecreated is in the future) 2. "warm" just created and still capable of being edited, and 3. "cold" after the editing time The problem is with the "hot" records as their "timecreated" field is set to +1 year in the future (grrrr wtf design). Such records are not returned by workshop_get_assessments(). If a submission is linked with "hot" assessments only and it submission is deleted, the hot assessments records are not cleaned-up. If there is at least one warm or cold assessment, the clean-up procedure within the foreach cycle runs and no records are left (which is IMHO the reason for why this is hard to reproduce). The Stanislav's fix removes the assessment records regardless their temperature. I will add a clean-up code into the upgrade.php so that all orphaned records are removed during the upgrade and hopefully no others are created.
          Hide
          David Mudrak added a comment -

          Fixed in CVS. Thanks for being patient.

          Show
          David Mudrak added a comment - Fixed in CVS. Thanks for being patient.
          David Mudrak made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Martin Dougiamas made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          QA Assignee nobody
          Martin Dougiamas made changes -
          Workflow jira [ 18009 ] MDL Workflow [ 53943 ]
          Martin Dougiamas made changes -
          Workflow MDL Workflow [ 53943 ] MDL Full Workflow [ 83034 ]

            People

            • Votes:
              4 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: