MDL-15452 - forgot to check a DB call for errors.

This commit is contained in:
tjhunt
2008-09-04 04:52:29 +00:00
parent 056995f248
commit 45da388f6d
+3
View File
@@ -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