5require_once 
"./Services/Container/classes/class.ilContainerGUI.php";
 
   31        function ilObjCategoryGUI($a_data, $a_id, $a_call_by_reference = 
true, $a_prepare_output = 
true)
 
   38                $GLOBALS[
'lng']->loadLanguageModule(
'cat');
 
   41                $this->
ilContainerGUI($a_data,(
int) $a_id,$a_call_by_reference,
false);
 
   43                if (is_object($this->
object))
 
   45                        include_once(
"./Services/Container/classes/class.ilContainer.php");
 
   46                        include_once(
"./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
 
   48                                        $this->object->getId(),
 
   56                global $rbacsystem, $ilNavigationHistory, $ilAccess, 
$ilCtrl,$ilTabs;
 
   58                $next_class = $this->ctrl->getNextClass($this);
 
   59                $cmd = $this->ctrl->getCmd();
 
   67                                include_once(
'./Services/User/classes/class.ilObjUserGUI.php');
 
   69                                $this->tabs_gui->setTabActive(
'administrate_users');
 
   73                                        $this->gui_obj->setCreationMode($this->creation_mode);
 
   74                                        $ret =& $this->ctrl->forwardCommand($this->gui_obj);
 
   79                                        $this->gui_obj->setCreationMode($this->creation_mode);
 
   80                                        $ret =& $this->ctrl->forwardCommand($this->gui_obj);
 
   83                                $ilTabs->clearTargets();
 
   84                                $ilTabs->setBackTarget($this->lng->txt(
'backto_lua'), $this->ctrl->getLinkTarget($this,
'listUsers'));
 
   86                                $ilHelp->setScreenIdComponent(
"cat");
 
   87                                $ilHelp->setScreenId(
"administrate_user");
 
   88                                $ilHelp->setSubScreenId(
$ilCtrl->getCmd());
 
   91                        case "ilobjuserfoldergui":
 
   92                                include_once(
'./Services/User/classes/class.ilObjUserFolderGUI.php');
 
   95                                $this->gui_obj->setUserOwnerId((
int) 
$_GET[
'ref_id']);
 
   96                                $this->gui_obj->setCreationMode($this->creation_mode);
 
   97                                $ret =& $this->ctrl->forwardCommand($this->gui_obj);
 
   99                                $ilTabs->clearTargets();
 
  100                                $ilTabs->setBackTarget($this->lng->txt(
'backto_lua'), $this->ctrl->getLinkTarget($this,
'listUsers'));
 
  102                                $ilHelp->setScreenIdComponent(
"cat");
 
  103                                $ilHelp->setScreenId(
"administrate_user");
 
  104                                $ilHelp->setSubScreenId(
$ilCtrl->getCmd());
 
  110                                include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
 
  111                                $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
 
  116                        case 'ilpermissiongui':
 
  118                                $this->tabs_gui->setTabActive(
'perm_settings');
 
  119                                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
  121                                $ret =& $this->ctrl->forwardCommand($perm_gui);
 
  124                        case 'ilinfoscreengui':
 
  125                                if ($this->info_screen_enabled)
 
  132                        case 'ilcontainerlinklistgui':
 
  133                                include_once(
"Services/Container/classes/class.ilContainerLinkListGUI.php");
 
  135                                $ret =& $this->ctrl->forwardCommand($link_list_gui);
 
  139                        case "ilcontainerpagegui":
 
  144                                        $this->tpl->setContent(
$ret);
 
  148                        case 'ilobjectcopygui':
 
  151                                include_once 
'./Services/Object/classes/class.ilObjectCopyGUI.php';
 
  154                                $this->ctrl->forwardCommand($cp);
 
  157                        case "ilobjstylesheetgui":
 
  161                        case 'ilusertablegui':
 
  162                                include_once 
'./Services/User/classes/class.ilUserTableGUI.php';
 
  164                                $u_table->initFilter();
 
  165                                $this->ctrl->setReturn($this,
'listUsers');
 
  166                                $this->ctrl->forwardCommand($u_table);
 
  169                        case "ilcommonactiondispatchergui":
 
  171                                include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
 
  173                                $this->ctrl->forwardCommand($gui);
 
  176                        case 'ildidactictemplategui':
 
  177                                $this->ctrl->setReturn($this,
'edit');
 
  178                                include_once 
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
 
  180                                $this->ctrl->forwardCommand($did);
 
  185                                $this->tabs_gui->setTabActive(
'export');
 
  186                                include_once 
'./Services/Export/classes/class.ilExportGUI.php';
 
  188                                $exp->addFormat(
'xml');
 
  189                                $this->ctrl->forwardCommand($exp);
 
  192                        case 'ilobjecttranslationgui':
 
  197                                include_once(
"./Services/Object/classes/class.ilObjectTranslationGUI.php");
 
  199                                $this->ctrl->forwardCommand($transgui);
 
  202                        case 'ilobjtaxonomygui':
 
  206                                include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomyGUI.php");
 
  208                                $tax->setAssignedObject($this->object->getId());
 
  209                                $tax->setMultiple(
true);
 
  210                                $tax->setListInfo($this->lng->txt(
"cntr_tax_list_info"));
 
  211                                $this->ctrl->forwardCommand($tax);                              
 
  214                        case 'ilobjectmetadatagui';
 
  217                                $this->tabs_gui->activateTab(
'meta_data');
 
  218                                include_once 
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
 
  220                                $this->ctrl->forwardCommand($md_gui);
 
  224                                if (
$cmd == 
"infoScreen")
 
  235                                        $ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))
 
  237                                        include_once(
"./Services/Link/classes/class.ilLink.php");
 
  238                                        $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
 
  243                                include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
 
  244                                if (is_object($this->
object))
 
  246                                        $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
 
  270                global $rbacsystem, 
$lng, $ilHelp, $ilAccess;
 
  272                if ($this->ctrl->getCmd() == 
"editPageContent")
 
  276                #$this->ctrl->setParameter($this,"ref_id",$this->ref_id);
 
  278                $ilHelp->setScreenIdComponent(
"cat");
 
  280                if ($rbacsystem->checkAccess(
'read',$this->ref_id))
 
  282                        $force_active = (
$_GET[
"cmd"] == 
"" || 
$_GET[
"cmd"] == 
"render")
 
  285                        $tabs_gui->addTab(
"view_content", 
$lng->txt(
"content"),
 
  286                                $this->ctrl->getLinkTarget($this, 
""));
 
  289                        if ($this->info_screen_enabled)
 
  291                                $force_active = ($this->ctrl->getNextClass() == 
"ilinfoscreengui" 
  292                                        || strtolower(
$_GET[
"cmdClass"]) == 
"ilnotegui")
 
  295                                $tabs_gui->addTarget(
"info_short",
 
  296                                         $this->ctrl->getLinkTargetByClass(
 
  297                                         array(
"ilobjcategorygui", 
"ilinfoscreengui"), 
"showSummary"),
 
  298                                         array(
"showSummary",
"", 
"infoScreen"),
 
  299                                         "", 
"", $force_active);
 
  304                if ($rbacsystem->checkAccess(
'write',$this->ref_id))
 
  306                        $force_active = (
$_GET[
"cmd"] == 
"edit")
 
  309                        $tabs_gui->addTarget(
"settings",
 
  310                                $this->ctrl->getLinkTarget($this, 
"edit"), 
"edit", get_class($this)
 
  311                                , 
"", $force_active);
 
  314                        include_once 
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
 
  316                        $mdtab = $mdgui->getTab();
 
  319                                $tabs_gui->addTab(
"meta_data",
 
  320                                        $this->lng->txt(
"meta_data"),
 
  324                        include_once 
"Services/Object/classes/class.ilObjectServiceSettingsGUI.php";
 
  326                                                $this->object->getId(),
 
  331                                $tabs_gui->addTarget(
"obj_tool_setting_taxonomies",
 
  332                                        $this->ctrl->getLinkTarget($this, 
"editTaxonomySettings"), 
"editTaxonomySettings", get_class($this));
 
  336                include_once 
'./Services/User/classes/class.ilUserAccountSettings.php';
 
  339                        $rbacsystem->checkAccess(
'cat_administrate_users',$this->ref_id))
 
  341                        $tabs_gui->addTarget(
"administrate_users",
 
  342                                $this->ctrl->getLinkTarget($this, 
"listUsers"), 
"listUsers", get_class($this));
 
  345                if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
 
  347                        $tabs_gui->addTarget(
 
  349                                $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
 
  356                parent::getTabs($tabs_gui);
 
  367                $ilTabs->activateTab(
"view_content");
 
  368                $ret =  parent::renderObject();
 
  375                $forms = parent::initCreationForms($a_new_type);
 
  385                $a_new_object->addTranslation($a_new_object->
getTitle(),
 
  389                include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
 
  395                $parent_ref_id = 
$tree->getParentId($a_new_object->
getRefId());
 
  397                include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
 
  409                $this->ctrl->setParameter($this, 
"ref_id", $a_new_object->
getRefId());
 
  420                $this->ctrl->setCmd(
"showSummary");
 
  421                $this->ctrl->setCmdClass(
"ilinfoscreengui");
 
  432                if (!$ilAccess->checkAccess(
"visible", 
"", $this->ref_id))
 
  434                        $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
 
  437                if (!$this->info_screen_enabled)
 
  443                $this->tabs_gui->setTabActive(
'info_short');
 
  445                include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
 
  448                $info->enablePrivateNotes();
 
  450                if ($ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))
 
  456                $info->enableNewsEditing(
false);
 
  457                if ($ilAccess->checkAccess(
"write", 
"", 
$_GET[
"ref_id"]))
 
  460                        $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
 
  462                        if ($enable_internal_rss)
 
  464                                $info->setBlockProperty(
"news", 
"settings", 
true);
 
  465                                $info->setBlockProperty(
"news", 
"public_notifications_option", 
true);
 
  469                include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
 
  471                $record_gui->setInfoObject(
$info);
 
  472                $record_gui->parse();
 
  476                $info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
 
  479                if (
$ilCtrl->getNextClass() == 
"ilinfoscreengui")
 
  498                $this->tabs_gui->activateTab(
'settings');
 
  499                $this->tabs_gui->setSubTabActive(
'edit_cat_settings');
 
  502                $this->tpl->setContent($this->form->getHTML());
 
  518                $this->form->checkInput();              
 
  520                if($this->record_gui->importEditFormPostValues())
 
  522                        $this->record_gui->writeEditForm();
 
  525                        $this->ctrl->redirect($this, 
"editInfo");                       
 
  539                if(is_object($this->form))
 
  544                include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
 
  546                $this->form->setFormAction($this->ctrl->getFormAction($this));
 
  547                $this->form->setTitle($this->lng->txt(
'ext_cat_settings'));
 
  548                $this->form->addCommandButton(
'updateInfo',$this->lng->txt(
'save'));
 
  549                $this->form->addCommandButton(
'editInfo',$this->lng->txt(
'cancel'));
 
  551                include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
 
  553                $this->record_gui->setPropertyForm($this->form);
 
  554                $this->record_gui->parse();
 
  563                $this->tabs_gui->addSubTab(
"settings_misc",
 
  564                        $this->lng->txt(
"settings"),
 
  565                        $this->ctrl->getLinkTarget($this, 
"edit"));
 
  571                $this->tabs_gui->addSubTab(
"settings_trans",
 
  572                        $this->lng->txt(
"obj_multilinguality"),
 
  573                        $this->ctrl->getLinkTargetByClass(
"ilobjecttranslationgui", 
""));
 
  578                        $this->tabs_gui->addSubTab(
"icons",
 
  579                                $this->lng->txt(
"icon_settings"),
 
  580                                $this->ctrl->getLinkTarget($this,
'editIcons'));
 
  583                $this->tabs_gui->activateTab(
"settings");
 
  584                $this->tabs_gui->activateSubTab($active_tab);
 
  589                $this->lng->loadLanguageModule($this->object->getType());
 
  592                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  594                $form->setFormAction($this->ctrl->getFormAction($this));
 
  595                $form->setTitle($this->lng->txt($this->object->getType().
"_edit"));
 
  599                $trans = $this->
object->getTranslations();
 
  600                $def = $trans[
"Fobject"][0]; 
 
  603                $title->setRequired(
true);
 
  606                $title->setValue($def[
"title"]);
 
  607                $form->addItem($title);
 
  609                if(
sizeof($trans[
"Fobject"]) > 1)
 
  611                        include_once(
'Services/MetaData/classes/class.ilMDLanguageItem.php');
 
  614                        $title->setInfo($this->lng->txt(
"language").
": ".$languages[$def[
"lang"]].
 
  615                                ' <a href="'.$this->ctrl->getLinkTarget($this, 
"editTranslations").
 
  616                                '">» '.$this->lng->txt(
"cat_more_translations").
'</a>');
 
  624                $desc->setValue($def[
"desc"]);
 
  625                $form->addItem($desc);
 
  632                $pres->setTitle($this->lng->txt(
'obj_presentation'));
 
  633                $form->addItem($pres);
 
  649                include_once 
'Modules/Category/classes/class.ilECSCategorySettings.php';
 
  651                $ecs->addSettingsToForm($form, 
'cat');
 
  655                $sh->setTitle($this->lng->txt(
'obj_features'));
 
  658                include_once 
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
 
  660                                $this->object->getId(),
 
  670                $form->addCommandButton(
"update", $this->lng->txt(
"save"));
 
  690                        $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
 
  695                        if($form->checkInput())
 
  697                                $title = $form->getInput(
"title");
 
  698                                $desc = $form->getInput(
"desc");
 
  699                                $lang = $this->
object->getTranslations();
 
  701                                $this->
object->deleteTranslation(
$lang);
 
  702                                $this->
object->addTranslation($title, $desc, 
$lang, 
true);      
 
  703                                $this->
object->setTitle($title);
 
  704                                $this->
object->setDescription($desc);
 
  705                                $this->
object->update();
 
  732                                require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
 
  738                                include_once 
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
 
  740                                        $this->object->getId(),
 
  751                                include_once 
'Modules/Category/classes/class.ilECSCategorySettings.php';        
 
  753                                if($ecs->handleSettingsUpdate())
 
  761                        $form->setValuesByPost();
 
  762                        $this->tpl->setContent($form->getHTML());
 
  773        $this->ctrl->redirectByClass(
"ilobjecttranslationgui", 
"");
 
  776                $this->lng->loadLanguageModule($this->object->getType());
 
  779                include_once(
"./Services/Object/classes/class.ilObjectTranslationTableGUI.php");
 
  782                if ($a_get_post_values)
 
  785                        foreach(
$_POST[
"title"] as $k => $v)
 
  787                                $vals[] = array(
"title" => $v,
 
  788                                        "desc" => 
$_POST[
"desc"][$k],
 
  789                                        "lang" => 
$_POST[
"lang"][$k],
 
  790                                        "default" => (
$_POST[
"default"] == $k));
 
  792                        $table->setData($vals);
 
  796                        $data = $this->
object->getTranslations();
 
  797                        foreach(
$data[
"Fobject"] as $k => $v)
 
  799                                $data[
"Fobject"][$k][
"default"] = ($k == 
$data[
"default_language"]);
 
  803                                $data[
"Fobject"][++$k][
"title"] = 
"";
 
  805                        $table->setData(
$data[
"Fobject"]);
 
  807                $tpl->setContent($table->getHTML());
 
  817                        $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  821                if (!isset(
$_POST[
"default"]))
 
  828                if (array_key_exists(
"",
$_POST[
"lang"]))
 
  835                if (count(array_unique(
$_POST[
"lang"])) < count(
$_POST[
"lang"]))
 
  842                $this->
object->removeTranslations();
 
  843                foreach(
$_POST[
"title"] as $k => $v)
 
  846                        $is_default = (
$_POST[
"default"] == $k);
 
  851                                $this->
object->update();
 
  854                        $this->
object->addTranslation(
 
  862                $this->ctrl->redirect($this, 
"editTranslations");
 
  872                        $k = max(array_keys(
$_POST[
"title"]));
 
  888                foreach(
$_POST[
"title"] as $k => $v)
 
  893                                if($k != 
$_POST[
"default"])
 
  895                                        unset(
$_POST[
"title"][$k]);
 
  896                                        unset(
$_POST[
"desc"][$k]);
 
  897                                        unset(
$_POST[
"lang"][$k]);
 
  922                global 
$lng, $rbacreview;
 
  924                $a_tpl->addBlockfile(
"ADM_CONTENT", 
"adm_content", 
"tpl.cat_import_form.html",
 
  927                $a_tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
  929                $a_tpl->setVariable(
"TXT_IMPORT_CATEGORIES", 
$lng->txt(
"import_categories"));
 
  930                $a_tpl->setVariable(
"TXT_HIERARCHY_OPTION", 
$lng->txt(
"import_cat_localrol"));
 
  931                $a_tpl->setVariable(
"TXT_IMPORT_FILE", 
$lng->txt(
"import_file"));
 
  932                $a_tpl->setVariable(
"TXT_IMPORT_TABLE", 
$lng->txt(
"import_cat_table"));
 
  934                $a_tpl->setVariable(
"BTN_IMPORT", 
$lng->txt(
"import"));
 
  935                $a_tpl->setVariable(
"BTN_CANCEL", 
$lng->txt(
"cancel"));
 
  938                $parent_role_ids = $rbacreview->getParentRoleIds($a_ref_id,
true);
 
  941                ksort($parent_role_ids);
 
  943                foreach ($parent_role_ids as $key => $par)
 
  945                    if ($par[
"obj_id"] != SYSTEM_ROLE_ID)
 
  949                        $output[
"adopt"][$key][
"check_adopt"] = $check;
 
  950                        $output[
"adopt"][$key][
"role_id"] = $par[
"obj_id"];
 
  951                        $output[
"adopt"][$key][
"type"] = ($par[
"type"] == 
'role' ? 
'Role' : 
'Template');
 
  952                        $output[
"adopt"][$key][
"role_name"] = $par[
"title"];
 
  959                foreach ($output[
"adopt"] as $key => $value)
 
  961                    $a_tpl->setCurrentBlock(
"ADOPT_PERM_ROW");
 
  962                    $a_tpl->setVariable(
"CSS_ROW_ADOPT",$value[
"css_row_adopt"]);
 
  963                    $a_tpl->setVariable(
"CHECK_ADOPT",$value[
"check_adopt"]);
 
  964                    $a_tpl->setVariable(
"LABEL_ID",$value[
"role_id"]);
 
  965                    $a_tpl->setVariable(
"TYPE",$value[
"type"]);
 
  966                    $a_tpl->setVariable(
"ROLE_NAME",$value[
"role_name"]);
 
  967                    $a_tpl->parseCurrentBlock();
 
  979                $this->ctrl->redirect($this);
 
 1019                require_once(
"./Modules/Category/classes/class.ilCategoryImportParser.php");
 
 1024                if (!@is_dir($import_dir))
 
 1031                $file_name = $_FILES[
"importFile"][
"name"];
 
 1034                if (!strcmp($file_name,
"")) {
 
 1036                  $this->ctrl->redirect($this);
 
 1039                $parts = pathinfo($file_name);
 
 1040                $full_path = $import_dir.
"/".$file_name;
 
 1046                $subdir = basename($parts[
"basename"],
".".$parts[
"extension"]);
 
 1047                $xml_file = $import_dir.
"/".$subdir.
"/".$subdir.
".xml";
 
 1051                $importParser->startParsing();
 
 1054                $this->ctrl->redirect($this);
 
 1063                include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
 
 1065                $utab->resetOffset();
 
 1066                $utab->resetFilter();
 
 1080                include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
 
 1082                $utab->resetOffset();
 
 1083                $utab->writeFilterToSession();
 
 1090                global 
$ilUser,$rbacreview, $ilToolbar;
 
 1092                include_once 
'./Services/User/classes/class.ilLocalUser.php';
 
 1093                include_once 
'./Services/User/classes/class.ilObjUserGUI.php';
 
 1095                global $rbacsystem,$rbacreview;
 
 1097                if(!$rbacsystem->checkAccess(
"cat_administrate_users",$this->object->getRefId()))
 
 1099                        $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_admin_users"),$this->ilias->error_obj->MESSAGE);
 
 1101                $this->tabs_gui->setTabActive(
'administrate_users');
 
 1105                $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.cat_admin_users.html',
 
 1106                        "Modules/Category");
 
 1108                if(count($rbacreview->getGlobalAssignableRoles()) or in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles(
$ilUser->getId())))
 
 1110                        $ilToolbar->addButton(
 
 1111                                $this->lng->txt(
'add_user'),
 
 1112                                $this->ctrl->getLinkTargetByClass(
'ilobjusergui',
'create')
 
 1115                        $ilToolbar->addButton(
 
 1116                                $this->lng->txt(
'import_users'),
 
 1117                                $this->ctrl->getLinkTargetByClass(
'ilobjuserfoldergui',
'importUserForm')
 
 1127                        $this->tpl->setCurrentBlock(
"confirm_delete");
 
 1128                        $this->tpl->setVariable(
"CONFIRM_FORMACTION",$this->ctrl->getFormAction($this));
 
 1129                        $this->tpl->setVariable(
"TXT_CANCEL",$this->lng->txt(
'cancel'));
 
 1130                        $this->tpl->setVariable(
"CONFIRM_CMD",
'performDeleteUsers');
 
 1131                        $this->tpl->setVariable(
"TXT_CONFIRM",$this->lng->txt(
'delete'));
 
 1132                        $this->tpl->parseCurrentBlock();
 
 1135                $this->lng->loadLanguageModule(
'user');
 
 1137                include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
 
 1139                $this->tpl->setVariable(
'USERS_TABLE',$utab->getHTML());
 
 1149                include_once 
'./Services/User/classes/class.ilUserAutoComplete.php';
 
 1151                $auto->setSearchFields(array(
'login',
'firstname',
'lastname',
'email'));
 
 1152                $auto->enableFieldSearchableCheck(
true);
 
 1153                $auto->isMoreLinkAvailable(
true);
 
 1167                include_once 
'./Services/User/classes/class.ilLocalUser.php';
 
 1170                foreach(
$_POST[
'user_ids'] as $user_id)
 
 1174                                die(
'user id not valid');
 
 1199                include_once 
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
 
 1201                $confirm->setFormAction($this->ctrl->getFormAction($this));
 
 1202                $confirm->setHeaderText($this->lng->txt(
'sure_delete_selected_users'));
 
 1203                $confirm->setConfirm($this->lng->txt(
'delete'), 
'performDeleteUsers');
 
 1204                $confirm->setCancel($this->lng->txt(
'cancel'), 
'listUsers');
 
 1206                foreach(
$_POST[
'id'] as $user)
 
 1213                                $name[
'lastname'].
', '.$name[
'firstname'].
' ['.$name[
'login'].
']' 
 1216                $this->tpl->setContent($confirm->getHTML());
 
 1221                global $rbacreview,$ilTabs;
 
 1225                include_once 
'./Services/User/classes/class.ilLocalUser.php';
 
 1227                if(!isset(
$_GET[
'obj_id']))
 
 1235                $ilTabs->clearTargets();
 
 1236                $ilTabs->setBackTarget($this->lng->txt(
'backto_lua'), $this->ctrl->getLinkTarget($this,
'listUsers'));
 
 1238                $ilHelp->setScreenIdComponent(
"cat");
 
 1239                $ilHelp->setScreenId(
"administrate_user");
 
 1240                $ilHelp->setSubScreenId(
"assign_roles");
 
 1247                        #ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to')); 
 1248                        #$this->listUsersObject(); 
 1253                $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.cat_role_assignment.html',
 
 1254                        "Modules/Category");
 
 1256                $ass_roles = $rbacreview->assignedRoles(
$_GET[
'obj_id']);
 
 1259                foreach($roles as $role)
 
 1268                        $f_result[$counter][] = $role_obj->getTitle() ? $role_obj->getTitle() : 
"";
 
 1269                        $f_result[$counter][] = $role_obj->getDescription() ? $role_obj->getDescription() : 
"";
 
 1270                        $f_result[$counter][] = $role[
'role_type'] == 
'global' ? 
 
 1271                                $this->lng->txt(
'global') :
 
 1272                                $this->lng->txt(
'local');
 
 1282                global $rbacreview,$rbacadmin;
 
 1285                include_once 
'./Services/User/classes/class.ilLocalUser.php';
 
 1305                $new_role_ids = 
$_POST[
'role_ids'] ? 
$_POST[
'role_ids'] : array();
 
 1306                $assigned_roles = $rbacreview->assignedRoles((
int) 
$_REQUEST[
'obj_id']);
 
 1307                foreach($roles as $role)
 
 1309                        if(in_array($role[
'obj_id'],$new_role_ids) and !in_array($role[
'obj_id'],$assigned_roles))
 
 1311                                $rbacadmin->assignUser($role[
'obj_id'],(
int) 
$_REQUEST[
'obj_id']);
 
 1313                        if(in_array($role[
'obj_id'],$assigned_roles) and !in_array($role[
'obj_id'],$new_role_ids))
 
 1315                                $rbacadmin->deassignUser($role[
'obj_id'],(
int) 
$_REQUEST[
'obj_id']);
 
 1332                if(in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles(
$ilUser->getId())))
 
 1334                        $global_roles = $rbacreview->getGlobalRolesArray();
 
 1336                elseif($tmp_obj->getTimeLimitOwner() == $this->object->getRefId())
 
 1338                        $global_roles = $rbacreview->getGlobalAssignableRoles();
 
 1342                        $global_roles = array();
 
 1344                return $roles = array_merge($global_roles,
 
 1345                                                                        $rbacreview->getAssignableChildRoles($this->object->getRefId()));
 
 1356                if($tmp_obj->getTimeLimitOwner() != $this->object->getRefId() and
 
 1357                   !in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles(
$ilUser->getId())))
 
 1363                $new_assigned = $new_assigned ? $new_assigned : array();
 
 1364                $assigned = $rbacreview->assignedRoles((
int) 
$_GET[
'obj_id']);
 
 1367                if(!in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles(
$ilUser->getId())))
 
 1369                        $ga = $rbacreview->getGlobalAssignableRoles();
 
 1373                        $ga = $rbacreview->getGlobalRolesArray();
 
 1375                $global_assignable = array();
 
 1376                foreach($ga as $role)
 
 1378                        $global_assignable[] = $role[
'obj_id'];
 
 1381                $new_visible_assigned_roles = array_intersect($new_assigned,$global_assignable);
 
 1382                $all_assigned_roles = array_intersect($assigned,$rbacreview->getGlobalRoles());
 
 1383                $main_assigned_roles = array_diff($all_assigned_roles,$global_assignable);
 
 1385                if(!count($new_visible_assigned_roles) and !count($main_assigned_roles))
 
 1401                $tpl->setCurrentBlock(
"tbl_form_header");
 
 1403                $this->ctrl->setParameter($this,
'obj_id',
$_GET[
'obj_id']);
 
 1404                $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
 
 1405                $tpl->parseCurrentBlock();
 
 1408                $tpl->setVariable(
"COLUMN_COUNTS",4);
 
 1412                $tpl->setVariable(
"BTN_NAME",
"assignSave");
 
 1413                $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"change_assignment"));
 
 1414                $tpl->parseCurrentBlock();
 
 1416                $tpl->setCurrentBlock(
"tbl_action_row");
 
 1417                $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
 
 1418                $tpl->parseCurrentBlock();
 
 1421                $title = $this->lng->txt(
'role_assignment').
' ('.$tmp_obj->getFullname().
')';
 
 1423                $tbl->setTitle($title,
"icon_role.svg",$this->lng->txt(
"role_assignment"));
 
 1424                $tbl->setHeaderNames(array(
'',
 
 1425                                                                   $this->lng->txt(
"title"),
 
 1426                                                                   $this->lng->txt(
'description'),
 
 1427                                                                   $this->lng->txt(
"type")));
 
 1428                $tbl->setHeaderVars(array(
"",
 
 1432                                                        array(
"ref_id" => $this->object->getRefId(),
 
 1433                                                                  "cmd" => 
"assignRoles",
 
 1434                                                                  "obj_id" => 
$_GET[
'obj_id'],
 
 1435                                                                  "cmdClass" => 
"ilobjcategorygui",
 
 1436                                                                  "cmdNode" => 
$_GET[
"cmdNode"],
 
 1437                                                                  "baseClass" => 
"ilRepositoryGUI")
 
 1439                $tbl->setColumnWidth(array(
"4%",
"35%",
"45%",
"16%"));
 
 1441                $this->set_unlimited = 
true;
 
 1445                $this->tpl->setVariable(
"ROLES_TABLE",
$tbl->tpl->get());
 
 1458                $tpl->setCurrentBlock(
"tbl_form_header");
 
 1460                $this->ctrl->setParameter($this,
'sort_by',
$_GET[
'sort_by']);
 
 1461                $this->ctrl->setParameter($this,
'sort_order',
$_GET[
'sort_order']);
 
 1462                $this->ctrl->setParameter($this,
'offset',
$_GET[
'offset']);
 
 1463                $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
 
 1464                $tpl->parseCurrentBlock();
 
 1470                        $tpl->setVariable(
"COLUMN_COUNTS",6);
 
 1473                        $tpl->setCurrentBlock(
"tbl_action_button");
 
 1474                        $tpl->setVariable(
"BTN_NAME",
"deleteUser");
 
 1475                        $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"delete"));
 
 1476                        $tpl->parseCurrentBlock();
 
 1478                        $tpl->setCurrentBlock(
"tbl_action_row");
 
 1479                        $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
 
 1480                        $tpl->parseCurrentBlock();
 
 1482                        $tbl->setFormName(
'cmd');
 
 1483                        $tbl->enable(
'select_all');
 
 1486                $tbl->setTitle($this->lng->txt(
"users"),
"icon_usr.svg",$this->lng->txt(
"users"));
 
 1487                $tbl->setHeaderNames(array(
'',
 
 1488                                                                   $this->lng->txt(
"username"),
 
 1489                                                                   $this->lng->txt(
"firstname"),
 
 1490                                                                   $this->lng->txt(
"lastname"),
 
 1491                                                                   $this->lng->txt(
'context'),
 
 1492                                                                   $this->lng->txt(
'role_assignment')));
 
 1493                $tbl->setHeaderVars(array(
"",
 
 1499                                                        array(
"ref_id" => $this->object->getRefId(),
 
 1500                                                                  "cmd" => 
"listUsers",
 
 1501                                                                  "cmdClass" => 
"ilobjcategorygui",
 
 1502                                                                  "cmdNode" => 
$_GET[
"cmdNode"]));
 
 1503                $tbl->setColumnWidth(array(
"1px",
"20%",
"20%",
"20%",
"20%",
"20%"));
 
 1504                $tbl->setSelectAllCheckbox(
'user_ids');
 
 1509                $this->tpl->setVariable(
"USERS_TABLE",
$tbl->tpl->get());
 
 1520                        case "listUsersObject":
 
 1522                                $tbl->setOrderDirection(
$_GET[
"sort_order"]);
 
 1524                                $tbl->setMaxCount($this->all_users_count);
 
 1525                                $tbl->setLimit(
$ilUser->getPref(
'hits_per_page'));
 
 1526                                $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
 
 1527                                $tbl->setData($result_set);
 
 1528                                $tbl->disable(
'auto_sort');
 
 1533                        case "assignRolesObject":
 
 1534                                $offset = 
$_GET[
"offset"];
 
 1536                                if (
$_GET[
"sort_by"] == 
"title" or empty(
$_GET[
"sort_by"]))
 
 1538                                        $_GET[
"sort_by"] = 
"login";
 
 1540                                $order = 
$_GET[
"sort_by"];
 
 1541                                $direction = 
$_GET[
"sort_order"];
 
 1544                        case "clipboardObject":
 
 1545                                $offset = 
$_GET[
"offset"];
 
 1546                                $order = 
$_GET[
"sort_by"];
 
 1547                                $direction = 
$_GET[
"sort_order"];
 
 1548                                $tbl->disable(
"footer");
 
 1552                                $offset = 
$_GET[
"offset"];
 
 1553                                $order = 
$_GET[
"sort_by"];
 
 1554                                $direction = 
$_GET[
"sort_order"];
 
 1558                $tbl->setOrderColumn($order);
 
 1559                $tbl->setOrderDirection($direction);
 
 1560                $tbl->setOffset($offset);
 
 1561                if($this->set_unlimited)
 
 1569                $tbl->setMaxCount(count($result_set));
 
 1573                        $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
 
 1577                        $tbl->disable(
'footer');
 
 1579                $tbl->setData($result_set);
 
 1584                include_once 
"./Services/Table/classes/class.ilTableGUI.php";
 
 1591                $action[0] = $this->lng->txt(
'all_users');
 
 1592                $action[$this->
object->getRefId()] = $this->lng->txt(
'users').
 
 1595                foreach($a_parent_ids as $parent)
 
 1597                        if($parent == $this->object->getRefId())
 
 1621                if ($ilAccess->checkAccess(
"read", 
"", $a_target))
 
 1625                else if ($ilAccess->checkAccess(
"read", 
"", ROOT_FOLDER_ID))
 
 1650                $this->tabs_gui->setTabActive(
'settings');
 
 1657                $tpl->setContent($a_form->getHTML());
 
 1664                include_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";
 
 1666                $form->setFormAction($this->ctrl->getFormAction($this));        
 
 1671                $form->addCommandButton(
'updateIcons', $this->lng->txt(
'save'));                                        
 
 1686                if($form->checkInput())
 
 1691                                if(
$_POST[
"cont_icon_delete"])
 
 1693                                        $this->
object->removeCustomIcon();
 
 1695                                $this->
object->saveIcons($_FILES[
"cont_icon"][
'tmp_name']);
 
 1697                        if ($_FILES[
"cont_icon"][
'tmp_name'] || 
$_POST[
"cont_icon_delete"])
 
 1701                        $this->ctrl->redirect($this,
"editIcons");
 
 1704                $form->setValuesByPost();
 
 1715                $this->tabs_gui->setTabActive(
"obj_tool_setting_taxonomies");                   
 
 1716                $this->tabs_gui->addSubTab(
"tax_settings", $this->lng->txt(
"cntr_taxonomy_sideblock_settings"), 
 
 1717                                $this->ctrl->getLinkTarget($this, 
"editTaxonomySettings"));
 
 1718                $this->tabs_gui->addSubTab(
"tax_list", $this->lng->txt(
"cntr_taxonomy_definitions"), 
 
 1719                                $this->ctrl->getLinkTargetByClass(
"ilobjtaxonomygui", 
""));             
 
 1720                $this->tabs_gui->activateSubTab($a_active);
 
 1727                include_once 
"Services/Object/classes/class.ilObjectServiceSettingsGUI.php";
 
 1728                include_once 
"Services/Taxonomy/classes/class.ilObjTaxonomy.php";
 
 1733                foreach(
$tree->getPathFull($this->object->getRefId()) as $node)
 
 1737                        if(
sizeof($node_taxes))
 
 1739                                foreach($node_taxes as $node_tax)
 
 1741                                        $res[$node_tax[
"tax_id"]] = array(
 
 1742                                                "title" => $node_tax[
"title"]
 
 1743                                                ,
"source" => $node[
"child"]
 
 1755                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
 1757                $form->setFormAction($this->ctrl->getFormAction($this), 
"editTaxonomySettings");
 
 1758                $form->setTitle($this->lng->txt(
"cntr_taxonomy_sideblock_settings"));
 
 1761                $form->addItem($block);
 
 1765                foreach($tax as $tax_id => $tax_item)
 
 1770                        if($tax_item[
"source"] != $this->object->getRefId())
 
 1773                                $loc->setTextOnly(
true);
 
 1774                                $loc->addRepositoryItems($tax_item[
"source"]);                          
 
 1775                                $option->setInfo($loc->getHTML());
 
 1778                        $block->addOption($option);
 
 1780                        if(in_array($tax_id, $current))
 
 1786                $block->setValue($value);
 
 1788                $form->addCommandButton(
"updateTaxonomySettings", $this->lng->txt(
"save"));
 
 1798                if(!
sizeof($taxonomies))
 
 1805                $this->tpl->setContent($form->getHTML());
 
 1816                        if(substr($keyword, 0, strlen($prefix)) == $prefix && (
bool)$value)
 
 1818                                $res[] = substr($keyword, strlen($prefix));
 
 1828                if(
sizeof($taxonomies))
 
 1831                        if($form->checkInput())
 
 1833                                $sblock = $form->getInput(
"sblock");
 
 1840                                if(is_array($sblock))
 
 1842                                        foreach($sblock as $tax_id)
 
 1845                                                        $prefix.$tax_id, 1);                                                                                    
 
 1852                $this->ctrl->redirect($this, 
"editTaxonomySettings");
 
_recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
_catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
This class represents an option in a checkbox group.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Confirmation screen class.
afterUpdate()
Post (successful) object update hook.
& forwardToPageObject()
forward command to page object
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
ilContainerGUI($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.
forwardToStyleSheet()
Forward to style object.
showCustomIconsEditing($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
show edit section of custom icons for container
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
Class ilContainerLinkListGUI.
static _deleteContainerSettings($a_id, $a_keyword=null, $a_keyword_like=false)
static _getContainerSettings($a_id)
_lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
_writeContainerSetting($a_id, $a_keyword, $a_value)
GUI class for didactic template settings inside repository objects.
Class ilECSCategorySettings.
Export User Interface Class.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
_getAllUserIds($a_filter=0)
editTaxonomySettingsObject()
__setTableGUIBasicData(&$tbl, &$result_set, $a_from="", $a_footer=true)
initExtendedSettings()
build property form for extended category settings
initEditForm()
Init object edit form.
updateObject()
updates object entry in object_data
__showRolesTable($a_result_set, $a_from="")
importCategoriesWithRolObject()
import categories with local rol
importCategoriesFormObject()
display form for category import
addUserAutoCompleteObject()
Show auto complete results.
ilObjCategoryGUI($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.
getEditFormValues()
Get values for edit form.
initTaxSubTabs($a_active="tax_list")
_getImportDir()
get user import directory name
deleteTranslationsObject()
Remove translation.
editInfoObject()
Edit extended category settings.
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
infoScreen()
show information screen
addTranslationObject()
Add a translation.
listUsersObject($show_delete=false)
editIconsObject($a_form=null)
Edit folder icons.
applyFilterObject()
Apply filter.
initCreationForms($a_new_type)
Init creation froms.
updateIconsObject()
update container icons
getTabs(&$tabs_gui)
Get tabs.
importCategoriesObject()
import categories
__checkGlobalRoles($new_assigned)
_importCategoriesForm($a_ref_id, &$a_tpl)
display form for category import (static, also called by RootFolderGUI)
__showUsersTable($a_result_set, $a_from="", $a_footer=true)
__buildFilterSelect($a_parent_ids)
updateTaxonomySettingsObject()
afterSave(ilObject $a_new_object)
Post (successful) object creation hook.
setEditTabs($active_tab="settings_misc")
renderObject()
Render category.
const CONTAINER_SETTING_TAXBLOCK
saveTranslationsObject()
Save title and translations.
performDeleteUsersObject()
resetFilterObject()
Reset filter (note: this function existed before data table filter has been introduced.
initTaxonomyForm(array $tax)
_importCategories($a_ref_id, $withrol_tmp)
import categories (static, also called by RootFolderGUI)
editTranslationsObject($a_get_post_values=false, $a_add=false)
Edit title and translations.
& executeCommand()
execute command note: this method is overwritten in all container objects
updateInfoObject()
Update info (extended meta data)
importCancelledObject()
import cancelled
getContentStylePath($a_style_id)
get content style path
static lookupObjectStyle($a_obj_id)
Lookup object style.
static writeStyleUsage($a_obj_id, $a_style_id)
Write style usage.
_lookupStandard($a_id)
Lookup standard flag.
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
Class ilObjUserFolderGUI.
static _lookupName($a_user_id)
lookup user name
GUI class for the workflow of copying objects.
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
prepareOutput()
prepare output
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
getCreationMode()
get creation mode
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
addHeaderAction()
Add header action menu.
redirectToRefId($a_ref_id, $a_cmd="")
redirects to (repository) view per ref id usually to a container and usually used at the end of a sav...
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
const INFO_TAB_VISIBILITY
GUI class for object translation handling.
TableGUI class for title/description translations.
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
const TITLE_LENGTH
max length of object title
static _lookupTitle($a_id)
lookup object title
static _lookupDescription($a_id)
lookup object description
getRefId()
get reference id @access public
getDescription()
get object description
getId()
get object id @access public
getTitle()
get object title @access public
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static getInstance()
Singelton get instance.
Auto completion class for user lists.
TableGUI class for user administration.
static getDataDir()
get data directory (outside webspace)
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static formCheckbox($checked, $varname, $value, $disabled=false)
??? @access public
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows)
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
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.
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static createDirectory($a_dir, $a_mod=0755)
create directory
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
redirection script todo: (a better solution should control the processing via a xml file)
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']