138 {
139 if(!isset(
$_POST[
'usr_id']) || !is_array(
$_POST[
'usr_id']))
140 {
142 return $this->showModerators();
143 }
144
145 $entries = $this->oForumModerators->getCurrentModerators();
146 if(count(
$_POST[
'usr_id']) == count($entries))
147 {
149 return $this->showModerators();
150 }
151
152 include_once "Modules/Forum/classes/class.ilForumNotification.php";
154
155 if($isCrsGrp)
156 {
157 global $tree;
158 $parent_ref_id = $tree->getParentId($this->ref_id);
159
160 include_once "Services/Membership/classes/class.ilParticipants.php";
161 }
162
163 include_once "Modules/Forum/classes/class.ilForumProperties.php";
165 $frm_noti_type = $objFrmProps->getNotificationType();
166
167 foreach(
$_POST[
'usr_id'] as $usr_id)
168 {
169 $this->oForumModerators->detachModeratorRole((int)$usr_id);
170
171 if($isCrsGrp && $frm_noti_type != 'default')
172 {
174 {
176 $tmp_frm_noti->setUserId((int)$usr_id);
178
179 $tmp_frm_noti->deleteAdminForce();
180 }
181 }
182 }
183
185 $this->ctrl->redirect($this, 'showModerators');
186 }
static _isParticipant($a_ref_id, $a_usr_id)
Static function to check if a user is a participant of the container object.