diff --git a/mod/forum/classes/local/exporters/author.php b/mod/forum/classes/local/exporters/author.php index 66f39dedc02..4ef65200fcc 100644 --- a/mod/forum/classes/local/exporters/author.php +++ b/mod/forum/classes/local/exporters/author.php @@ -163,12 +163,8 @@ class author extends exporter { ]; } else { $groups = array_map(function($group) use ($urlfactory, $context, $output) { - $imageurl = null; $groupurl = null; - - if (!$group->hidepicture) { - $imageurl = get_group_picture_url($group, $group->courseid, true); - } + $imageurl = get_group_picture_url($group, $group->courseid, true); if (course_can_view_participants($context)) { $groupurl = $urlfactory->get_author_group_url($group); diff --git a/mod/forum/classes/local/exporters/discussion.php b/mod/forum/classes/local/exporters/discussion.php index ede9dc1fd48..38cf2268089 100644 --- a/mod/forum/classes/local/exporters/discussion.php +++ b/mod/forum/classes/local/exporters/discussion.php @@ -179,8 +179,7 @@ class discussion extends exporter { ]; // If not hiding the group picture, and the group has a picture then use it. Fallback to generic group image. - if (!$group->hidepicture && - ($url = get_group_picture_url($group, $forum->get_course_id(), true))) { + if ($url = get_group_picture_url($group, $forum->get_course_id(), true)) { $groupdata['urls']['picture'] = $url; } else {