]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15113 converted some skipped dml stuff
authorskodak <skodak>
Mon, 9 Jun 2008 12:18:13 +0000 (12:18 +0000)
committerskodak <skodak>
Mon, 9 Jun 2008 12:18:13 +0000 (12:18 +0000)
mod/quiz/locallib.php
mod/quiz/report/analysis/report.php

index 5cd9f73890f9df8069cf1146d5193b626889e5bd..c1bad787eeb61bbb67b86dd5c7b670df4203884b 100644 (file)
@@ -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));
index c28130759639da151f3abe897f28dc160ac8bdd8..ce315064d8d1d50eef6511fd171628d53ffbb28b 100644 (file)
@@ -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');
             }