MDL-49674 comment: Use correct format when displaying the comment

The plugin callback executed above can eventually change the format. We
need to use that one to have the formatting of the first AJAX response
consistent with following displays.
This commit is contained in:
David Mudrák
2015-03-26 13:00:56 +01:00
parent 0a4b99f35b
commit 64bef5f9f6
+1 -1
View File
@@ -656,7 +656,7 @@ class comment {
$newcmt->fullname = fullname($USER);
$url = new moodle_url('/user/view.php', array('id' => $USER->id, 'course' => $this->courseid));
$newcmt->profileurl = $url->out();
$newcmt->content = format_text($newcmt->content, $format, array('overflowdiv'=>true));
$newcmt->content = format_text($newcmt->content, $newcmt->format, array('overflowdiv'=>true));
$newcmt->avatar = $OUTPUT->user_picture($USER, array('size'=>16));
$commentlist = array($newcmt);