diff --git a/main/exercise/exercise_show.php b/main/exercise/exercise_show.php index 320be98ba2..30c4a26900 100755 --- a/main/exercise/exercise_show.php +++ b/main/exercise/exercise_show.php @@ -620,22 +620,24 @@ foreach ($questionList as $questionId) { $renderer->setFormTemplate('
{content}
'); $renderer->setCustomElementTemplate('
{element}
'); $comnt = Event::get_comments($id, $questionId); - $default = ['comments_'.$questionId => $comnt]; + + $textareaId = 'comments_'.$questionId; + $default = [$textareaId => $comnt]; if ($useAdvancedEditor) { $feedback_form->addElement( 'html_editor', - 'comments_'.$questionId, - null, + $textareaId, null, + ['id' => $textareaId], [ 'ToolbarSet' => 'TestAnswerFeedback', 'Width' => '100%', - 'Height' => '120', + 'Height' => '120' ] ); } else { - $feedback_form->addElement('textarea', 'comments_'.$questionId); + $feedback_form->addElement('textarea', $textareaId, ['id' => $textareaId]); } $feedback_form->setDefaults($default); $feedback_form->display();