From 288731fa09fbd412735ea433782beaa7d4214b64 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Wed, 4 Apr 2007 16:51:10 +0000 Subject: [PATCH] Bug 2951 - correct PARAM_ types for answers to multichoice and shortanswer questions. Merged from OU Moodle. --- question/type/multichoice/edit_multichoice_form.php | 2 +- question/type/shortanswer/edit_shortanswer_form.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/question/type/multichoice/edit_multichoice_form.php b/question/type/multichoice/edit_multichoice_form.php index 49d52633b4..1040217dd8 100644 --- a/question/type/multichoice/edit_multichoice_form.php +++ b/question/type/multichoice/edit_multichoice_form.php @@ -47,7 +47,7 @@ class question_edit_multichoice_form extends question_edit_form { QUESTION_NUMANS_START : ($countanswers + QUESTION_NUMANS_ADD); $repeatedoptions = array(); $repeatedoptions['fraction']['default'] = 0; - $mform->setType('answer', PARAM_NOTAGS); + $mform->setType('answer', PARAM_RAW); $this->repeat_elements($repeated, $repeatsatstart, $repeatedoptions, 'noanswers', 'addanswers', QUESTION_NUMANS_ADD, get_string('addmorechoiceblanks', 'qtype_multichoice')); $mform->addElement('header', 'overallfeedbackhdr', get_string('overallfeedback', 'qtype_multichoice')); diff --git a/question/type/shortanswer/edit_shortanswer_form.php b/question/type/shortanswer/edit_shortanswer_form.php index 4af58e7722..5f0f648172 100644 --- a/question/type/shortanswer/edit_shortanswer_form.php +++ b/question/type/shortanswer/edit_shortanswer_form.php @@ -41,7 +41,7 @@ class question_edit_shortanswer_form extends question_edit_form { $repeatsatstart = (QUESTION_NUMANS_START > ($countanswers + QUESTION_NUMANS_ADD))? QUESTION_NUMANS_START : ($countanswers + QUESTION_NUMANS_ADD); $repeatedoptions = array(); - $mform->setType('answer', PARAM_NOTAGS); + $mform->setType('answer', PARAM_RAW); $repeatedoptions['fraction']['default'] = 0; $this->repeat_elements($repeated, $repeatsatstart, $repeatedoptions, 'noanswers', 'addanswers', QUESTION_NUMANS_ADD, get_string('addmoreanswerblanks', 'qtype_shortanswer')); -- 2.39.5