ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
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.

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

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 $lng, $tpl, $type, ilObject\_lookupObjId(), ilObject\_lookupType(), and ilMemberViewSettings\getInstance().

Referenced by ilContainerGUI\prepareOutput().

{
global $ilAccess;
if(!$settings->isEnabled())
{
return false;
}
global $tpl,$tree,$lng,$ilTabs;
// No course or group in path => aborting
if(!$tree->checkForParentType($a_ref_id, 'crs') and
!$tree->checkForParentType($a_ref_id, 'grp'))
{
return false;
}
// TODO: check edit_permission
$active = $settings->isActive();
/*
if($active)
{
$tpl->setCurrentBlock('mem_view');
$tpl->setVariable('MEM_VIEW_HREF','repository.php?ref_id='.$a_ref_id.'&mv=0');
$tpl->setVariable('MEM_VIEW_IMG',ilUtil::getImagePath('icon_rolt.gif'));
$tpl->setVariable('MEM_VIEW_ALT',$lng->txt('mem_view_deactivate'));
$tpl->parseCurrentBlock();
return true;
}
*/
if(($type == 'crs' or $type == 'grp') and $ilAccess->checkAccess('edit_permission','',$a_ref_id))
{
/* $tpl->setCurrentBlock('mem_view');
$tpl->setVariable('MEM_VIEW_HREF','repository.php?cmd=frameset&set_mode=flat&ref_id='.$a_ref_id.'&mv=1');
$tpl->setVariable('MEM_VIEW_IMG',ilUtil::getImagePath('icon_role.gif'));
$tpl->setVariable('MEM_VIEW_ALT',$lng->txt('mem_view_activate'));
$tpl->parseCurrentBlock(); */
$ilTabs->addNonTabbedLink("members_view",
$lng->txt('mem_view_activate'),
'repository.php?cmd=frameset&set_mode=flat&ref_id='.$a_ref_id.'&mv=1'
);
return true;
}
return true;
}

+ 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: