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'))) {
27 require_once
'Services/Notifications/classes/class.ilNotificationGUI.php';
29 $notifications->{$_REQUEST[
'cmd'] .
'Object'}();
33 if ($a_data == null) {
34 if (
$_GET[
'serverInquiry']) {
35 require_once dirname(__FILE__) .
'/class.ilChatroomServerHandler.php';
42 parent::__construct($a_data, $a_id, $a_call_by_reference,
false);
43 $this->lng->loadLanguageModule(
'chatroom');
44 $this->lng->loadLanguageModule(
'chatroom_adm');
61 $_REQUEST[
'sub'] =
$_GET[
'sub'] = (int) $sub;
63 include_once
'Services/Object/classes/class.ilObjectGUI.php';
65 } elseif ($DIC->rbac()->system()->checkAccess(
'read', ROOT_FOLDER_ID)) {
67 include_once
'Services/Object/classes/class.ilObjectGUI.php';
89 $forms = parent::initCreationForms($a_new_type);
91 $forms[self::CFORM_NEW]->clearCommandButtons();
92 $forms[self::CFORM_NEW]->addCommandButton(
'create-save', $this->lng->txt($a_new_type .
'_add'));
93 $forms[self::CFORM_NEW]->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
101 if (is_object($this->
object)) {
102 $DIC[
'ilLocator']->addItem($this->
object->getTitle(), $this->ctrl->getLinkTarget($this,
'view'),
'', $this->
getRefId());
112 return $this->
object->getRefId();
132 parent::cancelCreation();
137 if (!$this->
getCreationMode() && $DIC->access()->checkAccess(
'read',
'', (
int)
$_GET[
'ref_id'])) {
138 $DIC[
'ilNavigationHistory']->addItem($_GET[
'ref_id'],
'./goto.php?target=' . $this->type .
'_' . $_GET[
'ref_id'], $this->type);
141 $next_class = $this->ctrl->getNextClass();
143 require_once
'Modules/Chatroom/classes/class.ilChatroomTabGUIFactory.php';
147 if (strtolower($_GET[
'baseClass']) ==
'iladministrationgui') {
148 $tabFactory->getAdminTabsForCommand($this->ctrl->getCmd());
150 $DIC[
'ilHelp']->setScreenIdComponent(
"chtr");
151 $tabFactory->getTabsForCommand($this->ctrl->getCmd());
156 if ($next_class ==
'ilinfoscreengui' && $this->ctrl->getCmd() !=
'info') {
157 $this->ctrl->setCmd(
'info-' . $this->ctrl->getCmd());
160 if ($this->ctrl->getCmd() ==
'infoScreen') {
161 $this->ctrl->setCmdClass(
'ilinfoscreengui');
162 $this->ctrl->setCmd(
'info');
165 switch ($next_class) {
166 case "ilpropertyformgui":
167 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
169 require_once
'Modules/Chatroom/classes/class.ilChatroomFormFactory.php';
173 $this->ctrl->forwardCommand(
$form);
175 case 'ilpermissiongui':
176 include_once
'Services/AccessControl/classes/class.ilPermissionGUI.php';
179 $this->ctrl->forwardCommand($perm_gui);
185 $GLOBALS[
'DIC']->tabs()->setTabActive(
'export');
187 require_once
'Services/Export/classes/class.ilExportGUI.php';
189 $exp->addFormat(
'xml');
190 $this->ctrl->forwardCommand($exp);
193 case 'ilobjectcopygui':
195 include_once
'Services/Object/classes/class.ilObjectCopyGUI.php';
197 $cp->setType(
'chtr');
198 $this->ctrl->forwardCommand($cp);
201 case "ilcommonactiondispatchergui":
202 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
204 $this->ctrl->forwardCommand($gui);
209 $res = explode(
'-', $this->ctrl->getCmd(), 2);
211 if (!$result && method_exists($this, $this->ctrl->getCmd() .
'Object')) {
213 $this->{$this->ctrl->getCmd() .
'Object'}();
218 'reason' => $e->getMessage()
232 require_once
'Modules/Chatroom/classes/class.ilChatroomServerConnector.php';
233 require_once
'Modules/Chatroom/classes/class.ilChatroomServerSettings.php';
234 require_once
'Modules/Chatroom/classes/class.ilChatroomAdmin.php';
248 $this->tpl->setVariable(
'ADM_CONTENT', $this->lng->txt(
'invalid_operation'));
266 public function insertObject()
274 if (!$DIC->rbac()->system()->checkAccess(
'create',
$_GET[
'ref_id'], $new_type)) {
275 $this->
ilias->raiseError(
276 $this->lng->txt(
'no_create_permission'),
277 $this->
ilias->error_obj->MESSAGE
281 $location = $DIC[
'objDefinition']->getLocation($new_type);
284 $class_name =
'ilObj' . $DIC[
'objDefinition']->getClassName($new_type);
285 include_once
$location .
'/class.' . $class_name .
'.php';
290 $newObj =
new $class_name();
291 $newObj->setType($new_type);
295 $newObj->createReference();
296 $newObj->putInTree(
$_GET[
'ref_id']);
297 $newObj->setPermissions(
$_GET[
'ref_id']);
299 $objId = $newObj->getId();
305 'object_id' => $objId,
306 'autogen_usernames' =>
'Autogen #',
307 'display_past_msgs' => 20,
308 'private_rooms_enabled' => 0
312 include_once
'Services/AccessControl/classes/class.ilRbacLog.php';
313 $rbac_log_roles = $DIC->rbac()->review()->getParentRoleIds($newObj->getRefId(),
false);
317 $this->
object = $newObj;
Class ilChatroomServerHandler.
getObjectDefinition()
Returns object definition by calling getDefaultDefinition method in ilChatroomObjectDefinition.
GUI class for the workflow of copying objects.
static getDefaultConfiguration()
Instantiates and returns ilChatroomAdmin object using instance_id and settings from settingsTable...
initCreationForms($a_new_type)
{}
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
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.
Export User Interface Class.
prepareOutput($a_show_subobjects=true)
prepare output
static checkUserPermissions($permissions, $ref_id, $send_info=true)
Checks user permissions by given array and ref_id.
foreach($_POST as $key=> $value) $res
if(isset($_POST['submit'])) $form
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.
static _goto($params)
Overwrites $_GET['ref_id'] with given $ref_id.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
fallback()
Calls $this->prepareOutput method and sets template variable.
Class ilObjChatroomGUI GUI class for chatroom objects.