119 {
120 if (!isset(
$_POST[
'usr_id']) || !is_array(
$_POST[
'usr_id'])) {
122 return $this->showModerators();
123 }
124
125 $entries = $this->oForumModerators->getCurrentModerators();
126 if (count(
$_POST[
'usr_id']) == count($entries)) {
128 return $this->showModerators();
129 }
130
131 include_once "Modules/Forum/classes/class.ilForumNotification.php";
133
134 if ($isCrsGrp) {
135 include_once "Services/Membership/classes/class.ilParticipants.php";
136 }
137
138 include_once "Modules/Forum/classes/class.ilForumProperties.php";
140 $frm_noti_type = $objFrmProps->getNotificationType();
141
142 foreach (
$_POST[
'usr_id'] as $usr_id) {
143 $this->oForumModerators->detachModeratorRole((int) $usr_id);
144
145 if ($isCrsGrp && $frm_noti_type != 'default') {
148 $tmp_frm_noti->setUserId((int) $usr_id);
150
151 $tmp_frm_noti->deleteAdminForce();
152 }
153 }
154 }
155
157 $this->ctrl->redirect($this, 'showModerators');
158 }
static _isParticipant($a_ref_id, $a_usr_id)
Static function to check if a user is a participant of the container object.