Skip to content

Commit

Permalink
MDL-45455 quiz cron must rollback transaction on error.
Browse files Browse the repository at this point in the history
  • Loading branch information
timhunt committed May 15, 2014
1 parent a929fd5 commit 6f988b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mod/quiz/cronlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ public function update_overdue_attempts($timenow, $processto) {
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();
}
}

Expand Down

0 comments on commit 6f988b7

Please sign in to comment.