Skip to content

Commit

Permalink
Fix 0041709: Permission tab on remote courses throws error
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalseeland committed Aug 9, 2024
1 parent 687af03 commit 43e4180
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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")
);
}
}

/**
Expand Down

0 comments on commit 43e4180

Please sign in to comment.