From 603a648d0aec73d46e3271265a5775f3e4b3fa49 Mon Sep 17 00:00:00 2001 From: Ilya Tregubov Date: Wed, 17 Apr 2024 15:46:04 +0800 Subject: [PATCH] MDL-81574 mod_forum: Fix deprecated usage of format_text --- mod/forum/locallib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/forum/locallib.php b/mod/forum/locallib.php index 205236830a6..d68fd65e4af 100644 --- a/mod/forum/locallib.php +++ b/mod/forum/locallib.php @@ -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 = '';