diff --git a/lib/testing/classes/util.php b/lib/testing/classes/util.php index 4fdd3c7..c9b4c6b 100644 --- a/lib/testing/classes/util.php +++ b/lib/testing/classes/util.php @@ -657,7 +657,6 @@ abstract class testing_util { } continue; } - if (isset($structure[$table]['id']) and $structure[$table]['id']->auto_increment) { $currentrecords = $DB->get_records($table, array(), 'id ASC'); $changed = false; @@ -684,9 +683,7 @@ abstract class testing_util { } $DB->delete_records($table, array()); - foreach ($records as $record) { - $DB->import_record($table, $record, false, true); - } + $DB->insert_records($table, $records, true); } // reset all next record ids - aka sequences