From: tjhunt Date: Mon, 24 Sep 2007 14:18:47 +0000 (+0000) Subject: Related to MDL-10916 - saving Cloze questions in Moodle 1.9 generates Notices because... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=80fdc53efd7300ec4b2f4c6137756927794416a2;p=moodle.git Related to MDL-10916 - saving Cloze questions in Moodle 1.9 generates Notices because of changes to questionstupe_base::save_question. --- diff --git a/question/type/multianswer/questiontype.php b/question/type/multianswer/questiontype.php index 93f8fd1c04..7f3fe1fd0b 100644 --- a/question/type/multianswer/questiontype.php +++ b/question/type/multianswer/questiontype.php @@ -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; diff --git a/question/type/questiontype.php b/question/type/questiontype.php index 05ab192a5d..50c51d3b94 100644 --- a/question/type/questiontype.php +++ b/question/type/questiontype.php @@ -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();