Merge branch 'MDL-55499-master' of git://github.com/andrewnicols/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2017-04-04 18:23:02 +02:00
commit fc96fac29e

View file

@ -55,11 +55,13 @@ class renderer extends \mod_forum_renderer {
* @return string
*/
public function format_message_text($cm, $post) {
$context = \context_module::instance($cm->id);
$message = file_rewrite_pluginfile_urls($post->message, 'pluginfile.php',
\context_module::instance($cm->id)->id,
$context->id,
'mod_forum', 'post', $post->id);
$options = new \stdClass();
$options->para = true;
$options->context = $context;
return format_text($message, $post->messageformat, $options);
}