Merge branch 'w36_MDL-29175_m22_clozearray' of git://github.com/skodak/moodle
authorSam Hemelryk <sam@moodle.com>
Mon, 12 Sep 2011 04:52:36 +0000 (16:52 +1200)
committerSam Hemelryk <sam@moodle.com>
Mon, 12 Sep 2011 04:52:36 +0000 (16:52 +1200)
question/type/multianswer/edit_multianswer_form.php

index f6d328d..6812cf9 100644 (file)
@@ -91,9 +91,8 @@ class qtype_multianswer_edit_form extends question_edit_form {
         $mform->addRule('questiontext', null, 'required', null, 'client');
 
         // display the questions from questiontext;
-        if ("" != optional_param('questiontext', '', PARAM_RAW)) {
-            $this->questiondisplay = fullclone(qtype_multianswer_extract_question(
-                    optional_param('questiontext', '', PARAM_RAW)));
+        if ($questiontext = optional_param_array('questiontext', false, PARAM_RAW)) {
+            $this->questiondisplay = fullclone(qtype_multianswer_extract_question($questiontext));
 
         } else {
             if (!$this->reload && !empty($this->savedquestiondisplay->id)) {