From 5bb96cf618d279137c8bc27237fbf4e7f7db880f Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Fri, 28 Jan 2011 12:20:01 +0000 Subject: [PATCH] qtype_multianswer MDL-26168 fix invalid HTML from the editing form. Fix by Tony Levi. Thanks. --- question/type/multianswer/edit_multianswer_form.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/question/type/multianswer/edit_multianswer_form.php b/question/type/multianswer/edit_multianswer_form.php index 9f496d92735..69f905b0781 100644 --- a/question/type/multianswer/edit_multianswer_form.php +++ b/question/type/multianswer/edit_multianswer_form.php @@ -119,9 +119,9 @@ class question_edit_multianswer_form extends question_edit_form { $mform->addElement('submit', 'analyzequestion', get_string('decodeverifyquestiontext','qtype_multianswer')); $mform->registerNoSubmitButton('analyzequestion'); - echo '
'; - echo '
'; if ( $this->reload ){ + $mform->addElement('html', '
'); + $mform->addElement('html', '
'); for ($sub =1;$sub <=$countsubquestions ;$sub++) { $this->editas[$sub] = 'unknown type'; @@ -170,7 +170,7 @@ class question_edit_multianswer_form extends question_edit_form { } } - echo '
'; + $mform->addElement('html', '
'); $this->negative_diff =$countsavedsubquestions - $countsubquestions ; if ( ($this->negative_diff > 0 ) ||$this->qtype_change || ($this->used_in_quiz && $this->negative_diff != 0)){ $mform->addElement('header', 'additemhdr', get_string('warningquestionmodified','qtype_multianswer')); @@ -182,7 +182,7 @@ class question_edit_multianswer_form extends question_edit_form { if($this->qtype_change ) { $mform->addElement('static', 'alert1', "".get_string('questiontypechanged','qtype_multianswer')."",get_string('questiontypechangedcomment','qtype_multianswer')); } - echo '
'; + $mform->addElement('html', '
'); } if( $this->used_in_quiz){ if($this->negative_diff < 0) {