4 include_once
'Modules/Forum/classes/class.ilForumModerators.php';
5 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
6 include_once
'Services/Table/classes/class.ilTable2GUI.php';
7 include_once
'Services/Search/classes/class.ilQueryParser.php';
8 include_once
'Services/Search/classes/class.ilObjectSearchFactory.php';
40 public function __construct()
56 $ilTabs->setTabActive(
'frm_moderators');
57 $this->lng->loadLanguageModule(
'search');
59 if(!$ilAccess->checkAccess(
'write',
'', (
int)
$_GET[
'ref_id']))
61 $ilias->raiseError($this->lng->txt(
'permission_denied'), $ilias->error_obj->MESSAGE);
65 $this->ref_id = (int)$_GET[
'ref_id'];
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';
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');
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');
191 public function showModerators()
197 global $ilToolbar,
$lng;
199 include_once
'./Services/Search/classes/class.ilRepositorySearchGUI.php';
204 'auto_complete_name' => $lng->txt(
'user'),
205 'submit_name' => $lng->txt(
'add'),
206 'add_search' =>
true,
207 'add_from_container' => $this->oForumModerators->getRefId()
211 require_once
'Modules/Forum/classes/class.ilForumModeratorsTableGUI.php';
214 $entries = $this->oForumModerators->getCurrentModerators();
215 $num = count($entries);
218 foreach($entries as $usr_id)
232 $result[$i][
'login'] = $user->getLogin();
233 $result[$i][
'firstname'] = $user->getFirstname();
234 $result[$i][
'lastname'] = $user->getLastname();
239 $this->tpl->setContent(
$tbl->getHTML());
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.
Class ilForumModeratorsTableGUI.
static getInstance($a_obj_id=0)
Class ilForumModeratorsGUI.
addModerator($users=array())
static _lookupObjId($a_id)
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static fillAutoCompleteToolbar($parent_object, ilToolbarGUI $toolbar=null, $a_options=array(), $a_sticky=false)
fill toolbar with
static formCheckbox($checked, $varname, $value, $disabled=false)
??? public