Skip to content

Commit

Permalink
MDL-48269 mod_forum: Remove occurrences of hidepicture
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Feb 16, 2021
1 parent 32ed88a commit f04cbfa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 1 addition & 5 deletions mod/forum/classes/local/exporters/author.php
Expand Up @@ -163,12 +163,8 @@ protected function get_other_values(renderer_base $output) {
];
} 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);
Expand Down
3 changes: 1 addition & 2 deletions mod/forum/classes/local/exporters/discussion.php
Expand Up @@ -179,8 +179,7 @@ protected function get_other_values(renderer_base $output) {
];

// 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 {
Expand Down

0 comments on commit f04cbfa

Please sign in to comment.