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

workshop_list_student_submissions: unable to get submission

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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

      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".

        Gliffy Diagrams

        1. submissions.php
          19 kB
          Stanislav Tsymbalov

          Issue Links

            Activity

            Hide
            jovca 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
            jovca 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.
            Hide
            delustas 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
            delustas 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)
            Hide
            mudrd8mz 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
            mudrd8mz 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
            mudrd8mz David Mudrak added a comment -

            Fixed in CVS. Thanks for being patient.

            Show
            mudrd8mz David Mudrak added a comment - Fixed in CVS. Thanks for being patient.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Nov/09