Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit e85e3bff3ee8f7b9355cc130d5d98180907382d0 1 parent 51c72ec
@rwijaya rwijaya authored
View
5 mod/lesson/pagetypes/matching.php
@@ -477,7 +477,7 @@ public function custom_definition() {
$label = get_string('matchesanswer','lesson');
$count = $i;
$this->_form->addElement('text', 'response_editor['.$count.']', $label, array('size'=>'50'));
- $this->_form->setType('response_editor['.$count.']', PARAM_TEXT);
+ $this->_form->setType('response_editor['.$count.']', PARAM_NOTAGS);
$this->_form->setDefault('response_editor['.$count.']', '');
if ($required) {
$this->_form->addRule('response_editor['.$count.']', get_string('required'), 'required', null, 'client');
@@ -526,8 +526,7 @@ public function definition() {
if ($hasattempt) {
$responseid = 'response_'.$answer->id;
$mform->addElement('hidden', 'response['.$answer->id.']', htmlspecialchars(trim($answers[$useranswers[$i]]->response)));
- // Temporary fixed until MDL-38885 gets integrated
- $mform->setType('response', PARAM_TEXT);
+ $mform->setType('response', PARAM_NOTAGS);
}
$mform->addElement('select', $responseid, format_text($answer->answer,$answer->answerformat,$options), $responseoptions, $disabled);
$mform->setType($responseid, PARAM_TEXT);
View
2  mod/lesson/pagetypes/multichoice.php
@@ -553,7 +553,7 @@ public function definition() {
if ($hasattempt && in_array($answer->id, $useranswers)) {
$answerid = 'answer_'.$answer->id;
$mform->addElement('hidden', 'answer['.$answer->id.']', $answer->answer);
- $mform->setType('answer['.$answer->id.']', PARAM_TEXT);
+ $mform->setType('answer['.$answer->id.']', PARAM_NOTAGS);
$mform->setDefault($answerid, true);
$mform->setDefault('answer['.$answer->id.']', true);
}
Please sign in to comment.
Something went wrong with that request. Please try again.