4 require_once
'Services/Object/classes/class.ilObjectGUI.php';
5 require_once
'Modules/Chatroom/classes/class.ilObjChatroom.php';
6 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
7 require_once
'Modules/Chatroom/classes/class.ilObjChatroomAccess.php';
8 require_once
'Modules/Chatroom/classes/class.ilChatroomObjectGUI.php';
27 public function __construct($a_data = null, $a_id = null, $a_call_by_reference =
true)
29 if(in_array(
$_REQUEST[
'cmd'], array(
'getOSDNotifications',
'removeOSDNotifications')))
31 require_once
'Services/Notifications/classes/class.ilNotificationGUI.php';
33 $notifications->{
$_REQUEST[
'cmd'] .
'Object'}();
39 if(
$_GET[
'serverInquiry'])
41 require_once dirname(__FILE__) .
'/class.ilChatroomServerHandler.php';
48 parent::__construct($a_data, $a_id, $a_call_by_reference,
false);
49 $this->lng->loadLanguageModule(
'chatroom');
50 $this->lng->loadLanguageModule(
'chatroom_adm');
83 global $ilNavigationHistory,
$ilCtrl, $ilHelp, $ilAccess;
87 parent::cancelCreation();
94 $ilNavigationHistory->addItem($_GET[
'ref_id'],
'./goto.php?target=' . $this->type .
'_' . $_GET[
'ref_id'], $this->type);
97 $next_class = $ilCtrl->getNextClass();
99 require_once
'Modules/Chatroom/classes/class.ilChatroomTabFactory.php';
104 if(strtolower($_GET[
'baseClass']) ==
'iladministrationgui')
106 $tabFactory->getAdminTabsForCommand($ilCtrl->getCmd());
110 $ilHelp->setScreenIdComponent(
"chtr");
111 $tabFactory->getTabsForCommand($ilCtrl->getCmd());
116 if($next_class ==
'ilinfoscreengui' && $ilCtrl->getCmd() !=
'info')
118 $ilCtrl->setCmd(
'info-' . $ilCtrl->getCmd());
121 if($ilCtrl->getCmd() ==
'infoScreen')
123 $ilCtrl->setCmdClass(
'ilinfoscreengui');
124 $ilCtrl->setCmd(
'info');
129 case 'ilpermissiongui':
130 include_once
'Services/AccessControl/classes/class.ilPermissionGUI.php';
133 $ilCtrl->forwardCommand($perm_gui);
135 case 'ilobjectcopygui':
137 include_once
'Services/Object/classes/class.ilObjectCopyGUI.php';
139 $cp->setType(
'chtr');
140 $ilCtrl->forwardCommand($cp);
143 case "ilcommonactiondispatchergui":
144 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
146 $this->ctrl->forwardCommand($gui);
152 $res = explode(
'-', $ilCtrl->getCmd(), 2);
159 'reason' => $e->getMessage()
161 echo json_encode($error);
172 require_once
'Modules/Chatroom/classes/class.ilChatroomServerConnector.php';
173 require_once
'Modules/Chatroom/classes/class.ilChatroomServerSettings.php';
174 require_once
'Modules/Chatroom/classes/class.ilChatroomAdmin.php';
176 $settings = ilChatroomAdmin::getDefaultConfiguration()->getServerSettings();
188 $this->tpl->setVariable(
'ADM_CONTENT', $this->lng->txt(
'invalid_operation'));
206 public function insertObject()
215 $new_type = $this->type;
219 if(!$rbacsystem->checkAccess(
'create',
$_GET[
'ref_id'], $new_type))
221 $this->
ilias->raiseError(
222 $this->lng->txt(
'no_create_permission'),
223 $this->
ilias->error_obj->MESSAGE
227 $location = $objDefinition->getLocation($new_type);
230 $class_name =
'ilObj' . $objDefinition->getClassName($new_type);
231 include_once
$location .
'/class.' . $class_name .
'.php';
236 $newObj =
new $class_name();
237 $newObj->setType($new_type);
241 $newObj->createReference();
242 $newObj->putInTree(
$_GET[
'ref_id']);
243 $newObj->setPermissions(
$_GET[
'ref_id']);
245 $objId = $newObj->getId();
251 'object_id' => $objId,
252 'autogen_usernames' =>
'Autogen #',
253 'display_past_msgs' => 20,
254 'private_rooms_enabled' => 0
258 include_once
'Services/AccessControl/classes/class.ilRbacLog.php';
259 $rbac_log_roles = $rbacreview->getParentRoleIds($newObj->getRefId(),
false);
263 $this->
object = $newObj;
274 return $this->
object->getRefId();
281 public static function _goto($params)
290 $parts = explode(
'_', $params);
294 if($rbacsystem->checkAccess(
'read',
$ref_id))
300 include_once
'Services/Object/classes/class.ilObjectGUI.php';
303 else if($rbacsystem->checkAccess(
'read', ROOT_FOLDER_ID))
306 include_once
'Services/Object/classes/class.ilObjectGUI.php';
319 $forms = parent::initCreationForms($a_new_type);
321 unset($forms[self::CFORM_IMPORT]);
322 $forms[self::CFORM_NEW]->clearCommandButtons();
323 $forms[self::CFORM_NEW]->addCommandButton(
'create-save', $this->lng->txt($a_new_type .
'_add'));
324 $forms[self::CFORM_NEW]->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
335 if(is_object($this->
object))
337 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
'view'),
'', $this->
getRefId());
Class ilChatroomServerHandler.
getObjectDefinition()
Returns object definition by calling getDefaultDefinition method in ilChatroomObjectDefinition.
GUI class for the workflow of copying objects.
Class ilChatroomTabFactory.
initCreationForms($a_new_type)
settings()
Calls prepareOutput method.
static _lookupTitle($a_id)
lookup object title
static getDefaultDefinition($moduleName)
Returns an Instance of ilChatroomObjectDefinition, using given $moduleName as parameter.
static gatherFaPa($a_ref_id, array $a_role_ids, $a_add_action=false)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
& executeCommand()
execute command
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
Class ilChatroomServerConnector.
static _lookupObjId($a_id)
redirection script todo: (a better solution should control the processing via a xml file) ...
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
prepareOutput()
prepare output
_forwards()
Returns an empty array.
__construct($a_data=null, $a_id=null, $a_call_by_reference=true)
Constructor.
static add($a_action, $a_ref_id, array $a_diff, $a_source_ref_id=false)
getCreationMode()
get creation mode
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
addLocatorItems()
should be overwritten to add object specific items (repository items are preloaded) ...
fallback()
Calls $this->prepareOutput method and sets template variable.
Class ilObjChatroomGUI GUI class for chatroom objects.