ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMemberViewGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilMemberViewGUI:

Static Public Member Functions

static showMemberViewSwitch (int $a_ref_id)
 

Detailed Description

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

Author
Stefan Meyer <meyer.leifos.com>

Definition at line 22 of file class.ilMemberViewGUI.php.

Member Function Documentation

◆ showMemberViewSwitch()

static ilMemberViewGUI::showMemberViewSwitch ( int  $a_ref_id)
static

Definition at line 24 of file class.ilMemberViewGUI.php.

References $DIC, $lng, ILIAS\LTI\ToolProvider\$settings, $type, ilObject\_lookupObjId(), ilObject\_lookupType(), and ilMemberViewSettings\getInstance().

Referenced by ilContainerGUI\prepareOutput().

24  : bool
25  {
26  global $DIC;
27 
28  $ilAccess = $DIC->access();
29  $ilCtrl = $DIC->ctrl();
30 
32  if (!$settings->isEnabled()) {
33  return false;
34  }
35  $tree = $DIC->repositoryTree();
36  $lng = $DIC->language();
37  $ilTabs = $DIC->tabs();
38 
39  // No course or group in path => aborting
40  if (!$tree->checkForParentType($a_ref_id, 'crs') &&
41  !$tree->checkForParentType($a_ref_id, 'grp')) {
42  return false;
43  }
44 
45  // TODO: check edit_permission
46 
48  if (($type === 'crs' || $type === 'grp') && $ilAccess->checkAccess('write', '', $a_ref_id)) {
49  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $a_ref_id);
50  $ilCtrl->setParameterByClass("ilrepositorygui", "mv", "1");
51  $ilCtrl->setParameterByClass("ilrepositorygui", "set_mode", "flat");
52  $ilTabs->addNonTabbedLink(
53  "members_view",
54  $lng->txt('mem_view_activate'),
55  $ilCtrl->getLinkTargetByClass("ilrepositorygui", "")
56  );
57  $ilCtrl->clearParametersByClass("ilrepositorygui");
58  return true;
59  }
60  return true;
61  }
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200
$type
$lng
static _lookupObjId(int $ref_id)
global $DIC
Definition: feed.php:28
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: