mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-45455 quiz cron must rollback transaction on error.
This commit is contained in:
parent
a929fd50f9
commit
6f988b712d
1 changed files with 3 additions and 0 deletions
|
@ -84,6 +84,9 @@ class mod_quiz_overdue_attempt_updater {
|
||||||
mtrace("Error while processing attempt {$attempt->id} at {$attempt->quiz} quiz:");
|
mtrace("Error while processing attempt {$attempt->id} at {$attempt->quiz} quiz:");
|
||||||
mtrace($e->getMessage());
|
mtrace($e->getMessage());
|
||||||
mtrace($e->getTraceAsString());
|
mtrace($e->getTraceAsString());
|
||||||
|
// Close down any currently open transactions, otherwise one error
|
||||||
|
// will stop following DB changes from being committed.
|
||||||
|
$DB->force_transaction_rollback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue