MDL-46212 question editing: extra answer fields notice.
[moodle.git] / question / type / edit_question_form.php
index 06ff986..16058ad 100644 (file)
@@ -613,7 +613,7 @@ abstract class question_edit_form extends question_wizard_form {
         foreach ($question->options->answers as $answer) {
             foreach ($extraanswerfields as $field) {
                 // See hack comment in {@link data_preprocessing_answers()}.
-                unset($this->_form->_defaultValues["$field[$key]"]);
+                unset($this->_form->_defaultValues["{$field}[{$key}]"]);
                 $extrafieldsdata[$field][$key] = $this->data_preprocessing_extra_answer_field($answer, $field);
             }
             $key++;