3 require_once(
"./Services/Container/classes/class.ilContainerGUI.php");
4 require_once(
"./Services/AccessControl/classes/class.ilObjRole.php");
5 require_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
6 require_once(
"./Services/AccessControl/classes/class.ilPermissionGUI.php");
7 require_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
8 require_once(
"./Services/User/classes/class.ilUserAccountSettings.php");
9 require_once(
"./Services/Tracking/classes/class.ilLearningProgressGUI.php");
10 require_once(
"./Services/User/classes/class.ilObjUserFolderGUI.php");
11 require_once(
"./Services/Tree/classes/class.ilTree.php");
12 require_once(
"./Modules/OrgUnit/classes/Staff/class.ilOrgUnitStaffGUI.php");
13 require_once(
"./Modules/OrgUnit/classes/LocalUser/class.ilLocalUserGUI.php");
14 require_once(
"./Modules/OrgUnit/classes/Translation/class.ilTranslationGUI.php");
15 require_once(
"./Modules/OrgUnit/classes/ExtId/class.ilExtIdGUI.php");
16 require_once(
"./Modules/OrgUnit/classes/SimpleImport/class.ilOrgUnitSimpleImportGUI.php");
17 require_once(
"./Modules/OrgUnit/classes/SimpleUserImport/class.ilOrgUnitSimpleUserImportGUI.php");
18 require_once(
"./Modules/OrgUnit/classes/class.ilOrgUnitImporter.php");
19 require_once(
"./Services/Object/classes/class.ilObjectAddNewItemGUI.php");
20 require_once(
"class.ilOrgUnitExplorerGUI.php");
21 require_once(
"class.ilOrgUnitExportGUI.php");
22 require_once(
"class.ilObjOrgUnitAccess.php");
23 require_once(
"class.ilObjOrgUnitTree.php");
24 require_once(dirname(__FILE__) .
'/Types/class.ilOrgUnitTypeGUI.php');
25 require_once(dirname(__FILE__) .
'/Settings/class.ilObjOrgUnitSettingsFormGUI.php');
26 require_once(
'./Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
27 require_once(
'./Services/Container/classes/class.ilContainerByTypeContentGUI.php');
28 require_once(
"./Modules/OrgUnit/classes/Extension/class.ilOrgUnitExtension.php");
96 $ilToolbar = $DIC[
'ilToolbar'];
102 parent::__construct(
array(),
$_GET[
"ref_id"],
true,
false);
109 $this->toolbar = $ilToolbar;
112 $this->type =
'orgu';
114 $lng->loadLanguageModule(
"orgu");
115 $this->tpl->addCss(
'./Modules/OrgUnit/templates/default/orgu.css');
120 $cmd = $this->ctrl->getCmd();
121 $next_class = $this->ctrl->getNextClass($this);
122 parent::prepareOutput();
129 switch ($next_class) {
130 case "illocalusergui":
133 $this->ctrl->redirect($this);
135 $this->tabs_gui->setTabActive(
'administrate_users');
137 $this->ctrl->forwardCommand($ilLocalUserGUI);
139 case "ilorgunitsimpleimportgui":
140 $this->tabs_gui->setTabActive(
"view");
142 $this->tabs_gui->setSubTabActive(
'import');
144 $this->ctrl->forwardCommand($ilOrgUnitSimpleImportGUI);
146 case "ilorgunitsimpleuserimportgui":
148 $this->ctrl->forwardCommand($ilOrgUnitSimpleUserImportGUI);
150 case "ilorgunitstaffgui":
151 case "ilrepositorysearchgui":
152 $this->tabs_gui->setTabActive(
'orgu_staff');
154 $this->ctrl->forwardCommand($ilOrgUnitStaffGUI);
159 $ilObjUserGUI =
new ilObjUserGUI(
"", (
int)$_GET[
'ref_id'],
true,
false);
160 $ilObjUserGUI->setCreationMode(
true);
161 $this->ctrl->forwardCommand($ilObjUserGUI);
162 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index'));
165 $ilObjUserGUI =
new ilObjUserGUI(
"", $_GET[
'ref_id'],
true,
false);
166 $ilObjUserGUI->setCreationMode(
true);
167 $this->ctrl->forwardCommand($ilObjUserGUI);
168 $this->tabs_gui->clearTargets();
169 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index'));
173 $ilObjUserGUI =
new ilObjUserGUI(
"", (
int)$_GET[
'obj_id'],
false,
false);
174 $ilObjUserGUI->setCreationMode(
false);
175 $this->ctrl->forwardCommand($ilObjUserGUI);
176 $this->tabs_gui->clearTargets();
177 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index'));
180 $this->ctrl->redirectByClass(
"illocalusergui",
"index");
184 case "ilobjuserfoldergui":
187 $this->ctrl->redirectByClass(
"illocalusergui",
"index");
191 $ilObjUserFolderGUI->setUserOwnerId((
int)$_GET[
'ref_id']);
192 $ilObjUserFolderGUI->setCreationMode(
true);
193 $this->ctrl->forwardCommand($ilObjUserFolderGUI);
194 $this->tabs_gui->clearTargets();
195 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index'));
199 case "ilinfoscreengui":
200 $this->tabs_gui->setTabActive(
"info_short");
201 if (!$this->ilAccess->checkAccess(
"read",
"", $this->ref_id) AND !$this->ilAccess->checkAccess(
"visible",
"", $this->ref_id)) {
202 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_read"), $this->
ilias->error_obj->MESSAGE);
208 $this->ctrl->forwardCommand(
$info);
210 case 'ilpermissiongui':
211 $this->tabs_gui->setTabActive(
'perm_settings');
213 $this->ctrl->forwardCommand($ilPermissionGUI);
215 case "ilcommonactiondispatchergui":
216 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
218 $this->ctrl->forwardCommand($gui);
220 case 'illearningprogressgui':
221 case 'illplistofprogressgui':
222 $this->tabs_gui->clearTargets();
223 $this->tabs_gui->setBackTarget($this->lng->txt(
'backto_staff'), $this->ctrl->getLinkTargetByClass(
"ilOrgUnitStaffGUI",
'showStaff'));
226 $this->ctrl->redirectByClass(
"ilOrgUnitStaffGUI",
"showStaff");
228 $this->ctrl->saveParameterByClass(
"illearningprogressgui",
"obj_id");
229 $this->ctrl->saveParameterByClass(
"illearningprogressgui",
"recursive");
230 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
232 $this->ctrl->forwardCommand($new_gui);
234 case 'ilorgunitexportgui':
235 $this->tabs_gui->setTabActive(
'export');;
237 $ilOrgUnitExportGUI->addFormat(
'xml');
238 $this->ctrl->forwardCommand($ilOrgUnitExportGUI);
240 case 'iltranslationgui':
241 $this->tabs_gui->setTabActive(
"settings");
245 $this->ctrl->forwardCommand($ilTranslationGui);
247 case 'ilorgunittypegui':
248 $this->tabs_gui->setTabActive(
'orgu_types');
250 $this->ctrl->forwardCommand($types_gui);
267 case 'performPasteIntoMultipleObjects':
271 parent::createObject();
274 parent::saveObject();
277 $this->tabs_gui->clearTargets();
278 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTarget($this));
279 parent::deleteObject();
281 case 'confirmedDelete':
282 parent::confirmedDeleteObject();
285 $this->tabs_gui->clearTargets();
286 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTarget($this));
290 parent::clearObject();
292 case 'enableAdministrationPanel':
293 parent::enableAdministrationPanelObject();
295 case 'disableAdministrationPanel':
296 parent::disableAdministrationPanelObject();
298 case 'getAsynchItemList':
299 parent::getAsynchItemListObject();
302 $this->tabs_gui->setTabActive(
"settings");
306 case 'updateSettings':
307 $this->tabs_gui->setTabActive(
"settings");
311 case 'editAdvancedSettings':
312 $this->tabs_gui->setTabActive(
"settings");
316 case 'updateAdvancedSettings':
317 $this->tabs_gui->setTabActive(
"settings");
331 if (!$this->ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) {
332 if ($this->ilAccess->checkAccess(
"visible",
"",
$_GET[
"ref_id"])) {
334 $this->ctrl->redirectByClass(
'ilinfoscreengui',
'');
337 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_read"), $this->
ilias->error_obj->WARNING);
340 parent::renderObject();
341 $this->tabs_gui->setTabActive(
"view_content");
342 $this->tabs_gui->removeSubTab(
"page_editor");
343 $this->tabs_gui->removeSubTab(
"ordering");
370 $gui->setCreationUrl(
"ilias.php?ref_id=" .
$_GET[
"ref_id"] .
"&admin_mode=settings&cmd=create&baseClass=ilAdministrationGUI");
377 $tree->setTypeWhiteList(
380 if (!
$tree->handleCommand()) {
381 $this->tpl->setLeftNavContent(
$tree->getHTML());
383 $this->ctrl->setParameterByClass(
"ilObjOrgUnitGUI",
"ref_id",
$_GET[
"ref_id"]);
387 $whiteList =
array(
"orgu");
388 $pls = ilOrgUnitExtension::getActivePluginIdsForTree();
389 return array_merge($whiteList, $pls);
397 # all possible create permissions 398 parent::setTitleAndDescription();
399 if ($this->
object->getTitle() ==
"__OrgUnitAdministration") {
400 $this->tpl->setTitle($this->lng->txt(
"objs_orgu"));
401 $this->tpl->setDescription($this->lng->txt(
"objs_orgu"));
405 if ($this->
ilias->getSetting(
'custom_icons')) {
406 $icons_cache = ilObjOrgUnit::getIconsCache();
407 $icon_file = (isset($icons_cache[$this->
object->getId()])) ? $icons_cache[$this->
object->getId()] :
'';
409 $this->tpl->setTitleIcon($icon_file, $this->lng->txt(
"obj_" . $this->object->getType()));
422 if (
$row[
"title"] ==
"__OrgUnitAdministration") {
423 $row[
"title"] = $this->lng->txt(
"objs_orgu");
425 $this->ctrl->setParameterByClass(
"ilobjorgunitgui",
"ref_id",
$row[
"child"]);
427 $this->ctrl->setParameterByClass(
"ilobjorgunitgui",
"ref_id",
$_GET[
"ref_id"]);
438 if ($obj_type !=
"orgu") {
439 parent::redirectToRefId($a_ref_id, $a_cmd);
441 $this->ctrl->setParameterByClass(
"ilObjOrgUnitGUI",
"ref_id", $a_ref_id);
442 $this->ctrl->redirectByClass(
"ilObjOrgUnitGUI", $a_cmd);
451 if ($this->ilAccess->checkAccess(
'read',
'', $this->object->getRefId())) {
452 $this->tabs_gui->addTab(
"view_content", $this->lng->txt(
"content"), $this->ctrl->getLinkTarget($this,
""));
453 $this->tabs_gui->addTab(
"info_short",
"Info", $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
459 $this->tabs_gui->addTab(
"orgu_staff", $this->lng->txt(
"orgu_staff"), $this->ctrl->getLinkTargetByClass(
"ilOrgUnitStaffGUI",
"showStaff"));
461 if ($this->ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
462 $this->tabs_gui->addTab(
"settings", $this->lng->txt(
"settings"), $this->ctrl->getLinkTarget($this,
'editSettings'));
465 $this->tabs_gui->addTab(
"administrate_users", $this->lng->txt(
"administrate_users"), $this->ctrl->getLinkTargetByClass(
"ilLocalUserGUI",
"index"));
469 if ($this->ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
470 $this->tabs_gui->addTarget(
'export', $this->ctrl->getLinkTargetByClass(
'ilorgunitexportgui',
''),
'export',
'ilorgunitexportgui');
474 $this->tabs_gui->addTab(
'orgu_types', $this->lng->txt(
'orgu_types'), $this->ctrl->getLinkTargetByClass(
'ilOrgUnitTypeGUI'));
485 $next_class = $this->ctrl->getNextClass($this);
486 $cmd = $this->ctrl->getCmd();
487 $this->tabs_gui->addSubTab(
'edit_settings', $this->lng->txt(
'settings'), $this->ctrl->getLinkTarget($this,
'editSettings'));
488 $this->tabs_gui->addSubTab(
"edit_translations", $this->lng->txt(
"obj_multilinguality"), $this->ctrl->getLinkTargetByClass(
"iltranslationgui",
"editTranslations"));
490 $ilOrgUnitType = $this->
object->getOrgUnitType();
492 if (count($ilOrgUnitType->getAssignedAdvancedMDRecords(
true))) {
493 $this->tabs_gui->addSubTab(
'edit_advanced_settings', $this->lng->txt(
'orgu_adv_settings'), $this->ctrl->getLinkTarget($this,
'editAdvancedSettings'));
497 $this->tabs_gui->setSubTabActive($active_tab_id);
498 switch ($next_class) {
499 case 'iltranslationgui':
500 $this->tabs_gui->setSubTabActive(
"edit_translations");
505 $this->tabs_gui->setSubTabActive(
'edit_settings');
507 case 'editAdvancedSettings':
508 case 'updateAdvancedSettings':
509 $this->tabs_gui->setSubTabActive(
'edit_advanced_settings');
526 $this->tabs_gui->addSubTab(
"import", $this->lng->txt(
"import"), $this->ctrl->getLinkTargetByClass(
"ilOrgUnitSimpleImportGUI",
"chooseImport"));
538 $form->setFormAction($this->ctrl->getFormAction($this));
539 $form->addCommandButton(
'updateAdvancedSettings', $this->lng->txt(
'save'));
540 $form->addCommandButton(
'editSettings', $this->lng->txt(
'cancel'));
550 if (!$this->ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
552 $this->ctrl->redirect($this);
558 $this->tpl->setContent($form->getHTML());
566 if (!$this->ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
568 $this->ctrl->redirect($this);
575 if ($gui->importEditFormPostValues()) {
576 $gui->writeEditForm();
578 $this->ctrl->redirect($this,
'editAdvancedSettings');
580 $this->tpl->setContent($form->getHTML());
585 if (!$this->ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
587 $this->ctrl->redirect($this);
590 $this->tpl->setContent($form->getHTML());
595 if (!$this->ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
597 $this->ctrl->redirect($this);
600 if ($form->saveObject()) {
602 $this->ctrl->redirect($this,
'editSettings');
604 $this->tpl->setContent($form->getHTML());
613 parent::showAdministrationPanel(
$tpl);
620 foreach (
$toolbar->items as $key => $item) {
621 if ($item[
"cmd"] ==
"link" || $item[
"cmd"] ==
"copy" || $item[
"cmd"] ==
"download") {
632 $ilCtrl->initBaseClass(
"ilAdministrationGUI");
633 $ilCtrl->setTargetScript(
"ilias.php");
634 $ilCtrl->setParameterByClass(
"ilObjOrgUnitGUI",
"ref_id",
$ref_id);
635 $ilCtrl->setParameterByClass(
"ilObjOrgUnitGUI",
"admin_mode",
"settings");
636 $ilCtrl->setParameterByClass(
"IlObjPluginDispatchGUI",
"admin_mode",
"settings");
637 $ilCtrl->redirectByClass(
array(
"ilAdministrationGUI",
"ilObjOrgUnitGUI" ),
"view");
643 $tree = $DIC[
'tree'];
645 $explorer->setAjax(
false);
646 $explorer->setSelectMode(
'nodes[]',
false);
666 $message = __METHOD__ .
": cmd was not 'cut' ; may be a hack attempt!";
667 $this->
ilias->raiseError($message, $this->
ilias->error_obj->WARNING);
669 if (
$_SESSION[
'clipboard'][
'cmd'] ==
'cut') {
670 if (isset(
$_GET[
'ref_id']) && (
int)
$_GET[
'ref_id']) {
675 $this->ctrl->returnToParent($this);
693 return parent::__initTableGUI();
702 return parent::__setTableGUIBasicData(
$tbl, $result_set, $a_from);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
setSubTabsSettings($active_tab_id)
setPropertyForm($form)
set property form object
static _checkAccessStaff($ref_id)
__setTableGUIBasicData(&$tbl, &$result_set, $a_from="")
Class ilObjOrgUnit GUI class.
initCreationForms($a_new_type)
initCreationForms
Class ilOrgUnitSimpleImportGUI.
initAdvancedSettingsForm()
Initialize the form for editing advanced meta data.
Class ilOrgUnitExportGUI.
setContentSubTabs()
Set content sub tabs.
initImportForm($a_new_type)
Init object import form.
setInfoObject($info)
get info sections
const MODE_ADMINISTRATION
updateAdvancedSettings()
Update Advanced Metadata.
setTitleAndDescription()
called by prepare output
static _checkAccessAdministrateUsers($ref_id)
redirection script todo: (a better solution should control the processing via a xml file) ...
importFileObject($parent_id=null, $a_catch_errors=true)
Import.
doUserAutoCompleteObject()
??
initCreateForm($a_new_type)
Init object creation form.
editAdvancedSettings()
Edit Advanced Metadata.
const LP_CONTEXT_ORG_UNIT
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
performPaste()
Prepare $_POST for the generic method performPasteIntoMultipleObjectsObject
redirectToRefId($a_ref_id, $a_cmd="")
performPasteIntoMultipleObjectsObject()
Create new PHPExcel object
obj_idprivate
Render add new item selector.
Class ilObjUserFolderGUI.
Class ilOrgUnitSimpleUserImportGUI.
Class ilOrgUnitExplorerGUI.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
showAdministrationPanel(&$tpl)
show administration panel
static _checkAccessToUserLearningProgress($ref_id, $usr_id)
Class ilObjUserTrackingGUI.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
addAdminLocatorItems($a_do_not_add_object=false)
addStandardContainerSubTabs($a_include_view=true)
Add standar container subtabs for view, manage, oderdering and text/media editor link.