From 14be75dc41838f1fbeafa1f7aac1f15dddd7d401 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Tue, 27 Aug 2024 11:48:35 +0100 Subject: [PATCH] MDL-82813 group: correctly format group description property. --- user/lib.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/user/lib.php b/user/lib.php index 8b583b832571b..5ce2c7cb7857f 100644 --- a/user/lib.php +++ b/user/lib.php @@ -558,10 +558,13 @@ function user_get_user_details($user, $course = null, array $userfields = array( } } + $groupdescription = file_rewrite_pluginfile_urls($group->description, 'pluginfile.php', $context->id, 'group', + 'description', $group->id); + $userdetails['groups'][] = [ 'id' => $group->id, - 'name' => format_string($group->name), - 'description' => format_text($group->description, $group->descriptionformat, ['context' => $context]), + 'name' => format_string($group->name, true, ['context' => $context]), + 'description' => format_text($groupdescription, $group->descriptionformat, ['context' => $context]), 'descriptionformat' => $group->descriptionformat ]; }