@ -760,7 +760,6 @@ class AddCourse
->setVisibility($visibility)
->setShowScore(1)
->setDiskQuota($disk_quota)
->setCreationDate(new \DateTime())
->setExpirationDate(new \DateTime($expiration_date))
->setDepartmentName($department_name)
->setDepartmentUrl($department_url)
@ -1825,7 +1825,7 @@ class UserGroup extends Model
);
$repo = Container::getIllustrationRepository();
if ($repo->hasIllustration($userGroup)) {
if ($userGroup && $repo->hasIllustration($userGroup)) {
$picture = $repo->getIllustrationUrl($userGroup);
$img = '<img src="'.$picture.'" />';
$form->addElement('label', null, $img);
@ -127,9 +127,9 @@ final class IllustrationRepository extends ResourceRepository implements GridInt
public function hasIllustration(ResourceIllustrationInterface $resource): bool
{
$illustration = $this->getIllustrationUrlFromNode($resource->getResourceNode());
$node = $this->getIllustrationNodeFromParent($resource->getResourceNode());
return null !== $illustration;
return null !== $node;
}
/**