From 4f98178a4c51a56e3a554c20e07cd2015448b719 Mon Sep 17 00:00:00 2001
From: Moritz Strohm <strohm@data-quest.de>
Date: Mon, 20 Feb 2023 15:42:39 +0000
Subject: [PATCH] use correct avatar for study groups, closes #2192

Closes #2192

Merge request studip/studip!1432
---
 app/views/file/choose_file_from_course.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/app/views/file/choose_file_from_course.php b/app/views/file/choose_file_from_course.php
index 84969025927..af8160ad9d7 100644
--- a/app/views/file/choose_file_from_course.php
+++ b/app/views/file/choose_file_from_course.php
@@ -35,7 +35,11 @@ if (Request::get('range_type')) {
             <tr>
                 <td class="avatar">
                     <a href="<?= $controller->link_for('file/choose_file_from_course/' . $folder_id, array_merge($options, ['course_id' => $course->id])) ?>" data-dialog>
-                        <?= CourseAvatar::getAvatar($course->id)->getImageTag(Avatar::MEDIUM, ['style' => 'width: 50px; height: 50px;']) ?>
+                        <? if ($course->isStudygroup()) : ?>
+                            <?= StudygroupAvatar::getAvatar($course->id)->getImageTag(Avatar::MEDIUM, ['style' => 'width: 50px; height: 50px;']) ?>
+                        <? else : ?>
+                            <?= CourseAvatar::getAvatar($course->id)->getImageTag(Avatar::MEDIUM, ['style' => 'width: 50px; height: 50px;']) ?>
+                        <? endif ?>
                     </a>
                 </td>
                 <td>
-- 
GitLab