Skip to content

Commit

Permalink
MDL-49674 comment: Use correct format when displaying the comment
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mudrd8mz committed Mar 26, 2015
1 parent 20d3883 commit 2b6f97f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion comment/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ public function add($content, $format = FORMAT_MOODLE) {
$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);
Expand Down

0 comments on commit 2b6f97f

Please sign in to comment.