morethanonerecordinfetch in Grades User Report [2.7.4]

morethanonerecordinfetch in Grades User Report [2.7.4]

by Scott Zuvich -
Number of replies: 0

We are receiving this error when trying to view user report in gradesheets. I am aware that it means there's a duplicate entry for 'something,' but am unsure what that something is, or which tables/fields i should be looking at to track it down.

Default exception handler: Found more than one record in fetch() ! Debug:
Error code: morethanonerecordinfetch
* line 463 of \lib\setuplib.php: moodle_exception thrown
* line 163 of \lib\grade\grade_object.php: call to print_error()
* line 527 of \lib\grade\grade_grade.php: call to grade_object::fetch_helper()
* line 381 of \grade\report\user\lib.php: call to grade_grade::fetch()
* line 622 of \grade\report\user\lib.php: call to grade_report_user->fill_table_recursive()
* line 622 of \grade\report\user\lib.php: call to grade_report_user->fill_table_recursive()
* line 343 of \grade\report\user\lib.php: call to grade_report_user->fill_table_recursive()
* line 149 of \grade\report\user\index.php: call to grade_report_user->fill_table()

An exhaustive search revealed only a potential solution from 2007, but I don't want to implement it since it's so old. Here is the one I found: https://moodle.org/mod/forum/discuss.php?d=78622

This is only happening in one course (no other courses see this error, as far as we know) and only when there is a student selected for the gradesheet user report.

Location: grade/report/user/index.php?id=XXX&userid=XXX

Average of ratings: -