ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilSessionMembershipGUI Class Reference

GUI class for membership features. More...

+ Inheritance diagram for ilSessionMembershipGUI:
+ Collaboration diagram for ilSessionMembershipGUI:

Public Member Functions

 getPrintMemberData ($a_members)
 
 getAttendanceListUserData ($a_user_id, $a_filters)
 Callback from attendance list. More...
 
- Public Member Functions inherited from ilMembershipGUI
 __construct (ilObjectGUI $repository_gui, ilObject $repository_obj)
 Constructor. More...
 
 getParentGUI ()
 Get parent gui. More...
 
 getParentObject ()
 Get parent object. More...
 
 getMembersObject ()
 Get member object. More...
 
 filterUserIdsByRbacOrPositionOfCurrentUser ($a_user_ids)
 Filter user ids by access. More...
 
 updateParticipants ()
 update members More...
 
 createMailSignature ()
 
 addMemberTab (ilTabsGUI $tabs, $a_is_participant=false)
 add member tab More...
 
 readMemberData (array $usr_ids, array $columns)
 Required for member table guis. More...
 
 getLocalRoles ()
 Get parent roles. More...
 
 confirmAssignSubscribers ()
 Show subscription confirmation. More...
 
 confirmRefuseSubscribers ()
 Refuse subscriber confirmation. More...
 
 assignSubscribers ()
 Do assignment of subscription request @global type $rbacsystem @global type $ilErr. More...
 
 confirmAssignFromWaitingList ()
 Assign from waiting list (confirmatoin) More...
 
 assignFromWaitingList ()
 Assign from waiting list @global type $rbacsystem. More...
 
 confirmRefuseFromList ()
 Refuse from waiting list (confirmation) More...
 

Protected Member Functions

 checkRbacOrPositionAccessBool ($a_rbac_perm, $a_pos_perm, $a_ref_id=0)
 No support for positions in sessions Check if rbac or position access is granted. More...
 
 initParticipantTemplate ()
 Init participant view template. More...
 
 initWaitingList ()
 init waiting list More...
 
 initParticipantTableGUI ()
 
 updateMembers ()
 update entries from member table More...
 
 confirmDeleteParticipants ()
 Show confirmation screen for participants deletion. More...
 
 deleteParticipants ()
 Delete participants @global type $rbacreview @global type $rbacsystem @global type $ilAccess @global type $ilUser. More...
 
 showParticipantsToolbar ()
 Show participants toolbar. More...
 
 setSubTabs (ilTabsGUI $tabs)
 Set sub tabs. More...
 
 checkPermission ($a_permission, $a_cmd="")
 Check permission has no manage members. More...
 
 checkPermissionBool ($a_permission, $a_cmd='', $a_type='', $a_ref_id=0)
 Check permission.
Parameters
type$a_permission
type$a_cmd
type$a_type
type$a_ref_id
More...
 
 canAddOrSearchUsers ()
 Check if current user is allowed to add / search users. More...
 
 jump2UsersGallery ()
 Workaround for unavailable gallery. More...
 
- Protected Member Functions inherited from ilMembershipGUI
 getLanguage ()
 
 getCtrl ()
 
 getLogger ()
 
 checkPermissionBool ($a_permission, $a_cmd='', $a_type='', $a_ref_id=0)
 Check permission. More...
 
 checkRbacOrPositionAccessBool ($a_rbac_perm, $a_pos_perm, $a_ref_id=0)
 Check if rbac or position access is granted. More...
 
 checkPermission ($a_permission, $a_cmd="")
 Check permission If not granted redirect to parent gui. More...
 
 checkRbacOrPermissionAccess ($a_rbac_perm, $a_pos_perm)
 check rbac or position access More...
 
 canAddOrSearchUsers ()
 Check if current user is allowed to add / search users. More...
 
 participants ()
 Show participant table, subscriber table, wating list table;. More...
 
 participantsApplyFilter ()
 Apply filter for participant table. More...
 
 participantsResetFilter ()
 reset participants filter More...
 
 editMember ()
 Edit one participant. More...
 
 editParticipants ($post_participants=array())
 Edit participants. More...
 
 confirmDeleteParticipants ()
 Show confirmation screen for participants deletion. More...
 
 deleteParticipants ()
 
 sendMailToSelectedUsers ()
 Send mail to selected users. More...
 
 membersMap ()
 Members map. More...
 
 mailMembersBtn ()
 Mail to members view @global type $ilToolbar. More...
 
 showParticipantsToolbar ()
 Show participants toolbar. More...
 
 showMemberExportToolbarButton (ilToolbarGUI $toolbar, $a_back_cmd=null, $a_separator=false)
 Show member export button. More...
 
 showMailToMemberToolbarButton (ilToolbarGUI $toolbar, $a_back_cmd=null, $a_separator=false)
 Show mail to member toolbar button. More...
 
 getDefaultCommand ()
 Get default command. More...
 
 setSubTabs (ilTabsGUI $tabs)
 Set sub tabs. More...
 
 parseSubscriberTable ()
 Parse table of subscription request. More...
 
 refuseSubscribers ()
 Refuse subscribers @global type $rbacsystem. More...
 
 parseWaitingListTable ()
 Parse table of subscription request. More...
 
 refuseFromList ()
 refuse from waiting list More...
 
 addToClipboard ()
 Add selected users to user clipboard. More...
 
 getDefaultRole ()
 
 printMembers ()
 Print members. More...
 
 printMembersOutput ()
 print members output More...
 
 printForMembersOutput ()
 print members output More...
 
 jump2UsersGallery ()
 

Additional Inherited Members

- Protected Attributes inherited from ilMembershipGUI
 $lng = null
 
 $ctrl = null
 
 $logger = null
 
 $tpl
 
 $access
 

Detailed Description

Member Function Documentation

◆ canAddOrSearchUsers()

ilSessionMembershipGUI::canAddOrSearchUsers ( )
protected

Check if current user is allowed to add / search users.

Returns
bool

Reimplemented from ilMembershipGUI.

Definition at line 264 of file class.ilSessionMembershipGUI.php.

265 {
266 return $this->checkPermissionBool('write');
267 }
checkPermissionBool($a_permission, $a_cmd='', $a_type='', $a_ref_id=0)
Check permission.

References checkPermissionBool().

+ Here is the call graph for this function:

◆ checkPermission()

ilSessionMembershipGUI::checkPermission (   $a_permission,
  $a_cmd = "" 
)
protected

Check permission has no manage members.

Parameters
string$a_permission
string$a_cmd

Reimplemented from ilMembershipGUI.

Definition at line 240 of file class.ilSessionMembershipGUI.php.

241 {
242 if ($a_permission == 'manage_members') {
243 $a_permission = 'write';
244 }
245 return parent::checkPermission($a_permission, $a_cmd);
246 }

Referenced by deleteParticipants(), and updateMembers().

+ Here is the caller graph for this function:

◆ checkPermissionBool()

ilSessionMembershipGUI::checkPermissionBool (   $a_permission,
  $a_cmd = '',
  $a_type = '',
  $a_ref_id = 0 
)
protected

Check permission.

Parameters
type$a_permission
type$a_cmd
type$a_type
type$a_ref_id

Reimplemented from ilMembershipGUI.

Definition at line 252 of file class.ilSessionMembershipGUI.php.

253 {
254 if ($a_permission == 'manage_members') {
255 $a_permission = 'write';
256 }
257 return parent::checkPermissionBool($a_permission, $a_cmd, $a_type, $a_ref_id);
258 }
$a_type
Definition: workflow.php:92

References $a_type.

Referenced by canAddOrSearchUsers(), and checkRbacOrPositionAccessBool().

+ Here is the caller graph for this function:

◆ checkRbacOrPositionAccessBool()

ilSessionMembershipGUI::checkRbacOrPositionAccessBool (   $a_rbac_perm,
  $a_pos_perm,
  $a_ref_id = 0 
)
protected

No support for positions in sessions Check if rbac or position access is granted.

Parameters
string$a_rbac_perm
string$a_pos_perm
int$a_ref_id

Reimplemented from ilMembershipGUI.

Definition at line 26 of file class.ilSessionMembershipGUI.php.

27 {
28 if (!$a_ref_id) {
29 $a_ref_id = $this->getParentObject()->getRefId();
30 }
31 return $this->checkPermissionBool($a_rbac_perm, $a_ref_id);
32 }
getParentObject()
Get parent object.

References checkPermissionBool(), and ilMembershipGUI\getParentObject().

+ Here is the call graph for this function:

◆ confirmDeleteParticipants()

ilSessionMembershipGUI::confirmDeleteParticipants ( )
protected

Show confirmation screen for participants deletion.

Reimplemented from ilMembershipGUI.

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

112 {
113 $participants = (array) $_POST['participants'];
114
115 if (!count($participants)) {
116 ilUtil::sendFailure($this->lng->txt('no_checkbox'), true);
117 $this->ctrl->redirect($this, 'participants');
118 }
119
120 include_once('./Services/Utilities/classes/class.ilConfirmationGUI.php');
121 $confirm = new ilConfirmationGUI();
122 $confirm->setFormAction($this->ctrl->getFormAction($this, 'confirmDeleteParticipants'));
123 $confirm->setHeaderText($this->lng->txt($this->getParentObject()->getType() . '_header_delete_members'));
124 $confirm->setConfirm($this->lng->txt('confirm'), 'deleteParticipants');
125 $confirm->setCancel($this->lng->txt('cancel'), 'participants');
126
127 foreach ($participants as $usr_id) {
128 $name = ilObjUser::_lookupName($usr_id);
129
130 $confirm->addItem(
131 'participants[]',
132 $name['user_id'],
133 $name['lastname'] . ', ' . $name['firstname'] . ' [' . $name['login'] . ']',
134 ilUtil::getImagePath('icon_usr.svg')
135 );
136 }
137
138 $this->tpl->setContent($confirm->getHTML());
139 }
$_POST["username"]
Confirmation screen class.
static _lookupName($a_user_id)
lookup user name
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if($format !==null) $name
Definition: metadata.php:146

References $_POST, $name, ilObjUser\_lookupName(), ilUtil\getImagePath(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ deleteParticipants()

ilSessionMembershipGUI::deleteParticipants ( )
protected

Delete participants @global type $rbacreview @global type $rbacsystem @global type $ilAccess @global type $ilUser.

Returns
boolean

Reimplemented from ilMembershipGUI.

Definition at line 149 of file class.ilSessionMembershipGUI.php.

150 {
151 $this->checkPermission('write');
152
153 $participants = (array) $_POST['participants'];
154
155 if (!is_array($participants) or !count($participants)) {
156 ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
157 $this->ctrl->redirect($this, 'participants');
158 }
159
160 foreach ($participants as $part_id) {
161 // delete role assignment
162 $this->getMembersObject()->delete($part_id);
163 // delete further settings
164 $event_part = new ilEventParticipants($this->getParentObject()->getId());
165 $event_part->setUserId($part_id);
166 $event_part->setParticipated(false);
167 $event_part->setRegistered(false);
168 $event_part->setMark('');
169 $event_part->setComment('');
170 $event_part->updateUser();
171 }
172
173 ilUtil::sendSuccess($this->lng->txt($this->getParentObject()->getType() . "_members_deleted"), true);
174 $this->ctrl->redirect($this, "participants");
175
176 return true;
177 }
getMembersObject()
Get member object.
checkPermission($a_permission, $a_cmd="")
Check permission has no manage members.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References $_POST, checkPermission(), ilMembershipGUI\getMembersObject(), ilMembershipGUI\getParentObject(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ getAttendanceListUserData()

ilSessionMembershipGUI::getAttendanceListUserData (   $a_user_id,
  $a_filters 
)

Callback from attendance list.

Parameters
int$a_user_id
Returns
array

Definition at line 217 of file class.ilSessionMembershipGUI.php.

218 {
219 $data = $this->getMembersObject()->getEventParticipants()->getUser($a_user_id);
220
221 if ($a_filters && $a_filters["registered"] && !$data["registered"]) {
222 return;
223 }
224
225 $data['registered'] = $data['registered'] ?
226 $this->lng->txt('yes') :
227 $this->lng->txt('no');
228 $data['participated'] = $data['participated'] ?
229 $this->lng->txt('yes') :
230 $this->lng->txt('no');
231
232 return $data;
233 }

References $data, and ilMembershipGUI\getMembersObject().

+ Here is the call graph for this function:

◆ getPrintMemberData()

ilSessionMembershipGUI::getPrintMemberData (   $a_members)
Parameters
array$a_members
Returns
array

Definition at line 205 of file class.ilSessionMembershipGUI.php.

206 {
207 return $a_members;
208 }

◆ initParticipantTableGUI()

ilSessionMembershipGUI::initParticipantTableGUI ( )
protected
Returns
\ilParticpantTableGUI

Definition at line 58 of file class.ilSessionMembershipGUI.php.

59 {
61 $this,
62 $this->getParentObject(),
63 'participants'
64 );
65 $table->init();
66 return $table;
67 }
if(empty($password)) $table
Definition: pwgen.php:24

References $table, and ilMembershipGUI\getParentObject().

+ Here is the call graph for this function:

◆ initParticipantTemplate()

ilSessionMembershipGUI::initParticipantTemplate ( )
protected

Init participant view template.

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

40 {
41 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.sess_edit_members.html', 'Modules/Session');
42 }

◆ initWaitingList()

ilSessionMembershipGUI::initWaitingList ( )
protected

init waiting list

Returns
ilGroupWaitingList

Definition at line 48 of file class.ilSessionMembershipGUI.php.

49 {
50 include_once './Modules/Session/classes/class.ilSessionWaitingList.php';
51 $wait = new ilSessionWaitingList($this->getParentObject()->getId());
52 return $wait;
53 }

References ilMembershipGUI\getParentObject().

+ Here is the call graph for this function:

◆ jump2UsersGallery()

ilSessionMembershipGUI::jump2UsersGallery ( )
protected

Workaround for unavailable gallery.

Reimplemented from ilMembershipGUI.

Definition at line 273 of file class.ilSessionMembershipGUI.php.

274 {
275 return $this->participants();
276 }
participants()
Show participant table, subscriber table, wating list table;.

References ilMembershipGUI\participants().

+ Here is the call graph for this function:

◆ setSubTabs()

ilSessionMembershipGUI::setSubTabs ( ilTabsGUI  $tabs)
protected

Set sub tabs.

Reimplemented from ilMembershipGUI.

Definition at line 197 of file class.ilSessionMembershipGUI.php.

198 {
199 }

◆ showParticipantsToolbar()

ilSessionMembershipGUI::showParticipantsToolbar ( )
protected

Show participants toolbar.

Reimplemented from ilMembershipGUI.

Definition at line 183 of file class.ilSessionMembershipGUI.php.

184 {
185 $ilToolbar = $GLOBALS['DIC']->toolbar();
186 // print button
187
188 $ilToolbar->addButton(
189 $this->lng->txt($this->getParentObject()->getType() . "_print_list"),
190 $this->ctrl->getLinkTarget($this, 'printMembers')
191 );
192 }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

References $GLOBALS.

◆ updateMembers()

ilSessionMembershipGUI::updateMembers ( )
protected

update entries from member table

Definition at line 72 of file class.ilSessionMembershipGUI.php.

73 {
74 $this->checkPermission('write');
75
76 $part = ilParticipants::getInstance($this->getParentObject()->getRefId());
77
78 foreach ((array) $_REQUEST['visible_participants'] as $part_id) {
79 $participated = (bool) $_POST['participated'][$part_id];
80 $registered = (bool) $_POST['registered'][$part_id];
81
82 $this->getLogger()->debug('Participated: ' . (int) $participated);
83 $this->getLogger()->debug('Registered: ' . (int) $registered);
84
85 if ($part->isAssigned($part_id)) {
86 if (!$participated && !$registered) {
87 $part->delete($part_id);
88 }
89 } else {
90 if ($participated || $registered) {
91 $part->add($part_id, IL_SESS_MEMBER);
92 }
93 }
94 $event_part = new ilEventParticipants($this->getParentObject()->getId());
95 $event_part->setUserId($part_id);
96 $event_part->setMark(ilUtil::stripSlashes($_POST['mark'][$part_id]));
97 $event_part->setComment(ilUtil::stripSlashes($_POST['comment'][$part_id]));
98 $event_part->setParticipated($participated);
99 $event_part->setRegistered($registered);
100 $event_part->updateUser();
101 }
102
103 ilUtil::sendSuccess($this->getLanguage()->txt('settings_saved'), true);
104 $this->getCtrl()->redirect($this, 'participants');
105 }
const IL_SESS_MEMBER
static getInstance($a_ref_id)
Get instance by ref_id.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_POST, checkPermission(), ilMembershipGUI\getCtrl(), ilParticipants\getInstance(), ilMembershipGUI\getLanguage(), ilMembershipGUI\getLogger(), ilMembershipGUI\getParentObject(), IL_SESS_MEMBER, ilUtil\sendSuccess(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

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