Commit 288731fa authored by tjhunt's avatar tjhunt
Browse files

Bug 2951 - correct PARAM_ types for answers to multichoice and shortanswer...

Bug 2951 - correct PARAM_ types for answers to multichoice and shortanswer questions. Merged from OU Moodle.
parent b3396fe9
......@@ -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'));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment