Class ilCourseParticipantsGroupsGUI.
More...
|
| remove () |
| Remove user from group @global type $ilObjDataCache @global type $lng @global type $ilCtrl. More...
|
|
| add () |
| Add user to group @global type $ilErr @global type $ilObjDataCache @global type $lng @global type $ilAccess. More...
|
|
◆ __construct()
ilCourseParticipantsGroupsGUI::__construct |
( |
|
$a_ref_id | ) |
|
◆ add()
ilCourseParticipantsGroupsGUI::add |
( |
| ) |
|
|
protected |
Add user to group @global type $ilErr @global type $ilObjDataCache @global type $lng @global type $ilAccess.
- Returns
- type
Definition at line 146 of file class.ilCourseParticipantsGroupsGUI.php.
147 {
149
151 $ilObjDataCache =
$DIC[
'ilObjDataCache'];
153 $ilAccess =
$DIC[
'ilAccess'];
154
155 if (
sizeof(
$_POST[
"usrs"])) {
156 if (!
$GLOBALS[
'DIC']->access()->checkRbacOrPositionPermissionAccess(
'manage_members',
'manage_members', (
int)
$_POST[
'grp_id'])) {
159 return;
160 }
161
162 include_once './Modules/Group/classes/class.ilGroupParticipants.php';
164 foreach (
$_POST[
"usrs"] as $new_member) {
166 $ilErr->raiseError(
"An Error occured while assigning user to group !",
$ilErr->MESSAGE);
167 }
168
169 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
170 $members_obj->sendNotification(
172 $new_member
173 );
174 }
175 ilUtil::sendSuccess(
$lng->txt(
"grp_msg_member_assigned"));
176 }
177
179 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
const TYPE_ADMISSION_MEMBER
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
References $_POST, $DIC, $GLOBALS, $ilErr, $lng, ilGroupParticipants\_getInstanceByObjId(), IL_GRP_MEMBER, ilUtil\sendFailure(), show(), and ilGroupMembershipMailNotification\TYPE_ADMISSION_MEMBER.
◆ applyFilter()
ilCourseParticipantsGroupsGUI::applyFilter |
( |
| ) |
|
◆ confirmRemove()
ilCourseParticipantsGroupsGUI::confirmRemove |
( |
| ) |
|
Definition at line 74 of file class.ilCourseParticipantsGroupsGUI.php.
75 {
77
78 $ilCtrl =
$DIC[
'ilCtrl'];
81
82 include_once('./Services/Utilities/classes/class.ilConfirmationGUI.php');
84 $confirm->setFormAction($ilCtrl->getFormAction($this, 'remove'));
85 $confirm->addHiddenItem(
"grp_id",
$_GET[
"grp_id"]);
86 $confirm->setHeaderText(
$lng->txt(
'grp_dismiss_member'));
87 $confirm->setConfirm(
$lng->txt(
'confirm'),
'remove');
88 $confirm->setCancel(
$lng->txt(
'cancel'),
'show');
89
90 include_once './Services/User/classes/class.ilUserUtil.php';
91
92 $confirm->addItem(
93 'usr_id',
97 );
98
99 $tpl->setContent($confirm->getHTML());
100 }
Confirmation screen class.
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
References $_GET, $DIC, $lng, $tpl, ilUtil\getImagePath(), and ilUserUtil\getNamePresentation().
◆ executeCommand()
ilCourseParticipantsGroupsGUI::executeCommand |
( |
| ) |
|
Definition at line 28 of file class.ilCourseParticipantsGroupsGUI.php.
29 {
31
32 $ilCtrl =
$DIC[
'ilCtrl'];
34 $ilAccess =
$DIC[
'ilAccess'];
36
37 if (!
$GLOBALS[
'DIC']->access()->checkRbacOrPositionPermissionAccess(
'manage_members',
'manage_members', $this->ref_id)) {
39 }
40
41 $cmd = $ilCtrl->getCmd();
42 if (!$cmd) {
43 $cmd = "show";
44 }
45 $this->$cmd();
46 }
References $DIC, $GLOBALS, $ilErr, and $lng.
◆ remove()
ilCourseParticipantsGroupsGUI::remove |
( |
| ) |
|
|
protected |
Remove user from group @global type $ilObjDataCache @global type $lng @global type $ilCtrl.
- Returns
- type
Definition at line 109 of file class.ilCourseParticipantsGroupsGUI.php.
110 {
112
113 $ilObjDataCache =
$DIC[
'ilObjDataCache'];
115 $ilCtrl =
$DIC[
'ilCtrl'];
116
117 if (!
$GLOBALS[
'DIC']->access()->checkRbacOrPositionPermissionAccess(
'manage_members',
'manage_members', (
int)
$_POST[
'grp_id'])) {
120 return;
121 }
122
123 include_once './Modules/Group/classes/class.ilGroupParticipants.php';
125 $members_obj->delete((
int)
$_POST[
"usr_id"]);
126
127
128 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
129 $members_obj->sendNotification(
132 );
133
134 ilUtil::sendSuccess(
$lng->txt(
"grp_msg_membership_annulled"),
true);
135 $ilCtrl->redirect($this, "show");
136 }
const TYPE_DISMISS_MEMBER
References $_POST, $DIC, $GLOBALS, $lng, ilGroupParticipants\_getInstanceByObjId(), ilUtil\sendFailure(), show(), and ilGroupMembershipMailNotification\TYPE_DISMISS_MEMBER.
◆ resetFilter()
ilCourseParticipantsGroupsGUI::resetFilter |
( |
| ) |
|
◆ show()
ilCourseParticipantsGroupsGUI::show |
( |
| ) |
|
◆ $ref_id
ilCourseParticipantsGroupsGUI::$ref_id = 0 |
|
private |
The documentation for this class was generated from the following file: