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

GUI class for membership features. More...

+ Inheritance diagram for ilGroupMembershipGUI:
+ Collaboration diagram for ilGroupMembershipGUI:

Public Member Functions

 filterUserIdsByRbacOrPositionOfCurrentUser ($a_user_ids)
 Filter user ids by access. More...
 
 assignMembers ($user_ids, $a_type)
 @access public More...
 
 getLocalTypeRole ($a_translation=false)
 
 getPrintMemberData ($a_members)
 
 getAttendanceListUserData ($a_user_id)
 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

 updateParticipantsStatus ()
 save in participants table More...
 
 initParticipantTableGUI ()
 
 initEditParticipantTableGUI (array $participants)
 init edit participants table gui More...
 
 initParticipantTemplate ()
 Init participant view template. More...
 
 updateLPFromStatus ()
 Update lp from status. More...
 
 initWaitingList ()
 init waiting list More...
 
 getDefaultRole ()
 
- 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

◆ assignMembers()

ilGroupMembershipGUI::assignMembers (   $user_ids,
  $a_type 
)

@access public

Definition at line 38 of file class.ilGroupMembershipGUI.php.

39 {
40 if (empty($user_ids[0])) {
41 $this->lng->loadLanguageModule('search');
42 ilUtil::sendFailure($this->lng->txt('search_err_user_not_exist'), true);
43 return false;
44 }
45
46 $assigned = false;
47 foreach ((array) $user_ids as $new_member) {
48 if ($this->getMembersObject()->isAssigned($new_member)) {
49 continue;
50 }
51 switch ($a_type) {
52 case $this->getParentObject()->getDefaultAdminRole():
53 $this->getMembersObject()->add($new_member, IL_GRP_ADMIN);
54 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
55 $this->getMembersObject()->sendNotification(
57 $new_member
58 );
59 $assigned = true;
60 break;
61
62 case $this->getParentObject()->getDefaultMemberRole():
63 $this->getMembersObject()->add($new_member, IL_GRP_MEMBER);
64 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
65 $this->getMembersObject()->sendNotification(
67 $new_member
68 );
69 $assigned = true;
70 break;
71
72 default:
73 if (in_array($a_type, $this->getParentObject()->getLocalGroupRoles(true))) {
74 $this->getMembersObject()->add($new_member, IL_GRP_MEMBER);
75 $this->getMembersObject()->updateRoleAssignments($new_member, (array) $a_type);
76 } else {
77 ilLoggerFactory::getLogger('crs')->notice('Can not find role with id .' . $a_type . ' to assign users.');
78 ilUtil::sendFailure($this->lng->txt("crs_cannot_find_role"), true);
79 return false;
80 }
81 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
82 $this->getMembersObject()->sendNotification(
84 $new_member
85 );
86 $assigned = true;
87 break;
88 }
89 }
90
91 if ($assigned) {
92 ilUtil::sendSuccess($this->lng->txt("grp_msg_member_assigned"), true);
93 } else {
94 ilUtil::sendSuccess($this->lng->txt('grp_users_already_assigned'), true);
95 }
96 $this->ctrl->redirect($this, 'participants');
97 }
const IL_GRP_MEMBER
const IL_GRP_ADMIN
static getLogger($a_component_id)
Get component logger.
getParentObject()
Get parent object.
getMembersObject()
Get member object.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$a_type
Definition: workflow.php:92

References $a_type, ilLoggerFactory\getLogger(), ilMembershipGUI\getMembersObject(), ilMembershipGUI\getParentObject(), IL_GRP_ADMIN, IL_GRP_MEMBER, ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilGroupMembershipMailNotification\TYPE_ADMISSION_MEMBER.

+ Here is the call graph for this function:

◆ filterUserIdsByRbacOrPositionOfCurrentUser()

ilGroupMembershipGUI::filterUserIdsByRbacOrPositionOfCurrentUser (   $a_user_ids)

Filter user ids by access.

Parameters
int[]$a_user_ids
Returns
int[]

Reimplemented from ilMembershipGUI.

Definition at line 25 of file class.ilGroupMembershipGUI.php.

26 {
27 return $GLOBALS['DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
28 'manage_members',
29 'manage_members',
30 $this->getParentObject()->getRefId(),
31 $a_user_ids
32 );
33 }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

References $GLOBALS, and ilMembershipGUI\getParentObject().

Referenced by getAttendanceListUserData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAttendanceListUserData()

ilGroupMembershipGUI::getAttendanceListUserData (   $a_user_id)

Callback from attendance list.

Parameters
int$a_user_id
Returns
array

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

218 {
219 if ($this->filterUserIdsByRbacOrPositionOfCurrentUser([$a_user_id])) {
220 $data = $this->member_data[$a_user_id];
221 $data['access'] = $data['access_time'];
222 $data['progress'] = $this->lng->txt($data['progress']);
223 return $data;
224 }
225 return [];
226 }
filterUserIdsByRbacOrPositionOfCurrentUser($a_user_ids)
Filter user ids by access.

References $data, and filterUserIdsByRbacOrPositionOfCurrentUser().

+ Here is the call graph for this function:

◆ getDefaultRole()

ilGroupMembershipGUI::getDefaultRole ( )
protected
Returns
int

Reimplemented from ilMembershipGUI.

Definition at line 196 of file class.ilGroupMembershipGUI.php.

197 {
198 return $this->getParentGUI()->object->getDefaultMemberRole();
199 }
getParentGUI()
Get parent gui.

References ilMembershipGUI\getParentGUI().

+ Here is the call graph for this function:

◆ getLocalTypeRole()

ilGroupMembershipGUI::getLocalTypeRole (   $a_translation = false)
Todo:
refactor delete

Definition at line 169 of file class.ilGroupMembershipGUI.php.

170 {
171 return $this->getParentObject()->getLocalGroupRoles($a_translation);
172 }

References ilMembershipGUI\getParentObject().

+ Here is the call graph for this function:

◆ getPrintMemberData()

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

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

206 {
207 $member_data = $this->readMemberData($a_members, array());
208 $member_data = $this->getParentGUI()->addCustomData($member_data);
209 return $member_data;
210 }
readMemberData(array $usr_ids, array $columns)
Required for member table guis.

References ilMembershipGUI\getParentGUI(), and ilMembershipGUI\readMemberData().

+ Here is the call graph for this function:

◆ initEditParticipantTableGUI()

ilGroupMembershipGUI::initEditParticipantTableGUI ( array  $participants)
protected

init edit participants table gui

Parameters
array$participants
Returns
\ilGroupEditParticipantsTableGUI

Definition at line 146 of file class.ilGroupMembershipGUI.php.

147 {
148 include_once './Modules/Group/classes/class.ilGroupEditParticipantsTableGUI.php';
150 $table->setTitle($this->lng->txt($this->getParentObject()->getType() . '_header_edit_members'));
151 $table->setData($this->getParentGUI()->readMemberData($participants));
152
153 return $table;
154 }
if(empty($password)) $table
Definition: pwgen.php:24

References $table, ilMembershipGUI\getParentGUI(), ilMembershipGUI\getParentObject(), and ilMembershipGUI\readMemberData().

+ Here is the call graph for this function:

◆ initParticipantTableGUI()

ilGroupMembershipGUI::initParticipantTableGUI ( )
protected
Returns
\ilParticpantTableGUI

Definition at line 121 of file class.ilGroupMembershipGUI.php.

122 {
123 include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
124 $show_tracking =
126 ;
127 if ($show_tracking) {
128 include_once('./Services/Object/classes/class.ilObjectLP.php');
129 $olp = ilObjectLP::getInstance($this->getParentObject()->getId());
130 $show_tracking = $olp->isActive();
131 }
132
133 include_once './Modules/Group/classes/class.ilGroupParticipantsTableGUI.php';
135 $this,
136 $this->getParentObject(),
137 $show_tracking
138 );
139 }
static _enabledLearningProgress()
check wether learing progress is enabled or not
static _enabledUserRelatedData()
check wether user related tracking is enabled or not
static getInstance($a_obj_id)

References ilObjUserTracking\_enabledLearningProgress(), ilObjUserTracking\_enabledUserRelatedData(), ilObjectLP\getInstance(), and ilMembershipGUI\getParentObject().

+ Here is the call graph for this function:

◆ initParticipantTemplate()

ilGroupMembershipGUI::initParticipantTemplate ( )
protected

Init participant view template.

Definition at line 161 of file class.ilGroupMembershipGUI.php.

162 {
163 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.grp_edit_members.html', 'Modules/Group');
164 }

◆ initWaitingList()

ilGroupMembershipGUI::initWaitingList ( )
protected

init waiting list

Returns
ilGroupWaitingList

Definition at line 186 of file class.ilGroupMembershipGUI.php.

187 {
188 include_once './Modules/Group/classes/class.ilGroupWaitingList.php';
189 $wait = new ilGroupWaitingList($this->getParentObject()->getId());
190 return $wait;
191 }
Waiting list for groups.

References ilMembershipGUI\getParentObject().

+ Here is the call graph for this function:

◆ updateLPFromStatus()

ilGroupMembershipGUI::updateLPFromStatus ( )
protected

Update lp from status.

Definition at line 177 of file class.ilGroupMembershipGUI.php.

178 {
179 return null;
180 }

◆ updateParticipantsStatus()

ilGroupMembershipGUI::updateParticipantsStatus ( )
protected

save in participants table

Definition at line 102 of file class.ilGroupMembershipGUI.php.

103 {
104 $participants = (array) $_POST['visible_member_ids'];
105 $notification = (array) $_POST['notification'];
106 foreach ($participants as $mem_id) {
107 if ($this->getMembersObject()->isAdmin($mem_id)) {
108 $this->getMembersObject()->updateNotification($mem_id, in_array($mem_id, $notification));
109 } else {
110 $this->getMembersObject()->updateNotification($mem_id, false);
111 }
112 }
113 ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
114 $this->ctrl->redirect($this, 'participants');
115 }
$_POST["username"]

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

+ Here is the call graph for this function:

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