From dfee5a9a8a8289cfb6a4a86a3cd05ad4dc0e685c Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 9 Jun 2008 12:18:13 +0000 Subject: [PATCH] MDL-15113 converted some skipped dml stuff --- mod/quiz/locallib.php | 4 ++-- mod/quiz/report/analysis/report.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/quiz/locallib.php b/mod/quiz/locallib.php index 5cd9f73890..c1bad787ee 100644 --- a/mod/quiz/locallib.php +++ b/mod/quiz/locallib.php @@ -151,7 +151,7 @@ function quiz_get_latest_attempt_by_user($quizid, $userid) { } /** - * Load an attempt by id. You need to use this method instead of get_record, because + * Load an attempt by id. You need to use this method instead of $DB->get_record, because * of some ancient history to do with the upgrade from Moodle 1.4 to 1.5, See the comment * after CREATE TABLE `prefix_quiz_newest_states` in mod/quiz/db/mysql.php. * @@ -466,7 +466,7 @@ function quiz_set_grade($newgrade, &$quiz) { } // Use a transaction, so that on those databases that support it, this is safer. - begin_sql(); + $DB->begin_sql(); // Update the quiz table. $success = $DB->set_field('quiz', 'grade', $newgrade, array('id' => $quiz->instance)); diff --git a/mod/quiz/report/analysis/report.php b/mod/quiz/report/analysis/report.php index c281307596..ce315064d8 100644 --- a/mod/quiz/report/analysis/report.php +++ b/mod/quiz/report/analysis/report.php @@ -146,7 +146,7 @@ class quiz_report extends quiz_default_report { " WHERE i.quiz = '$quiz->id' AND q.id = i.question". " AND q.id IN ($questionlist)"; - if (!$quizquestions = get_records_sql($sql)) { + if (!$quizquestions = $DB->get_records_sql($sql)) { print_error('No questions found'); } -- 2.39.5