Bug 2951 - correct PARAM_ types for answers to multichoice and shortanswer questions. Merged from OU Moodle.

This commit is contained in:
tjhunt
2007-04-04 16:51:10 +00:00
parent b3396fe91d
commit 288731fa09
2 changed files with 2 additions and 2 deletions
@@ -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'));
@@ -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'));