Details
Description
With debug mode set to developer, when I enter a Choice activity to make a choice, the following error is displayed:
Catchable fatal error: Argument 2 passed to moodle_database::get_record() must be an array, string given, called in C:\xampp\htdocs\moodle\mod\choice\lib.php on line 299 and defined in C:\xampp\htdocs\moodle\lib\dml\moodle_database.php on line 1166
I made the following correction to choice/lib.php
Current:
if ($choice->allowupdate && $aaa = $DB->get_record('choice_answers', 'choiceid', $choice->id, 'userid', $user->id)) {
New:
if ($choice->allowupdate && $aaa = $DB->get_record('choice_answers', array('choiceid' => $choice->id, 'userid' => $user->id))) {