Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-39369: Lesson module: change settype PARAM_TEXT to PARAM_NOTAGS

  • Loading branch information...
commit e85e3bff3ee8f7b9355cc130d5d98180907382d0 1 parent 51c72ec
rwijaya rwijaya authored
5 mod/lesson/pagetypes/matching.php
@@ -477,7 +477,7 @@ public function custom_definition() {
477 477 $label = get_string('matchesanswer','lesson');
478 478 $count = $i;
479 479 $this->_form->addElement('text', 'response_editor['.$count.']', $label, array('size'=>'50'));
480   - $this->_form->setType('response_editor['.$count.']', PARAM_TEXT);
  480 + $this->_form->setType('response_editor['.$count.']', PARAM_NOTAGS);
481 481 $this->_form->setDefault('response_editor['.$count.']', '');
482 482 if ($required) {
483 483 $this->_form->addRule('response_editor['.$count.']', get_string('required'), 'required', null, 'client');
@@ -526,8 +526,7 @@ public function definition() {
526 526 if ($hasattempt) {
527 527 $responseid = 'response_'.$answer->id;
528 528 $mform->addElement('hidden', 'response['.$answer->id.']', htmlspecialchars(trim($answers[$useranswers[$i]]->response)));
529   - // Temporary fixed until MDL-38885 gets integrated
530   - $mform->setType('response', PARAM_TEXT);
  529 + $mform->setType('response', PARAM_NOTAGS);
531 530 }
532 531 $mform->addElement('select', $responseid, format_text($answer->answer,$answer->answerformat,$options), $responseoptions, $disabled);
533 532 $mform->setType($responseid, PARAM_TEXT);
2  mod/lesson/pagetypes/multichoice.php
@@ -553,7 +553,7 @@ public function definition() {
553 553 if ($hasattempt && in_array($answer->id, $useranswers)) {
554 554 $answerid = 'answer_'.$answer->id;
555 555 $mform->addElement('hidden', 'answer['.$answer->id.']', $answer->answer);
556   - $mform->setType('answer['.$answer->id.']', PARAM_TEXT);
  556 + $mform->setType('answer['.$answer->id.']', PARAM_NOTAGS);
557 557 $mform->setDefault($answerid, true);
558 558 $mform->setDefault('answer['.$answer->id.']', true);
559 559 }

0 comments on commit e85e3bf

Please sign in to comment.
Something went wrong with that request. Please try again.