4 include_once
'./Services/WebServices/ECS/classes/class.ilECSSetting.php';
43 $this->log =
$GLOBALS[
'DIC']->logger()->wsrv();
45 $this->container = $settingsContainer;
49 $this->lng->loadLanguageModule(
'ecs');
89 $GLOBALS[
'DIC'][
'tpl']->setTitle($this->lng->txt(
'ecs_campus_connect_title'));
91 $this->ctrl->saveParameter($this,
'server_id');
92 $this->ctrl->saveParameter($this,
'mid');
93 $this->ctrl->saveParameter($this,
'tid');
95 $next_class = $this->ctrl->getNextClass($this);
96 $cmd = $this->ctrl->getCmd();
99 switch ($next_class) {
109 $GLOBALS[
'DIC'][
'tpl']->setDescription(
'');
119 $GLOBALS[
'DIC'][
'ilCtrl']->returnToParent($this);
133 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
146 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
160 $ilTabs = $DIC[
'ilTabs'];
162 $current_node = (array) (($_REQUEST[
'lnodes']) ? $_REQUEST[
'lnodes'] : ROOT_FOLDER_ID);
163 $current_node = end($current_node);
165 $this->ctrl->setParameter($this,
'lnodes', $current_node);
168 $ilTabs->activateTab(
'ecs_crs_allocation');
169 $ilTabs->activateSubTab(
'cInitTree');
171 $GLOBALS[
'DIC'][
'tpl']->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.ecs_cmap_overview.html',
'Services/WebServices/ECS');
175 include_once
'./Services/WebServices/ECS/classes/Course/class.ilECSCourseMappingRule.php';
176 include_once
'./Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
178 if ($current_attribute === null) {
180 $current_attribute = (string) $_REQUEST[
'ecs_ca'];
181 if (!$current_attribute) {
203 $GLOBALS[
'DIC'][
'tpl']->setVariable(
'TFORM_ACTION', $this->ctrl->getFormAction($this));
204 $GLOBALS[
'DIC'][
'tpl']->setVariable(
'LOCAL_EXPLORER', $explorer->getOutput());
205 $GLOBALS[
'DIC'][
'tpl']->setVariable(
'MAPPING_FORM',
$form->getHTML());
213 include_once
'./Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
223 include_once
'./Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
235 $tree = $DIC[
'tree'];
237 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingLocalExplorer.php';
239 $this->ctrl->getLinkTarget($this,
'cInitOverview'),
245 $lnodes = (array) $_REQUEST[
'lnodes'];
246 $checked_node = array_pop($lnodes);
247 if ((
int) $_REQUEST[
'lid']) {
248 $checked_node = (int) $_REQUEST[
'lid'];
252 $explorer->setCheckedItems(array($checked_node));
254 $explorer->setCheckedItems(array(ROOT_FOLDER_ID));
256 $explorer->setTargetGet(
'lref_id');
257 $explorer->setSessionExpandVariable(
'lexpand');
258 $explorer->setExpand((
int)
$_GET[
'lexpand']);
259 $explorer->setExpandTarget($this->ctrl->getLinkTarget($this,
'cInitOverview'));
260 $explorer->setOutput(0);
269 include_once
'./Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
272 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
274 $form->setTableWidth(
"100%");
275 $this->ctrl->setParameter($this,
'ecs_ca', $current_attribute);
276 $form->setFormAction($this->ctrl->getFormAction($this));
277 $this->ctrl->setParameter($this,
'ecs_ca',
'');
282 $attributes = $attributes_obj->getAttributeSequence($current_attribute);
284 include_once
'./Services/WebServices/ECS/classes/Course/class.ilECSCourseMappingRule.php';
288 $section->setTitle($this->lng->txt(
'ecs_cmap_att_' . $att_name));
293 $isfilter =
new ilRadioGroupInputGUI($this->lng->txt(
'ecs_cmap_form_filter'), $att_name .
'_is_filter');
296 $all_values =
new ilRadioOption($this->lng->txt(
'ecs_cmap_form_all_values'), 0);
297 $isfilter->addOption($all_values);
299 $use_filter =
new ilRadioOption($this->lng->txt(
'ecs_cmap_form_filter_by_values'), 1);
301 $filter->
setInfo($this->lng->txt(
'ecs_cmap_form_filter_info'));
302 $filter->setSize(50);
303 $filter->setMaxLength(512);
304 $filter->setRequired(
true);
306 $use_filter->addSubItem($filter);
308 $isfilter->addOption($use_filter);
310 $form->addItem($isfilter);
313 $subdirs =
new ilCheckboxInputGUI($this->lng->txt(
'ecs_cmap_form_create_subdirs'), $att_name .
'_subdirs');
315 $subdirs->setValue(1);
330 $form->addItem($subdirs);
361 $form->addItem($hidden_atts);
364 if ($current_attribute) {
365 $form->addCommandButton(
'cSaveOverview', $this->lng->txt(
'save'));
368 if ($attributes_obj->getNextAttributeName($current_attribute)) {
369 $form->addCommandButton(
'cAddAttribute', $this->lng->txt(
'ecs_cmap_add_attribute_btn'));
371 if ($attributes_obj->getPreviousAttributeName($current_attribute)) {
372 $form->addCommandButton(
'cDeleteAttribute', $this->lng->txt(
'ecs_cmap_delete_attribute_btn'));
379 $form->addCommandButton(
'cDeleteRulesOfNode', $this->lng->txt(
'ecs_cmap_delete_rule'));
382 #$form->addCommandButton('cInitOverview', $this->lng->txt('cancel')); 384 $form->setShowTopButtons(
false);
394 $current_node = (int) $_REQUEST[
'lnodes'];
395 $current_att = (string) $_REQUEST[
'ecs_ca'];
398 if (
$form->checkInput()) {
400 $all_attributes = explode(
',',
$form->getInput(
'attributes'));
401 foreach ((array) $all_attributes as $att_name) {
410 $rule->setRefId($current_node);
411 $rule->setAttribute($att_name);
412 $rule->enableFilter(
$form->getInput($att_name .
'_is_filter'));
413 $rule->setFilter(
$form->getInput($att_name .
'_filter'));
414 $rule->enableSubdirCreation(
$form->getInput($att_name .
'_subdirs'));
418 if (
$rule->getRuleId()) {
425 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
426 $this->ctrl->setParameter($this,
'lnodes', $current_node);
427 $this->ctrl->redirect($this,
'cInitOverview');
430 $form->setValuesByPost();
437 $current_node = (int) $_REQUEST[
'lnodes'];
439 include_once
'./Services/WebServices/ECS/classes/Course/class.ilECSCourseMappingRule.php';
446 foreach ($rules as $rid) {
450 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
451 $this->ctrl->redirect($this,
'cInitOverview');
466 $ilTabs = $DIC[
'ilTabs'];
469 $ilTabs->activateTab(
'ecs_crs_allocation');
470 $ilTabs->activateSubTab(
'cSettings');
486 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
488 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
490 $form->setFormAction($this->ctrl->getFormAction($this));
491 $form->setTitle($this->lng->txt(
'settings'));
496 $form->addItem($check);
500 $imp =
new ilCustomInputGUI($this->lng->txt(
'ecs_cmap_def_cat'),
'default_cat');
503 $tpl =
new ilTemplate(
'tpl.ecs_import_id_form.html',
true,
true,
'Services/WebServices/ECS');
504 $tpl->setVariable(
'SIZE', 5);
505 $tpl->setVariable(
'MAXLENGTH', 11);
506 $tpl->setVariable(
'POST_VAR',
'default_cat');
512 include_once
'./Services/Tree/classes/class.ilPathGUI.php';
514 $path->enableTextOnly(
false);
515 $path->enableHideLeaf(
false);
519 $imp->setHtml(
$tpl->get());
520 $imp->setInfo($this->lng->txt(
'ecs_cmap_def_cat_info'));
521 $form->addItem($imp);
524 $allinone =
new ilCheckboxInputGUI($this->lng->txt(
'ecs_cmap_all_in_one'),
'allinone');
526 $allinone->setInfo($this->lng->txt(
'ecs_cmap_all_in_one_info'));
528 $allinone_cat =
new ilCustomInputGUI($this->lng->txt(
'ecs_cmap_all_in_one_cat'),
'allinone_cat');
531 $tpl =
new ilTemplate(
'tpl.ecs_import_id_form.html',
true,
true,
'Services/WebServices/ECS');
532 $tpl->setVariable(
'SIZE', 5);
533 $tpl->setVariable(
'MAXLENGTH', 11);
534 $tpl->setVariable(
'POST_VAR',
'allinone_cat');
537 $tpl->setVariable(
'PROPERTY_VALUE', $cat);
539 include_once
'./Services/Tree/classes/class.ilPathGUI.php';
541 $path->enableTextOnly(
false);
542 $path->enableHideLeaf(
false);
546 $allinone_cat->setHtml(
$tpl->get());
547 $allinone->addSubItem($allinone_cat);
548 $form->addItem($allinone);
551 $multiple =
new ilCheckboxInputGUI($this->lng->txt(
'ecs_cmap_multiple_atts'),
'multiple');
555 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSMappingUtils.php';
556 include_once
'./Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
563 )->getAttributeValues()
569 $form->addItem($multiple);
573 $rm->setTitle($this->lng->txt(
'ecs_role_mappings'));
577 $auth_type =
new ilSelectInputGUI($this->lng->txt(
'ecs_member_auth_type'),
'auth_mode');
579 $auth_type->setRequired(
true);
581 $form->addItem($auth_type);
585 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSMappingUtils.php';
589 $role_map->setSize(32);
590 $role_map->setMaxLength(64);
591 $role_map->setRequired(
$info[
'required']);
592 $form->addItem($role_map);
595 $form->addCommandButton(
'cUpdateSettings', $this->lng->txt(
'save'));
596 $form->addCommandButton(
'cSettings', $this->lng->txt(
'cancel'));
609 $ilTabs = $DIC[
'ilTabs'];
611 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
613 $ilTabs->activateTab(
'ecs_dir_allocation');
614 $ilTabs->activateSubTab(
'dSettings');
616 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
632 if (
$form->checkInput()) {
633 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
635 $settings->enableCourseAllocation(
$form->getInput(
'enabled'));
636 $settings->setDefaultCourseCategory(
$form->getInput(
'default_cat'));
637 $settings->enableAllInOne(
$form->getInput(
'allinone'));
638 $settings->setAllInOneCategory(
$form->getInput(
'allinone_cat'));
639 $settings->enableAttributeMapping(
$form->getInput(
'multiple'));
640 $settings->setAuthMode(
$form->getInput(
'auth_mode'));
643 $role_mappings = array();
647 $settings->setRoleMappings($role_mappings);
651 include_once
'./Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
655 $form_atts =
$form->getInput(
'atts');
657 foreach ($form_atts as
$name) {
663 $att->setServerId($this->
getServer()->getServerId());
664 $att->setMid($this->
getMid());
665 $att->setName($name);
672 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
673 $GLOBALS[
'DIC'][
'ilCtrl']->redirect($this,
'cSettings');
676 $form->setValuesByPost();
688 $ilTabs = $DIC[
'ilTabs'];
691 $ilTabs->setTabActive(
'ecs_crs_allocation');
692 $ilTabs->setSubTabActive(
'cAttributes');
694 include_once
'./Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributesTableGUI.php';
695 $table =
new ilECSCourseAttributesTableGUI(
724 if (
$form->checkInput()) {
725 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
727 $settings->enableDirectoryMapping((
bool)
$form->getInput(
'active'));
728 $settings->enableEmptyContainerCreation(!
$form->getInput(
'empty'));
730 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
733 $form->setValuesByPost();
735 $ilCtrl->redirect($this,
'dSettings');
743 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
744 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
747 $form->setFormAction($this->ctrl->getFormAction($this));
748 $form->setTitle($this->lng->txt(
'general_settings'));
750 $active =
new ilCheckboxInputGUI($this->lng->txt(
'ecs_node_mapping_activate'),
'active');
752 $form->addItem($active);
754 $create_empty =
new ilCheckboxInputGUI($this->lng->txt(
'ecs_node_mapping_create_empty'),
'empty');
756 $create_empty->setInfo($this->lng->txt(
'ecs_node_mapping_create_empty_info'));
757 $form->addItem($create_empty);
759 $form->addCommandButton(
'dUpdateSettings', $this->lng->txt(
'save'));
760 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
772 $ilToolbar = $DIC[
'ilToolbar'];
775 $GLOBALS[
'DIC'][
'ilTabs']->activateSubTab(
'dTrees');
776 $GLOBALS[
'DIC'][
'ilTabs']->activateTab(
'ecs_dir_allocation');
778 $ilToolbar->addButton(
779 $this->lng->txt(
'ecs_sync_trees'),
780 $this->ctrl->getLinkTarget($this,
'dSynchronizeTrees')
783 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingTreeTableGUI.php';
793 $dtreeTable->parse();
794 $GLOBALS[
'DIC'][
'tpl']->setContent($dtreeTable->getHTML());
804 $GLOBALS[
'DIC'][
'ilTabs']->activateSubTab(
'dTrees');
805 $GLOBALS[
'DIC'][
'ilTabs']->activateTab(
'ecs_dir_allocation');
807 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
808 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
811 $confirm->setFormAction($this->ctrl->getFormAction($this));
812 $confirm->setHeaderText($this->lng->txt(
'ecs_confirm_delete_tree'));
816 (
int) $_REQUEST[
'tid'],
820 (
int) $_REQUEST[
'tid']
823 $confirm->setConfirm($this->lng->txt(
'delete'),
'dDeleteTree');
824 $confirm->setCancel($this->lng->txt(
'cancel'),
'dTrees');
826 $GLOBALS[
'DIC'][
'tpl']->setContent($confirm->getHTML());
834 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
835 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
837 $GLOBALS[
'DIC'][
'ilLog']->write(
'Deleting tree');
845 include_once
'./Services/WebServices/ECS/classes/class.ilECSImport.php';
852 (
int) $_REQUEST[
'tid']
859 $data->setTreeId((
int) $_REQUEST[
'tid']);
863 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
867 (
int) $_REQUEST[
'tid']
870 ilUtil::sendSuccess($this->lng->txt(
'ecs_cms_tree_deleted'),
true);
871 $this->ctrl->redirect($this,
'dTrees');
879 $GLOBALS[
'DIC'][
'tpl']->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.ecs_edit_tree.html',
'Services/WebServices/ECS');
881 $this->ctrl->saveParameter($this,
'cid');
883 $GLOBALS[
'DIC'][
'ilTabs']->clearTargets();
884 $GLOBALS[
'DIC'][
'ilTabs']->setBack2Target(
885 $this->lng->txt(
'ecs_back_settings'),
886 $this->ctrl->getLinkTarget($this,
'cancel')
888 $GLOBALS[
'DIC'][
'ilTabs']->setBackTarget(
889 $this->lng->txt(
'ecs_cms_dir_tree'),
890 $this->ctrl->getLinkTarget($this,
'dTrees')
893 $GLOBALS[
'DIC'][
'tpl']->setVariable(
'LEGEND',
$GLOBALS[
'DIC'][
'lng']->txt(
'ecs_status_legend'));
894 $GLOBALS[
'DIC'][
'tpl']->setVariable(
'PENDING_UNMAPPED',
$GLOBALS[
'DIC'][
'lng']->txt(
'ecs_status_pending_unmapped'));
895 $GLOBALS[
'DIC'][
'tpl']->setVariable(
'PENDING_UNMAPPED_DISCON',
$GLOBALS[
'DIC'][
'lng']->txt(
'ecs_status_pending_unmapped_discon'));
896 $GLOBALS[
'DIC'][
'tpl']->setVariable(
'PENDING_UNMAPPED_NONDISCON',
$GLOBALS[
'DIC'][
'lng']->txt(
'ecs_status_pending_unmapped_nondiscon'));
897 $GLOBALS[
'DIC'][
'tpl']->setVariable(
'MAPPED',
$GLOBALS[
'DIC'][
'lng']->txt(
'ecs_status_mapped'));
898 $GLOBALS[
'DIC'][
'tpl']->setVariable(
'DELETED',
$GLOBALS[
'DIC'][
'lng']->txt(
'ecs_status_deleted'));
901 $GLOBALS[
'DIC'][
'tpl']->setVariable(
'GENERAL_FORM',
$form->getHTML());
902 $GLOBALS[
'DIC'][
'tpl']->setVariable(
'TFORM_ACTION', $this->ctrl->getFormAction($this,
'dEditTree'));
913 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSMappingUtils.php';
914 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
920 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignment.php';
924 (
int) $_REQUEST[
'tid'],
928 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
929 $form =
new ilPropertyFormGUI();
930 $form->setFormAction($this->ctrl->getFormAction($this,
'dEditTree'));
931 $form->setTitle($this->lng->txt(
'general_settings'));
932 $form->addCommandButton(
'dUpdateTreeSettings', $this->lng->txt(
'save'));
933 $form->addCommandButton(
'dTrees', $this->lng->txt(
'cancel'));
934 $form->setTableWidth(
'30%');
937 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
942 $cmsid->setDisabled(
true);
944 $cmsid->setMaxLength(12);
945 $form->addItem($cmsid);
951 (
int) $_REQUEST[
'tid']
958 $form->addItem($status);
963 $title->setChecked($assignment->isTitleUpdateEnabled());
964 #$title->setInfo($this->lng->txt('ecs_title_update_info')); 968 $position =
new ilCheckboxInputGUI($this->lng->txt(
'ecs_position_updates'),
'position');
970 $position->setChecked($mapping_advanced && $assignment->isPositionUpdateEnabled());
971 $position->setValue(1);
972 #$position->setInfo($this->lng->txt('ecs_position_update_info')); 973 $form->addItem($position);
976 $tree->setDisabled(!$mapping_advanced);
977 $tree->setChecked($mapping_advanced && $assignment->isTreeUpdateEnabled());
979 #$tree->setInfo($this->lng->txt('ecs_tree_update_info')); 991 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignment.php';
992 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
996 (
int) $_REQUEST[
'tid'],
999 $assignment->setRefId(0);
1000 $assignment->setObjId(0);
1003 if (
$form->checkInput()) {
1004 $assignment->enableTitleUpdate(
$form->getInput(
'title'));
1005 $assignment->enableTreeUpdate(
$form->getInput(
'tree'));
1006 $assignment->enablePositionUpdate(
$form->getInput(
'position'));
1007 $assignment->update();
1009 ilUtil::sendSuccess($this->lng->txt(
'settings_saved',
true));
1010 $this->ctrl->redirect($this,
'dEditTree');
1013 $form->setValuesByPost();
1024 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsTreeSynchronizer.php';
1028 (
int) $_REQUEST[
'tid']
1031 ilUtil::sendSuccess($this->lng->txt(
'ecs_cms_tree_synchronized'),
true);
1032 $this->ctrl->redirect($this,
'dTrees');
1037 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSDirectoryTreeConnector.php';
1039 $this->log->dump(
'Start synchronizing cms directory trees');
1043 $res = $connector->getDirectoryTrees();
1047 foreach ((array)
$res->getLinkIds() as $cms_id) {
1048 include_once
'./Services/WebServices/ECS/classes/class.ilECSEventQueueReader.php';
1049 include_once
'./Services/WebServices/ECS/classes/class.ilECSEvent.php';
1057 $this->ctrl->redirect($this,
'dTrees');
1060 $this->ctrl->redirect($this,
'dTrees');
1071 $tree = $DIC[
'tree'];
1073 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingLocalExplorer.php';
1075 $this->ctrl->getLinkTarget($this,
'dEditTree'),
1081 $lnodes = (array) $_REQUEST[
'lnodes'];
1082 $checked_node = array_pop($lnodes);
1083 if ((
int) $_REQUEST[
'lid']) {
1084 $checked_node = (int) $_REQUEST[
'lid'];
1087 if ($checked_node) {
1088 $explorer->setCheckedItems(array($checked_node));
1090 $explorer->setCheckedItems(array(ROOT_FOLDER_ID));
1092 $explorer->setTargetGet(
'lref_id');
1093 $explorer->setSessionExpandVariable(
'lexpand');
1094 $explorer->setExpand((
int)
$_GET[
'lexpand']);
1095 $explorer->setExpandTarget($this->ctrl->getLinkTarget($this,
'dEditTree'));
1096 $explorer->setOutput(0);
1097 $GLOBALS[
'DIC'][
'tpl']->setVariable(
'LOCAL_EXPLORER', $explorer->getOutput());
1109 $tree = $DIC[
'tree'];
1111 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
1112 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingCmsExplorer.php';
1113 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
1116 $this->ctrl->getLinkTarget($this,
'dEditTree'),
1119 (int) $_REQUEST[
'tid']
1124 (
int) $_REQUEST[
'tid']
1127 $explorer->setPostVar(
'rnodes[]');
1130 $active_node =
$tree->getRootId();
1131 foreach ($localExplorer->getCheckedItems() as $ref_id) {
1132 $explorer->setCheckedItems(
1136 (
int) $_REQUEST[
'tid'],
1140 $active_node = $ref_id;
1144 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
1145 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
1150 (
int) $_REQUEST[
'tid'],
1153 foreach ($cmsTree->getPathId($cs_id) as $path_id) {
1154 #$explorer->setExpand($path_id); 1158 $explorer->setTargetGet(
'rref_id');
1159 $explorer->setSessionExpandVariable(
'rexpand');
1161 #if((int) $_REQUEST['rexpand']) 1163 $explorer->setExpand((
int)
$_GET[
'rexpand']);
1165 $explorer->setExpandTarget($this->ctrl->getLinkTarget($this,
'dEditTree'));
1166 $explorer->setOutput(0);
1167 $GLOBALS[
'DIC'][
'tpl']->setVariable(
'REMOTE_EXPLORER', $explorer->getOutput());
1176 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
1180 (
int) $_REQUEST[
'tid']
1193 $this->ctrl->redirect($this,
'dEditTree');
1196 $ref_id = end(
$_POST[
'lnodes']);
1198 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
1202 (
int) $_REQUEST[
'tid'],
1210 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignment.php';
1211 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
1212 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
1213 foreach (
$nodes as $cms_id) {
1217 (
int) $_REQUEST[
'tid'],
1220 $assignment->setRefId($ref_id);
1222 $assignment->enablePositionUpdate(
false);
1223 $assignment->enableTreeUpdate(
false);
1227 (
int) $_REQUEST[
'tid']
1229 $assignment->update();
1233 $childs = $cmsTree->getSubTreeIds($cms_id);
1238 (
int) $_REQUEST[
'tid'],
1246 (
int) $_REQUEST[
'tid']
1250 $this->ctrl->setParameter($this,
'lid', (
int) $ref_id);
1252 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
1253 $this->ctrl->redirect($this,
'dEditTree');
1262 $GLOBALS[
'DIC'][
'ilTabs']->activateSubTab(
'dMappingOverview');
1263 $GLOBALS[
'DIC'][
'ilTabs']->activateTab(
'ecs_dir_allocation');
1276 $ilTabs = $DIC[
'ilTabs'];
1278 include_once
'./Services/WebServices/ECS/classes/class.ilECSParticipantSettings.php';
1280 $ilTabs->clearTargets();
1281 $ilTabs->setBackTarget(
1282 $this->lng->txt(
'ecs_back_settings'),
1283 $this->ctrl->getParentReturn($this)
1288 'ecs_dir_allocation',
1289 $this->lng->txt(
'ecs_dir_alloc'),
1290 $this->ctrl->getLinkTarget($this,
'dSettings')
1295 'ecs_crs_allocation',
1296 $this->lng->txt(
'ecs_crs_alloc'),
1297 $this->ctrl->getLinkTarget($this,
'cStart')
1310 $ilTabs = $DIC[
'ilTabs'];
1312 if ($a_tab == self::TAB_DIRECTORY) {
1315 $this->lng->txt(
'ecs_cc_mapping_overview'),
1316 $this->ctrl->getLinkTarget($this,
'dMappingOverview')
1320 $this->lng->txt(
'ecs_cms_dir_tree'),
1321 $this->ctrl->getLinkTarget($this,
'dTrees')
1325 $this->lng->txt(
'settings'),
1326 $this->ctrl->getLinkTarget($this,
'dSettings')
1329 if ($a_tab == self::TAB_COURSE) {
1331 include_once
'./Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
1334 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
1338 $this->lng->txt(
'ecs_cmap_overview'),
1339 $this->ctrl->getLinkTarget($this,
'cInitOverview')
1345 $this->lng->txt(
'settings'),
1346 $this->ctrl->getLinkTarget($this,
'cSettings')
static lookupCmsIdsOfTree($a_server_id, $a_mid, $a_tree_id)
$ilDB $ilDB
static getRulesOfRefId($a_sid, $a_mid, $a_ref_id)
Get all rule of ref_id type $ilDB.
Creates a path for a start and endnode.
This class represents an option in a radio group.
initFormCSettings()
Init settings form.
dMappingOverview()
Show directory trees.
static getRoleMappingInfo($a_role_type_info=0)
Get role mapping info.
static updateStatus($a_server_id, $a_mid, $a_tree_id)
static getInstanceByServerId($a_server_id)
Get singleton instance per server.
static hasRules($a_sid, $a_mid, $a_ref_id)
setValue($a_value)
Set Value.
cSettings(ilPropertyFormGUI $form=null)
Show course allocation ilTabsGUI $ilTabs.
getContainer()
Get container object.
setTabs()
Set tabs ilTabsGUI $ilTabs.
static lookupRootId($a_tree_id)
lookup root id
executeCommand()
ilCtrl executeCommand
static lookupTitle($a_server_id, $a_mid, $a_tree_id)
Lookup title by obj id.
cStart()
Goto default page.
dShowCmsExplorer(ilExplorer $localExplorer)
Show cms explorer.
dShowLocalExplorer()
Show local explorer.
static deleteMappings($a_server_id, $a_mid, $a_tree_id)
Delete mappings $ilDB $ilDB.
dSynchronizeTree()
Synchronize Tree.
dSettings(ilPropertyFormGUI $form=null)
Show directory allocation ilTabsGUI $ilTabs.
static getInstanceByServerMid($a_server_id, $a_mid)
Get instance.
static _lookupTitle($a_id)
lookup object title
cAttributes()
Show active attributes ilTabsGUI $ilTabs.
dStart()
Goto default page.
setInfo($a_info)
Set Info.
static lookupMappingStatus($a_server_id, $a_mid, $a_tree_id)
Lookup mapping status.
dEditTree(ilPropertyFormGUI $form=null)
Edit directory tree assignments.
static getCourseMappingFieldSelectOptions()
static lookupDefaultTitleUpdate($a_server_id, $a_mid, $a_tree_id)
Lookup default title update setting.
cancel()
return to parent container
cShowLocalExplorer()
Show local explorer.
static mappingStatusToString($a_status)
Get mapping status as string.
__construct($settingsContainer, $server_id, $mid)
Constructor.
setValue($a_value)
Set Value.
const TYPE_DIRECTORY_TREES
foreach($_POST as $key=> $value) $res
if(isset($_POST['submit'])) $form
static deleteDisconnectableMappings($a_server_id, $a_mid, $a_tree_id, $a_ref_id)
delete disconnectable mappings
cAddAttribute()
Add one attribute in form.
Storage of course attributes for assignment rules.
cInitOverview($form=null, $current_attribute=null)
Show overview page.
static getAuthModeSelection()
Get auth mode selection.
static _lookupObjId($a_id)
static getInstance($a_server_id, $a_mid)
Get instance.
cSaveOverview()
Save overview.
static deleteMappingsByCsId($a_server_id, $a_mid, $a_tree_id, $cs_ids)
Delete mappings $ilDB.
special template class to simplify handling of ITX/PEAR
static lookupLastExistingAttribute($a_sid, $a_mid, $a_ref_id)
Lookup existing attributes.
This class represents a text property in a property form.
Reads ECS events and stores them in the database.
static lookupAssignmentsByRefId($a_server_id, $a_mid, $a_tree_id, $a_ref_id)
Lookup assignments.
cUpdateSettings()
Update course settings.
if(array_key_exists('yes', $_REQUEST)) $attributes
dUpdateSettings()
Update node mapping settings.
dInitFormTreeSettings(ilPropertyFormGUI $form=null)
Init form settings.
static getInstanceByAttribute($a_sid, $a_mid, $a_ref_id, $a_att)
Get rule instance by attribute type $ilDB.
Class ilExplorer class for explorer view in admin frame.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
cInitMappingForm($current_node, $current_attribute)
Init the mapping form.
dConfirmDeleteTree()
Delete tree settings.
cDeleteAttribute()
Delete last attribute in form.
static lookupCmsId($a_obj_id)
Lookup cms id.
static deleteRessources($a_server_id, $a_mid, $a_econtent_ids)
Delete ressources $ilDB.
This class represents a non editable value in a property form.
static loookupCmsMid($a_server_id)
Lookup mid of current cms participant $ilDB.
dInitEditTree()
Init tree.
Storage of course attributes for assignment rules.
dTrees()
Show directory trees.
if(empty($password)) $table
static lookupMappedItemsForRefId($a_server_id, $a_mid, $a_tree_id, $a_ref_id)
Get cs ids for ref_id <type> $ilDB.
setValue($a_value)
Set Value.
dDeleteTree()
Delete tree.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
Confirmation screen class.
setSubTabs($a_tab)
Set Sub tabs ilTabsGUI $ilTabs.