Hello,
I am having a fetch() error and seem unable to solve it. I am using Moodle 2.6, latest release, with Essential 2.7.
I initially thought this was a problem with question type I am using (drag and drop on image), but Tim Hunt said no. He said the errors are related to grade, as shown in the code.
The error appears after finishing a quiz associated with a Navigation Course on our site. I am logged in as trainee. Quiz finishes, but when I return to view grades, I get this fetch error. Here is debug information:
Debug info:
Error code: more than one record in fetch()
Stack trace:
- line 463 of /lib/setuplib.php: moodle_exception thrown
- line 163 of /lib/grade/grade_object.php: call to print_error()
- line 326 of /lib/grade/grade_item.php: call to grade_object::fetch_helper()
- line 980 of /lib/grade/grade_item.php: call to grade_item::fetch()
- line 1010 of /lib/gradelib.php: call to grade_item::fetch_course_item()
- line 84 of /grade/report/user/index.php: call to grade_regrade_final_grades()
What is even worse, I cannot redo the quiz, enter the quiz, or even create a new quiz activity in the related course area. It is impossible to do anything with it, except delete it, which would be devastating to my work schedule.
I did find an older post from 2012 in which this was discussed and a bug tracker was filed on it https://tracker.moodle.org/browse/MDL-31441. It appears the bug is still open. However, the person who initially posted, developed a solution that involved deleting files in the database following the link she provided, but I am not familiar enough with mySql to find the potentially offending data.
I did post a similar request for help in the general help forum, but that was before I saw that gradebook has its own forum. I imagine this is the better place to get the answer. And I hope my double posting transgression can be forgiven this once.
I really, really, need someone who can help me with this.
Rod Wolford