Permalink
Browse files

qtype_multianswer MDL-26168 fix invalid HTML from the editing form.

Fix by Tony Levi. Thanks.
  • Loading branch information...
1 parent 8cdc85a commit 5bb96cf618d279137c8bc27237fbf4e7f7db880f @timhunt timhunt committed Jan 28, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 question/type/multianswer/edit_multianswer_form.php
@@ -119,9 +119,9 @@ function definition_inner(&$mform) {
$mform->addElement('submit', 'analyzequestion', get_string('decodeverifyquestiontext','qtype_multianswer'));
$mform->registerNoSubmitButton('analyzequestion');
- echo '<div class="ablock clearfix">';
- echo '<div class=" clearfix">';
if ( $this->reload ){
+ $mform->addElement('html', '<div class="ablock clearfix">');
+ $mform->addElement('html', '<div class=" clearfix">');
for ($sub =1;$sub <=$countsubquestions ;$sub++) {
$this->editas[$sub] = 'unknown type';
@@ -170,7 +170,7 @@ function definition_inner(&$mform) {
}
}
- echo '</div>';
+ $mform->addElement('html', '</div>');
$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 @@ function definition_inner(&$mform) {
if($this->qtype_change ) {
$mform->addElement('static', 'alert1', "<strong>".get_string('questiontypechanged','qtype_multianswer')."</strong>",get_string('questiontypechangedcomment','qtype_multianswer'));
}
- echo '</div>';
+ $mform->addElement('html', '</div>');
}
if( $this->used_in_quiz){
if($this->negative_diff < 0) {

0 comments on commit 5bb96cf

Please sign in to comment.