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';
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'));
117 if(is_object($this->
object))
119 $ilLocator->addItem($this->
object->getTitle(), $this->ctrl->getLinkTarget($this,
'view'),
'', $this->
getRefId());
129 return $this->
object->getRefId();
152 global $ilNavigationHistory,
$ilCtrl, $ilHelp, $ilAccess;
156 parent::cancelCreation();
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';
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')
187 $ilCtrl->setCmd(
'info-' . $ilCtrl->getCmd());
190 if($ilCtrl->getCmd() ==
'infoScreen')
192 $ilCtrl->setCmdClass(
'ilinfoscreengui');
193 $ilCtrl->setCmd(
'info');
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';
211 $ilCtrl->forwardCommand($perm_gui);
213 case 'ilobjectcopygui':
215 include_once
'Services/Object/classes/class.ilObjectCopyGUI.php';
217 $cp->setType(
'chtr');
218 $ilCtrl->forwardCommand($cp);
221 case "ilcommonactiondispatchergui":
222 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
224 $this->ctrl->forwardCommand($gui);
230 $res = explode(
'-', $ilCtrl->getCmd(), 2);
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();
266 $this->tpl->setVariable(
'ADM_CONTENT', $this->lng->txt(
'invalid_operation'));
284 public function insertObject()
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;
Class ilChatroomServerHandler.
getObjectDefinition()
Returns object definition by calling getDefaultDefinition method in ilChatroomObjectDefinition.
GUI class for the workflow of copying objects.
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.
prepareOutput($a_show_subobjects=true)
prepare output
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
Create styles array
The data for the language used.
_forwards()
Returns an empty array.
Class ilChatroomTabGUIFactory.
__construct($a_data=null, $a_id=null, $a_call_by_reference=true)
{}
Create new PHPExcel object
obj_idprivate
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.
executeCommand()
execute command
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.