4require_once
'Services/Object/classes/class.ilObjectGUI.php';
5require_once
'Modules/Chatroom/classes/class.ilObjChatroom.php';
6require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
7require_once
'Modules/Chatroom/classes/class.ilObjChatroomAccess.php';
8require_once
'Modules/Chatroom/classes/class.ilChatroomObjectGUI.php';
24 public function __construct($a_data =
null, $a_id =
null, $a_call_by_reference =
true)
26 if(in_array($_REQUEST[
'cmd'], array(
'getOSDNotifications',
'removeOSDNotifications')))
28 require_once
'Services/Notifications/classes/class.ilNotificationGUI.php';
30 $notifications->{$_REQUEST[
'cmd'] .
'Object'}();
36 if(
$_GET[
'serverInquiry'])
38 require_once dirname(__FILE__) .
'/class.ilChatroomServerHandler.php';
45 parent::__construct($a_data, $a_id, $a_call_by_reference,
false);
46 $this->lng->loadLanguageModule(
'chatroom');
47 $this->lng->loadLanguageModule(
'chatroom_adm');
54 public static function _goto(
$params)
67 if($rbacsystem->checkAccess(
'read',
$ref_id))
71 $_REQUEST[
'sub'] =
$_GET[
'sub'] = (int)$sub;
73 include_once
'Services/Object/classes/class.ilObjectGUI.php';
76 else if($rbacsystem->checkAccess(
'read', ROOT_FOLDER_ID))
79 include_once
'Services/Object/classes/class.ilObjectGUI.php';
101 $forms = parent::initCreationForms($a_new_type);
103 unset($forms[self::CFORM_IMPORT]);
104 $forms[self::CFORM_NEW]->clearCommandButtons();
105 $forms[self::CFORM_NEW]->addCommandButton(
'create-save', $this->lng->txt($a_new_type .
'_add'));
106 $forms[self::CFORM_NEW]->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
110 protected function addLocatorItems()
117 if(is_object($this->
object))
119 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
'view'),
'', $this->getRefId());
129 return $this->
object->getRefId();
144 public function executeCommand()
152 global $ilNavigationHistory,
$ilCtrl, $ilHelp, $ilAccess;
154 if(
'cancel' ==
$ilCtrl->getCmd() && $this->getCreationMode())
156 parent::cancelCreation();
161 if(!$this->getCreationMode() && $ilAccess->checkAccess(
'read',
'', (
int)
$_GET[
'ref_id']))
163 $ilNavigationHistory->addItem(
$_GET[
'ref_id'],
'./goto.php?target=' . $this->type .
'_' .
$_GET[
'ref_id'], $this->type);
166 $next_class =
$ilCtrl->getNextClass();
168 require_once
'Modules/Chatroom/classes/class.ilChatroomTabGUIFactory.php';
169 if(!$this->getCreationMode())
173 if(strtolower(
$_GET[
'baseClass']) ==
'iladministrationgui')
175 $tabFactory->getAdminTabsForCommand(
$ilCtrl->getCmd());
179 $ilHelp->setScreenIdComponent(
"chtr");
180 $tabFactory->getTabsForCommand(
$ilCtrl->getCmd());
185 if($next_class ==
'ilinfoscreengui' &&
$ilCtrl->getCmd() !=
'info')
190 if(
$ilCtrl->getCmd() ==
'infoScreen')
192 $ilCtrl->setCmdClass(
'ilinfoscreengui');
198 case "ilpropertyformgui":
199 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
201 require_once
'Modules/Chatroom/classes/class.ilChatroomFormFactory.php';
203 $form = $factory->getClientSettingsForm();
205 $ilCtrl->forwardCommand($form);
207 case 'ilpermissiongui':
208 include_once
'Services/AccessControl/classes/class.ilPermissionGUI.php';
209 $this->prepareOutput();
211 $ilCtrl->forwardCommand($perm_gui);
213 case 'ilobjectcopygui':
214 $this->prepareOutput();
215 include_once
'Services/Object/classes/class.ilObjectCopyGUI.php';
217 $cp->setType(
'chtr');
221 case "ilcommonactiondispatchergui":
222 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
224 $this->ctrl->forwardCommand($gui);
237 'reason' => $e->getMessage()
250 require_once
'Modules/Chatroom/classes/class.ilChatroomServerConnector.php';
251 require_once
'Modules/Chatroom/classes/class.ilChatroomServerSettings.php';
252 require_once
'Modules/Chatroom/classes/class.ilChatroomAdmin.php';
254 $settings = ilChatroomAdmin::getDefaultConfiguration()->getServerSettings();
265 $this->prepareOutput();
266 $this->tpl->setVariable(
'ADM_CONTENT', $this->lng->txt(
'invalid_operation'));
274 $this->prepareOutput();
284 public function insertObject()
291 global $rbacsystem, $objDefinition, $rbacreview;
293 $new_type = $this->type;
297 if(!$rbacsystem->checkAccess(
'create',
$_GET[
'ref_id'], $new_type))
299 $this->
ilias->raiseError(
300 $this->lng->txt(
'no_create_permission'),
301 $this->ilias->error_obj->MESSAGE
305 $location = $objDefinition->getLocation($new_type);
308 $class_name =
'ilObj' . $objDefinition->getClassName($new_type);
309 include_once
$location .
'/class.' . $class_name .
'.php';
314 $newObj =
new $class_name();
315 $newObj->setType($new_type);
319 $newObj->createReference();
320 $newObj->putInTree(
$_GET[
'ref_id']);
321 $newObj->setPermissions(
$_GET[
'ref_id']);
323 $objId = $newObj->getId();
329 'object_id' => $objId,
330 'autogen_usernames' =>
'Autogen #',
331 'display_past_msgs' => 20,
332 'private_rooms_enabled' => 0
336 include_once
'Services/AccessControl/classes/class.ilRbacLog.php';
337 $rbac_log_roles = $rbacreview->getParentRoleIds($newObj->getRefId(),
false);
341 $this->
object = $newObj;
sprintf('%.4f', $callTime)
An exception for terminatinating execution or to throw for unit testing.
static getDefaultDefinition($moduleName)
Returns an Instance of ilChatroomObjectDefinition, using given $moduleName as parameter.
Class ilChatroomServerConnector.
Class ilChatroomServerHandler.
Class ilChatroomTabGUIFactory.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Class ilObjChatroomGUI GUI class for chatroom objects.
_forwards()
Returns an empty array.
__construct($a_data=null, $a_id=null, $a_call_by_reference=true)
{}
initCreationForms($a_new_type)
{Init creation froms.this will create the default creation forms: new, import, clonearray}
fallback()
Calls $this->prepareOutput method and sets template variable.
getObjectDefinition()
Returns object definition by calling getDefaultDefinition method in ilChatroomObjectDefinition.
settings()
Calls prepareOutput method.
GUI class for the workflow of copying objects.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static add($a_action, $a_ref_id, array $a_diff, $a_source_ref_id=false)
static gatherFaPa($a_ref_id, array $a_role_ids, $a_add_action=false)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
redirection script todo: (a better solution should control the processing via a xml file)