1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-25 10:26:17 +02:00

Merge branch 'MDL-47664-master' of git://github.com/andrewnicols/moodle

This commit is contained in:
Dan Poltawski 2014-10-20 17:49:02 +01:00
commit cf3fbf8a0e

@ -527,7 +527,12 @@ abstract class testing_util {
foreach ($data as $table => $records) {
if (isset($structure[$table]['id']) and $structure[$table]['id']->auto_increment) {
$nextid = self::get_next_sequence_starting_value($records);
$lastrecord = end($records);
if ($lastrecord) {
$nextid = $lastrecord->id + 1;
} else {
$nextid = 1;
}
if (!isset($current[$table])) {
$DB->get_manager()->reset_sequence($table);
} else if ($nextid == $current[$table]) {