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';
101 ilYuiUtil::initTreeView();
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;
188 $roles = $new_obj->initDefaultRoles();
191 $rbacadmin->assignUser($roles[0],$ilUser->getId());
195 "ilias.php?baseClass=ilChatHandlerGUI&ref_id=".$new_obj->getRefId().
"&cmd=view"));
202 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
204 if(!$rbacsystem->checkAccess(
'moderate',$this->object->getRefId()))
206 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
209 include_once(
'Services/Table/classes/class.ilTable2GUI.php');
212 $table->setTitle($lng->txt(
'chat_blocked_users'));
213 $table->setId(
'cht_blocked_users_' . $this->object->getId());
214 $table->setFormAction($ilCtrl->getFormAction($this));
215 $table->addColumn(
'',
'checkbox',
'2%',
true);
216 $table->addColumn($lng->txt(
'chat_user_name'),
'login');
217 $table->addColumn($lng->txt(
'lastname'),
'lastname');
218 $table->addColumn($lng->txt(
'firstname'),
'firstname');
219 $table->addColumn($lng->txt(
'actions'));
220 $table->setNoEntriesText($lng->txt(
'chat_no_blocked'));
222 $table->setSelectAllCheckbox(
'blocked_check');
223 $table->setRowTemplate(
'tpl.chat_blocked_users_row.html',
'Modules/Chat');
227 $tabledata = array();
229 $table->addMultiCommand(
'unblockUsers', $lng->txt(
'chat_blocked_unlocked'));
231 include_once(
"./Services/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
233 foreach($blocked_users as $usrId)
236 $current_selection_list->setListTitle($lng->txt(
"actions"));
237 $current_selection_list->setId(
"act_".$usrId);
238 $ilCtrl->setParameter($this,
'blocked_check', $usrId);
239 $current_selection_list->addItem($this->lng->txt(
"chat_blocked_unlocked"),
'', $ilCtrl->getLinkTarget($this,
'unblockUsers'));
245 'login' => $usr->getLogin(),
246 'firstname' => $usr->getFirstname(),
247 'lastname' => $usr->getLastname(),
248 'actions' => $current_selection_list->getHTML()
251 $table->setData($tabledata);
256 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
259 $form->setTitle($lng->txt(
'chat_add_blocking'));
260 $form->setFormAction($ilCtrl->getFormAction($this,
'blockUser'));
263 $form->addItem($inp);
265 $form->addCommandButton(
'blockUser', $lng->txt(
'chat_block_user'));
267 $tpl->setVariable(
'ADM_CONTENT', $table->getHTML() .
"<br />" . $form->getHTML());
275 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
277 if(!$rbacsystem->checkAccess(
'moderate',$this->object->getRefId()))
279 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
291 if($blocked_obj->isBlocked(
$usr_id))
308 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
312 if(!$rbacsystem->checkAccess(
'moderate',$this->object->getRefId()))
314 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
319 if (
$_GET[
'blocked_check'])
320 $_POST[
'blocked_check'] = array(
$_GET[
'blocked_check']);
322 if(!is_array(
$_POST[
'blocked_check']))
330 $blocked_obj->unblock($usr_id);
339 global $rbacsystem,$ilUser,
$lng;
342 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
349 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
351 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
355 $isActive = ($this->
object->server_comm->isAlive() && $this->ilias->getSetting(
"chat_active"));
362 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
372 $rooms_unprepared = array();
373 if($rbacsystem->checkAccess(
'write',$this->ref_id))
375 $rooms_unprepared = $this->
object->chat_room->getAllRoomsOfObject();
379 $this->
object->chat_room->setOwnerId(
$_SESSION[
"AccountId"]);
380 $rooms_unprepared = $this->
object->chat_room->getRoomsOfObject();
389 'title' => $this->object->getTitle().
" ".$lng->txt(
"chat_public_room"),
394 foreach($rooms_unprepared as
$key => $value)
396 $rooms[$i] = $rooms_unprepared[
$key];
402 include_once
'Modules/Chat/classes/class.ilChatRoomsTableGUI.php';
403 $tbl =
new ilChatRoomsTableGUI($this, $rbacsystem->checkAccess(
'write',$this->object->getRefId()), $isActive);
404 $tbl->setData($rooms);
407 include_once
'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php';
409 $this->tpl->setVariable(
'PRMLINK', $permalink->getHTML());
411 $this->tpl->setVariable(
"ADM_CONTENT", $tbl->getHTML());
420 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
422 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
425 if(!isset(
$_POST[
"del_id"]))
436 if(count(
$_POST[
"del_id"]) > 1)
443 if(in_array(0,
$_POST[
"del_id"]))
454 $room =&
new ilChatRoom($this->object->getId());
457 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.chat_edit_room.html",
"Modules/Chat");
458 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
459 $this->tpl->setVariable(
"TXT_ROOM_NAME",$this->lng->txt(
"chat_room_name"));
460 $this->tpl->setVariable(
"ROOM_CANCEL",$this->lng->txt(
"cancel"));
461 $this->tpl->setVariable(
"TXT_EDIT_CHATROOMS",$this->lng->txt(
"chat_chatroom_rename"));
462 $this->tpl->setVariable(
"ROOM_NAME",$room->getTitle());
463 $this->tpl->setVariable(
"CMD",
"renameRoom");
464 $this->tpl->setVariable(
"ROOM_EDIT",$this->lng->txt(
"rename"));
468 if(in_array(0,
$_POST[
"del_id"]))
486 if(in_array(0,
$_POST[
"del_id"]) and !$rbacsystem->checkAccess(
'write',$this->object->getRefId()))
493 foreach(
$_POST[
"del_id"] as $room_id)
495 $this->
object->chat_room->setRoomId($room_id);
496 $this->
object->server_comm->setType(
"delete");
497 $this->
object->server_comm->send();
498 $this->
object->chat_room->deleteAllMessages();
512 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
514 $this->ilias->raiseError($lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
520 if(!isset(
$_POST[
"del_id"]))
527 if(in_array(0,
$_POST[
"del_id"]) and !$rbacsystem->checkAccess(
'write',$this->object->getRefId()))
534 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
536 $conf->setFormAction($ilCtrl->getFormAction($this));
537 $conf->setHeaderText($lng->txt(
'chat_confirm_delete'));
538 foreach(
$_POST[
"del_id"] as $id)
540 $room =
new ilChatRoom($this->object->getId());
542 $conf->addItem(
'del_id[]', $id, $room->getTitle());
544 $conf->setConfirm($lng->txt(
'confirm'),
'confirmedDeleteRoom');
545 $conf->setCancel($lng->txt(
'cancel'),
'view');
546 $tpl->setVariable(
'ADM_CONTENT', $conf->getHTML());
551 global $rbacsystem,
$lng;
553 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
555 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
561 if(!isset(
$_POST[
"del_id"]))
569 if(in_array(0,
$_POST[
"del_id"]) &&!$rbacsystem->checkAccess(
'write',$this->object->getRefId()))
575 foreach(
$_POST[
"del_id"] as $room_id)
577 $this->
object->chat_room->setRoomId($room_id);
578 $this->
object->server_comm->setType(
"delete");
579 $this->
object->server_comm->send();
580 $this->
object->chat_room->deleteAllMessages();
590 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
592 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
595 if(!isset(
$_GET[
"room_id"]))
602 if(
$_GET[
"room_id"] == 0)
609 $room =
new ilChatRoom($this->object->getId());
613 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
617 $form->setFormAction($ilCtrl->getFormAction($this,
'renameRoom'));
618 $form->setTitle($lng->txt(
"chat_chatroom_rename"));
620 $inp =
new ilTextInputGUI($lng->txt(
'chat_room_name'),
'room_name');
622 $form->addItem($inp);
625 $hinp->setValue(
$_GET[
'room_id']);
626 $form->addItem($hinp);
628 $form->addCommandButton(
'renameRoom', $lng->txt(
'rename'));
629 $form->addCommandButton(
'view', $lng->txt(
'cancel'));
631 $tpl->setVariable(
'ADM_CONTENT',$form->getHTML());
672 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
674 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
678 $this->ilias->raiseError($this->lng->txt(
"chat_select_one_room"),$this->ilias->error_obj->MESSAGE);
680 $this->
object->chat_room->setOwnerId(
$_SESSION[
"AccountId"]);
681 if(!$this->object->chat_room->deleteRooms(
$_POST[
'del_id']))
683 $this->ilias->raiseError($this->object->chat_room->getErrorMessage(),$this->ilias->error_obj->MESSAGE);
695 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
697 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
699 $room =&
new ilChatRoom($this->object->getId());
701 $room->setOwnerId(
$_SESSION[
"AccountId"]);
703 if(!$room->validate())
705 $this->ilias->raiseError($room->getErrorMessage(),$this->ilias->error_obj->MESSAGE);
718 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
720 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
723 $room =
new ilChatRoom($this->object->getId());
726 if(!$room->validate())
728 $this->ilias->raiseError($room->getErrorMessage(),$this->ilias->error_obj->MESSAGE);
739 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
741 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
743 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.chat_edit_room.html",
"Modules/Chat");
744 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
745 $this->tpl->setVariable(
"TXT_ROOM_NAME",$this->lng->txt(
"chat_room_name"));
746 $this->tpl->setVariable(
"ROOM_CANCEL",$this->lng->txt(
"cancel"));
748 $this->tpl->setVariable(
"TXT_EDIT_CHATROOMS",$this->lng->txt(
"chat_chatroom_rename"));
749 $this->tpl->setVariable(
"ROOM_NAME",
"");
750 $this->tpl->setVariable(
"CMD",
"addRoom");
751 $this->tpl->setVariable(
"ROOM_EDIT",$this->lng->txt(
"add"));
759 if (!$rbacsystem->checkAccess(
"moderate", $this->object->getRefId()))
761 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
764 $this->
object->__initChatRecording();
765 $data = $this->
object->chat_recording->getRecordings();
766 if (!is_array(
$data))
772 include_once(
"./Services/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
775 $tablelines = array();
779 if ($d[
'moderator_id'])
781 $usr =
new ilObjUser($d[
'moderator_id']);
782 $mod = $usr->getPublicName();
787 'REC_ID' => $d[
'record_id'],
788 'RECORDING_TITLE' => $d[
'title'],
789 'RECORDING_DESCRIPTION' => $d[
'description'],
792 'start_timestamp' => $d[
'start_time']
795 if (is_array($moderator = $this->object->chat_recording->getModerator($d[
"moderator_id"])))
797 $this->tpl->setVariable(
"MODERATOR", $moderator);
801 $current_selection_list->setListTitle($this->lng->txt(
"actions"));
802 $current_selection_list->setId(
"act_".$current[
'REC_ID']);
804 if ($d[
'end_time'] > 0)
807 $ilCtrl->setParameter($this,
'record_id',$d[
"record_id"]);
808 $current_selection_list->addItem($lng->txt(
'export'),
'', $ilCtrl->getLinkTarget($this,
'exportRecording'));
809 $ilCtrl->clearParameters($this);
813 $current_selection_list->addItem($lng->txt(
'delete'),
'', $ilCtrl->getLinkTarget($this,
'askDeleteRecordings'));
815 $current[
'COMMAND_SELECTION_LIST'] = $current_selection_list->getHTML();
817 $tablelines[] = $current;
821 include_once(
'Services/Table/classes/class.ilTable2GUI.php');
822 $table =
new ilTable2GUI($this, $lng->txt(
'chat_recordings'));
823 $table->
setTitle($lng->txt(
'chat_recordings'));
824 $table->setData($tablelines);
825 $table->setId(
'cht_recordings_tbl_' . $this->object->getId());
826 $table->addColumn(
'',
'checkbox',
'1%',
true);
827 $table->addColumn($lng->txt(
'title'),
'RECORDING_TITLE',
'35%');
828 $table->addColumn($lng->txt(
'chat_recording_moderator'),
'RECORDING_MODERATOR',
'15%');
829 $table->addColumn($lng->txt(
'chat_recording_time_frame'),
'start_timestamp',
'30%');
830 $table->addColumn($lng->txt(
'actions'),
false,
'10%');
832 $table->setFormAction($ilCtrl->getFormAction($this));
833 $table->setSelectAllCheckbox(
'recordings');
835 $table->setRowTemplate(
'tpl.chat_recordings_list_row.html',
'Modules/Chat');
837 $table->addMultiCommand(
'askDeleteRecordings', $lng->txt(
'delete'));
839 $this->tpl->setVariable(
'ADM_CONTENT', $table->getHTML());
846 if (!$rbacsystem->checkAccess(
"moderate", $this->object->getRefId()))
848 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
851 if(!is_array(
$_POST[
'recordings']))
859 $this->
object->__initChatRecording();
862 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.chat_ask_delete_recordings.html",
"Modules/Chat");
864 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
865 $this->tpl->setVariable(
"TBL_TITLE",$this->lng->txt(
'chat_recordings'));
866 $this->tpl->setVariable(
"HEADER_DESC",$this->lng->txt(
'chat_recording_description'));
867 $this->tpl->setVariable(
"HEADER_MOD",$this->lng->txt(
'chat_recording_moderator'));
868 $this->tpl->setVariable(
"HEADER_TIME",$this->lng->txt(
'chat_recording_time_frame'));
870 $this->tpl->setVariable(
"BTN_DELETE",$this->lng->txt(
'delete'));
871 $this->tpl->setVariable(
"BTN_CANCEL",$this->lng->txt(
'cancel'));
874 for ($i = 0; $i < count(
$_POST[
"recordings"]); $i++)
876 $this->
object->chat_recording->getRecord(
$_POST[
"recordings"][$i]);
877 $this->tpl->setCurrentBlock(
"recordings_row");
878 if($this->object->chat_recording->getTitle() !=
"")
880 $this->tpl->setVariable(
"RECORDING_TITLE", $this->object->chat_recording->getTitle());
882 if($this->object->chat_recording->getDescription() !=
"")
884 $this->tpl->setVariable(
"RECORDING_DESCRIPTION", $this->object->chat_recording->getDescription());
886 if ($moderator = $this->object->chat_recording->getModerator())
888 $this->tpl->setVariable(
"MODERATOR", $moderator);
890 $this->tpl->setVariable(
"START_TIME", date(
"Y-m-d H:i:s", $this->object->chat_recording->getStartTime()));
891 if ($this->object->chat_recording->getEndTime() > 0)
893 $this->tpl->setVariable(
"END_TIME", date(
"Y-m-d H:i:s", $this->object->chat_recording->getEndTime()));
896 $this->tpl->parseCurrentBlock();
905 if (!$rbacsystem->checkAccess(
"moderate", $this->object->getRefId()))
907 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
910 if(!is_array(
$_SESSION[
'chat_recordings_del']))
918 $this->
object->__initChatRecording();
920 foreach(
$_SESSION[
'chat_recordings_del'] as $record_id)
922 $this->
object->chat_recording->delete($record_id);
935 if (!$rbacsystem->checkAccess(
"moderate", $this->object->getRefId()))
937 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
939 $this->
object->__initChatRecording();
941 if (!$this->object->chat_recording->getRecord(
$_GET[
"record_id"]) ||
942 $this->
object->chat_recording->getEndTime() == 0)
950 $tmp_tpl =&
new ilTemplate(
"tpl.chat_export_recording.html",
true,
true,
"Modules/Chat");
952 if($this->object->chat_recording->getTitle())
954 $tmp_tpl->setVariable(
"TITLE",$this->object->chat_recording->getTitle());
956 $tmp_tpl->setVariable(
"START_TIME",date(
"Y-m-d H:i:s", $this->object->chat_recording->getStartTime()));
957 $tmp_tpl->setVariable(
"END_TIME",date(
"Y-m-d H:i:s", $this->object->chat_recording->getEndTime()));
958 $tmp_tpl->setVariable(
"CONTENT",$this->object->chat_recording->exportMessages());
1018 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
1020 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
1024 $this->tpl->show(
false,
false);
1034 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
1036 !$rbacsystem->checkAccess(
"read", $this->ref_id)
1040 $baseClass =
'ilchatpresentationgui';
1041 $ilCtrl->setParameter($baseClass,
'ref_id', $this->ref_id);
1046 if ($_REQUEST[
"room_id"] && !$this->object->chat_room->getTitle())
1048 $baseClass =
'ilchatpresentationgui';
1049 $ilCtrl->setParameter($baseClass,
'ref_id', $this->ref_id);
1054 $this->
object->chat_room->setUserId(
$_SESSION[
"AccountId"]);
1055 $this->
object->chat_room->updateLastVisit();
1056 $this->tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
1059 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.chat_user_frame_async.html",
'Modules/Chat');
1060 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
1062 $this->tpl->addCss(
"./Modules/Chat/templates/default/chat.css");
1064 $ilMainMenu->setSmallMode(
false);
1065 $this->tpl->setVariable(
"MAINMENU", $ilMainMenu->getHTML());
1067 include_once
'Services/YUI/classes/class.ilYuiUtil.php';
1071 $this->tpl->addJavascript(
"./Services/JavaScript/js/Basic.js");
1072 $this->tpl->addJavascript(
"./Services/Navigation/js/ServiceNavigation.js");
1073 $this->tpl->addJavascript(
'./Services/YUI/js/2_5_0/yahoo/yahoo-min.js');
1074 $this->tpl->addJavascript(
'./Services/YUI/js/2_5_0/event/event-min.js');
1075 $this->tpl->addJavascript(
'./Services/YUI/js/2_5_0/connection/connection-min.js');
1077 $this->tpl->addJavascript(
'./Modules/Chat/js/ChatRoomList.js');
1078 $this->tpl->addJavascript(
'./Modules/Chat/js/ChatActiveUsersRoom.js');
1079 $this->tpl->addJavascript(
'./Modules/Chat/js/ChatOnlineUsers.js');
1080 $this->tpl->addJavascript(
'./Modules/Chat/js/ChatLanguage.js');
1081 $this->tpl->addJavascript(
'./Modules/Chat/js/ChatUserList.js');
1082 $this->tpl->addJavascript(
'./Modules/Chat/js/ChatContextMenu.js');
1083 $this->tpl->addJavascript(
'./Modules/Chat/js/ChatMessages.js');
1084 $this->tpl->addJavascript(
'./Modules/Chat/js/ChatUserFrameAsync.js');
1089 $this->tpl->addJavascript(
'./Modules/Chat/js/ChatMenu.js');
1091 $ilLocator->addRepositoryItems($this->object->getRefId());
1092 $ilLocator->addItem($this->object->getTitle(),
'repository.php?ref_id='.$this->object->getRefId(),
'_top', $this->
object->getRefId());
1093 $this->tpl->setLocator();
1095 $this->tpl->setCurrentBlock(
"js_chat_init");
1096 $ilCtrl->setParameter($this,
'ref_id',
'#__ref_id');
1097 $link = $ilCtrl->getLinkTarget($this,
"#__cmd",
'',
true);
1098 $this->tpl->setVariable(
"CHAT_BASE_URL_TEMPLATE", $link);
1099 $ilCtrl->clearParameters($this);
1101 $this->tpl->setVariable(
"BASE_REF_ID", $this->object->getRefId());
1102 $this->tpl->setVariable(
"BASE_ROOM_ID", $this->object->chat_room->getRoomId());
1103 $this->tpl->setVariable(
"ONLINE_USERS_TITLE", addslashes($this->lng->txt(
'chat_online_users')));
1104 $this->tpl->setVariable(
"ACTIVE_USERS_TITLE", addslashes($this->lng->txt(
'chat_active_users')));
1105 $this->tpl->setVariable(
"ROOM_LIST_TITLE", addslashes($this->lng->txt(
'chat_rooms')));
1106 $this->tpl->setVariable(
"CHATSERVER_ADDRESS",$this->object->server_comm->getServerFrameSource());
1108 $this->tpl->setVariable(
"CHAT_HIDE", addslashes($this->lng->txt(
'hide')));
1109 $this->tpl->setVariable(
"CHAT_SHOW", addslashes($this->lng->txt(
'show')));
1110 $this->tpl->setVariable(
"CHAT_OPEN", addslashes($this->lng->txt(
'chat_open')));
1111 $this->tpl->setVariable(
"CHAT_RECORDING_RUNNING", addslashes($this->lng->txt(
'chat_recording_running')));
1112 $this->tpl->setVariable(
"CHAT_RECORDING_ALREADY_RUNNING", addslashes($this->lng->txt(
'chat_recording_already_running')));
1113 $this->tpl->setVariable(
"CHAT_RECORDING_STOPPED", addslashes($this->lng->txt(
'chat_recording_stopped')));
1115 $this->tpl->setVariable(
"CHAT_EMPTY_MESSAGE", addslashes($this->lng->txt(
'chat_empty')));
1117 $this->tpl->setVariable(
"CHAT_CONFIRM_USER_INVITE", addslashes($this->lng->txt(
'chat_confirm_user_invite')));
1118 $this->tpl->setVariable(
"CHAT_CONFIRM_KICK_USER", addslashes($this->lng->txt(
'chat_confirm_kick_user')));
1119 $this->tpl->setVariable(
"CHAT_NO_TITLE_GIVEN", addslashes($this->lng->txt(
'chat_no_title_given')));
1120 $this->tpl->setVariable(
"CHAT_ADDRESS", addslashes($this->lng->txt(
'chat_address')));
1121 $this->tpl->setVariable(
"CHAT_WHISPER", addslashes($this->lng->txt(
'chat_whisper')));
1122 $this->tpl->setVariable(
"CHAT_KICK", addslashes($this->lng->txt(
'chat_kick')));
1123 $this->tpl->setVariable(
"CHAT_UNKICK", addslashes($this->lng->txt(
'chat_unkick')));
1124 $this->tpl->setVariable(
"CHAT_INVITE", addslashes($this->lng->txt(
'chat_invite')));
1125 $this->tpl->setVariable(
"CHAT_DISINVITE", addslashes($this->lng->txt(
'chat_disinvite')));
1126 $this->tpl->setVariable(
"CHAT_PROFILE", addslashes($this->lng->txt(
'chat_profile')));
1127 $this->tpl->setVariable(
"CANCEL", addslashes($this->lng->txt(
'cancel')));
1129 $this->tpl->setVariable(
"ADD_TO_BOOKMARK", addslashes($this->lng->txt(
'chat_add_to_bookmark')));
1130 $this->tpl->setVariable(
"ADD_TO_ADDRESSBOOK", addslashes($this->lng->txt(
'chat_add_to_addressbook')));
1131 $this->tpl->setVariable(
"EMPTY_ROOM", addslashes($this->lng->txt(
'chat_empty')));
1132 $this->tpl->setVariable(
"DELETE", addslashes($this->lng->txt(
'delete')));
1133 $this->tpl->setVariable(
"CONFIRM_DELETE_PRIVATE_ROOM", addslashes($this->lng->txt(
'chat_confirm_delete_private_room')));
1134 $this->tpl->setVariable(
"CHAT_CONFIRM_USER_INVITE", addslashes($this->lng->txt(
'chat_confirm_user_invite')));
1135 $this->tpl->setVariable(
"INVITE", addslashes($this->lng->txt(
'chat_invite')));
1136 $this->tpl->setVariable(
"DISINVITE", addslashes($this->lng->txt(
'chat_disinvite')));
1137 $this->tpl->setVariable(
"CHAT_USER_HIDDEN", addslashes($this->lng->txt(
'chat_user_hidden')));
1138 $this->tpl->setVariable(
"CHAT_USER_VISIBLE", addslashes($this->lng->txt(
'chat_user_visible')));
1140 $this->tpl->setVariable(
"TXT_REFRESH", addslashes($this->lng->txt(
'refresh')));
1141 $this->tpl->setVariable(
"TXT_HIDE_TEXTFORMAT", addslashes($this->lng->txt(
'chat_hide_textformat')));
1142 $this->tpl->setVariable(
"TXT_SHOW_TEXTFORMAT", addslashes($this->lng->txt(
'chat_show_textformat')));
1143 $this->tpl->setVariable(
"TXT_TEXTFORMAT", addslashes($this->lng->txt(
'chat_textformat')));
1145 $this->tpl->parseCurrentBlock();
1147 if($_REQUEST[
"room_id"])
1149 $this->tpl->setVariable(
"TITLE",$this->object->chat_room->getTitle());
1153 $this->tpl->setVariable(
"TITLE",$this->object->getTitle());
1156 if($ilUser->getId() != ANONYMOUS_USER_ID)
1158 $ilCtrl->setParameter($this,
"room_id", $this->object->chat_room->getRoomId());
1159 $this->tpl->setVariable(
"ADD_FORMACTION", $ilCtrl->getFormAction($this,
"addPrivateRoom"));
1160 $this->tpl->setVariable(
"TXT_ADD_PRIVATE_CHATROOM", $this->lng->txt(
"chat_add_private_chatroom"));
1161 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"add"));
1165 if ($ilSetting->get(
'chat_smilies_status') == 1)
1167 include_once
'Modules/Chat/classes/class.ilChatSmilies.php';
1169 foreach($smilies as $smiley)
1171 $this->tpl->setCurrentBlock(
"smilies_element");
1172 $this->tpl->setVariable(
"SMILEY_SRC", $smiley[
'smiley_fullpath']);
1173 $parts = explode(
"\n", $smiley[
"smiley_keywords"]);
1174 $this->tpl->setVariable(
"SMILEY_CONTENT", $parts[0]);
1176 $this->tpl->parseCurrentBlock();
1178 $this->tpl->setCurrentBlock(
"smilies_selector");
1179 $this->tpl->setVariable(
'TXT_SHOW_SMILIES', $this->lng->txt(
'chat_show_smilies'));
1180 $this->tpl->setVariable(
'TXT_HIDE_SMILIES', $this->lng->txt(
'chat_hide_smilies'));
1181 $this->tpl->parseCurrentBlock();
1185 $this->tpl->fillJavaScriptFiles();
1186 $this->tpl->fillCssFiles();
1187 $this->tpl->fillContentStyle();
1188 $this->tpl->show(
false,
false);
1194 global $rbacsystem, $ilUser;
1198 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
1200 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
1202 $result->errormsg = $this->lng->txt(
"msg_no_perm_read");
1203 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
1208 include
'Modules/Chat/classes/class.ilChatBlock.php';
1210 $last_known_id = $_REQUEST[
"chat_last_known_id"] ? $_REQUEST[
"chat_last_known_id"] : 0;
1212 $new_last_known_id = 0;
1214 $msg = $block->getMessages
1216 $this->object->chat_room->getObjId(),
1217 $this->
object->chat_room->getRoomId(),
1224 'chatviewer_last_selected_room',
1225 $this->object->chat_room->getObjId().
',' . $this->
object->chat_room->getRoomId()
1229 $ilUser->getId(),
'chatviewer_last_selected_room',
1230 $this->
object->chat_room->getObjId().
',' . $this->
object->chat_room->getRoomId()
1236 $result->lastId = $new_last_known_id;
1238 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
1249 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.chat_input_frame.html",
'Modules/Chat');
1255 if($ilUser->getId() != ANONYMOUS_USER_ID)
1260 $message = $this->lng->txt(
"chat_private_message").
" ";
1261 $message .= $this->
object->chat_user->getLogin().
" -> ".$user_obj->getLogin();
1264 else if(
$_GET[
"a_id"])
1267 $message = $this->lng->txt(
"chat_address_user").
" ".$user_obj->getLogin();
1271 $ilCtrl->setParameter($this,
"room_id", $_REQUEST[
"room_id"]);
1274 $ilCtrl->setParameter($this,
"p_id",
$_GET[
"p_id"]);
1276 else if (
$_GET[
"a_id"])
1278 $ilCtrl->setParameter($this,
"a_id",
$_GET[
"a_id"]);
1280 $this->tpl->setVariable(
"FORMACTION", $ilCtrl->getFormAction($this,
"inputAsync"));
1281 $ilCtrl->clearParameters($this);
1283 $this->tpl->setVariable(
"TXT_NEW_MESSAGE",$this->lng->txt(
'chat_new_message'));
1284 $this->tpl->setVariable(
"TXT_COLOR",$this->lng->txt(
"chat_color"));
1285 $this->tpl->setVariable(
"TXT_TYPE",$this->lng->txt(
"chat_type"));
1286 $this->tpl->setVariable(
"TXT_FACE",$this->lng->txt(
"chat_face"));
1287 $this->tpl->setVariable(
"TXT_INPUT",$this->lng->txt(
"chat_input"));
1291 $this->tpl->setCurrentBlock(
"cancel");
1292 $this->tpl->setVariable(
"TXT_SUBMIT_CANCEL",$this->lng->txt(
"cancel_whisper"));
1293 $this->tpl->parseCurrentBlock();
1294 $this->tpl->setVariable(
"TXT_SUBMIT_OK",$this->lng->txt(
"ok"));
1298 $this->tpl->setCurrentBlock(
"cancel");
1299 $this->tpl->setVariable(
"TXT_SUBMIT_CANCEL",$this->lng->txt(
"cancel_talk"));
1300 $this->tpl->parseCurrentBlock();
1301 $this->tpl->setVariable(
"TXT_SUBMIT_OK",$this->lng->txt(
"ok"));
1305 $this->tpl->setVariable(
"TXT_SUBMIT_OK",$this->lng->txt(
"ok"));
1308 if ($ilSetting->get(
'chat_export_status') == 0 || ($ilSetting->get(
'chat_export_status') == 1 && $rbacsystem->checkAccess(
"moderate", $this->ref_id) ) )
1310 $this->tpl->setVariable(
"TXT_HTML_EXPORT",$this->lng->txt(
'exp_html'));
1316 $this->tpl->setVariable(
"RADIO_TYPE",$this->
__getFontType());
1317 $this->tpl->setVariable(
"CHECK_FACE",$this->
__getFontFace());
1319 if ($rbacsystem->checkAccess(
"moderate", $this->object->getRefId()))
1321 $this->
object->__initChatRecording();
1322 $this->tpl->setCurrentBlock(
"moderator");
1323 $this->
object->chat_recording->setRoomId($this->object->chat_room->getRoomId());
1326 if ($this->object->chat_recording->getTitle() !=
"")
1328 $this->tpl->setVariable(
"TXT_TITLE_STOP_RECORDING", $this->lng->txt(
"chat_recording_title"));
1329 $this->tpl->setVariable(
"VAL_TITLE_STOP_RECORDING", $this->object->chat_recording->getTitle());
1331 if ($this->object->chat_recording->getDescription() !=
"")
1333 $this->tpl->setVariable(
"TXT_DESCRIPTION_STOP_RECORDING", $this->lng->txt(
"chat_recording_description"));
1334 $this->tpl->setVariable(
"VAL_DESCRIPTION_STOP_RECORDING", $this->object->chat_recording->getDescription());
1336 $this->tpl->setVariable(
"TXT_SUBMIT_STOP_RECORDING", $this->lng->txt(
"chat_stop_recording"));
1340 $this->tpl->setVariable(
"TXT_TITLE_START_RECORDING", $this->lng->txt(
"chat_recording_title"));
1341 $this->tpl->setVariable(
"TXT_DESCRIPTION_START_RECORDING", $this->lng->txt(
"chat_recording_description"));
1342 $this->tpl->setVariable(
"TXT_SUBMIT_START_RECORDING", $this->lng->txt(
"chat_start_recording"));
1345 $ilCtrl->setParameter($this,
"room_id", $this->object->chat_room->getRoomId());
1346 $this->tpl->setVariable(
"MODERATOR_FORMACTION",
1347 $ilCtrl->getFormAction($this,
"startRecording"));
1348 $this->tpl->setVariable(
"TXT_RECORDINGS",$this->lng->txt(
'chat_recordings'));
1349 $this->tpl->setVariable(
"MODERATOR_TARGET",
"_top");
1350 $this->tpl->parseCurrentBlock(
"moderator");
1354 include_once
'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php';
1356 $this->tpl->setVariable(
'PERMANENT_LINK', $permalink->getHTML(),
'&room_id='.$this->object->chat_room->getRoomId());
1373 if(!
$_GET[
'usr_id'])
1379 $this->
object->chat_room->setOwnerId($ilUser->getId());
1385 if(!$id = $this->object->chat_room->lookupRoomId())
1387 $id = $this->
object->chat_room->add();
1391 $this->
object->chat_room->setRoomId($id);
1392 $this->
object->chat_room->invite((
int)
$_GET[
"usr_id"]);
1393 $this->
object->sendMessage((
int) $_GET[
'usr_id']);
1395 if((
int)$this->object->chat_room->getRoomId())
1397 ilUtil::sendSuccess(sprintf($this->lng->txt(
"chat_user_invited_private"), $this->
object->chat_room->getTitle()),
true);
1401 ilUtil::sendSuccess(sprintf($this->lng->txt(
"chat_user_invited_public"), $this->
object->getTitle()),
true);
1404 ilUtil::redirect(
'ilias.php?baseClass=ilChatPresentationGUI&ref_id='.$this->object->getRefId().
'&room_id='.$id);
1410 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.chat_close.html",
'Modules/Chat');
1412 $this->tpl->touchBlock(
"content");
1418 if ($ilSetting->get(
'chat_export_status') == 0 || ($ilSetting->get(
'chat_export_status') == 1 && $rbacsystem->checkAccess(
"moderate", $this->ref_id) ) )
1420 $tmp_tpl =&
new ilTemplate(
"tpl.chat_export.html",
true,
true,
"Modules/Chat");
1422 if($this->object->chat_room->getRoomId())
1424 $tmp_tpl->setVariable(
"CHAT_NAME",$this->object->chat_room->getTitle());
1425 $filename .=
' - ' . $this->
object->chat_room->getTitle();
1429 $tmp_tpl->setVariable(
"CHAT_NAME",$this->object->getTitle());
1434 $export_period = $ilSetting->get(
'chat_export_period');
1435 $time_min = time() - $export_period * 60 * 60 * 24;
1436 $tmp_tpl->setVariable(
"CHAT_DATE",strftime(
"%c",time()));
1437 $tmp_tpl->setVariable(
"CONTENT",$this->object->chat_room->getAllMessages($time_min));
1450 $opt = array(
"createRoom" => $this->lng->txt(
"chat_room_select"));
1459 $opt[
"exportRoom"] = $this->lng->txt(
"chat_html_export");
1461 if($rbacsystem->checkAccess(
'write',$this->object->getRefId()) or
1462 count($this->object->chat_room->getRoomsOfObject()))
1464 $opt[
"refreshRoom"] = $this->lng->txt(
"chat_refresh");
1467 if(count($this->object->chat_room->getRoomsOfObject()))
1469 $opt[
"renameRoom"] = $this->lng->txt(
"rename");
1470 $opt[
"deleteRoom"] = $this->lng->txt(
"delete");
1483 $this->tpl->setCurrentBlock(
"ChatStyle");
1490 $this->tpl->parseCurrentBlock();
1495 $colors = array(
"black" => $this->lng->txt(
"chat_black"),
1496 "red" => $this->lng->txt(
"chat_red"),
1497 "green" => $this->lng->txt(
"chat_green"),
1498 "maroon" => $this->lng->txt(
"chat_maroon"),
1499 "olive" => $this->lng->txt(
"chat_olive"),
1500 "navy" => $this->lng->txt(
"chat_navy"),
1501 "purple" => $this->lng->txt(
"chat_purple"),
1502 "teal" => $this->lng->txt(
"chat_teal"),
1503 "silver" => $this->lng->txt(
"chat_silver"),
1504 "gray" => $this->lng->txt(
"chat_gray"),
1505 "lime" => $this->lng->txt(
"chat_lime"),
1506 "yellow" => $this->lng->txt(
"chat_yellow"),
1507 "fuchsia" => $this->lng->txt(
"chat_fuchsia"),
1508 "aqua" => $this->lng->txt(
"chat_aqua"),
1509 "blue" => $this->lng->txt(
"chat_blue"));
1516 $types = array(
"times" => $this->lng->txt(
"chat_times"),
1517 "tahoma" => $this->lng->txt(
"chat_tahoma"),
1518 "arial" => $this->lng->txt(
"chat_arial"));
1520 $_POST[
"type"] = $_POST[
"type"] ? $_POST[
"type"] :
"times";
1524 $this->tpl->setCurrentBlock(
"FONT_TYPES");
1525 $this->tpl->setVariable(
"BL_TXT_TYPE",
$type);
1526 $this->tpl->setVariable(
"FONT_TYPE",
$name);
1527 $this->tpl->setVariable(
"TYPE_CHECKED",$_POST[
"type"] ==
$name ?
"checked=\"checked\"" :
"");
1528 $this->tpl->parseCurrentBlock();
1536 $types = array(
"bold" => $this->lng->txt(
"chat_bold"),
1537 "italic" => $this->lng->txt(
"chat_italic"),
1538 "underlined" => $this->lng->txt(
"chat_underlined"));
1540 $this->tpl->setCurrentBlock(
"FONT_FACES");
1541 $this->tpl->setVariable(
"BL_TXT_FACE",
"<b>".$this->lng->txt(
"chat_bold").
"</b>");
1542 $this->tpl->setVariable(
"FONT_FACE",
"bold");
1543 $this->tpl->setVariable(
"FACE_CHECKED",in_array(
"bold",
$_POST[
"face"]) ?
"checked=\"checked\"" :
"");
1544 $this->tpl->parseCurrentBlock();
1546 $this->tpl->setCurrentBlock(
"FONT_FACES");
1547 $this->tpl->setVariable(
"BL_TXT_FACE",
"<i>".$this->lng->txt(
"chat_italic").
"</i>");
1548 $this->tpl->setVariable(
"FONT_FACE",
"italic");
1549 $this->tpl->setVariable(
"FACE_CHECKED",in_array(
"italic",
$_POST[
"face"]) ?
"checked=\"checked\"" :
"");
1550 $this->tpl->parseCurrentBlock();
1552 $this->tpl->setCurrentBlock(
"FONT_FACES");
1553 $this->tpl->setVariable(
"BL_TXT_FACE",
"<u>".$this->lng->txt(
"chat_underlined").
"</u>");
1554 $this->tpl->setVariable(
"FONT_FACE",
"underlined");
1555 $this->tpl->setVariable(
"FACE_CHECKED",in_array(
"underlined",
$_POST[
"face"]) ?
"checked=\"checked\"" :
"");
1556 $this->tpl->parseCurrentBlock();
1561 $tpl =
new ilTemplate(
"tpl.chat_message.html",
true,
true,
'Modules/Chat');
1562 $_POST[
'message'] = htmlentities(trim(
$_POST[
'message']));
1564 $_POST[
'message'] = preg_replace(
'/%u([0-9A-Fa-f]{4})/im',
'&#x$1;',
$_POST[
'message']);
1568 $tpl->setVariable(
"MESSAGE",
$_POST[
"message"]);
1569 $tpl->setVariable(
"FONT_COLOR",
$_POST[
"color"]);
1570 $tpl->setVariable(
"FONT_FACE",
$_POST[
"type"]);
1577 $tpl->setCurrentBlock(
"private");
1578 $tpl->setVariable(
"PRIVATE_U_COLOR",
"red");
1579 $tpl->setVariable(
"PRIVATE_FROM",$user_obj->getLogin());
1583 $tpl->setVariable(
"PRIVATE_TO",$user_obj->getLogin());
1584 $tpl->parseCurrentBlock();
1586 else if(
$_GET[
"a_id"])
1588 $tpl->setCurrentBlock(
"address");
1589 $tpl->setVariable(
"ADDRESS_FROM_COLOR",
"navy");
1592 $tpl->setVariable(
"ADDRESS_FROM",$user_obj->getLogin());
1594 $tpl->setVariable(
"ADDRESS_TO_COLOR",
"red");
1597 $tpl->setVariable(
"ADDRESS_TO",$user_obj->getLogin());
1598 $tpl->parseCurrentBlock();
1602 $tpl->setCurrentBlock(
"normal");
1603 $tpl->setVariable(
"NORMAL_U_COLOR",
"navy");
1604 $tpl->setVariable(
"NORMAL_UNAME",$this->object->chat_user->getLogin());
1605 $tpl->parseCurrentBlock();
1610 foreach(
$_POST[
"face"] as $face)
1612 $tpl->setCurrentBlock(
"type_open");
1616 $tpl->setVariable(
"TYPE_TYPE_O",
"b");
1619 $tpl->setVariable(
"TYPE_TYPE_O",
"i");
1623 $tpl->setVariable(
"TYPE_TYPE_O",
"u");
1626 $tpl->parseCurrentBlock();
1629 foreach(
$_POST[
"face"] as $face)
1631 $tpl->setCurrentBlock(
"type_close");
1635 $tpl->setVariable(
"TYPE_TYPE_C",
"b");
1638 $tpl->setVariable(
"TYPE_TYPE_C",
"i");
1642 $tpl->setVariable(
"TYPE_TYPE_C",
"u");
1645 $tpl->parseCurrentBlock();
1649 $message = preg_replace(
"/\r/",
"",
$tpl->get());
1650 $message = preg_replace(
"/\n/",
"",$message);
1659 if (!$rbacsystem->checkAccess(
"read", $this->ref_id))
1661 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
1664 if (isset(
$_GET[
'del_id']))
1667 if(!isset(
$_POST[
"del_id"]))
1679 include_once
"Modules/Chat/classes/class.ilFileDataChat.php";
1681 if(count(
$_POST[
"del_id"]) == 1)
1683 $this->
object->chat_room->setRoomId(
$_POST[
"del_id"][0]);
1689 foreach(
$_POST[
"del_id"] as $id)
1691 $this->
object->chat_room->setRoomId((
int) $id);
1693 $tmp_tpl =&
new ilTemplate(
"tpl.chat_export.html",
true,
true,
"Modules/Chat");
1697 $tmp_tpl->setVariable(
"CHAT_NAME",$this->object->chat_room->getTitle());
1701 $tmp_tpl->setVariable(
"CHAT_NAME",$this->object->getTitle());
1703 $tmp_tpl->setVariable(
"CHAT_DATE",strftime(
"%c",time()));
1704 $tmp_tpl->setVariable(
"CONTENT",$this->object->chat_room->getAllMessages());
1706 $file_obj->addFile(
"chat_".$this->object->chat_room->getRoomId().
".html",$tmp_tpl->get());
1708 $fname = $file_obj->zip();
1719 global $rbacsystem,$rbacreview, $ilAccess;
1721 $this->ctrl->setParameter($this,
"ref_id",$this->object->getRefId());
1725 if($rbacsystem->checkAccess(
'read',$this->object->getRefId()))
1727 $force_active = (
$_GET[
"cmd"] ==
"" ||
$_GET[
"cmd"] ==
"view")
1730 $tabs_gui->addTarget(
"chat_rooms",
1731 $this->ctrl->getLinkTarget($this,
"view"), array(
"view",
""), get_class($this),
1736 if ($ilAccess->checkAccess(
'visible',
'', $this->ref_id))
1738 $force_active = ($this->ctrl->getNextClass() ==
"ilinfoscreengui"
1739 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
1743 $tabs_gui->addTarget(
"info_short",
1744 $this->ctrl->getLinkTargetByClass(
1745 array(
"ilobjchatgui",
"ilinfoscreengui"),
"showSummary"),
1746 array(
"showSummary",
"infoScreen"),
1747 "",
"", $force_active);
1750 if($rbacsystem->checkAccess(
'write',$this->object->getRefId()))
1752 $force_active = (
$_GET[
"cmd"] ==
"edit")
1755 $tabs_gui->addTarget(
"edit_properties",
1756 $this->ctrl->getLinkTarget($this,
"edit"),
"edit", get_class($this),
1759 if($rbacsystem->checkAccess(
'moderate',$this->object->getRefId()))
1761 $tabs_gui->addTarget(
"chat_recordings",
1762 $this->ctrl->getLinkTarget($this,
"recordings"),
"recordings", get_class($this));
1764 if($rbacsystem->checkAccess(
'moderate',$this->object->getRefId()))
1766 $tabs_gui->addTarget(
"chat_blocked_users",
1767 $this->ctrl->getLinkTarget($this,
"blockedUsers"),
1768 array(
"blockedUsers",
"unBlockUsers",
"blockUser"), get_class($this));
1771 if($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
1773 $tabs_gui->addTarget(
"perm_settings",
1774 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
1781 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_content.html");
1782 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
1802 include_once
'./classes/class.ilTabsGUI.php';
1804 $this->tpl->setCurrentBlock(
"header_image");
1806 $this->tpl->parseCurrentBlock();
1807 $this->tpl->setVariable(
"HEADER",$this->object->getTitle());
1808 $this->tpl->setVariable(
"H_DESCRIPTION",$this->object->getDescription());
1810 #$tabs_gui =& new ilTabsGUI();
1811 $this->
getTabs($this->tabs_gui);
1814 #$this->tpl->setVariable("TABS", $tabs_gui->getHTML());
1820 global $ilias_locator;
1822 $this->tpl->addBlockFile(
"LOCATOR",
"locator",
"tpl.locator.html",
"Services/Locator");
1825 foreach ($tree->getPathFull($this->object->getRefId()) as
$key =>
$row)
1829 $this->tpl->touchBlock(
'locator_separator_prefix');
1832 $this->tpl->setCurrentBlock(
"locator_item");
1834 if(
$row[
"type"] ==
'chat')
1836 $this->tpl->setVariable(
"ITEM",$this->object->getTitle());
1837 $this->tpl->setVariable(
"LINK_ITEM",$this->ctrl->getLinkTarget($this));
1841 $this->tpl->setVariable(
"ITEM",
$row[
"title"]);
1842 $this->tpl->setVariable(
"LINK_ITEM",
"repository.php?ref_id=".
$row[
"child"]);
1846 $this->tpl->setVariable(
"ITEM", $this->lng->txt(
"repository"));
1847 $this->tpl->setVariable(
"LINK_ITEM",
"repository.php?ref_id=".
$row[
"child"]);
1850 $this->tpl->parseCurrentBlock();
1853 $this->tpl->setVariable(
"TXT_LOCATOR",$this->lng->txt(
"locator"));
1854 $this->tpl->parseCurrentBlock();
1861 if ($ilAccess->checkAccess(
"read",
"", $a_target))
1863 $_GET[
"ref_id"] = $a_target;
1864 $_GET[
"cmd"] =
"view";
1865 $_GET[
"baseClass"] =
"ilChatHandlerGUI";
1866 include(
"ilias.php");
1869 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
1871 $_GET[
"cmd"] =
"frameset";
1872 $_GET[
"target"] =
"";
1873 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
1876 include(
"repository.php");
1880 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
1887 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
1889 $tpl->setContent($ilCtrl->getHTML($profile_gui));
1898 if (is_object($this->
object))
1900 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
''),
'',
$_GET[
'ref_id']);
1911 $this->ctrl->setCmd(
"showSummary");
1912 $this->ctrl->setCmdClass(
"ilinfoscreengui");
1923 if (!$ilAccess->checkAccess(
"visible",
"", $this->ref_id))
1925 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
1928 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1931 $info->enablePrivateNotes();
1933 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
1940 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
1953 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
1956 $this->ctrl->forwardCommand($info);
1962 $this->
object->chat_room->setUserId(
$_SESSION[
"AccountId"]);
1963 $this->
object->chat_room->updateLastVisit();
1969 $all_users = $this->
object->chat_room->getOnlineUsers();
1972 $filtered_users = array();
1974 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
1976 $activeMap = array();
1977 foreach($active_users as
$user)
1979 $activeMap[$user->id] = 1;
1983 foreach($all_users as $user)
1985 if($user[
'user_id'] ==
$_SESSION[
'AccountId'] || $user[
'user_id'] == ANONYMOUS_USER_ID || $activeMap[$user[
'user_id']]) {
1990 $oUser->setId($user[
'user_id']);
1993 if($oUser->getPref(
'hide_own_online_status') ==
'y') {
1998 $filtered_users[] = $oUser;
2003 foreach($filtered_users as $user) {
2005 if($user->getId() != ANONYMOUS_USER_ID) {
2009 if (in_array($user->getPref(
"public_profile"), array(
"y",
"g"))) {
2012 $new_user->img = $user->getPersonalPicturePath();
2014 $new_user->dn = $user->getFirstname().
' '.$user->getLastname().
' ('.$user->getLogin().
')';
2030 if($this->object->chat_room->isInvited($user->getId())) {
2059 $result->hidden_count = $hidden_count;
2065 global $rbacsystem,
$ilCtrl, $ilUser;
2067 $users = $this->
object->chat_room->getActiveUsers();
2073 foreach($users as
$user) {
2081 $user_obj->setId($user);
2084 $new_user->login = $user_obj->getLogin();
2086 if (in_array($user_obj->getPref(
"public_profile"), array(
"y",
"g"))) {
2089 $new_user->img = $user_obj->getPersonalPicturePath();
2091 $new_user->dn = $user_obj->getFirstname().
' '.$user_obj->getLastname().
' ('.$user_obj->getLogin().
')';
2101 if($ilUser->getId() != ANONYMOUS_USER_ID && $user != ANONYMOUS_USER_ID) {
2102 $ilCtrl->clearParameters($this);
2103 if(in_array($user_obj->getPref(
"public_profile"), array(
"y",
"g"))) {
2105 $ilCtrl->setParameter($this,
"user", $user_obj->getId());
2106 $link = $ilCtrl->getLinkTarget($this,
"showUserProfile");
2107 $ilCtrl->clearParameters($this);
2112 if($rbacsystem->checkAccess(
'moderate',$this->object->getRefId()) and !$_REQUEST[
'room_id']) {
2113 $ilCtrl->setParameter($this,
"kick_id", $user_obj->getId());
2115 if($this->object->chat_room->isKicked($user_obj->getId())) {
2127 $ilCtrl->clearParameters($this);
2140 global $rbacsystem, $ilUser,
$ilCtrl;
2141 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
2145 $public_rooms = $this->
object->chat_room->getAllRooms();
2146 $private_rooms = $this->
object->chat_room->getRooms();
2148 $this->
object->__initChatRecording();
2152 $current_room =
false;
2156 foreach($public_rooms as $room) {
2157 if ($room[
'child'] == $this->object->getRefId()) {
2158 $current_room = $room;
2162 $rooms[count($rooms)-1][
'users'] = $this->
object->chat_room->getCountActiveUser($room[
'obj_id'],0);
2165 $private_rooms_by_parent_id = array();
2167 foreach($private_rooms as $room) {
2169 if (!is_array($private_rooms_by_parent_id[$room[
'chat_id']]))
2170 $private_rooms_by_parent_id[$room[
'chat_id']] = array();
2172 $private_rooms_by_parent_id[$room[
'chat_id']][] = $room;
2173 $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']);
2180 foreach($rooms as $k => $v) {
2181 $titel[$k] = strtolower($v[
'title']);
2182 $users[$k] = $v[
'users'];
2185 array_multisort($users, SORT_DESC, $titel, SORT_STRING, $rooms);
2187 foreach($private_rooms_by_parent_id as $k => $v) {
2190 foreach($v as $k1 => $v1) {
2192 $titel[$k1] = strtolower($v1[
'title']);
2193 $users[$k1] = $v1[
'users'];
2195 array_multisort($users, SORT_DESC, $titel, SORT_STRING, $private_rooms_by_parent_id[$k]);
2204 if ($this->object->chat_room->getRoomId() == 0) {
2208 $croom->act =
false;
2212 if (is_array($private_rooms_by_parent_id[$current_room[
'obj_id']])) {
2213 $croom->subrooms = array();
2214 $ref_id = $current_room[
"ref_id"];
2215 foreach($private_rooms_by_parent_id[$current_room[
'obj_id']] as $priv_room) {
2217 if (isset($_REQUEST[
"room_id"]) && $_REQUEST[
"room_id"] == $priv_room[
"room_id"]) {
2223 $croom->subrooms[] = $tmp;
2227 $out_rooms = array();
2228 foreach($rooms as $room) {
2234 $new_room->subrooms = array();
2235 if (is_array($private_rooms_by_parent_id[$room[
'obj_id']])) {
2236 foreach($private_rooms_by_parent_id[$room[
'obj_id']] as $priv_room) {
2240 $out_rooms[] = $new_room;
2244 $result->currentRoom = $croom;
2251 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2259 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2267 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2274 global
$ilCtrl, $rbacsystem, $ilObjDataCache,
$lng, $ilUser;
2275 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
2277 !$rbacsystem->checkAccess(
"read", $_REQUEST[
"ref_id"])
2281 $res =
new stdClass();
2283 $baseClass =
'ilchatpresentationgui';
2286 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2293 $res =
new stdClass();
2299 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2309 if (!$rbacsystem->checkAccess(
"read", $this->ref_id)) {
2310 $result->errormsg = $this->lng->txt(
"msg_no_perm_read");
2313 $ilCtrl->setParameter($this,
"room_id", $_REQUEST[
"room_id"]);
2314 if (
$_GET[
"p_id"]) {
2315 $ilCtrl->setParameter($this,
"p_id",
$_GET[
"p_id"]);
2317 else if (
$_GET[
"a_id"]) {
2318 $ilCtrl->setParameter($this,
"pa_id",
$_GET[
"a_id"]);
2319 $ilCtrl->setParameter($this,
"a_id",
$_GET[
"a_id"]);
2321 $result->serverTarget = $this->
object->server_comm->getServerFrameSource();
2325 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2334 $rbacsystem->checkAccess(
"moderate", $this->object->getRefId()) &&
2335 $this->object->chat_room->checkWriteAccess()
2338 if ($rid = (
int)$_REQUEST[
'room_id'])
2340 $this->
object->chat_room->setRoomId($rid);
2343 $this->
object->server_comm->setType(
'delete');
2345 $this->
object->server_comm->setMessage($message);
2346 $this->
object->server_comm->send();
2348 $this->
object->chat_room->deleteAllMessages();
2357 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2366 if(!$rbacsystem->checkAccess(
'moderate',$this->object->getRefId())) {
2368 $result->errormsg = $this->lng->txt(
"msg_no_perm_write");
2371 if($_REQUEST[
"kick_id"])
2373 $tmp_user =
new ilObjUser($_REQUEST[
'kick_id']);
2375 $this->
object->server_comm->setKickedUser($tmp_user->getLogin());
2376 $this->
object->server_comm->setType(
"kick");
2377 $this->
object->server_comm->send();
2379 $this->
object->chat_room->setKicked((
int)$_REQUEST[
'kick_id']);
2381 $result->infomsg = $this->lng->txt(
"chat_user_dropped");
2388 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2399 if(!$rbacsystem->checkAccess(
'moderate',$this->object->getRefId()))
2401 $result->errormsg = $this->lng->txt(
"msg_no_perm_write");
2404 if($_REQUEST[
"kick_id"])
2406 $this->
object->chat_room->setUnkicked((
int)$_REQUEST[
'kick_id']);
2408 $result->infomsg = $this->lng->txt(
"chat_user_unkicked");
2414 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2425 if (!$rbacsystem->checkAccess(
"read", $this->ref_id)) {
2426 $result->errormsg = $this->lng->txt(
"msg_no_perm_read");
2431 $room =&
new ilChatRoom($this->object->getId());
2433 $room->setOwnerId(
$_SESSION[
"AccountId"]);
2435 if(!$room->validate())
2437 $result->infomsg = $room->getErrorMessage();
2442 $result->room_id = $room->add();
2443 $result->infomsg = $this->lng->txt(
"chat_room_added");
2450 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2459 $this->
object->chat_room->invite((
int)
$_GET[
"i_id"]);
2460 $this->
object->sendMessage((
int) $_GET[
"i_id"]);
2461 if((
int)$this->object->chat_room->getRoomId()) {
2462 $result->infomsg = sprintf($this->lng->txt(
"chat_user_invited_private"), $this->
object->chat_room->getTitle());
2465 $result->infomsg = sprintf($this->lng->txt(
"chat_user_invited_public"), $this->
object->getTitle());
2471 $result->errormsg =
"user id not found";
2474 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2484 $this->
object->chat_room->drop((
int)
$_GET[
"i_id"]);
2486 $tmp_user =&
new ilObjUser($_GET[
"i_id"]);
2487 $this->
object->server_comm->setKickedUser($tmp_user->getLogin());
2488 $this->
object->server_comm->setType(
"kick");
2489 $this->
object->server_comm->send();
2491 $result->infomsg = $this->lng->txt(
"chat_user_dropped_private");
2495 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2506 if (!$rbacsystem->checkAccess(
"read", $this->ref_id)) {
2507 $result->errormsg = $this->lng->txt(
"msg_no_perm_read");
2510 if(!
$_GET[
"room_id_delete"]) {
2511 $result->errormsg = $this->lng->txt(
"chat_select_one_room");
2514 $this->
object->chat_room->setOwnerId(
$_SESSION[
"AccountId"]);
2515 $rooms = array(
$_GET[
"room_id_delete"]);
2517 if (!$rbacsystem->checkAccess(
"write", $this->ref_id)) {
2518 $delResult = $this->
object->chat_room->deleteRooms($rooms, $this->object->chat_room->getOwnerId());
2521 $delResult = $this->
object->chat_room->deleteRooms($rooms);
2526 $result->errormsg = $this->
object->chat_room->getErrorMessage();
2529 $result->infomsg = $this->lng->txt(
"chat_rooms_deleted");
2531 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2539 $this->
object->chat_room->setUserId(
$_SESSION[
"AccountId"]);
2540 $this->
object->chat_room->updateLastVisit();
2542 if(!$_REQUEST[
"message"])
2544 $result->errormsg = $this->lng->txt(
"chat_insert_message");
2547 if($_REQUEST[
"message"] and $this->object->chat_room->checkWriteAccess())
2554 $this->
object->server_comm->setMessage($message);
2555 if((
int)
$_GET[
"p_id"])
2557 $this->
object->server_comm->setType(
'private');
2559 else if((
int) $_GET[
"a_id"])
2561 $this->
object->server_comm->setType(
'address');
2564 if(!$this->object->server_comm->send($id))
2566 $result->errormsg = $this->lng->txt(
"chat_no_connection");
2572 $_SESSION[
"il_notify_last_msg_checksum"] = $id;
2576 $result->errormsg = $this->lng->txt(
'chat_kicked_from_room');
2578 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2587 global $rbacsystem,$ilUser;
2590 if (!$rbacsystem->checkAccess(
"moderate", $this->object->getRefId()))
2592 $result->errormsg = $this->lng->txt(
"msg_no_perm_read");
2596 $this->
object->__initChatRecording();
2597 if(
$_GET[
"room_id"])
2599 $this->
object->chat_recording->setRoomId(
$_GET[
"room_id"]);
2602 if (!$this->object->chat_recording->isRecording())
2604 $this->
object->chat_recording->setModeratorId($ilUser->getId());
2605 $this->
object->chat_recording->startRecording($_REQUEST[
"title"]);
2607 $result->infomsg = $this->lng->txt(
"chat_recording_started");
2611 $result->errormsg = $this->lng->txt(
"chat_recording_already_running");
2614 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2622 global $rbacsystem,$ilUser;
2624 if (!$rbacsystem->checkAccess(
"moderate", $this->object->getRefId()))
2626 $result->errormsg = $this->lng->txt(
"msg_no_perm_read");
2630 $this->
object->__initChatRecording();
2631 if(
$_GET[
"room_id"]) {
2632 $this->
object->chat_recording->setRoomId(
$_GET[
"room_id"]);
2634 if ($this->object->chat_recording->isRecording()) {
2635 $this->
object->chat_recording->stopRecording($ilUser->getId());
2637 $result->infomsg = $this->lng->txt(
"chat_recording_stopped");
2640 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2647 global $ilObjDataCache,
$lng;
2649 include_once
'Services/PersonalDesktop/classes/class.ilBookmark.php';
2651 $targetclass =
'ilchatpresentationgui';
2652 $ref_id = $_REQUEST[
"ref_id"];
2653 $room_id = $_REQUEST[
"room_id"];
2655 $result->obj_id = $this->
object->getId();
2665 $bookmark->setTitle(vsprintf($lng->txt(
'chat_default_bookmark_title'), $ilObjDataCache->lookupTitle(
$obj_id)));
2666 $bookmark->setDescription(vsprintf($lng->txt(
'chat_default_bookmark_description'), $ilObjDataCache->lookupTitle(
$obj_id)));
2667 $bookmark->setParent(1);
2668 $bookmark->setTarget(
"ilias.php?baseClass=$targetclass&ref_id=$ref_id&room_id=0");
2669 $result->msg = vsprintf($lng->txt(
'chat_added_to_bookmarks'), $ilObjDataCache->lookupTitle(
$obj_id));
2675 $chat_title = $ilObjDataCache->lookupTitle(
$obj_id);
2677 $room->setRoomId($room_id);
2678 $bookmark->setTitle(vsprintf($lng->txt(
'chat_default_bookmark_title'), $room->getTitle() .
' - ' . $chat_title ));
2679 $bookmark->setDescription(vsprintf($lng->txt(
'chat_default_bookmark_description'), $room->getTitle()));
2680 $bookmark->setParent(1);
2681 $bookmark->setTarget(
"ilias.php?baseClass=$targetclass&ref_id=$ref_id&room_id=$room_id");
2682 $result->msg = vsprintf($lng->txt(
'chat_added_to_bookmarks'), $chat_title .
' - ' . $room->getTitle());
2685 $bookmark->create();
2689 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2696 global
$lng, $ilUser;
2698 include_once
'Services/Contact/classes/class.ilAddressbook.php';
2700 if ($addressbook->checkEntryByLogin($_REQUEST[
"ulogin"]))
2703 $result->msg = $lng->txt(
'chat_user_already_in_addressbook');
2707 $login = $_REQUEST[
"ulogin"];
2717 if ($oUser->hasPublicProfile())
2719 $firstname = $oUser->getFirstname();
2720 $lastname = $oUser->getLastname();
2722 $result->msg = vsprintf($lng->txt(
'chat_added_to_addressbook'),
$login);
2723 $email = ($oUser->getPref(
'public_email') ==
'y' ? $oUser->getEmail() :
'') ;
2724 $addressbook->addEntry(
$login, $firstname, $lastname, $email);
2727 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
2733 global $rbacsystem, $ilUser,
$ilCtrl;
2734 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
2736 $new_room =
new stdClass();
2737 $new_room->title = $room[
"title"];
2738 $new_room->users_online = $this->
object->chat_room->getCountActiveUser($room[
"obj_id"],0);
2739 $new_room->obj_id = $room[
"obj_id"];
2740 $new_room->room_id = 0;
2741 $new_room->ref_id = $room[
"child"];
2744 $new_room->pme =
true;
2746 $new_room->pmbo =
true;
2748 $ilCtrl->setParameter($this,
"ref_id", $room[
"child"]);
2749 $link = $ilCtrl->getLinkTarget($this,
"showFrames");
2750 $this->tpl->setVariable(
"ROOM_LINK", $link);
2751 $ilCtrl->setParameter($this,
"ref_id",
$_GET[
"ref_id"]);
2753 $link =
"il_chat_async_handler.enterRoom('".$room[
'child'].
"',false);";
2755 $this->
object->chat_recording->setObjId($room[
"obj_id"]);
2757 if ($room[
"child"] == $this->object->getRefId() &&
2758 $this->
object->chat_room->getRoomId() == 0 &&
2759 $rbacsystem->checkAccess(
"moderate", $this->object->getRefId()))
2761 $link =
"il_chat_async_handler.emptyRoom();";
2763 $new_room->pmem =
true;
2768 $new_room->pmem =
false;
2771 $this->
object->chat_recording->setObjId($room[
"obj_id"]);
2772 $this->
object->chat_recording->setRoomId(0);
2774 if ($this->object->chat_recording->isRecording()) {
2775 $new_room->recording =
true;
2778 $new_room->recording =
false;
2786 global $rbacsystem, $ilUser,
$ilCtrl;
2787 include_once
'Modules/Chat/classes/class.ilChatBlockedUsers.php';
2788 $new_room =
new stdClass();
2790 $new_room->title = $room[
"title"];
2791 $new_room->users_online = $this->
object->chat_room->getCountActiveUser($room[
"chat_id"],$room[
"room_id"]);
2793 $new_room->obj_id = $room[
"chat_id"];
2794 $new_room->room_id = $room[
"room_id"];
2798 $new_room->pme =
true;
2800 $new_room->pmbo =
true;
2802 $ilCtrl->setParameter($this,
"ref_id",
$ref_id);
2803 $ilCtrl->setParameter($this,
"room_id", $room[
"room_id"]);
2804 $link = $ilCtrl->getLinkTarget($this,
"showFrames");
2806 $link =
"il_chat_async_handler.enterRoom('$ref_id','".$room[
"room_id"].
"');";
2808 if ($room[
"owner"] !=
$_SESSION[
"AccountId"] && !$rbacsystem->checkAccess(
'moderate', $this->object->getRefId())) {
2810 $new_room->chat_initiated = $user_obj->getLogin();
2813 $new_room->pmde =
false;
2819 $ilCtrl->setParameter($this,
"room_id", $this->object->chat_room->getRoomId());
2820 $ilCtrl->setParameter($this,
"room_id_delete", $room[
"room_id"]);
2821 $link = $ilCtrl->getLinkTarget($this,
"deleteRoom");
2822 $ilCtrl->clearParameters($this);
2824 $new_room->pmde =
true;
2826 $link =
"il_chat_async_handler.deletePrivateRoom('".$room[
'room_id'].
"');";
2829 $this->
object->chat_recording->setObjId($room[
"chat_id"]);
2830 $this->
object->chat_recording->setRoomId($room[
"room_id"]);
2832 if ($this->object->chat_recording->isRecording()) {
2833 $new_room->recording =
true;
2836 $new_room->recording =
false;
2839 $new_room->own_room_id = $room[
"room_id"];
2841 $new_room->mod = $rbacsystem->checkAccess(
"moderate", $this->object->getRefId());
2844 $room[
"room_id"] == $this->object->chat_room->getRoomId() &&
2845 $rbacsystem->checkAccess(
"moderate", $this->object->getRefId())
2848 $link =
"il_chat_async_handler.emptyRoom();";
2849 $ilCtrl->clearParameters($this);
2851 $new_room->pmem =
true;
2856 $new_room->pmem =
false;