MDL-81574 mod_forum: Fix deprecated usage of format_text

This commit is contained in:
Ilya Tregubov 2024-04-17 15:46:04 +08:00
parent 8cf14f6e70
commit 603a648d0a

View file

@ -309,8 +309,9 @@ class forum_portfolio_caller extends portfolio_module_caller_base {
$viewfullnames = true;
// format the post body
$options = portfolio_format_text_options();
$options->context = $this->modcontext;
$format = $this->get('exporter')->get('format');
$formattedtext = format_text($post->message, $post->messageformat, $options, $this->get('course')->id);
$formattedtext = format_text($post->message, $post->messageformat, $options);
$formattedtext = portfolio_rewrite_pluginfile_urls($formattedtext, $this->modcontext->id, 'mod_forum', 'post', $post->id, $format);
$output = '<table border="0" cellpadding="3" cellspacing="0" class="forumpost">';