]> git.mjollnir.org Git - moodle.git/commitdiff
Related to MDL-10916 - saving Cloze questions in Moodle 1.9 generates Notices because...
authortjhunt <tjhunt>
Mon, 24 Sep 2007 14:18:47 +0000 (14:18 +0000)
committertjhunt <tjhunt>
Mon, 24 Sep 2007 14:18:47 +0000 (14:18 +0000)
question/type/multianswer/questiontype.php
question/type/questiontype.php

index 93f8fd1c04e3669d59a5129684a45dd9167dba1b..7f3fe1fd0bca3cd2464fab38efc216e20b61a842 100644 (file)
@@ -77,7 +77,7 @@ class embedded_cloze_qtype extends default_questiontype {
             }
             $wrapped->name = $question->name;
             $wrapped->parent = $question->id;
-            $wrapped->category = $question->category;
+            $wrapped->category = $question->category . ',1'; // save_question strips this extra bit off again.
             $wrapped = $QTYPES[$wrapped->qtype]->save_question($wrapped,
                     $wrapped, $question->course);
             $sequence[] = $wrapped->id;
index 05ab192a5d860af9e6d3561d7ed61ba9afbcaf3d..50c51d3b94b6be49e6bd891b2370260444ab14ee 100644 (file)
@@ -289,7 +289,7 @@ class default_questiontype {
             }
         } else {         // Question is a new one
             // Set the unique code
-            list($question->category,$contextid) = explode(',', $form->category);
+            list($question->category,$notused) = explode(',', $form->category);
             $question->stamp = make_unique_id_code();
             $question->createdby = $USER->id;
             $question->timecreated = time();