mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-67959 mod_forum: Display group pictures in forum only if available
Displaying a default group picture in forum posts leads to confusion, so better to not display a default group picture when the group picture is not set for the group.
This commit is contained in:
parent
fd840ab59c
commit
cbee8815fc
@ -165,13 +165,11 @@ class author extends exporter {
|
||||
$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);
|
||||
if (empty($imageurl)) {
|
||||
// Get a generic group image URL.
|
||||
$imageurl = $output->image_url('g/g1');
|
||||
}
|
||||
}
|
||||
|
||||
if (course_can_view_participants($context)) {
|
||||
$groupurl = $urlfactory->get_author_group_url($group);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user