Class ilForumModeratorsGUI.
More...
◆ addModerator()
ilForumModeratorsGUI::addModerator |
( |
|
$users = array() | ) |
|
Definition at line 99 of file class.ilForumModeratorsGUI.php.
References $ilUser, ilForumNotification\_isParentNodeGrpCrs(), ilObject\_lookupObjId(), ilForumProperties\getInstance(), ilUtil\sendFailure(), and ilUtil\sendSuccess().
109 include_once
"Modules/Forum/classes/class.ilForumNotification.php";
111 include_once
"Modules/Forum/classes/class.ilForumProperties.php";
113 $frm_noti_type = $objFrmProps->getNotificationType();
115 foreach($users as $user_id)
117 $this->oForumModerators->addModeratorRole((
int)$user_id);
118 if($isCrsGrp && $frm_noti_type !=
'default')
121 $tmp_frm_noti->setUserId((
int)$user_id);
122 $tmp_frm_noti->setUserIdNoti($ilUser->getId());
123 $tmp_frm_noti->setUserToggle((
int)$objFrmProps->getUserToggleNoti());
124 $tmp_frm_noti->setAdminForce((
int)$objFrmProps->getAdminForceNoti());
126 $tmp_frm_noti->insertAdminForce();
131 $this->ctrl->redirect($this,
'showModerators');
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _isParentNodeGrpCrs($a_ref_id)
Class ilForumNotification.
static getInstance($a_obj_id=0)
static _lookupObjId($a_id)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
◆ detachModeratorRole()
ilForumModeratorsGUI::detachModeratorRole |
( |
| ) |
|
Definition at line 137 of file class.ilForumModeratorsGUI.php.
References $_GET, $_POST, $lng, $result, $tbl, ilForumNotification\_isParentNodeGrpCrs(), ilParticipants\_isParticipant(), ilObject\_lookupObjId(), array, ilRepositorySearchGUI\fillAutoCompleteToolbar(), ilUtil\formCheckbox(), ilForumProperties\getInstance(), ilObjectFactory\getInstanceByObjId(), ilUtil\sendFailure(), and ilUtil\sendSuccess().
139 if(!isset(
$_POST[
'usr_id']) || !is_array(
$_POST[
'usr_id']))
142 return $this->showModerators();
145 $entries = $this->oForumModerators->getCurrentModerators();
146 if(count(
$_POST[
'usr_id']) == count($entries))
149 return $this->showModerators();
152 include_once
"Modules/Forum/classes/class.ilForumNotification.php";
158 $parent_ref_id = $tree->getParentId($this->ref_id);
160 include_once
"Services/Membership/classes/class.ilParticipants.php";
163 include_once
"Modules/Forum/classes/class.ilForumProperties.php";
165 $frm_noti_type = $objFrmProps->getNotificationType();
167 foreach(
$_POST[
'usr_id'] as $usr_id)
169 $this->oForumModerators->detachModeratorRole((
int)$usr_id);
171 if($isCrsGrp && $frm_noti_type !=
'default')
176 $tmp_frm_noti->setUserId((
int)$usr_id);
179 $tmp_frm_noti->deleteAdminForce();
185 $this->ctrl->redirect($this,
'showModerators');
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _isParentNodeGrpCrs($a_ref_id)
static _isParticipant($a_ref_id, $a_usr_id)
Static function to check if a user is a participant of the container object.
Class ilForumNotification.
static getInstance($a_obj_id=0)
static _lookupObjId($a_id)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
◆ executeCommand()
ilForumModeratorsGUI::executeCommand |
( |
| ) |
|
Definition at line 71 of file class.ilForumModeratorsGUI.php.
References $cmd.
73 $next_class = $this->ctrl->getNextClass($this);
74 $cmd = $this->ctrl->getCmd();
78 case 'ilrepositorysearchgui':
79 include_once
'Services/Search/classes/class.ilRepositorySearchGUI.php';
81 $rep_search->setCallback($this,
'addModerator');
82 $this->ctrl->setReturn($this,
'showModerators');
83 $this->ctrl->forwardCommand($rep_search);
89 $cmd =
'showModerators';
◆ $ctrl
ilForumModeratorsGUI::$ctrl |
|
private |
◆ $lng
ilForumModeratorsGUI::$lng |
|
private |
◆ $oForumModerators
ilForumModeratorsGUI::$oForumModerators |
|
private |
◆ $ref_id
ilForumModeratorsGUI::$ref_id = 0 |
|
private |
◆ $tpl
ilForumModeratorsGUI::$tpl |
|
private |
The documentation for this class was generated from the following file: