|
|
|
@ -620,22 +620,24 @@ foreach ($questionList as $questionId) { |
|
|
|
$renderer->setFormTemplate('<form{attributes}><div>{content}</div></form>'); |
|
|
|
$renderer->setFormTemplate('<form{attributes}><div>{content}</div></form>'); |
|
|
|
$renderer->setCustomElementTemplate('<div>{element}</div>'); |
|
|
|
$renderer->setCustomElementTemplate('<div>{element}</div>'); |
|
|
|
$comnt = Event::get_comments($id, $questionId); |
|
|
|
$comnt = Event::get_comments($id, $questionId); |
|
|
|
$default = ['comments_'.$questionId => $comnt]; |
|
|
|
|
|
|
|
|
|
|
|
$textareaId = 'comments_'.$questionId; |
|
|
|
|
|
|
|
$default = [$textareaId => $comnt]; |
|
|
|
|
|
|
|
|
|
|
|
if ($useAdvancedEditor) { |
|
|
|
if ($useAdvancedEditor) { |
|
|
|
$feedback_form->addElement( |
|
|
|
$feedback_form->addElement( |
|
|
|
'html_editor', |
|
|
|
'html_editor', |
|
|
|
'comments_'.$questionId, |
|
|
|
$textareaId, |
|
|
|
null, |
|
|
|
|
|
|
|
null, |
|
|
|
null, |
|
|
|
|
|
|
|
['id' => $textareaId], |
|
|
|
[ |
|
|
|
[ |
|
|
|
'ToolbarSet' => 'TestAnswerFeedback', |
|
|
|
'ToolbarSet' => 'TestAnswerFeedback', |
|
|
|
'Width' => '100%', |
|
|
|
'Width' => '100%', |
|
|
|
'Height' => '120', |
|
|
|
'Height' => '120' |
|
|
|
] |
|
|
|
] |
|
|
|
); |
|
|
|
); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$feedback_form->addElement('textarea', 'comments_'.$questionId); |
|
|
|
$feedback_form->addElement('textarea', $textareaId, ['id' => $textareaId]); |
|
|
|
} |
|
|
|
} |
|
|
|
$feedback_form->setDefaults($default); |
|
|
|
$feedback_form->setDefaults($default); |
|
|
|
$feedback_form->display(); |
|
|
|
$feedback_form->display(); |
|
|
|
|