Fix update usergroup + format code

pull/3768/head
Julio Montoya 5 years ago
parent 488a1e66e2
commit 45a31f22d2
  1. 1
      public/main/inc/lib/add_course.lib.inc.php
  2. 2
      public/main/inc/lib/usergroup.lib.php
  3. 4
      src/CoreBundle/Repository/Node/IllustrationRepository.php

@ -760,7 +760,6 @@ class AddCourse
->setVisibility($visibility) ->setVisibility($visibility)
->setShowScore(1) ->setShowScore(1)
->setDiskQuota($disk_quota) ->setDiskQuota($disk_quota)
->setCreationDate(new \DateTime())
->setExpirationDate(new \DateTime($expiration_date)) ->setExpirationDate(new \DateTime($expiration_date))
->setDepartmentName($department_name) ->setDepartmentName($department_name)
->setDepartmentUrl($department_url) ->setDepartmentUrl($department_url)

@ -1825,7 +1825,7 @@ class UserGroup extends Model
); );
$repo = Container::getIllustrationRepository(); $repo = Container::getIllustrationRepository();
if ($repo->hasIllustration($userGroup)) { if ($userGroup && $repo->hasIllustration($userGroup)) {
$picture = $repo->getIllustrationUrl($userGroup); $picture = $repo->getIllustrationUrl($userGroup);
$img = '<img src="'.$picture.'" />'; $img = '<img src="'.$picture.'" />';
$form->addElement('label', null, $img); $form->addElement('label', null, $img);

@ -127,9 +127,9 @@ final class IllustrationRepository extends ResourceRepository implements GridInt
public function hasIllustration(ResourceIllustrationInterface $resource): bool public function hasIllustration(ResourceIllustrationInterface $resource): bool
{ {
$illustration = $this->getIllustrationUrlFromNode($resource->getResourceNode()); $node = $this->getIllustrationNodeFromParent($resource->getResourceNode());
return null !== $illustration; return null !== $node;
} }
/** /**

Loading…
Cancel
Save