-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
3.10.6
-
None
-
MOODLE_310_STABLE
When selecting the Overview report in the block then selecting the feedback activity in the completion report a dml exception is thrown as per below:
Can't find data record in database table feedback_completed.
Debug info:
SELECT * FROM {feedback_completed} WHERE feedback = ? AND anonymous_response = ? AND userid = ?
[array (
0 => '13483',
1 => 2,
2 => 57204,
)]
Error code: invalidrecord
Stack trace:
- line 1646 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
- line 1622 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
- line 94 of /mod/feedback/classes/completion.php: call to moodle_database->get_record()
- line 63 of /mod/feedback/show_entries.php: call to mod_feedback_completion->__construct()
Issue seems to be caused by the urls generated in the blocks report passing the user id to the feedback module without checking the user has submitted something the url should default to the feedback activity without any parameters as is consistent with other activity modules which support completion data.
Te replicate
Create a course with completion tracking enabled and enrol 1 user in the course
Create the feedback activity in the course and set completion to student must view this activity to complete it.
Add the completion progress block to the course
Select the "Overview" report from the completion progress block
Click the feedback module from the report details and note the dml exception for a record which doesnt exist