ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCourseParticipantsGroupsGUI Class Reference

Class ilCourseParticipantsGroupsGUI. More...

+ Collaboration diagram for ilCourseParticipantsGroupsGUI:

Public Member Functions

 __construct ($a_ref_id)
 executeCommand ()
 show ()
 applyFilter ()
 resetFilter ()
 confirmRemove ()
 remove ()
 add ()

Detailed Description

Constructor & Destructor Documentation

ilCourseParticipantsGroupsGUI::__construct (   $a_ref_id)

Definition at line 17 of file class.ilCourseParticipantsGroupsGUI.php.

{
$this->ref_id = $a_ref_id;
}

Member Function Documentation

ilCourseParticipantsGroupsGUI::add ( )

Definition at line 111 of file class.ilCourseParticipantsGroupsGUI.php.

References $_POST, $ilErr, $lng, ilGroupParticipants\_getInstanceByObjId(), IL_GRP_MEMBER, ilUtil\sendFailure(), ilUtil\sendSuccess(), show(), and ilGroupMembershipMailNotification\TYPE_ADMISSION_MEMBER.

{
global $ilErr, $ilObjDataCache, $lng, $ilAccess;
if(sizeof($_POST["usrs"]))
{
if (!$ilAccess->checkAccess("write", "", $_POST["grp_id"]))
{
ilUtil::sendFailure($lng->txt("permission_denied"), true);
$this->show();
return;
}
include_once './Modules/Group/classes/class.ilGroupParticipants.php';
$members_obj = ilGroupParticipants::_getInstanceByObjId($ilObjDataCache->lookupObjId($_POST["grp_id"]));
foreach ($_POST["usrs"] as $new_member)
{
if (!$members_obj->add($new_member, IL_GRP_MEMBER))
{
$ilErr->raiseError("An Error occured while assigning user to group !", $ilErr->MESSAGE);
}
include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
$members_obj->sendNotification(
$new_member
);
}
ilUtil::sendSuccess($lng->txt("grp_msg_member_assigned"));
}
$this->show();
}

+ Here is the call graph for this function:

ilCourseParticipantsGroupsGUI::applyFilter ( )

Definition at line 47 of file class.ilCourseParticipantsGroupsGUI.php.

References show().

{
$tbl_gui = new ilCourseParticipantsGroupsTableGUI($this, "show", $this->ref_id);
$tbl_gui->resetOffset();
$tbl_gui->writeFilterToSession();
$this->show();
}

+ Here is the call graph for this function:

ilCourseParticipantsGroupsGUI::confirmRemove ( )

Definition at line 63 of file class.ilCourseParticipantsGroupsGUI.php.

References $_GET, $ilCtrl, $lng, $tpl, ilUtil\getImagePath(), and ilUserUtil\getNamePresentation().

{
global $ilAccess, $ilCtrl, $lng, $tpl;
include_once('./Services/Utilities/classes/class.ilConfirmationGUI.php');
$confirm = new ilConfirmationGUI();
$confirm->setFormAction($ilCtrl->getFormAction($this,'remove'));
$confirm->addHiddenItem("grp_id", $_GET["grp_id"]);
$confirm->setHeaderText($lng->txt('grp_dismiss_member'));
$confirm->setConfirm($lng->txt('confirm'),'remove');
$confirm->setCancel($lng->txt('cancel'),'show');
include_once './Services/User/classes/class.ilUserUtil.php';
$confirm->addItem('usr_id',
$_GET["usr_id"],
ilUserUtil::getNamePresentation($_GET["usr_id"], false, false, "", true),
ilUtil::getImagePath('icon_usr.svg'));
$tpl->setContent($confirm->getHTML());
}

+ Here is the call graph for this function:

ilCourseParticipantsGroupsGUI::executeCommand ( )

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

References $cmd, $ilCtrl, $ilErr, and $lng.

{
global $ilCtrl, $ilErr, $ilAccess, $lng;
if(!$ilAccess->checkAccess('write','',$this->ref_id))
{
$ilErr->raiseError($lng->txt('permission_denied'),$ilErr->WARNING);
}
$cmd = $ilCtrl->getCmd();
if(!$cmd)
{
$cmd = "show";
}
$this->$cmd();
}
ilCourseParticipantsGroupsGUI::remove ( )

Definition at line 85 of file class.ilCourseParticipantsGroupsGUI.php.

References $_POST, $ilCtrl, $lng, ilGroupParticipants\_getInstanceByObjId(), ilUtil\sendFailure(), ilUtil\sendSuccess(), show(), and ilGroupMembershipMailNotification\TYPE_DISMISS_MEMBER.

{
global $ilAccess, $ilObjDataCache, $lng, $ilCtrl;
if (!$ilAccess->checkAccess("write", "", $_POST["grp_id"]))
{
ilUtil::sendFailure($lng->txt("permission_denied"), true);
$this->show();
return;
}
include_once './Modules/Group/classes/class.ilGroupParticipants.php';
$members_obj = ilGroupParticipants::_getInstanceByObjId($ilObjDataCache->lookupObjId($_POST["grp_id"]));
$members_obj->delete($_POST["usr_id"]);
// Send notification
include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
$members_obj->sendNotification(
$_POST["usr_id"]
);
ilUtil::sendSuccess($lng->txt("grp_msg_membership_annulled"), true);
$ilCtrl->redirect($this, "show");
}

+ Here is the call graph for this function:

ilCourseParticipantsGroupsGUI::resetFilter ( )

Definition at line 55 of file class.ilCourseParticipantsGroupsGUI.php.

References show().

{
$tbl_gui = new ilCourseParticipantsGroupsTableGUI($this, "show", $this->ref_id);
$tbl_gui->resetOffset();
$tbl_gui->resetFilter();
$this->show();
}

+ Here is the call graph for this function:

ilCourseParticipantsGroupsGUI::show ( )

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

References $tpl.

Referenced by add(), applyFilter(), remove(), and resetFilter().

{
global $tpl;
$tbl_gui = new ilCourseParticipantsGroupsTableGUI($this, "show", $this->ref_id);
$tpl->setContent($tbl_gui->getHTML());
}

+ Here is the caller graph for this function:


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