Class ilForumModeratorsGUI.
More...
◆ __construct()
ilForumModeratorsGUI::__construct |
( |
| ) |
|
Definition at line 33 of file class.ilForumModeratorsGUI.php.
References $_GET, $DIC, and user().
36 $this->ctrl = $DIC->ctrl();
37 $this->tpl = $DIC->ui()->mainTemplate();
38 $this->lng = $DIC->language();
39 $this->access = $DIC->access();
40 $this->tabs = $DIC->tabs();
41 $this->error = $DIC[
'ilErr'];
42 $this->
user = $DIC->user();
43 $this->toolbar = $DIC->toolbar();
45 $this->tabs->activateTab(
'frm_moderators');
46 $this->lng->loadLanguageModule(
'search');
48 if (!$this->access->checkAccess(
'write',
'', (
int)
$_GET[
'ref_id'])) {
49 $this->error->raiseError($this->lng->txt(
'permission_denied'), $this->error->MESSAGE);
53 $this->ref_id = (int) $_GET[
'ref_id'];
◆ addModerator()
ilForumModeratorsGUI::addModerator |
( |
|
$users = array() | ) |
|
Definition at line 85 of file class.ilForumModeratorsGUI.php.
References $users, ilForumNotification\_isParentNodeGrpCrs(), ilObject\_lookupObjId(), ilForumProperties\getInstance(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and user().
92 include_once
"Modules/Forum/classes/class.ilForumNotification.php";
94 include_once
"Modules/Forum/classes/class.ilForumProperties.php";
96 $frm_noti_type = $objFrmProps->getNotificationType();
98 foreach (
$users as $user_id) {
99 $this->oForumModerators->addModeratorRole((
int) $user_id);
100 if ($isCrsGrp && $frm_noti_type !=
'default') {
102 $tmp_frm_noti->setUserId((
int) $user_id);
103 $tmp_frm_noti->setUserIdNoti($this->
user->getId());
104 $tmp_frm_noti->setUserToggle((
int) $objFrmProps->getUserToggleNoti());
105 $tmp_frm_noti->setAdminForce((
int) $objFrmProps->getAdminForceNoti());
107 $tmp_frm_noti->insertAdminForce();
112 $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 118 of file class.ilForumModeratorsGUI.php.
References $_GET, $_POST, $i, $result, $tbl, $user, ilForumNotification\_isParentNodeGrpCrs(), ilParticipants\_isParticipant(), ilObject\_lookupObjId(), array, ilRepositorySearchGUI\fillAutoCompleteToolbar(), ilUtil\formCheckbox(), ilForumProperties\getInstance(), ilObjectFactory\getInstanceByObjId(), ilUtil\sendFailure(), and ilUtil\sendSuccess().
120 if (!isset(
$_POST[
'usr_id']) || !is_array(
$_POST[
'usr_id'])) {
122 return $this->showModerators();
125 $entries = $this->oForumModerators->getCurrentModerators();
126 if (count(
$_POST[
'usr_id']) == count($entries)) {
128 return $this->showModerators();
131 include_once
"Modules/Forum/classes/class.ilForumNotification.php";
135 include_once
"Services/Membership/classes/class.ilParticipants.php";
138 include_once
"Modules/Forum/classes/class.ilForumProperties.php";
140 $frm_noti_type = $objFrmProps->getNotificationType();
142 foreach (
$_POST[
'usr_id'] as $usr_id) {
143 $this->oForumModerators->detachModeratorRole((
int) $usr_id);
145 if ($isCrsGrp && $frm_noti_type !=
'default') {
148 $tmp_frm_noti->setUserId((
int) $usr_id);
151 $tmp_frm_noti->deleteAdminForce();
157 $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 59 of file class.ilForumModeratorsGUI.php.
61 $next_class = $this->ctrl->getNextClass($this);
62 $cmd = $this->ctrl->getCmd();
64 switch ($next_class) {
65 case 'ilrepositorysearchgui':
66 include_once
'Services/Search/classes/class.ilRepositorySearchGUI.php';
68 $rep_search->setCallback($this,
'addModerator');
69 $this->ctrl->setReturn($this,
'showModerators');
70 $this->ctrl->forwardCommand($rep_search);
75 $cmd =
'showModerators';
◆ $ctrl
ilForumModeratorsGUI::$ctrl |
|
private |
◆ $error
ilForumModeratorsGUI::$error |
|
private |
◆ $lng
ilForumModeratorsGUI::$lng |
|
private |
◆ $oForumModerators
ilForumModeratorsGUI::$oForumModerators |
|
private |
◆ $ref_id
ilForumModeratorsGUI::$ref_id = 0 |
|
private |
◆ $tabs
ilForumModeratorsGUI::$tabs |
|
private |
◆ $toolbar
ilForumModeratorsGUI::$toolbar |
|
private |
◆ $tpl
ilForumModeratorsGUI::$tpl |
|
private |
◆ $user
ilForumModeratorsGUI::$user |
|
private |
The documentation for this class was generated from the following file: