MDL-48269 mod_forum: Remove occurrences of hidepicture

This commit is contained in:
Jun Pataleta
2021-01-28 14:09:49 +08:00
parent 32ed88ad07
commit f04cbfa7ab
2 changed files with 2 additions and 7 deletions
+1 -5
View File
@@ -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);
@@ -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 {