if (!empty($question->questiontext)) {
$questiontext = $question->questiontext;
} else {
- $questiontext = '';
+ $questiontext = $this->_form->getElement('questiontext')->getValue();
+ $questiontext = $questiontext['text'];
}
$questiontext = file_prepare_draft_area($draftid, $this->context->id,
'question', 'questiontext', empty($question->id) ? null : (int) $question->id,
$draftid = file_get_submitted_draft_itemid('generalfeedback');
if (empty($question->generalfeedback)) {
- $question->generalfeedback = '';
+ $generalfeedback = $this->_form->getElement('generalfeedback')->getValue();
+ $question->generalfeedback = $generalfeedback['text'];
}
$feedback = file_prepare_draft_area($draftid, $this->context->id,