Fix textarea id BT#16144

pull/2999/head
Julio Montoya 6 years ago
parent 92b318509e
commit baa827304d
  1. 12
      main/exercise/exercise_show.php

@ -620,22 +620,24 @@ foreach ($questionList as $questionId) {
$renderer->setFormTemplate('<form{attributes}><div>{content}</div></form>');
$renderer->setCustomElementTemplate('<div>{element}</div>');
$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();

Loading…
Cancel
Save