Moodle

Under certain circumstances workshop_get_user_assessments may fail

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Duplicate
  • Affects Version/s: 1.9.6
  • Fix Version/s: 1.9.7
  • Component/s: Workshop
  • Labels:
    None
  • Database:
    MySQL
  • Difficulty:
    Moderate
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

When a student access a workshop in view, under certain circumstances (that are still under investigation and not always reproducible) get the following error:

workshop_list_student_submissions: unable to get submission

Trying to identify the problem we displayed submission id and user id as follows:

workshop_list_student_submissions: unable to get submission id 694 for user 5709

According to db tables, submission id 694 should not be retrived for this student, thus the error.

Problem appears only for some students, while others does not suffer the issue on the same workshop.

Issue Links

Activity

Hide
David Mudrak added a comment -

This looks similar to MDL-7218. Any chances the solution described there could help your issue?

Show
David Mudrak added a comment - This looks similar to MDL-7218. Any chances the solution described there could help your issue?
Hide
David Mudrak added a comment -

Andrea, does it mean that the user 5709 is neither author nor the reviewer of the submission 694? Can you try to run the following two queries and report the results?

SELECT * FROM mdl_workshop_assessments WHERE submissionid=694 AND userid=5709

and

SELECT * FROM mdl_workshop_submissions WHERE id=694 AND userid=5709
Show
David Mudrak added a comment - Andrea, does it mean that the user 5709 is neither author nor the reviewer of the submission 694? Can you try to run the following two queries and report the results?
SELECT * FROM mdl_workshop_assessments WHERE submissionid=694 AND userid=5709
and
SELECT * FROM mdl_workshop_submissions WHERE id=694 AND userid=5709
Hide
Andrea Bicciolo added a comment -

First query:
"id";"workshopid";"submissionid";"userid";"timecreated";"timegraded";"timeagreed";"grade";"gradinggrade";"teachergraded";"mailed";"resubmission";"donotuse";"generalcomment";"teachercomment"
"1069";"152";"694";"5709";"1288311708";"0";"0";"-1";"0";"0";"0";"0";"0";;

Second query:
no record returned

Show
Andrea Bicciolo added a comment - First query: "id";"workshopid";"submissionid";"userid";"timecreated";"timegraded";"timeagreed";"grade";"gradinggrade";"teachergraded";"mailed";"resubmission";"donotuse";"generalcomment";"teachercomment" "1069";"152";"694";"5709";"1288311708";"0";"0";"-1";"0";"0";"0";"0";"0";; Second query: no record returned
Hide
David Mudrak added a comment -

OK, so we know the user is reviewer of the submission - it was allocated to him to assess. Now please run the following and report the results please

SELECT * FROM mdl_workshop_submissions WHERE id=694
Show
David Mudrak added a comment - OK, so we know the user is reviewer of the submission - it was allocated to him to assess. Now please run the following and report the results please
SELECT * FROM mdl_workshop_submissions WHERE id=694
Hide
Andrea Bicciolo added a comment -

This third query returned no record.

Show
Andrea Bicciolo added a comment - This third query returned no record.
Hide
David Mudrak added a comment -

OK, here we go. It is a known problem with inconsistent database state. The student experiencing the error message is expected to assess a submission that was deleted. This is obvious clone of MDL-7218. I am going to fix that one. Let us continue the discussion there.

Show
David Mudrak added a comment - OK, here we go. It is a known problem with inconsistent database state. The student experiencing the error message is expected to assess a submission that was deleted. This is obvious clone of MDL-7218. I am going to fix that one. Let us continue the discussion there.
Hide
David Mudrak added a comment -

Closing this issue as duplicate of MDL-7218. I am going to work on this nasty thing.

Show
David Mudrak added a comment - Closing this issue as duplicate of MDL-7218. I am going to work on this nasty thing.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: