16 require_once
"classes/class.ilObjectGUI.php";
17 require_once
"Modules/Chat/classes/class.ilChatRecording.php";
28 public function __construct($a_data,$a_id,$a_call_by_reference =
true, $a_prepare_output =
true)
32 $lng->loadLanguageModule(
'chat');
35 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference, $a_prepare_output);
38 $this->ctrl->saveParameter($this,array(
"ref_id",
"cmdClass"));
41 if(is_object($this->object->chat_user))
43 $this->
object->chat_user->setUserId(
$_SESSION[
"AccountId"]);
51 if(
$_GET[
"baseClass"] ==
"ilChatPresentationGUI")
60 $next_class = $this->ctrl->getNextClass($this);
61 $cmd = $this->ctrl->getCmd();
66 case 'ilpermissiongui':
67 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
69 $ret =& $this->ctrl->forwardCommand($perm_gui);
72 case "ilpublicuserprofilegui":
73 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
75 $ret = $this->ctrl->forwardCommand($profile_gui);
78 case 'ilinfoscreengui':
100 include_once
'Services/YUI/classes/class.ilYuiUtil.php';
102 $testTpl =
new ilTemplate(
'tpl.test_treeview.html',
true,
true,
'Modules/Chat');
103 $testTpl->setVariable(
'SOME_CONTENT',
'asdf');
104 $tpl->setContent($testTpl->get());
130 global $ilLocator,
$tree,$ilObjDataCache;
132 if (
$_GET[
"admin_mode"] ==
"settings")
134 $ilLocator->addItem($this->lng->txt(
"administration"),
135 $this->ctrl->getLinkTargetByClass(
"iladministrationgui",
"frameset"),
139 $chat_settings_ref_id = $tree->getParentId($this->object->getRefId());
140 $chat_settings_obj_id = $ilObjDataCache->lookupObjId($chat_settings_ref_id);
142 $this->ctrl->setParameterByClass(
'ilobjchatservergui',
'ref_id',$chat_settings_ref_id);
143 $ilLocator->addItem($ilObjDataCache->lookupTitle($chat_settings_obj_id),
144 $this->ctrl->getLinkTargetByClass(array(
'iladministrationgui',
'ilobjchatservergui'),
147 if ($this->object->getRefId() != SYSTEM_FOLDER_ID)
149 $ilLocator->addItem($this->object->getTitle(),
150 $this->ctrl->getLinkTarget($this,
"view"));
163 $this->target_script = $a_script;
168 return $this->target_script.
"?".$a_params;
183 global $ilUser,$rbacadmin;
192 "ilias.php?baseClass=ilChatHandlerGUI&ref_id=".$new_obj->getRefId().
"&cmd=view"));
199 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
201 if(!$rbacsystem->checkAccess(
'moderate',$this->object->getRefId()))
203 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
206 include_once(
'Services/Table/classes/class.ilTable2GUI.php');
209 $table->setTitle($lng->txt(
'chat_blocked_users'));
210 $table->setId(
'cht_blocked_users_' . $this->object->getId());
211 $table->setFormAction($ilCtrl->getFormAction($this));
212 $table->addColumn(
'',
'checkbox',
'2%',
true);
213 $table->addColumn($lng->txt(
'chat_user_name'),
'login');
214 $table->addColumn($lng->txt(
'lastname'),
'lastname');
215 $table->addColumn($lng->txt(
'firstname'),
'firstname');
216 $table->addColumn($lng->txt(
'actions'));
217 $table->setNoEntriesText($lng->txt(
'chat_no_blocked'));
219 $table->setSelectAllCheckbox(
'blocked_check');
220 $table->setRowTemplate(
'tpl.chat_blocked_users_row.html',
'Modules/Chat');
224 $tabledata = array();
226 $table->addMultiCommand(
'unblockUsers', $lng->txt(
'chat_blocked_unlocked'));
228 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
230 foreach($blocked_users as $usrId)
233 $current_selection_list->setListTitle($lng->txt(
"actions"));
234 $current_selection_list->setId(
"act_".$usrId);
235 $ilCtrl->setParameter($this,
'blocked_check', $usrId);
236 $current_selection_list->addItem($this->lng->txt(
"chat_blocked_unlocked"),
'', $ilCtrl->getLinkTarget($this,
'unblockUsers'));
242 'login' => $usr->getLogin(),
243 'firstname' => $usr->getFirstname(),
244 'lastname' => $usr->getLastname(),
245 'actions' => $current_selection_list->getHTML()
248 $table->setData($tabledata);
253 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
256 $form->setTitle($lng->txt(
'chat_add_blocking'));
257 $form->setFormAction($ilCtrl->getFormAction($this,
'blockUser'));
260 $form->addItem($inp);
262 $form->addCommandButton(
'blockUser', $lng->txt(
'chat_block_user'));
264 $tpl->setVariable(
'ADM_CONTENT', $table->getHTML() .
"<br />" . $form->getHTML());
272 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
274 if(!$rbacsystem->checkAccess(
'moderate',$this->object->getRefId()))
276 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
288 if($blocked_obj->isBlocked(
$usr_id))
305 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
309 if(!$rbacsystem->checkAccess(
'moderate',$this->object->getRefId()))
311 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
316 if (
$_GET[
'blocked_check'])
317 $_POST[
'blocked_check'] = array(
$_GET[
'blocked_check']);
319 if(!is_array(
$_POST[
'blocked_check']))
327 $blocked_obj->unblock($usr_id);
336 global $rbacsystem,$ilUser,
$lng;
339 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
346 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
348 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
352 $isActive = ($this->
object->server_comm->isAlive() && $this->ilias->getSetting(
"chat_active"));
359 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
369 $rooms_unprepared = array();
370 if($rbacsystem->checkAccess(
'write',$this->ref_id))
372 $rooms_unprepared = $this->
object->chat_room->getAllRoomsOfObject();
376 $this->
object->chat_room->setOwnerId(
$_SESSION[
"AccountId"]);
377 $rooms_unprepared = $this->
object->chat_room->getRoomsOfObject();
386 'title' => $this->object->getTitle().
" ".$lng->txt(
"chat_public_room"),
391 foreach($rooms_unprepared as $key => $value)
393 $rooms[$i] = $rooms_unprepared[$key];
399 include_once
'Modules/Chat/classes/class.ilChatRoomsTableGUI.php';
400 $tbl =
new ilChatRoomsTableGUI($this, $rbacsystem->checkAccess(
'write',$this->object->getRefId()), $isActive);
401 $tbl->setData($rooms);
404 include_once
'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php';
406 $this->tpl->setVariable(
'PRMLINK', $permalink->getHTML());
408 $this->tpl->setVariable(
"ADM_CONTENT", $tbl->getHTML());
417 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
419 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
422 if(!isset(
$_POST[
"del_id"]))
433 if(count(
$_POST[
"del_id"]) > 1)
440 if(in_array(0,
$_POST[
"del_id"]))
451 $room =&
new ilChatRoom($this->object->getId());
454 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.chat_edit_room.html",
"Modules/Chat");
455 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
456 $this->tpl->setVariable(
"TXT_ROOM_NAME",$this->lng->txt(
"chat_room_name"));
457 $this->tpl->setVariable(
"ROOM_CANCEL",$this->lng->txt(
"cancel"));
458 $this->tpl->setVariable(
"TXT_EDIT_CHATROOMS",$this->lng->txt(
"chat_chatroom_rename"));
459 $this->tpl->setVariable(
"ROOM_NAME",$room->getTitle());
460 $this->tpl->setVariable(
"CMD",
"renameRoom");
461 $this->tpl->setVariable(
"ROOM_EDIT",$this->lng->txt(
"rename"));
465 if(in_array(0,
$_POST[
"del_id"]))
483 if(in_array(0,
$_POST[
"del_id"]) and !$rbacsystem->checkAccess(
'write',$this->object->getRefId()))
490 foreach(
$_POST[
"del_id"] as $room_id)
492 $this->
object->chat_room->setRoomId($room_id);
493 $this->
object->server_comm->setType(
"delete");
494 $this->
object->server_comm->send();
495 $this->
object->chat_room->deleteAllMessages();
509 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
511 $this->ilias->raiseError($lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
517 if(!isset(
$_POST[
"del_id"]))
524 if(in_array(0,
$_POST[
"del_id"]) and !$rbacsystem->checkAccess(
'write',$this->object->getRefId()))
531 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
533 $conf->setFormAction($ilCtrl->getFormAction($this));
534 $conf->setHeaderText($lng->txt(
'chat_confirm_delete'));
535 foreach(
$_POST[
"del_id"] as $id)
537 $room =
new ilChatRoom($this->object->getId());
539 $conf->addItem(
'del_id[]', $id, $room->getTitle());
541 $conf->setConfirm($lng->txt(
'confirm'),
'confirmedDeleteRoom');
542 $conf->setCancel($lng->txt(
'cancel'),
'view');
543 $tpl->setVariable(
'ADM_CONTENT', $conf->getHTML());
548 global $rbacsystem,
$lng;
550 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
552 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
558 if(!isset(
$_POST[
"del_id"]))
566 if(in_array(0,
$_POST[
"del_id"]) &&!$rbacsystem->checkAccess(
'write',$this->object->getRefId()))
572 foreach(
$_POST[
"del_id"] as $room_id)
574 $this->
object->chat_room->setRoomId($room_id);
575 $this->
object->server_comm->setType(
"delete");
576 $this->
object->server_comm->send();
577 $this->
object->chat_room->deleteAllMessages();
587 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
589 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
592 if(!isset(
$_GET[
"room_id"]))
599 if(
$_GET[
"room_id"] == 0)
606 $room =
new ilChatRoom($this->object->getId());
610 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
614 $form->setFormAction($ilCtrl->getFormAction($this,
'renameRoom'));
615 $form->setTitle($lng->txt(
"chat_chatroom_rename"));
617 $inp =
new ilTextInputGUI($lng->txt(
'chat_room_name'),
'room_name');
619 $form->addItem($inp);
622 $hinp->setValue(
$_GET[
'room_id']);
623 $form->addItem($hinp);
625 $form->addCommandButton(
'renameRoom', $lng->txt(
'rename'));
626 $form->addCommandButton(
'view', $lng->txt(
'cancel'));
628 $tpl->setVariable(
'ADM_CONTENT',$form->getHTML());
669 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
671 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
675 $this->ilias->raiseError($this->lng->txt(
"chat_select_one_room"),$this->ilias->error_obj->MESSAGE);
677 $this->
object->chat_room->setOwnerId(
$_SESSION[
"AccountId"]);
678 if(!$this->object->chat_room->deleteRooms(
$_POST[
'del_id']))
680 $this->ilias->raiseError($this->object->chat_room->getErrorMessage(),$this->ilias->error_obj->MESSAGE);
692 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
694 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
696 $room =&
new ilChatRoom($this->object->getId());
698 $room->setOwnerId(
$_SESSION[
"AccountId"]);
700 if(!$room->validate())
702 $this->ilias->raiseError($room->getErrorMessage(),$this->ilias->error_obj->MESSAGE);
715 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
717 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
720 $room =
new ilChatRoom($this->object->getId());
723 if(!$room->validate())
725 $this->ilias->raiseError($room->getErrorMessage(),$this->ilias->error_obj->MESSAGE);
736 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
738 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
740 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.chat_edit_room.html",
"Modules/Chat");
741 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
742 $this->tpl->setVariable(
"TXT_ROOM_NAME",$this->lng->txt(
"chat_room_name"));
743 $this->tpl->setVariable(
"ROOM_CANCEL",$this->lng->txt(
"cancel"));
745 $this->tpl->setVariable(
"TXT_EDIT_CHATROOMS",$this->lng->txt(
"chat_chatroom_rename"));
746 $this->tpl->setVariable(
"ROOM_NAME",
"");
747 $this->tpl->setVariable(
"CMD",
"addRoom");
748 $this->tpl->setVariable(
"ROOM_EDIT",$this->lng->txt(
"add"));
756 if (!$rbacsystem->checkAccess(
"moderate", $this->object->getRefId()))
758 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
761 $this->
object->__initChatRecording();
762 $data = $this->
object->chat_recording->getRecordings();
763 if (!is_array(
$data))
769 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
772 $tablelines = array();
776 if ($d[
'moderator_id'])
778 $usr =
new ilObjUser($d[
'moderator_id']);
779 $mod = $usr->getPublicName();
784 'REC_ID' => $d[
'record_id'],
785 'RECORDING_TITLE' => $d[
'title'],
786 'RECORDING_DESCRIPTION' => $d[
'description'],
789 'start_timestamp' => $d[
'start_time']
792 if (is_array($moderator = $this->object->chat_recording->getModerator($d[
"moderator_id"])))
794 $this->tpl->setVariable(
"MODERATOR", $moderator);
798 $current_selection_list->setListTitle($this->lng->txt(
"actions"));
799 $current_selection_list->setId(
"act_".$current[
'REC_ID']);
801 if ($d[
'end_time'] > 0)
804 $ilCtrl->setParameter($this,
'record_id',$d[
"record_id"]);
805 $current_selection_list->addItem($lng->txt(
'export'),
'', $ilCtrl->getLinkTarget($this,
'exportRecording'));
806 $ilCtrl->clearParameters($this);
810 $current_selection_list->addItem($lng->txt(
'delete'),
'', $ilCtrl->getLinkTarget($this,
'askDeleteRecordings'));
812 $current[
'COMMAND_SELECTION_LIST'] = $current_selection_list->getHTML();
814 $tablelines[] = $current;
818 include_once(
'Services/Table/classes/class.ilTable2GUI.php');
819 $table =
new ilTable2GUI($this, $lng->txt(
'chat_recordings'));
820 $table->
setTitle($lng->txt(
'chat_recordings'));
821 $table->setData($tablelines);
822 $table->setId(
'cht_recordings_tbl_' . $this->object->getId());
823 $table->addColumn(
'',
'checkbox',
'1%',
true);
824 $table->addColumn($lng->txt(
'title'),
'RECORDING_TITLE',
'35%');
825 $table->addColumn($lng->txt(
'chat_recording_moderator'),
'RECORDING_MODERATOR',
'15%');
826 $table->addColumn($lng->txt(
'chat_recording_time_frame'),
'start_timestamp',
'30%');
827 $table->addColumn($lng->txt(
'actions'),
false,
'10%');
829 $table->setFormAction($ilCtrl->getFormAction($this));
830 $table->setSelectAllCheckbox(
'recordings');
832 $table->setRowTemplate(
'tpl.chat_recordings_list_row.html',
'Modules/Chat');
834 $table->addMultiCommand(
'askDeleteRecordings', $lng->txt(
'delete'));
836 $this->tpl->setVariable(
'ADM_CONTENT', $table->getHTML());
843 if (!$rbacsystem->checkAccess(
"moderate", $this->object->getRefId()))
845 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
848 if(!is_array(
$_POST[
'recordings']))
856 $this->
object->__initChatRecording();
859 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.chat_ask_delete_recordings.html",
"Modules/Chat");
861 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
862 $this->tpl->setVariable(
"TBL_TITLE",$this->lng->txt(
'chat_recordings'));
863 $this->tpl->setVariable(
"HEADER_DESC",$this->lng->txt(
'chat_recording_description'));
864 $this->tpl->setVariable(
"HEADER_MOD",$this->lng->txt(
'chat_recording_moderator'));
865 $this->tpl->setVariable(
"HEADER_TIME",$this->lng->txt(
'chat_recording_time_frame'));
867 $this->tpl->setVariable(
"BTN_DELETE",$this->lng->txt(
'delete'));
868 $this->tpl->setVariable(
"BTN_CANCEL",$this->lng->txt(
'cancel'));
871 for ($i = 0; $i < count(
$_POST[
"recordings"]); $i++)
873 $this->
object->chat_recording->getRecord(
$_POST[
"recordings"][$i]);
874 $this->tpl->setCurrentBlock(
"recordings_row");
875 if($this->object->chat_recording->getTitle() !=
"")
877 $this->tpl->setVariable(
"RECORDING_TITLE", $this->object->chat_recording->getTitle());
879 if($this->object->chat_recording->getDescription() !=
"")
881 $this->tpl->setVariable(
"RECORDING_DESCRIPTION", $this->object->chat_recording->getDescription());
883 if ($moderator = $this->object->chat_recording->getModerator())
885 $this->tpl->setVariable(
"MODERATOR", $moderator);
887 $this->tpl->setVariable(
"START_TIME", date(
"Y-m-d H:i:s", $this->object->chat_recording->getStartTime()));
888 if ($this->object->chat_recording->getEndTime() > 0)
890 $this->tpl->setVariable(
"END_TIME", date(
"Y-m-d H:i:s", $this->object->chat_recording->getEndTime()));
893 $this->tpl->parseCurrentBlock();
902 if (!$rbacsystem->checkAccess(
"moderate", $this->object->getRefId()))
904 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
907 if(!is_array(
$_SESSION[
'chat_recordings_del']))
915 $this->
object->__initChatRecording();
917 foreach(
$_SESSION[
'chat_recordings_del'] as $record_id)
919 $this->
object->chat_recording->delete($record_id);
932 if (!$rbacsystem->checkAccess(
"moderate", $this->object->getRefId()))
934 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
936 $this->
object->__initChatRecording();
938 if (!$this->object->chat_recording->getRecord(
$_GET[
"record_id"]) ||
939 $this->
object->chat_recording->getEndTime() == 0)
947 $tmp_tpl =&
new ilTemplate(
"tpl.chat_export_recording.html",
true,
true,
"Modules/Chat");
949 if($this->object->chat_recording->getTitle())
951 $tmp_tpl->setVariable(
"TITLE",$this->object->chat_recording->getTitle());
953 $tmp_tpl->setVariable(
"START_TIME",date(
"Y-m-d H:i:s", $this->object->chat_recording->getStartTime()));
954 $tmp_tpl->setVariable(
"END_TIME",date(
"Y-m-d H:i:s", $this->object->chat_recording->getEndTime()));
955 $tmp_tpl->setVariable(
"CONTENT",$this->object->chat_recording->exportMessages());
1015 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
1017 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
1021 $this->tpl->show(
false,
false);
1031 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
1033 !$rbacsystem->checkAccess(
"read", $this->ref_id)
1037 $baseClass =
'ilchatpresentationgui';
1038 $ilCtrl->setParameter($baseClass,
'ref_id', $this->ref_id);
1043 if (
$_REQUEST[
"room_id"] && !$this->object->chat_room->getTitle())
1045 $baseClass =
'ilchatpresentationgui';
1046 $ilCtrl->setParameter($baseClass,
'ref_id', $this->ref_id);
1051 $this->
object->chat_room->setUserId(
$_SESSION[
"AccountId"]);
1052 $this->
object->chat_room->updateLastVisit();
1053 $this->tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
1056 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.chat_user_frame_async.html",
'Modules/Chat');
1057 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
1059 $this->tpl->addCss(
"./Modules/Chat/templates/default/chat.css");
1061 $ilMainMenu->setSmallMode(
false);
1062 $this->tpl->setVariable(
"MAINMENU", $ilMainMenu->getHTML());
1064 include_once
'Services/YUI/classes/class.ilYuiUtil.php';
1068 $this->tpl->addJavascript(
"./Services/JavaScript/js/Basic.js");
1069 $this->tpl->addJavascript(
"./Services/Navigation/js/ServiceNavigation.js");
1070 $this->tpl->addJavascript(
'./Services/YUI/js/2_5_0/yahoo/yahoo-min.js');
1071 $this->tpl->addJavascript(
'./Services/YUI/js/2_5_0/event/event-min.js');
1072 $this->tpl->addJavascript(
'./Services/YUI/js/2_5_0/connection/connection-min.js');
1074 $this->tpl->addJavascript(
'./Modules/Chat/js/ChatRoomList.js');
1075 $this->tpl->addJavascript(
'./Modules/Chat/js/ChatActiveUsersRoom.js');
1076 $this->tpl->addJavascript(
'./Modules/Chat/js/ChatOnlineUsers.js');
1077 $this->tpl->addJavascript(
'./Modules/Chat/js/ChatLanguage.js');
1078 $this->tpl->addJavascript(
'./Modules/Chat/js/ChatUserList.js');
1079 $this->tpl->addJavascript(
'./Modules/Chat/js/ChatContextMenu.js');
1080 $this->tpl->addJavascript(
'./Modules/Chat/js/ChatMessages.js');
1081 $this->tpl->addJavascript(
'./Modules/Chat/js/ChatUserFrameAsync.js');
1086 $this->tpl->addJavascript(
'./Modules/Chat/js/ChatMenu.js');
1088 $ilLocator->addRepositoryItems($this->object->getRefId());
1089 $ilLocator->addItem($this->object->getTitle(),
'repository.php?ref_id='.$this->object->getRefId(),
'_top', $this->
object->getRefId());
1090 $this->tpl->setLocator();
1092 $this->tpl->setCurrentBlock(
"js_chat_init");
1093 $ilCtrl->setParameter($this,
'ref_id',
'#__ref_id');
1094 $link = $ilCtrl->getLinkTarget($this,
"#__cmd",
'',
true);
1095 $this->tpl->setVariable(
"CHAT_BASE_URL_TEMPLATE", $link);
1096 $ilCtrl->clearParameters($this);
1098 $this->tpl->setVariable(
"BASE_REF_ID", $this->object->getRefId());
1099 $this->tpl->setVariable(
"BASE_ROOM_ID", $this->object->chat_room->getRoomId());
1100 $this->tpl->setVariable(
"ONLINE_USERS_TITLE", addslashes($this->lng->txt(
'chat_online_users')));
1101 $this->tpl->setVariable(
"ACTIVE_USERS_TITLE", addslashes($this->lng->txt(
'chat_active_users')));
1102 $this->tpl->setVariable(
"ROOM_LIST_TITLE", addslashes($this->lng->txt(
'chat_rooms')));
1103 $this->tpl->setVariable(
"CHATSERVER_ADDRESS",$this->object->server_comm->getServerFrameSource());
1105 $this->tpl->setVariable(
"CHAT_HIDE", addslashes($this->lng->txt(
'hide')));
1106 $this->tpl->setVariable(
"CHAT_SHOW", addslashes($this->lng->txt(
'show')));
1107 $this->tpl->setVariable(
"CHAT_OPEN", addslashes($this->lng->txt(
'chat_open')));
1108 $this->tpl->setVariable(
"CHAT_RECORDING_RUNNING", addslashes($this->lng->txt(
'chat_recording_running')));
1109 $this->tpl->setVariable(
"CHAT_RECORDING_ALREADY_RUNNING", addslashes($this->lng->txt(
'chat_recording_already_running')));
1110 $this->tpl->setVariable(
"CHAT_RECORDING_STOPPED", addslashes($this->lng->txt(
'chat_recording_stopped')));
1112 $this->tpl->setVariable(
"CHAT_EMPTY_MESSAGE", addslashes($this->lng->txt(
'chat_empty')));
1114 $this->tpl->setVariable(
"CHAT_CONFIRM_USER_INVITE", addslashes($this->lng->txt(
'chat_confirm_user_invite')));
1115 $this->tpl->setVariable(
"CHAT_CONFIRM_KICK_USER", addslashes($this->lng->txt(
'chat_confirm_kick_user')));
1116 $this->tpl->setVariable(
"CHAT_NO_TITLE_GIVEN", addslashes($this->lng->txt(
'chat_no_title_given')));
1117 $this->tpl->setVariable(
"CHAT_ADDRESS", addslashes($this->lng->txt(
'chat_address')));
1118 $this->tpl->setVariable(
"CHAT_WHISPER", addslashes($this->lng->txt(
'chat_whisper')));
1119 $this->tpl->setVariable(
"CHAT_KICK", addslashes($this->lng->txt(
'chat_kick')));
1120 $this->tpl->setVariable(
"CHAT_UNKICK", addslashes($this->lng->txt(
'chat_unkick')));
1121 $this->tpl->setVariable(
"CHAT_INVITE", addslashes($this->lng->txt(
'chat_invite')));
1122 $this->tpl->setVariable(
"CHAT_DISINVITE", addslashes($this->lng->txt(
'chat_disinvite')));
1123 $this->tpl->setVariable(
"CHAT_PROFILE", addslashes($this->lng->txt(
'chat_profile')));
1124 $this->tpl->setVariable(
"CANCEL", addslashes($this->lng->txt(
'cancel')));
1126 $this->tpl->setVariable(
"ADD_TO_BOOKMARK", addslashes($this->lng->txt(
'chat_add_to_bookmark')));
1127 $this->tpl->setVariable(
"ADD_TO_ADDRESSBOOK", addslashes($this->lng->txt(
'chat_add_to_addressbook')));
1128 $this->tpl->setVariable(
"EMPTY_ROOM", addslashes($this->lng->txt(
'chat_empty')));
1129 $this->tpl->setVariable(
"DELETE", addslashes($this->lng->txt(
'delete')));
1130 $this->tpl->setVariable(
"CONFIRM_DELETE_PRIVATE_ROOM", addslashes($this->lng->txt(
'chat_confirm_delete_private_room')));
1131 $this->tpl->setVariable(
"CHAT_CONFIRM_USER_INVITE", addslashes($this->lng->txt(
'chat_confirm_user_invite')));
1132 $this->tpl->setVariable(
"INVITE", addslashes($this->lng->txt(
'chat_invite')));
1133 $this->tpl->setVariable(
"DISINVITE", addslashes($this->lng->txt(
'chat_disinvite')));
1134 $this->tpl->setVariable(
"CHAT_USER_HIDDEN", addslashes($this->lng->txt(
'chat_user_hidden')));
1135 $this->tpl->setVariable(
"CHAT_USER_VISIBLE", addslashes($this->lng->txt(
'chat_user_visible')));
1137 $this->tpl->setVariable(
"TXT_REFRESH", addslashes($this->lng->txt(
'refresh')));
1138 $this->tpl->setVariable(
"TXT_HIDE_TEXTFORMAT", addslashes($this->lng->txt(
'chat_hide_textformat')));
1139 $this->tpl->setVariable(
"TXT_SHOW_TEXTFORMAT", addslashes($this->lng->txt(
'chat_show_textformat')));
1140 $this->tpl->setVariable(
"TXT_TEXTFORMAT", addslashes($this->lng->txt(
'chat_textformat')));
1142 $this->tpl->parseCurrentBlock();
1146 $this->tpl->setVariable(
"TITLE",$this->object->chat_room->getTitle());
1150 $this->tpl->setVariable(
"TITLE",$this->object->getTitle());
1153 if($ilUser->getId() != ANONYMOUS_USER_ID)
1155 $ilCtrl->setParameter($this,
"room_id", $this->object->chat_room->getRoomId());
1156 $this->tpl->setVariable(
"ADD_FORMACTION", $ilCtrl->getFormAction($this,
"addPrivateRoom"));
1157 $this->tpl->setVariable(
"TXT_ADD_PRIVATE_CHATROOM", $this->lng->txt(
"chat_add_private_chatroom"));
1158 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"add"));
1162 if ($ilSetting->get(
'chat_smilies_status') == 1)
1164 include_once
'Modules/Chat/classes/class.ilChatSmilies.php';
1166 foreach($smilies as $smiley)
1168 $this->tpl->setCurrentBlock(
"smilies_element");
1169 $this->tpl->setVariable(
"SMILEY_SRC", $smiley[
'smiley_fullpath']);
1170 $parts = explode(
"\n", $smiley[
"smiley_keywords"]);
1171 $this->tpl->setVariable(
"SMILEY_CONTENT", $parts[0]);
1173 $this->tpl->parseCurrentBlock();
1175 $this->tpl->setCurrentBlock(
"smilies_selector");
1176 $this->tpl->setVariable(
'TXT_SHOW_SMILIES', $this->lng->txt(
'chat_show_smilies'));
1177 $this->tpl->setVariable(
'TXT_HIDE_SMILIES', $this->lng->txt(
'chat_hide_smilies'));
1178 $this->tpl->parseCurrentBlock();
1182 $this->tpl->fillJavaScriptFiles();
1183 $this->tpl->fillCssFiles();
1184 $this->tpl->fillContentStyle();
1185 $this->tpl->show(
false,
false);
1191 global $rbacsystem, $ilUser;
1195 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
1197 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
1199 $result->errormsg = $this->lng->txt(
"msg_no_perm_read");
1200 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
1205 include
'Modules/Chat/classes/class.ilChatBlock.php';
1207 $last_known_id =
$_REQUEST[
"chat_last_known_id"] ?
$_REQUEST[
"chat_last_known_id"] : 0;
1209 $new_last_known_id = 0;
1211 $msg = $block->getMessages
1213 $this->object->chat_room->getObjId(),
1214 $this->
object->chat_room->getRoomId(),
1221 'chatviewer_last_selected_room',
1222 $this->object->chat_room->getObjId().
',' . $this->
object->chat_room->getRoomId()
1226 $ilUser->getId(),
'chatviewer_last_selected_room',
1227 $this->
object->chat_room->getObjId().
',' . $this->
object->chat_room->getRoomId()
1233 $result->lastId = $new_last_known_id;
1235 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
1246 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.chat_input_frame.html",
'Modules/Chat');
1252 if($ilUser->getId() != ANONYMOUS_USER_ID)
1257 $message = $this->lng->txt(
"chat_private_message").
" ";
1258 $message .= $this->
object->chat_user->getLogin().
" -> ".$user_obj->getLogin();
1261 else if(
$_GET[
"a_id"])
1264 $message = $this->lng->txt(
"chat_address_user").
" ".$user_obj->getLogin();
1268 $ilCtrl->setParameter($this,
"room_id",
$_REQUEST[
"room_id"]);
1271 $ilCtrl->setParameter($this,
"p_id",
$_GET[
"p_id"]);
1273 else if (
$_GET[
"a_id"])
1275 $ilCtrl->setParameter($this,
"a_id",
$_GET[
"a_id"]);
1277 $this->tpl->setVariable(
"FORMACTION", $ilCtrl->getFormAction($this,
"inputAsync"));
1278 $ilCtrl->clearParameters($this);
1280 $this->tpl->setVariable(
"TXT_NEW_MESSAGE",$this->lng->txt(
'chat_new_message'));
1281 $this->tpl->setVariable(
"TXT_COLOR",$this->lng->txt(
"chat_color"));
1282 $this->tpl->setVariable(
"TXT_TYPE",$this->lng->txt(
"chat_type"));
1283 $this->tpl->setVariable(
"TXT_FACE",$this->lng->txt(
"chat_face"));
1284 $this->tpl->setVariable(
"TXT_INPUT",$this->lng->txt(
"chat_input"));
1288 $this->tpl->setCurrentBlock(
"cancel");
1289 $this->tpl->setVariable(
"TXT_SUBMIT_CANCEL",$this->lng->txt(
"cancel_whisper"));
1290 $this->tpl->parseCurrentBlock();
1291 $this->tpl->setVariable(
"TXT_SUBMIT_OK",$this->lng->txt(
"ok"));
1293 elseif(
$_GET[
"a_id"])
1295 $this->tpl->setCurrentBlock(
"cancel");
1296 $this->tpl->setVariable(
"TXT_SUBMIT_CANCEL",$this->lng->txt(
"cancel_talk"));
1297 $this->tpl->parseCurrentBlock();
1298 $this->tpl->setVariable(
"TXT_SUBMIT_OK",$this->lng->txt(
"ok"));
1302 $this->tpl->setVariable(
"TXT_SUBMIT_OK",$this->lng->txt(
"ok"));
1305 if ($ilSetting->get(
'chat_export_status') == 0 || ($ilSetting->get(
'chat_export_status') == 1 && $rbacsystem->checkAccess(
"moderate", $this->ref_id) ) )
1307 $this->tpl->setVariable(
"TXT_HTML_EXPORT",$this->lng->txt(
'exp_html'));
1313 $this->tpl->setVariable(
"RADIO_TYPE",$this->
__getFontType());
1314 $this->tpl->setVariable(
"CHECK_FACE",$this->
__getFontFace());
1316 if ($rbacsystem->checkAccess(
"moderate", $this->object->getRefId()))
1318 $this->
object->__initChatRecording();
1319 $this->tpl->setCurrentBlock(
"moderator");
1320 $this->
object->chat_recording->setRoomId($this->object->chat_room->getRoomId());
1323 if ($this->object->chat_recording->getTitle() !=
"")
1325 $this->tpl->setVariable(
"TXT_TITLE_STOP_RECORDING", $this->lng->txt(
"chat_recording_title"));
1326 $this->tpl->setVariable(
"VAL_TITLE_STOP_RECORDING", $this->object->chat_recording->getTitle());
1328 if ($this->object->chat_recording->getDescription() !=
"")
1330 $this->tpl->setVariable(
"TXT_DESCRIPTION_STOP_RECORDING", $this->lng->txt(
"chat_recording_description"));
1331 $this->tpl->setVariable(
"VAL_DESCRIPTION_STOP_RECORDING", $this->object->chat_recording->getDescription());
1333 $this->tpl->setVariable(
"TXT_SUBMIT_STOP_RECORDING", $this->lng->txt(
"chat_stop_recording"));
1337 $this->tpl->setVariable(
"TXT_TITLE_START_RECORDING", $this->lng->txt(
"chat_recording_title"));
1338 $this->tpl->setVariable(
"TXT_DESCRIPTION_START_RECORDING", $this->lng->txt(
"chat_recording_description"));
1339 $this->tpl->setVariable(
"TXT_SUBMIT_START_RECORDING", $this->lng->txt(
"chat_start_recording"));
1342 $ilCtrl->setParameter($this,
"room_id", $this->object->chat_room->getRoomId());
1343 $this->tpl->setVariable(
"MODERATOR_FORMACTION",
1344 $ilCtrl->getFormAction($this,
"startRecording"));
1345 $this->tpl->setVariable(
"TXT_RECORDINGS",$this->lng->txt(
'chat_recordings'));
1346 $this->tpl->setVariable(
"MODERATOR_TARGET",
"_top");
1347 $this->tpl->parseCurrentBlock(
"moderator");
1351 include_once
'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php';
1353 $this->tpl->setVariable(
'PERMANENT_LINK', $permalink->getHTML(),
'&room_id='.$this->object->chat_room->getRoomId());
1370 if(!
$_GET[
'usr_id'])
1376 $this->
object->chat_room->setOwnerId($ilUser->getId());
1382 if(!$id = $this->object->chat_room->lookupRoomId())
1384 $id = $this->
object->chat_room->add();
1388 $this->
object->chat_room->setRoomId($id);
1389 $this->
object->chat_room->invite((
int)
$_GET[
"usr_id"]);
1390 $this->
object->sendMessage((
int) $_GET[
'usr_id']);
1392 if((
int)$this->object->chat_room->getRoomId())
1394 ilUtil::sendSuccess(sprintf($this->lng->txt(
"chat_user_invited_private"), $this->
object->chat_room->getTitle()),
true);
1398 ilUtil::sendSuccess(sprintf($this->lng->txt(
"chat_user_invited_public"), $this->
object->getTitle()),
true);
1401 ilUtil::redirect(
'ilias.php?baseClass=ilChatPresentationGUI&ref_id='.$this->object->getRefId().
'&room_id='.$id);
1407 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.chat_close.html",
'Modules/Chat');
1409 $this->tpl->touchBlock(
"content");
1415 if ($ilSetting->get(
'chat_export_status') == 0 || ($ilSetting->get(
'chat_export_status') == 1 && $rbacsystem->checkAccess(
"moderate", $this->ref_id) ) )
1417 $tmp_tpl =&
new ilTemplate(
"tpl.chat_export.html",
true,
true,
"Modules/Chat");
1419 if($this->object->chat_room->getRoomId())
1421 $tmp_tpl->setVariable(
"CHAT_NAME",$this->object->chat_room->getTitle());
1422 $filename .=
' - ' . $this->
object->chat_room->getTitle();
1426 $tmp_tpl->setVariable(
"CHAT_NAME",$this->object->getTitle());
1431 $export_period = $ilSetting->get(
'chat_export_period');
1432 $time_min = time() - $export_period * 60 * 60 * 24;
1433 $tmp_tpl->setVariable(
"CHAT_DATE",strftime(
"%c",time()));
1434 $tmp_tpl->setVariable(
"CONTENT",$this->object->chat_room->getAllMessages($time_min));
1447 $opt = array(
"createRoom" => $this->lng->txt(
"chat_room_select"));
1456 $opt[
"exportRoom"] = $this->lng->txt(
"chat_html_export");
1458 if($rbacsystem->checkAccess(
'write',$this->object->getRefId()) or
1459 count($this->object->chat_room->getRoomsOfObject()))
1461 $opt[
"refreshRoom"] = $this->lng->txt(
"chat_refresh");
1464 if(count($this->object->chat_room->getRoomsOfObject()))
1466 $opt[
"renameRoom"] = $this->lng->txt(
"rename");
1467 $opt[
"deleteRoom"] = $this->lng->txt(
"delete");
1480 $this->tpl->setCurrentBlock(
"ChatStyle");
1487 $this->tpl->parseCurrentBlock();
1492 $colors = array(
"black" => $this->lng->txt(
"chat_black"),
1493 "red" => $this->lng->txt(
"chat_red"),
1494 "green" => $this->lng->txt(
"chat_green"),
1495 "maroon" => $this->lng->txt(
"chat_maroon"),
1496 "olive" => $this->lng->txt(
"chat_olive"),
1497 "navy" => $this->lng->txt(
"chat_navy"),
1498 "purple" => $this->lng->txt(
"chat_purple"),
1499 "teal" => $this->lng->txt(
"chat_teal"),
1500 "silver" => $this->lng->txt(
"chat_silver"),
1501 "gray" => $this->lng->txt(
"chat_gray"),
1502 "lime" => $this->lng->txt(
"chat_lime"),
1503 "yellow" => $this->lng->txt(
"chat_yellow"),
1504 "fuchsia" => $this->lng->txt(
"chat_fuchsia"),
1505 "aqua" => $this->lng->txt(
"chat_aqua"),
1506 "blue" => $this->lng->txt(
"chat_blue"));
1513 $types = array(
"times" => $this->lng->txt(
"chat_times"),
1514 "tahoma" => $this->lng->txt(
"chat_tahoma"),
1515 "arial" => $this->lng->txt(
"chat_arial"));
1517 $_POST[
"type"] = $_POST[
"type"] ? $_POST[
"type"] :
"times";
1519 foreach($types as $name => $type)
1521 $this->tpl->setCurrentBlock(
"FONT_TYPES");
1522 $this->tpl->setVariable(
"BL_TXT_TYPE",$type);
1523 $this->tpl->setVariable(
"FONT_TYPE",$name);
1524 $this->tpl->setVariable(
"TYPE_CHECKED",$_POST[
"type"] == $name ?
"checked=\"checked\"" :
"");
1525 $this->tpl->parseCurrentBlock();
1533 $types = array(
"bold" => $this->lng->txt(
"chat_bold"),
1534 "italic" => $this->lng->txt(
"chat_italic"),
1535 "underlined" => $this->lng->txt(
"chat_underlined"));
1537 $this->tpl->setCurrentBlock(
"FONT_FACES");
1538 $this->tpl->setVariable(
"BL_TXT_FACE",
"<b>".$this->lng->txt(
"chat_bold").
"</b>");
1539 $this->tpl->setVariable(
"FONT_FACE",
"bold");
1540 $this->tpl->setVariable(
"FACE_CHECKED",in_array(
"bold",
$_POST[
"face"]) ?
"checked=\"checked\"" :
"");
1541 $this->tpl->parseCurrentBlock();
1543 $this->tpl->setCurrentBlock(
"FONT_FACES");
1544 $this->tpl->setVariable(
"BL_TXT_FACE",
"<i>".$this->lng->txt(
"chat_italic").
"</i>");
1545 $this->tpl->setVariable(
"FONT_FACE",
"italic");
1546 $this->tpl->setVariable(
"FACE_CHECKED",in_array(
"italic",
$_POST[
"face"]) ?
"checked=\"checked\"" :
"");
1547 $this->tpl->parseCurrentBlock();
1549 $this->tpl->setCurrentBlock(
"FONT_FACES");
1550 $this->tpl->setVariable(
"BL_TXT_FACE",
"<u>".$this->lng->txt(
"chat_underlined").
"</u>");
1551 $this->tpl->setVariable(
"FONT_FACE",
"underlined");
1552 $this->tpl->setVariable(
"FACE_CHECKED",in_array(
"underlined",
$_POST[
"face"]) ?
"checked=\"checked\"" :
"");
1553 $this->tpl->parseCurrentBlock();
1558 $tpl =
new ilTemplate(
"tpl.chat_message.html",
true,
true,
'Modules/Chat');
1559 $_POST[
'message'] = htmlentities(trim(
$_POST[
'message']));
1561 $_POST[
'message'] = preg_replace(
'/%u([0-9A-Fa-f]{4})/im',
'&#x$1;',
$_POST[
'message']);
1565 $tpl->setVariable(
"MESSAGE",
$_POST[
"message"]);
1566 $tpl->setVariable(
"FONT_COLOR",
$_POST[
"color"]);
1567 $tpl->setVariable(
"FONT_FACE",
$_POST[
"type"]);
1574 $tpl->setCurrentBlock(
"private");
1575 $tpl->setVariable(
"PRIVATE_U_COLOR",
"red");
1576 $tpl->setVariable(
"PRIVATE_FROM",$user_obj->getLogin());
1580 $tpl->setVariable(
"PRIVATE_TO",$user_obj->getLogin());
1581 $tpl->parseCurrentBlock();
1583 else if(
$_GET[
"a_id"])
1585 $tpl->setCurrentBlock(
"address");
1586 $tpl->setVariable(
"ADDRESS_FROM_COLOR",
"navy");
1589 $tpl->setVariable(
"ADDRESS_FROM",$user_obj->getLogin());
1591 $tpl->setVariable(
"ADDRESS_TO_COLOR",
"red");
1594 $tpl->setVariable(
"ADDRESS_TO",$user_obj->getLogin());
1595 $tpl->parseCurrentBlock();
1599 $tpl->setCurrentBlock(
"normal");
1600 $tpl->setVariable(
"NORMAL_U_COLOR",
"navy");
1601 $tpl->setVariable(
"NORMAL_UNAME",$this->object->chat_user->getLogin());
1602 $tpl->parseCurrentBlock();
1607 foreach(
$_POST[
"face"] as $face)
1609 $tpl->setCurrentBlock(
"type_open");
1613 $tpl->setVariable(
"TYPE_TYPE_O",
"b");
1616 $tpl->setVariable(
"TYPE_TYPE_O",
"i");
1620 $tpl->setVariable(
"TYPE_TYPE_O",
"u");
1623 $tpl->parseCurrentBlock();
1626 foreach(
$_POST[
"face"] as $face)
1628 $tpl->setCurrentBlock(
"type_close");
1632 $tpl->setVariable(
"TYPE_TYPE_C",
"b");
1635 $tpl->setVariable(
"TYPE_TYPE_C",
"i");
1639 $tpl->setVariable(
"TYPE_TYPE_C",
"u");
1642 $tpl->parseCurrentBlock();
1646 $message = preg_replace(
"/\r/",
"",
$tpl->get());
1647 $message = preg_replace(
"/\n/",
"",$message);
1656 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
1658 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
1661 if (isset(
$_GET[
'del_id']))
1664 if(!isset(
$_POST[
"del_id"]))
1676 include_once
"Modules/Chat/classes/class.ilFileDataChat.php";
1678 if(count(
$_POST[
"del_id"]) == 1)
1680 $this->
object->chat_room->setRoomId(
$_POST[
"del_id"][0]);
1686 foreach(
$_POST[
"del_id"] as $id)
1688 $this->
object->chat_room->setRoomId((
int) $id);
1690 $tmp_tpl =&
new ilTemplate(
"tpl.chat_export.html",
true,
true,
"Modules/Chat");
1694 $tmp_tpl->setVariable(
"CHAT_NAME",$this->object->chat_room->getTitle());
1698 $tmp_tpl->setVariable(
"CHAT_NAME",$this->object->getTitle());
1700 $tmp_tpl->setVariable(
"CHAT_DATE",strftime(
"%c",time()));
1701 $tmp_tpl->setVariable(
"CONTENT",$this->object->chat_room->getAllMessages());
1703 $file_obj->addFile(
"chat_".$this->object->chat_room->getRoomId().
".html",$tmp_tpl->get());
1705 $fname = $file_obj->zip();
1716 global $rbacsystem,$rbacreview, $ilAccess;
1718 $this->ctrl->setParameter($this,
"ref_id",$this->object->getRefId());
1722 if($rbacsystem->checkAccess(
'read',$this->object->getRefId()))
1724 $force_active = (
$_GET[
"cmd"] ==
"" ||
$_GET[
"cmd"] ==
"view")
1727 $tabs_gui->addTarget(
"chat_rooms",
1728 $this->ctrl->getLinkTarget($this,
"view"), array(
"view",
""), get_class($this),
1733 if ($ilAccess->checkAccess(
'visible',
'', $this->ref_id))
1735 $force_active = ($this->ctrl->getNextClass() ==
"ilinfoscreengui"
1736 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
1740 $tabs_gui->addTarget(
"info_short",
1741 $this->ctrl->getLinkTargetByClass(
1742 array(
"ilobjchatgui",
"ilinfoscreengui"),
"showSummary"),
1743 array(
"showSummary",
"infoScreen"),
1744 "",
"", $force_active);
1747 if($rbacsystem->checkAccess(
'write',$this->object->getRefId()))
1749 $force_active = (
$_GET[
"cmd"] ==
"edit")
1752 $tabs_gui->addTarget(
"edit_properties",
1753 $this->ctrl->getLinkTarget($this,
"edit"),
"edit", get_class($this),
1758 if($rbacsystem->checkAccess(
'moderate',$this->object->getRefId()))
1760 $tabs_gui->addTarget(
"chat_blocked_users",
1761 $this->ctrl->getLinkTarget($this,
"blockedUsers"),
1762 array(
"blockedUsers",
"unBlockUsers",
"blockUser"), get_class($this));
1766 if($rbacsystem->checkAccess(
'moderate',$this->object->getRefId()))
1768 $tabs_gui->addTarget(
"chat_recordings",
1769 $this->ctrl->getLinkTarget($this,
"recordings"),
"recordings", get_class($this));
1773 if($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
1775 $tabs_gui->addTarget(
"perm_settings",
1776 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
1783 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_content.html");
1784 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
1804 include_once
'./classes/class.ilTabsGUI.php';
1806 $this->tpl->setCurrentBlock(
"header_image");
1808 $this->tpl->parseCurrentBlock();
1809 $this->tpl->setVariable(
"HEADER",$this->object->getTitle());
1810 $this->tpl->setVariable(
"H_DESCRIPTION",$this->object->getDescription());
1812 #$tabs_gui =& new ilTabsGUI();
1813 $this->
getTabs($this->tabs_gui);
1816 #$this->tpl->setVariable("TABS", $tabs_gui->getHTML());
1822 global $ilias_locator;
1824 $this->tpl->addBlockFile(
"LOCATOR",
"locator",
"tpl.locator.html",
"Services/Locator");
1827 foreach ($tree->getPathFull($this->object->getRefId()) as $key =>
$row)
1831 $this->tpl->touchBlock(
'locator_separator_prefix');
1834 $this->tpl->setCurrentBlock(
"locator_item");
1836 if(
$row[
"type"] ==
'chat')
1838 $this->tpl->setVariable(
"ITEM",$this->object->getTitle());
1839 $this->tpl->setVariable(
"LINK_ITEM",$this->ctrl->getLinkTarget($this));
1841 elseif (
$row[
"child"] != $tree->getRootId())
1843 $this->tpl->setVariable(
"ITEM",
$row[
"title"]);
1844 $this->tpl->setVariable(
"LINK_ITEM",
"repository.php?ref_id=".
$row[
"child"]);
1848 $this->tpl->setVariable(
"ITEM", $this->lng->txt(
"repository"));
1849 $this->tpl->setVariable(
"LINK_ITEM",
"repository.php?ref_id=".
$row[
"child"]);
1852 $this->tpl->parseCurrentBlock();
1855 $this->tpl->setVariable(
"TXT_LOCATOR",$this->lng->txt(
"locator"));
1856 $this->tpl->parseCurrentBlock();
1863 if ($ilAccess->checkAccess(
"read",
"", $a_target))
1865 $_GET[
"ref_id"] = $a_target;
1866 $_GET[
"cmd"] =
"view";
1867 $_GET[
"baseClass"] =
"ilChatHandlerGUI";
1868 include(
"ilias.php");
1871 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
1873 $_GET[
"cmd"] =
"frameset";
1874 $_GET[
"target"] =
"";
1875 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
1878 include(
"repository.php");
1882 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
1889 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
1891 $tpl->setContent($ilCtrl->getHTML($profile_gui));
1900 if (is_object($this->
object))
1902 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
''),
'',
$_GET[
'ref_id']);
1913 $this->ctrl->setCmd(
"showSummary");
1914 $this->ctrl->setCmdClass(
"ilinfoscreengui");
1925 if (!$ilAccess->checkAccess(
"visible",
"", $this->ref_id))
1927 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
1930 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1933 $info->enablePrivateNotes();
1935 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
1942 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
1955 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
1958 $this->ctrl->forwardCommand($info);
1964 $this->
object->chat_room->setUserId(
$_SESSION[
"AccountId"]);
1965 $this->
object->chat_room->updateLastVisit();
1971 $all_users = $this->
object->chat_room->getOnlineUsers();
1974 $filtered_users = array();
1976 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
1978 $activeMap = array();
1979 foreach($active_users as
$user)
1981 $activeMap[$user->id] = 1;
1985 foreach($all_users as $user)
1987 if($user[
'user_id'] ==
$_SESSION[
'AccountId'] || $user[
'user_id'] == ANONYMOUS_USER_ID || $activeMap[$user[
'user_id']]) {
1992 $oUser->setId($user[
'user_id']);
1995 if($oUser->getPref(
'hide_own_online_status') ==
'y') {
2000 $filtered_users[] = $oUser;
2005 foreach($filtered_users as $user) {
2007 if($user->getId() != ANONYMOUS_USER_ID) {
2011 if (in_array($user->getPref(
"public_profile"), array(
"y",
"g"))) {
2014 $new_user->img = $user->getPersonalPicturePath();
2016 $new_user->dn = $user->getFirstname().
' '.$user->getLastname().
' ('.$user->getLogin().
')';
2032 if($this->object->chat_room->isInvited($user->getId())) {
2061 $result->hidden_count = $hidden_count;
2067 global $rbacsystem,
$ilCtrl, $ilUser;
2069 $users = $this->
object->chat_room->getActiveUsers();
2075 foreach($users as
$user) {
2083 $user_obj->setId($user);
2086 $new_user->login = $user_obj->getLogin();
2088 if (in_array($user_obj->getPref(
"public_profile"), array(
"y",
"g"))) {
2091 $new_user->img = $user_obj->getPersonalPicturePath();
2093 $new_user->dn = $user_obj->getFirstname().
' '.$user_obj->getLastname().
' ('.$user_obj->getLogin().
')';
2103 if($ilUser->getId() != ANONYMOUS_USER_ID && $user != ANONYMOUS_USER_ID) {
2104 $ilCtrl->clearParameters($this);
2105 if(in_array($user_obj->getPref(
"public_profile"), array(
"y",
"g"))) {
2107 $ilCtrl->setParameter($this,
"user", $user_obj->getId());
2108 $link = $ilCtrl->getLinkTarget($this,
"showUserProfile");
2109 $ilCtrl->clearParameters($this);
2114 if($rbacsystem->checkAccess(
'moderate',$this->object->getRefId()) and !
$_REQUEST[
'room_id']) {
2115 $ilCtrl->setParameter($this,
"kick_id", $user_obj->getId());
2117 if($this->object->chat_room->isKicked($user_obj->getId())) {
2129 $ilCtrl->clearParameters($this);
2142 global $rbacsystem, $ilUser,
$ilCtrl;
2143 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
2147 $public_rooms = $this->
object->chat_room->getAllRooms();
2148 $private_rooms = $this->
object->chat_room->getRooms();
2150 $this->
object->__initChatRecording();
2154 $current_room =
false;
2158 foreach($public_rooms as $room) {
2159 if ($room[
'child'] == $this->object->getRefId()) {
2160 $current_room = $room;
2164 $rooms[count($rooms)-1][
'users'] = $this->
object->chat_room->getCountActiveUser($room[
'obj_id'],0);
2167 $private_rooms_by_parent_id = array();
2169 foreach($private_rooms as $room) {
2171 if (!is_array($private_rooms_by_parent_id[$room[
'chat_id']]))
2172 $private_rooms_by_parent_id[$room[
'chat_id']] = array();
2174 $private_rooms_by_parent_id[$room[
'chat_id']][] = $room;
2175 $private_rooms_by_parent_id[$room[
'chat_id']][count($private_rooms_by_parent_id[$room[
'chat_id']])-1][
'users'] = $this->
object->chat_room->getCountActiveUser($room[
'chat_id'],$room[
'room_id']);
2182 foreach($rooms as $k => $v) {
2183 $titel[$k] = strtolower($v[
'title']);
2184 $users[$k] = $v[
'users'];
2187 array_multisort($users, SORT_DESC, $titel, SORT_STRING, $rooms);
2189 foreach($private_rooms_by_parent_id as $k => $v) {
2192 foreach($v as $k1 => $v1) {
2194 $titel[$k1] = strtolower($v1[
'title']);
2195 $users[$k1] = $v1[
'users'];
2197 array_multisort($users, SORT_DESC, $titel, SORT_STRING, $private_rooms_by_parent_id[$k]);
2206 if ($this->object->chat_room->getRoomId() == 0) {
2210 $croom->act =
false;
2214 if (is_array($private_rooms_by_parent_id[$current_room[
'obj_id']])) {
2215 $croom->subrooms = array();
2216 $ref_id = $current_room[
"ref_id"];
2217 foreach($private_rooms_by_parent_id[$current_room[
'obj_id']] as $priv_room) {
2225 $croom->subrooms[] = $tmp;
2229 $out_rooms = array();
2230 foreach($rooms as $room) {
2236 $new_room->subrooms = array();
2237 if (is_array($private_rooms_by_parent_id[$room[
'obj_id']])) {
2238 foreach($private_rooms_by_parent_id[$room[
'obj_id']] as $priv_room) {
2242 $out_rooms[] = $new_room;
2246 $result->currentRoom = $croom;
2253 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2261 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2269 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2276 global
$ilCtrl, $rbacsystem, $ilObjDataCache,
$lng, $ilUser;
2277 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
2279 !$rbacsystem->checkAccess(
"read",
$_REQUEST[
"ref_id"])
2283 $res =
new stdClass();
2285 $baseClass =
'ilchatpresentationgui';
2288 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2295 $res =
new stdClass();
2301 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2311 if (!$rbacsystem->checkAccess(
"read", $this->ref_id)) {
2312 $result->errormsg = $this->lng->txt(
"msg_no_perm_read");
2315 $ilCtrl->setParameter($this,
"room_id",
$_REQUEST[
"room_id"]);
2316 if (
$_GET[
"p_id"]) {
2317 $ilCtrl->setParameter($this,
"p_id",
$_GET[
"p_id"]);
2319 else if (
$_GET[
"a_id"]) {
2320 $ilCtrl->setParameter($this,
"pa_id",
$_GET[
"a_id"]);
2321 $ilCtrl->setParameter($this,
"a_id",
$_GET[
"a_id"]);
2323 $result->serverTarget = $this->
object->server_comm->getServerFrameSource();
2327 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2336 $rbacsystem->checkAccess(
"moderate", $this->object->getRefId()) &&
2337 $this->object->chat_room->checkWriteAccess()
2342 $this->
object->chat_room->setRoomId($rid);
2345 $this->
object->server_comm->setType(
'delete');
2347 $this->
object->server_comm->setMessage($message);
2348 $this->
object->server_comm->send();
2350 $this->
object->chat_room->deleteAllMessages();
2359 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2368 if(!$rbacsystem->checkAccess(
'moderate',$this->object->getRefId())) {
2370 $result->errormsg = $this->lng->txt(
"msg_no_perm_write");
2377 $this->
object->server_comm->setKickedUser($tmp_user->getLogin());
2378 $this->
object->server_comm->setType(
"kick");
2379 $this->
object->server_comm->send();
2381 $this->
object->chat_room->setKicked((
int)
$_REQUEST[
'kick_id']);
2383 $result->infomsg = $this->lng->txt(
"chat_user_dropped");
2390 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2401 if(!$rbacsystem->checkAccess(
'moderate',$this->object->getRefId()))
2403 $result->errormsg = $this->lng->txt(
"msg_no_perm_write");
2408 $this->
object->chat_room->setUnkicked((
int)
$_REQUEST[
'kick_id']);
2410 $result->infomsg = $this->lng->txt(
"chat_user_unkicked");
2416 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2427 if (!$rbacsystem->checkAccess(
"read", $this->ref_id)) {
2428 $result->errormsg = $this->lng->txt(
"msg_no_perm_read");
2433 $room =&
new ilChatRoom($this->object->getId());
2435 $room->setOwnerId(
$_SESSION[
"AccountId"]);
2437 if(!$room->validate())
2439 $result->infomsg = $room->getErrorMessage();
2444 $result->room_id = $room->add();
2445 $result->infomsg = $this->lng->txt(
"chat_room_added");
2452 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2461 $this->
object->chat_room->invite((
int)
$_GET[
"i_id"]);
2462 $this->
object->sendMessage((
int) $_GET[
"i_id"]);
2463 if((
int)$this->object->chat_room->getRoomId()) {
2464 $result->infomsg = sprintf($this->lng->txt(
"chat_user_invited_private"), $this->
object->chat_room->getTitle());
2467 $result->infomsg = sprintf($this->lng->txt(
"chat_user_invited_public"), $this->
object->getTitle());
2473 $result->errormsg =
"user id not found";
2476 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2486 $this->
object->chat_room->drop((
int)
$_GET[
"i_id"]);
2488 $tmp_user =&
new ilObjUser($_GET[
"i_id"]);
2489 $this->
object->server_comm->setKickedUser($tmp_user->getLogin());
2490 $this->
object->server_comm->setType(
"kick");
2491 $this->
object->server_comm->send();
2493 $result->infomsg = $this->lng->txt(
"chat_user_dropped_private");
2497 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2508 if (!$rbacsystem->checkAccess(
"read", $this->ref_id)) {
2509 $result->errormsg = $this->lng->txt(
"msg_no_perm_read");
2512 if(!
$_GET[
"room_id_delete"]) {
2513 $result->errormsg = $this->lng->txt(
"chat_select_one_room");
2516 $this->
object->chat_room->setOwnerId(
$_SESSION[
"AccountId"]);
2517 $rooms = array(
$_GET[
"room_id_delete"]);
2519 if (!$rbacsystem->checkAccess(
"write", $this->ref_id)) {
2520 $delResult = $this->
object->chat_room->deleteRooms($rooms, $this->object->chat_room->getOwnerId());
2523 $delResult = $this->
object->chat_room->deleteRooms($rooms);
2528 $result->errormsg = $this->
object->chat_room->getErrorMessage();
2531 $result->infomsg = $this->lng->txt(
"chat_rooms_deleted");
2533 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2541 $this->
object->chat_room->setUserId(
$_SESSION[
"AccountId"]);
2542 $this->
object->chat_room->updateLastVisit();
2546 $result->errormsg = $this->lng->txt(
"chat_insert_message");
2549 if(
$_REQUEST[
"message"] and $this->object->chat_room->checkWriteAccess())
2556 $this->
object->server_comm->setMessage($message);
2557 if((
int)
$_GET[
"p_id"])
2559 $this->
object->server_comm->setType(
'private');
2561 else if((
int) $_GET[
"a_id"])
2563 $this->
object->server_comm->setType(
'address');
2566 if(!$this->object->server_comm->send($id))
2568 $result->errormsg = $this->lng->txt(
"chat_no_connection");
2574 $_SESSION[
"il_notify_last_msg_checksum"] = $id;
2578 $result->errormsg = $this->lng->txt(
'chat_kicked_from_room');
2580 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2589 global $rbacsystem,$ilUser;
2592 if (!$rbacsystem->checkAccess(
"moderate", $this->object->getRefId()))
2594 $result->errormsg = $this->lng->txt(
"msg_no_perm_read");
2598 $this->
object->__initChatRecording();
2599 if(
$_GET[
"room_id"])
2601 $this->
object->chat_recording->setRoomId(
$_GET[
"room_id"]);
2604 if (!$this->object->chat_recording->isRecording())
2606 $this->
object->chat_recording->setModeratorId($ilUser->getId());
2607 $this->
object->chat_recording->startRecording(
$_REQUEST[
"title"]);
2609 $result->infomsg = $this->lng->txt(
"chat_recording_started");
2613 $result->errormsg = $this->lng->txt(
"chat_recording_already_running");
2616 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2624 global $rbacsystem,$ilUser;
2626 if (!$rbacsystem->checkAccess(
"moderate", $this->object->getRefId()))
2628 $result->errormsg = $this->lng->txt(
"msg_no_perm_read");
2632 $this->
object->__initChatRecording();
2633 if(
$_GET[
"room_id"]) {
2634 $this->
object->chat_recording->setRoomId(
$_GET[
"room_id"]);
2636 if ($this->object->chat_recording->isRecording()) {
2637 $this->
object->chat_recording->stopRecording($ilUser->getId());
2639 $result->infomsg = $this->lng->txt(
"chat_recording_stopped");
2642 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2649 global $ilObjDataCache,
$lng;
2651 include_once
'Services/PersonalDesktop/classes/class.ilBookmark.php';
2653 $targetclass =
'ilchatpresentationgui';
2657 $result->obj_id = $this->
object->getId();
2667 $bookmark->setTitle(vsprintf($lng->txt(
'chat_default_bookmark_title'), $ilObjDataCache->lookupTitle(
$obj_id)));
2668 $bookmark->setDescription(vsprintf($lng->txt(
'chat_default_bookmark_description'), $ilObjDataCache->lookupTitle(
$obj_id)));
2669 $bookmark->setParent(1);
2670 $bookmark->setTarget(
"ilias.php?baseClass=$targetclass&ref_id=$ref_id&room_id=0");
2671 $result->msg = vsprintf($lng->txt(
'chat_added_to_bookmarks'), $ilObjDataCache->lookupTitle(
$obj_id));
2677 $chat_title = $ilObjDataCache->lookupTitle(
$obj_id);
2679 $room->setRoomId($room_id);
2680 $bookmark->setTitle(vsprintf($lng->txt(
'chat_default_bookmark_title'), $room->getTitle() .
' - ' . $chat_title ));
2681 $bookmark->setDescription(vsprintf($lng->txt(
'chat_default_bookmark_description'), $room->getTitle()));
2682 $bookmark->setParent(1);
2683 $bookmark->setTarget(
"ilias.php?baseClass=$targetclass&ref_id=$ref_id&room_id=$room_id");
2684 $result->msg = vsprintf($lng->txt(
'chat_added_to_bookmarks'), $chat_title .
' - ' . $room->getTitle());
2687 $bookmark->create();
2691 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2698 global
$lng, $ilUser;
2700 include_once
'Services/Contact/classes/class.ilAddressbook.php';
2702 if ($addressbook->checkEntryByLogin(
$_REQUEST[
"ulogin"]))
2705 $result->msg = $lng->txt(
'chat_user_already_in_addressbook');
2719 if ($oUser->hasPublicProfile())
2721 $firstname = $oUser->getFirstname();
2722 $lastname = $oUser->getLastname();
2724 $result->msg = vsprintf($lng->txt(
'chat_added_to_addressbook'), $login);
2725 $email = ($oUser->getPref(
'public_email') ==
'y' ? $oUser->getEmail() :
'') ;
2726 $addressbook->addEntry($login, $firstname, $lastname, $email);
2729 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2735 global $rbacsystem, $ilUser,
$ilCtrl;
2736 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
2738 $new_room =
new stdClass();
2739 $new_room->title = $room[
"title"];
2740 $new_room->users_online = $this->
object->chat_room->getCountActiveUser($room[
"obj_id"],0);
2741 $new_room->obj_id = $room[
"obj_id"];
2742 $new_room->room_id = 0;
2743 $new_room->ref_id = $room[
"child"];
2746 $new_room->pme =
true;
2748 $new_room->pmbo =
true;
2750 $ilCtrl->setParameter($this,
"ref_id", $room[
"child"]);
2751 $link = $ilCtrl->getLinkTarget($this,
"showFrames");
2752 $this->tpl->setVariable(
"ROOM_LINK", $link);
2753 $ilCtrl->setParameter($this,
"ref_id",
$_GET[
"ref_id"]);
2755 $link =
"il_chat_async_handler.enterRoom('".$room[
'child'].
"',false);";
2757 $this->
object->chat_recording->setObjId($room[
"obj_id"]);
2759 if ($room[
"child"] == $this->object->getRefId() &&
2760 $this->
object->chat_room->getRoomId() == 0 &&
2761 $rbacsystem->checkAccess(
"moderate", $this->object->getRefId()))
2763 $link =
"il_chat_async_handler.emptyRoom();";
2765 $new_room->pmem =
true;
2770 $new_room->pmem =
false;
2773 $this->
object->chat_recording->setObjId($room[
"obj_id"]);
2774 $this->
object->chat_recording->setRoomId(0);
2776 if ($this->object->chat_recording->isRecording()) {
2777 $new_room->recording =
true;
2780 $new_room->recording =
false;
2788 global $rbacsystem, $ilUser,
$ilCtrl;
2789 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
2790 $new_room =
new stdClass();
2792 $new_room->title = $room[
"title"];
2793 $new_room->users_online = $this->
object->chat_room->getCountActiveUser($room[
"chat_id"],$room[
"room_id"]);
2795 $new_room->obj_id = $room[
"chat_id"];
2796 $new_room->room_id = $room[
"room_id"];
2800 $new_room->pme =
true;
2802 $new_room->pmbo =
true;
2804 $ilCtrl->setParameter($this,
"ref_id",
$ref_id);
2805 $ilCtrl->setParameter($this,
"room_id", $room[
"room_id"]);
2806 $link = $ilCtrl->getLinkTarget($this,
"showFrames");
2808 $link =
"il_chat_async_handler.enterRoom('$ref_id','".$room[
"room_id"].
"');";
2810 if ($room[
"owner"] !=
$_SESSION[
"AccountId"] && !$rbacsystem->checkAccess(
'moderate', $this->object->getRefId())) {
2812 $new_room->chat_initiated = $user_obj->getLogin();
2815 $new_room->pmde =
false;
2821 $ilCtrl->setParameter($this,
"room_id", $this->object->chat_room->getRoomId());
2822 $ilCtrl->setParameter($this,
"room_id_delete", $room[
"room_id"]);
2823 $link = $ilCtrl->getLinkTarget($this,
"deleteRoom");
2824 $ilCtrl->clearParameters($this);
2826 $new_room->pmde =
true;
2828 $link =
"il_chat_async_handler.deletePrivateRoom('".$room[
'room_id'].
"');";
2831 $this->
object->chat_recording->setObjId($room[
"chat_id"]);
2832 $this->
object->chat_recording->setRoomId($room[
"room_id"]);
2834 if ($this->object->chat_recording->isRecording()) {
2835 $new_room->recording =
true;
2838 $new_room->recording =
false;
2841 $new_room->own_room_id = $room[
"room_id"];
2843 $new_room->mod = $rbacsystem->checkAccess(
"moderate", $this->object->getRefId());
2846 $room[
"room_id"] == $this->object->chat_room->getRoomId() &&
2847 $rbacsystem->checkAccess(
"moderate", $this->object->getRefId())
2850 $link =
"il_chat_async_handler.emptyRoom();";
2851 $ilCtrl->clearParameters($this);
2853 $new_room->pmem =
true;
2858 $new_room->pmem =
false;