/** * */ public function forcePublicRoom() { $ref_id = ilObjChatroom::_getPublicRefId(); if (!$ref_id) { $this->createPublicRoom(); return; } $instance = ilObjectFactory::getInstanceByRefId($ref_id, false); if (!$instance) { $this->createPublicRoom(); return; } $obj_id = ilObject::_lookupObjId($ref_id); if (!$obj_id) { $this->createPublicRoom(); return; } if (!ilObject::_hasUntrashedReference($obj_id)) { $this->createPublicRoom(); return; } require_once 'Modules/Chatroom/classes/class.ilChatroomInstaller.php'; ilChatroomInstaller::ensureCorrectPublicChatroomTreeLocation($ref_id); }
function __showChatInvitation($a_usr_id) { global $rbacsystem, $ilUser, $lng; include_once './Modules/Chatroom/classes/class.ilObjChatroom.php'; if ($a_usr_id == $ilUser->getId()) { return false; } //if($rbacsystem->checkAccess('read',ilObjChat::_getPublicChatRefId()) //and $rbacsystem->checkAccessOfUser($a_usr_id,'read',ilObjChat::_getPublicChatRefId())) if ($rbacsystem->checkAccess('read', ilObjChatroom::_getPublicRefId()) and $rbacsystem->checkAccessOfUser($a_usr_id, 'read', ilObjChatroom::_getPublicRefId())) { $this->tpl->setCurrentBlock("chat_link"); $this->tpl->setVariable("TXT_CHAT_INVITE", $lng->txt('chat_invite_public_room')); //$this->tpl->setVariable("CHAT_LINK",'./ilias.php?baseClass=ilChatPresentationGUI&ref_id='.ilObjChat::_getPublicChatRefId(). //'&usr_id='.$a_usr_id.'&cmd=invitePD'); $this->tpl->setVariable("CHAT_LINK", './ilias.php?baseClass=ilRepositoryGUI&ref_id=' . ilObjChatroom::_getPublicRefId() . '&usr_id=' . $a_usr_id . '&cmd=view-invitePD'); $this->tpl->setVariable('TXT_CHAT_INVITE_TOOLTIP', $lng->txt('chat_invite_public_room_tooltip')); $this->tpl->parseCurrentBlock(); return true; } return false; }
public function forcePublicRoom() { $ref_id = ilObjChatroom::_getPublicRefId(); if (!$ref_id) { $this->createPublicRoom(); return; } $instance = ilObjectFactory::getInstanceByRefId($ref_id, false); if (!$instance) { $this->createPublicRoom(); return; } $obj_id = ilObject::_lookupObjId($ref_id); if (!$obj_id) { $this->createPublicRoom(); return; } if (!ilObject::_hasUntrashedReference($obj_id)) { $this->createPublicRoom(); return; } }