Quiz activity - duplicating last too long

Quiz activity - duplicating last too long

by Ratko Bucic -
Number of replies: 0

When I try to duplicate one of quizzes (one activity in section), it last like 10 minutes. I think original quiz was imported from another server long time ago. 

Moodle version: 2.9.8+ (Build: 20160915) 

Any idea how this can be fixed?

Duplicating of empty quiz activity last 2 sec, and no errors ;)

In debug log is shown hundred of lines like this:

[01-Sep-2017 17:12:42 Asia/Shanghai] Debugging: Did you remember to make the first column something unique in your call to get_records? Duplicate value 'learning.puxi.nordanglia.com+140818002503+ekKAKE learning.puxi.nordanglia.com+140818002503+TJaXGv' found in column 'concat(stamp, ' ', version)'. in 
* line 1089 of /lib/dml/mysqli_native_moodle_database.php: call to debugging()
* line 1404 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
* line 652 of /backup/util/dbops/restore_dbops.class.php: call to moodle_database->get_records_sql_menu()
* line 516 of /backup/util/dbops/restore_dbops.class.php: call to restore_dbops::prechek_precheck_qbanks_by_level()
* line 178 of /backup/util/helper/restore_prechecks_helper.class.php: call to restore_dbops::precheck_categories_and_questions()
* line 376 of /backup/controller/restore_controller.class.php: call to restore_prechecks_helper::execute_prechecks()
* line 3551 of /course/lib.php: call to restore_controller->execute_precheck()
* line 3487 of /course/lib.php: call to duplicate_module()
* line 118 of /course/rest.php: call to mod_duplicate_activity()
Average of ratings: -