]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14679 minor dml conversion errors in quiz backup
authorsam_marshall <sam_marshall>
Tue, 1 Jul 2008 13:19:24 +0000 (13:19 +0000)
committersam_marshall <sam_marshall>
Tue, 1 Jul 2008 13:19:24 +0000 (13:19 +0000)
mod/quiz/backuplib.php
question/backuplib.php

index d6919086905a865b8076c14ee286d0fee085a1d5..21a11d708151d5ba7bf43e87bc542c92593219b1 100644 (file)
                                                 {quiz} q
                                            WHERE q.course = ? AND
                                                  g.quiz = q.id AND
-                                                 g.question = t.id",false, array($course));
+                                                 g.question = t.id", array($course));
         if ($categories) {
             foreach ($categories as $key => $category) {
                 $exist = $DB->get_record('question_categories', array('id' => $key));
index 762093446b1f14d900bc03ec998af9aeff6da728..1118be6220c08154ae2b74334220fe6947ce0b61 100644 (file)
      * Insert code to identify categories to later insert all question ids later eg. course, quiz or other module name.
      */
     function question_insert_q_ids($backup_unique_code, $info){
-        global $CFG;
+        global $CFG,$DB;
             //put the ids of the questions from all these categories into the db.
         $status = $DB->execute("INSERT INTO {backup_ids} (backup_code, table_name, old_id, info)
                                 SELECT '$backup_unique_code', 'question', q.id, ''