mirror of
https://github.com/moodle/moodle.git
synced 2025-03-01 06:22:39 +01:00
MDL-67930 mod_forum: consistent default group image when hidden.
This commit is contained in:
parent
f2fc4a9fa1
commit
3e1b05f001
@ -178,13 +178,13 @@ class discussion extends exporter {
|
||||
'urls' => [],
|
||||
];
|
||||
|
||||
if (!$group->hidepicture) {
|
||||
$url = get_group_picture_url($group, $forum->get_course_id(), true);
|
||||
if (empty($url)) {
|
||||
// Get a generic group image URL.
|
||||
$url = $output->image_url('g/g1')->out(false);
|
||||
}
|
||||
// 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))) {
|
||||
|
||||
$groupdata['urls']['picture'] = $url;
|
||||
} else {
|
||||
$groupdata['urls']['picture'] = $output->image_url('g/g1')->out(false);
|
||||
}
|
||||
|
||||
if ($capabilitymanager->can_view_participants($user, $discussion)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user