ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilMemberViewGUI Class Reference

Show member view switch More...

+ Collaboration diagram for ilMemberViewGUI:

Static Public Member Functions

static showMemberViewSwitch ($a_ref_id)
 Show member view switch. More...
 

Detailed Description

Show member view switch

Author
Stefan Meyer <meyer.leifos.com>
Version
$Id$

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

Member Function Documentation

◆ showMemberViewSwitch()

static ilMemberViewGUI::showMemberViewSwitch (   $a_ref_id)
static

Show member view switch.

Returns
Parameters
int$a_ref_id

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

References $ilCtrl, $lng, $tpl, ilObject\_lookupObjId(), ilObject\_lookupType(), and ilMemberViewSettings\getInstance().

Referenced by ilContainerGUI\prepareOutput().

40  {
41  global $ilAccess, $ilCtrl;
42 
44  if(!$settings->isEnabled())
45  {
46  return false;
47  }
48  global $tpl,$tree,$lng,$ilTabs;
49 
50  // No course or group in path => aborting
51  if(!$tree->checkForParentType($a_ref_id, 'crs') and
52  !$tree->checkForParentType($a_ref_id, 'grp'))
53  {
54  return false;
55  }
56 
57  // TODO: check edit_permission
58 
59  $active = $settings->isActive();
60 
62  if(($type == 'crs' or $type == 'grp') and $ilAccess->checkAccess('write','',$a_ref_id))
63  {
64  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $a_ref_id);
65  $ilCtrl->setParameterByClass("ilrepositorygui", "mv", "1");
66  $ilCtrl->setParameterByClass("ilrepositorygui", "set_mode", "flat");
67  $ilTabs->addNonTabbedLink("members_view",
68  $lng->txt('mem_view_activate'),
69  $ilCtrl->getLinkTargetByClass("ilrepositorygui", "frameset")
70  );
71  $ilCtrl->clearParametersByClass("ilrepositorygui");
72  return true;
73  }
74  return true;
75  }
global $tpl
Definition: ilias.php:8
global $ilCtrl
Definition: ilias.php:18
static _lookupObjId($a_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
static getInstance()
Get instance.
global $lng
Definition: privfeed.php:17
+ 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: