Skip to content
Snippets Groups Projects
Commit 60c69f2a authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

use correct avatar, fixes #3700

Closes #3700

Merge request studip/studip!2569
parent 9fb1d550
No related branches found
No related tags found
No related merge requests found
...@@ -399,10 +399,14 @@ class Course extends SchemaProvider ...@@ -399,10 +399,14 @@ class Course extends SchemaProvider
/** /**
* @inheritdoc * @inheritdoc
*
* @param \Course $resource
*/ */
public function getResourceMeta($resource) public function getResourceMeta($resource)
{ {
$avatar = \CourseAvatar::getAvatar($resource->id); $avatar = $resource->isStudygroup()
? \StudygroupAvatar::getAvatar($resource->id)
: \CourseAvatar::getAvatar($resource->id);
return [ return [
'avatar' => [ 'avatar' => [
......
...@@ -13,6 +13,9 @@ class CourseShowTest extends \Codeception\Test\Unit ...@@ -13,6 +13,9 @@ class CourseShowTest extends \Codeception\Test\Unit
protected function _before() protected function _before()
{ {
\DBManager::getInstance()->setConnection('studip', $this->getModule('\\Helper\\StudipDb')->dbh); \DBManager::getInstance()->setConnection('studip', $this->getModule('\\Helper\\StudipDb')->dbh);
//Initialize $SEM_TYPE and $SEM_CLASS arrays
$GLOBALS['SEM_CLASS'] = SemClass::getClasses();
$GLOBALS['SEM_TYPE'] = SemType::getTypes();
} }
protected function _after() protected function _after()
......
...@@ -13,6 +13,9 @@ class CoursesByUserTest extends \Codeception\Test\Unit ...@@ -13,6 +13,9 @@ class CoursesByUserTest extends \Codeception\Test\Unit
protected function _before() protected function _before()
{ {
\DBManager::getInstance()->setConnection('studip', $this->getModule('\\Helper\\StudipDb')->dbh); \DBManager::getInstance()->setConnection('studip', $this->getModule('\\Helper\\StudipDb')->dbh);
//Initialize $SEM_TYPE and $SEM_CLASS arrays
$GLOBALS['SEM_CLASS'] = SemClass::getClasses();
$GLOBALS['SEM_TYPE'] = SemType::getTypes();
} }
protected function _after() protected function _after()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment