MDL-45455 quiz cron must rollback transaction on error.

This commit is contained in:
Tim Hunt 2014-05-13 13:35:39 +01:00
parent a929fd50f9
commit 6f988b712d

View File

@ -84,6 +84,9 @@ class mod_quiz_overdue_attempt_updater {
mtrace("Error while processing attempt {$attempt->id} at {$attempt->quiz} quiz:");
mtrace($e->getMessage());
mtrace($e->getTraceAsString());
// Close down any currently open transactions, otherwise one error
// will stop following DB changes from being committed.
$DB->force_transaction_rollback();
}
}