Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
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) {
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