-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix 0041709: Permission tab on remote courses throws error
- Loading branch information
1 parent
687af03
commit 43e4180
Showing
1 changed file
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,12 +18,14 @@ | |
declare(strict_types=1); | ||
|
||
/** | ||
* @author Stefan Meyer <[email protected]> | ||
*/ | ||
* @author Stefan Meyer <[email protected]> | ||
*/ | ||
abstract class ilRemoteObjectBaseGUI extends ilObject2GUI | ||
{ | ||
private ilLogger $logger; | ||
|
||
public const TAB_ID_PERMISSIONS = "id_permissions"; | ||
|
||
public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0) | ||
{ | ||
global $DIC; | ||
|
@@ -115,9 +117,13 @@ protected function setTabs(): void | |
$this->ctrl->getLinkTarget($this, "edit") | ||
); | ||
} | ||
|
||
// will add permissions if needed | ||
parent::setTabs(); | ||
if ($this->checkPermissionBool("edit_permission")) { | ||
$this->tabs_gui->addTab( | ||
self::TAB_ID_PERMISSIONS, | ||
$this->lng->txt("perm_settings"), | ||
$this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm") | ||
); | ||
} | ||
} | ||
|
||
/** | ||
|