Moodle

exercise_list_submissions_for_admin: Submission record not found!

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 1.9.3
  • Fix Version/s: None
  • Component/s: Exercise
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE

Description

When teacher deletes a submissions with assessments that are in the editing time period, this assessments are not deleted, living them without relation with any submission (they have been deleted).

This causes problems in functions such as mod/exercise/locallib.php/exercise_list_submissions_for_admin() that ends printing the following error message:

"exercise_list_submissions_for_admin: Submission record not found!"

To solve the problem, the patch at [1] can be applied. Basically it gets asessments calling get_records instead of exercise_get_assessments() function, that takes care of editingtime.

Thanks in advance

------

[1] dangerous patch!! :-P

Index: submissions.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/exercise/Attic/submissions.php,v
retrieving revision 1.29.2.4
diff -r1.29.2.4 submissions.php
156c156,158
< if ($assessments = exercise_get_assessments($submission)) {

>
> $assessments = get_records_select("exercise_assessments", "(submissionid = $submission->id)", "timecreated ASC");
> if ( $assessments ) {
402c404,405
< if ($assessments = exercise_get_assessments($submission)) {

> $assessments = get_records_select("exercise_assessments", "(submissionid = $submission->id)", "timecreated ASC");
> if ($assessments) {

Activity

Hide
Michael de Raadt added a comment -

Thanks for reporting this issue.

We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

Michael d;

lqjjLKA0p6

Show
Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
Hide
Michael de Raadt added a comment -

I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Show
Michael de Raadt added a comment - I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: