Skip to content

Commit

Permalink
MDL-15452 - forgot to check a DB call for errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhunt committed Sep 4, 2008
1 parent 056995f commit 45da388
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mod/quiz/locallib.php
Expand Up @@ -156,6 +156,9 @@ function quiz_get_latest_attempt_by_user($quizid, $userid) {
function quiz_load_attempt($attemptid) {
global $DB;
$attempt = $DB->get_record('quiz_attempts', array('id' => $attemptid));
if (!$attempt) {
return false;
}

if (!$DB->record_exists('question_sessions', array('attemptid' => $attempt->uniqueid))) {
/// this attempt has not yet been upgraded to the new model
Expand Down

0 comments on commit 45da388

Please sign in to comment.