Skip to content

Commit

Permalink
MDL-46212 question editing: extra answer fields notice.
Browse files Browse the repository at this point in the history
It turns out that PHP does not interpret "$field[$key]" the way we were
expecting.
  • Loading branch information
timhunt committed Jul 3, 2014
1 parent 4de51c2 commit 0e30442
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion question/type/edit_question_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ protected function data_preprocessing_extra_answer_fields($question, $extraanswe
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++;
Expand Down

0 comments on commit 0e30442

Please sign in to comment.