Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Modules/Course/classes/class.ilObjCourseListGUI.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=0);

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
Expand All @@ -18,6 +16,8 @@
*
*********************************************************************/

declare(strict_types=0);

/**
* Class ilObjCourseListGUI
* @author Alex Killing <alex.killing@gmx.de>
Expand Down Expand Up @@ -143,12 +143,12 @@ public function getProperties(): array

// course period
$info = ilObjCourseAccess::lookupPeriodInfo($this->obj_id);
if (is_array($info)) {
if ($info !== []) {
$props[] = array(
'alert' => false,
'newline' => true,
'property' => $info['property'] ?? "",
'value' => $info['value'] ?? ""
'property' => $info['property'],
'value' => $info['value']
);
}

Expand Down
12 changes: 3 additions & 9 deletions Modules/Group/classes/class.ilObjGroupAccess.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
Expand All @@ -18,6 +16,7 @@
*
*********************************************************************/

declare(strict_types=1);

/**
* Class ilObjGroupAccess
Expand Down Expand Up @@ -282,12 +281,7 @@ public static function lookupRegistrationInfo(int $a_obj_id): array
return $info;
}

/**
* @param int $a_obj_id
* @return array<{property: string, value: string}> | null
* @throws ilDateTimeException
*/
public static function lookupPeriodInfo(int $a_obj_id): ?array
public static function lookupPeriodInfo(int $a_obj_id): array
{
global $DIC;

Expand Down Expand Up @@ -325,7 +319,7 @@ public static function lookupPeriodInfo(int $a_obj_id): ?array
'value' => ilDatePresentation::formatPeriod($start, $end)
];
}
return null;
return [];
}

public static function _usingRegistrationCode(): bool
Expand Down
42 changes: 17 additions & 25 deletions Modules/Group/classes/class.ilObjGroupListGUI.php
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
<?php

declare(strict_types=1);
/*
+-----------------------------------------------------------------------------+
| ILIAS open source |
+-----------------------------------------------------------------------------+
| Copyright (c) 1998-2008 ILIAS open source, University of Cologne |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
| as published by the Free Software Foundation; either version 2 |
| of the License, or (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
| |
| You should have received a copy of the GNU General Public License |
| along with this program; if not, write to the Free Software |
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
+-----------------------------------------------------------------------------+
*/

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
*********************************************************************/

declare(strict_types=1);

/**
* Class ilObjGroupListGUI
Expand Down Expand Up @@ -132,9 +125,8 @@ public function getProperties(): array
);
}

// course period
$info = ilObjGroupAccess::lookupPeriodInfo($this->obj_id);
if (is_array($info)) {
if ($info !== []) {
$props[] = array(
'alert' => false,
'newline' => true,
Expand Down
1 change: 1 addition & 0 deletions Services/Object/classes/class.ilObjectListGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,7 @@ public function determineProperties(): array
if (!$this->access->checkAccess('read', '', $this->ref_id, $this->type, $this->obj_id)) {
$props[] = [
'alert' => true,
'property' => '',
'value' => $this->lng->txt('no_access_item_public'),
'newline' => true
];
Expand Down