Found more than one record in fetch() ! /lib/setuplib.php

Found more than one record in fetch() ! /lib/setuplib.php

by Ahsan Tejani -
Number of replies: 0

I restore backup of around 50+ course. now when login through user account. Following error showing. please guide as its creating a lot of problem. 

Found more than one record in fetch() !
File: /lib/setuplib.php
Line: 497
Stack trace:
Error code: morethanonerecordinfetch
* line 497 of /lib/setuplib.php: moodle_exception thrown
* line 163 of /lib/grade/grade_object.php: call to print_error()
* line 366 of /lib/grade/grade_item.php: call to grade_object::fetch_helper()
* line 758 of /lib/completionlib.php: call to grade_item::fetch()
* line 1136 of /lib/completionlib.php: call to completion_info->get_grade_completion()
* line 1092 of /lib/completionlib.php: call to completion_info->get_other_cm_completion_data()
* line 82 of /completion/classes/progress.php: call to completion_info->get_data()
* line 210 of /course/classes/external/course_summary_exporter.php: call to core_completion\progress::get_course_progress_percentage()
* line 62 of /course/classes/external/course_summary_exporter.php: call to core_course\external\course_summary_exporter::get_course_progress()
* line 125 of /lib/classes/external/exporter.php: call to core_course\external\course_summary_exporter->get_other_values()
* line 3880 of /course/externallib.php: call to core\external\exporter->export()
* line ? of unknownfile: call to core_course_external::{closure}()
* line 3881 of /course/externallib.php: call to array_map()
* line 261 of /lib/externallib.php: call to core_course_external::get_enrolled_courses_by_timeline_classification()
* line 81 of /lib/ajax/service.php: call to external_api::call_external

Average of ratings: -