ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilECSMappingSettingsGUI Class Reference
+ Collaboration diagram for ilECSMappingSettingsGUI:

Public Member Functions

 __construct ($settingsContainer, $server_id, $mid)
 Constructor.
 getContainer ()
 Get container object.
 getServer ()
 getMid ()
 Get mid.
 executeCommand ()
 ilCtrl executeCommand
 cancel ()
 return to parent container

Data Fields

const TAB_DIRECTORY = 1
const TAB_COURSE = 2

Protected Member Functions

 cStart ()
 Goto default page.
 dStart ()
 Goto default page.
 cInitOverview ($form=null, $current_attribute=null)
 Show overview page.
 cAddAttribute ()
 Add one attribute in form.
 cDeleteAttribute ()
 Delete last attribute in form.
 cShowLocalExplorer ()
 Show local explorer.
 cInitMappingForm ($current_node, $current_attribute)
 Init the mapping form.
 cSaveOverview ()
 Save overview.
 cDeleteRulesOfNode ()
 cSettings (ilPropertyFormGUI $form=NULL)
 Show course allocation ilTabsGUI $ilTabs.
 initFormCSettings ()
 Init settings form.
 dSettings (ilPropertyFormGUI $form=NULL)
 Show directory allocation ilTabsGUI $ilTabs.
 cUpdateSettings ()
 Update course settings.
 cAttributes ()
 Show active attributes ilTabsGUI $ilTabs.
 dUpdateSettings ()
 Update node mapping settings.
 initFormDSettings ()
 dTrees ()
 Show directory trees.
 dConfirmDeleteTree ()
 Delete tree settings.
 dDeleteTree ()
 Delete tree.
 dEditTree (ilPropertyFormGUI $form=null)
 Edit directory tree assignments.
 dInitFormTreeSettings (ilPropertyFormGUI $form=null)
 Init form settings.
 dUpdateTreeSettings ()
 dSynchronizeTree ()
 Synchronize Tree.
 dSynchronizeTrees ()
 dShowLocalExplorer ()
 Show local explorer.
 dShowCmsExplorer (ilExplorer $localExplorer)
 Show cms explorer.
 dInitEditTree ()
 Init tree.
 dMap ()
 Do mapping.
 dMappingOverview ()
 Show directory trees.
 setTabs ()
 Set tabs ilTabsGUI $ilTabs.
 setSubTabs ($a_tab)
 Set Sub tabs ilTabsGUI $ilTabs.

Protected Attributes

 $lng = null
 $ctrl = null

Private Attributes

 $container = null
 $server = null
 $mid = null

Detailed Description

Definition at line 15 of file class.ilECSMappingSettingsGUI.php.

Constructor & Destructor Documentation

ilECSMappingSettingsGUI::__construct (   $settingsContainer,
  $server_id,
  $mid 
)

Constructor.

Parameters
ilObjectGUI$settingsContainer

Definition at line 31 of file class.ilECSMappingSettingsGUI.php.

References $ilCtrl, $lng, $mid, and ilECSSetting\getInstanceByServerId().

{
global $lng,$ilCtrl;
$this->container = $settingsContainer;
$this->server = ilECSSetting::getInstanceByServerId($server_id);
$this->mid = $mid;
$this->lng = $lng;
$this->lng->loadLanguageModule('ecs');
$this->ctrl = $ilCtrl;
}

+ Here is the call graph for this function:

Member Function Documentation

ilECSMappingSettingsGUI::cAddAttribute ( )
protected

Add one attribute in form.

Definition at line 204 of file class.ilECSMappingSettingsGUI.php.

References $_REQUEST, cInitOverview(), ilECSCourseAttributes\getInstance(), getMid(), and getServer().

{
include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
$next_attribute = ilECSCourseAttributes::getInstance($this->getServer()->getServerId(), $this->getMid())->getNextAttributeName((string) $_REQUEST['ecs_ca']);
$this->cInitOverview(NULL, $next_attribute);
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::cancel ( )

return to parent container

Definition at line 107 of file class.ilECSMappingSettingsGUI.php.

References $GLOBALS.

{
$GLOBALS['ilCtrl']->returnToParent($this);
}
ilECSMappingSettingsGUI::cAttributes ( )
protected

Show active attributes ilTabsGUI $ilTabs.

Definition at line 684 of file class.ilECSMappingSettingsGUI.php.

References $GLOBALS, ilECSCourseAttributes\getInstance(), getMid(), getServer(), and setSubTabs().

{
global $ilTabs;
$this->setSubTabs(self::TAB_COURSE);
$ilTabs->setTabActive('ecs_crs_allocation');
$ilTabs->setSubTabActive('cAttributes');
include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributesTableGUI.php';
$table = new ilECSCourseAttributesTableGUI(
$this,
'attributes',
$this->getServer()->getServerId(),
$this->getMid()
);
$table->init();
$table->parse(
$this->getServer()->getServerId(),
$this->getMid())->getAttributes());
$GLOBALS['tpl']->setContent($table->getHTML());
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::cDeleteAttribute ( )
protected

Delete last attribute in form.

Definition at line 214 of file class.ilECSMappingSettingsGUI.php.

References $_REQUEST, cInitOverview(), ilECSCourseAttributes\getInstance(), getMid(), and getServer().

{
include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
$prev_attribute = ilECSCourseAttributes::getInstance($this->getServer()->getServerId(), $this->getMid())->getPreviousAttributeName((string) $_REQUEST['ecs_ca']);
$this->cInitOverview(NULL, $prev_attribute);
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::cDeleteRulesOfNode ( )
protected

Definition at line 439 of file class.ilECSMappingSettingsGUI.php.

References $_REQUEST, getMid(), ilECSCourseMappingRule\getRulesOfRefId(), getServer(), and ilUtil\sendSuccess().

{
$current_node = (int) $_REQUEST['lnodes'];
include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseMappingRule.php';
$this->getServer()->getServerId(),
$this->getMid(),
$current_node);
foreach($rules as $rid)
{
$rule = new ilECSCourseMappingRule($rid);
$rule->delete();
}
ilUtil::sendSuccess($this->lng->txt('settings_saved'),true);
$this->ctrl->redirect($this,'cInitOverview');
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::cInitMappingForm (   $current_node,
  $current_attribute 
)
protected

Init the mapping form.

Definition at line 262 of file class.ilECSMappingSettingsGUI.php.

References $section, ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilECSCourseAttributes\getInstance(), ilECSCourseMappingRule\getInstanceByAttribute(), getMid(), getServer(), ilECSCourseMappingRule\hasRules(), ilRadioOption\setInfo(), and ilRadioOption\setValue().

Referenced by cInitOverview(), and cSaveOverview().

{
include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
$attributes_obj = ilECSCourseAttributes::getInstance($this->getServer()->getServerId(), $this->getMid());
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setTableWidth("100%");
$this->ctrl->setParameter($this,'ecs_ca',$current_attribute);
$form->setFormAction($this->ctrl->getFormAction($this));
$this->ctrl->setParameter($this,'ecs_ca','');
$form->setTitle($this->lng->txt('ecs_cmap_mapping_form_title') .' '.ilObject::_lookupTitle(ilObject::_lookupObjId($current_node)));
// Iterate through all current attributes
$attributes = $attributes_obj->getAttributeSequence($current_attribute);
foreach($attributes as $att_name)
{
include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseMappingRule.php';
$rule = ilECSCourseMappingRule::getInstanceByAttribute($this->getServer()->getServerId(), $this->getMid(), $current_node, $att_name);
$section->setTitle($this->lng->txt('ecs_cmap_att_'.$att_name));
// Filter
$form->addItem($section);
$isfilter = new ilRadioGroupInputGUI($this->lng->txt('ecs_cmap_form_filter'),$att_name.'_is_filter');
$isfilter->setValue($rule->isFilterEnabled() ? 1 : 0);
$all_values = new ilRadioOption($this->lng->txt('ecs_cmap_form_all_values'),0);
$isfilter->addOption($all_values);
$use_filter = new ilRadioOption($this->lng->txt('ecs_cmap_form_filter_by_values'),1);
$filter = new ilTextInputGUI('',$att_name.'_filter');
$filter->setInfo($this->lng->txt('ecs_cmap_form_filter_info'));
$filter->setSize(50);
$filter->setMaxLength(512);
$filter->setRequired(true);
$filter->setValue($rule->getFilter());
$use_filter->addSubItem($filter);
$isfilter->addOption($use_filter);
$form->addItem($isfilter);
// Create subdirs
$subdirs = new ilCheckboxInputGUI($this->lng->txt('ecs_cmap_form_create_subdirs'),$att_name.'_subdirs');
$subdirs->setChecked($rule->isSubdirCreationEnabled());
$subdirs->setValue(1);
// Subdir types (disabled in spec)
/*
$subdir_type = new ilRadioGroupInputGUI($this->lng->txt('ecs_cmap_form_subdir_type'), $att_name.'_subdir_type');
$subdir_type->setValue($rule->getSubDirectoryType());
$value = new ilRadioOption($this->lng->txt('ecs_cmap_form_subdir_value'), ilECSCourseMappingRule::SUBDIR_VALUE);
$subdir_type->addOption($value);
$name = new ilRadioOption($this->lng->txt('ecs_cmap_form_subdir_name'), ilECSCourseMappingRule::SUBDIR_ATTRIBUTE_NAME);
$subdir_type->addOption($name);
$subdirs->addSubItem($subdir_type);
*/
$form->addItem($subdirs);
// Directory relations
/*
$upper_attributes = ilECSCourseAttributes::getInstance(
$this->getServer()->getServerId(),
$this->getMid())->getUpperAttributes($att_name);
if($upper_attributes)
{
$dir_relation = new ilRadioGroupInputGUI($this->lng->txt('ecs_cmap_form_dir_relation'),$att_name.'_dir_relation');
$current_dir = new ilRadioOption($this->lng->txt('ecs_cmap_form_current_dir'),'');
$dir_relation->addOption($current_dir);
}
foreach($upper_attributes as $subdir_name)
{
$subdir = new ilRadioOption($this->lng->txt('ecs_cmap_att_'.$subdir_name),$subdir_name);
$dir_relation->addOption($subdir);
}
if($upper_attributes)
{
$dir_relation->setValue((string) $rule->getDirectory());
$form->addItem($dir_relation);
}
*/
}
// add list of attributes
$hidden_atts = new ilHiddenInputGUI('attributes');
$hidden_atts->setValue(implode(',',$attributes));
$form->addItem($hidden_atts);
if($current_attribute)
{
$form->addCommandButton('cSaveOverview',$this->lng->txt('save'));
}
if($attributes_obj->getNextAttributeName($current_attribute))
{
$form->addCommandButton('cAddAttribute', $this->lng->txt('ecs_cmap_add_attribute_btn'));
}
if($attributes_obj->getPreviousAttributeName($current_attribute))
{
$form->addCommandButton('cDeleteAttribute', $this->lng->txt('ecs_cmap_delete_attribute_btn'));
}
$this->getServer()->getServerId(),
$this->getMid(),
$current_node
))
{
$form->addCommandButton('cDeleteRulesOfNode', $this->lng->txt('ecs_cmap_delete_rule'));
}
#$form->addCommandButton('cInitOverview', $this->lng->txt('cancel'));
$form->setShowTopButtons(false);
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSMappingSettingsGUI::cInitOverview (   $form = null,
  $current_attribute = null 
)
protected

Show overview page.

Definition at line 148 of file class.ilECSMappingSettingsGUI.php.

References $_REQUEST, $GLOBALS, cInitMappingForm(), cShowLocalExplorer(), getMid(), getServer(), ilECSCourseMappingRule\lookupLastExistingAttribute(), and setSubTabs().

Referenced by cAddAttribute(), cDeleteAttribute(), cSaveOverview(), and cStart().

{
global $ilTabs;
$current_node = (array) (($_REQUEST['lnodes']) ? $_REQUEST['lnodes'] : ROOT_FOLDER_ID);
$current_node = end($current_node);
$this->ctrl->setParameter($this,'lnodes',$current_node);
$this->setSubTabs(self::TAB_COURSE);
$ilTabs->activateTab('ecs_crs_allocation');
$ilTabs->activateSubTab('cInitTree');
$GLOBALS['tpl']->addBlockFile('ADM_CONTENT','adm_content','tpl.ecs_cmap_overview.html','Services/WebServices/ECS');
$explorer = $this->cShowLocalExplorer();
if(!$form instanceof ilPropertyFormGUI)
{
include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseMappingRule.php';
include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
if($current_attribute === null)
{
// check request
$current_attribute = (string) $_REQUEST['ecs_ca'];
if(!$current_attribute)
{
$this->getServer()->getServerId(),
$this->getMid(),
$current_node
);
$current_attribute =
$existing ?
$existing :
'';
/*
ilECSCourseAttributes::getInstance(
$this->getServer()->getServerId(),
$this->getMid())->getFirstAttributeName()
);
*/
}
}
$form = $this->cInitMappingForm($current_node,$current_attribute);
}
$GLOBALS['tpl']->setVariable('TFORM_ACTION',$this->ctrl->getFormAction($this));
$GLOBALS['tpl']->setVariable('LOCAL_EXPLORER',$explorer->getOutput());
$GLOBALS['tpl']->setVariable('MAPPING_FORM',$form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSMappingSettingsGUI::cSaveOverview ( )
protected

Save overview.

Definition at line 392 of file class.ilECSMappingSettingsGUI.php.

References $_REQUEST, cInitMappingForm(), cInitOverview(), ilECSCourseMappingRule\getInstanceByAttribute(), getMid(), getServer(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
$current_node = (int) $_REQUEST['lnodes'];
$current_att = (string) $_REQUEST['ecs_ca'];
$form = $this->cInitMappingForm($current_node, $current_att);
if($form->checkInput())
{
// save ...
$all_attributes = explode(',',$form->getInput('attributes'));
foreach((array) $all_attributes as $att_name)
{
$this->getServer()->getServerId(),
$this->getMid(),
$current_node,
$att_name);
$rule->setServerId($this->getServer()->getServerId());
$rule->setMid($this->getMid());
$rule->setRefId($current_node);
$rule->setAttribute($att_name);
$rule->enableFilter($form->getInput($att_name.'_is_filter'));
$rule->setFilter($form->getInput($att_name.'_filter'));
$rule->enableSubdirCreation($form->getInput($att_name.'_subdirs'));
//$rule->setSubDirectoryType($form->getInput($att_name.'_subdir_type'));
//$rule->setDirectory($form->getInput($att_name.'_dir_relation'));
if($rule->getRuleId())
{
$rule->update();
}
else
{
$rule->save();
}
}
ilUtil::sendSuccess($this->lng->txt('settings_saved'),true);
$this->ctrl->setParameter($this,'lnodes',$current_node);
$this->ctrl->redirect($this,'cInitOverview');
}
$form->setValuesByPost();
ilUtil::sendFailure($this->lng->txt('err_check_input'));
$this->cInitOverview($form, $current_att);
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::cSettings ( ilPropertyFormGUI  $form = NULL)
protected

Show course allocation ilTabsGUI $ilTabs.

Returns
bool

Definition at line 466 of file class.ilECSMappingSettingsGUI.php.

References $GLOBALS, initFormCSettings(), and setSubTabs().

Referenced by cStart(), and cUpdateSettings().

{
global $ilTabs;
$this->setSubTabs(self::TAB_COURSE);
$ilTabs->activateTab('ecs_crs_allocation');
$ilTabs->activateSubTab('cSettings');
if(!$form instanceof ilPropertyFormGUI)
{
$form = $this->initFormCSettings();
}
$GLOBALS['tpl']->setContent($form->getHTML());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSMappingSettingsGUI::cShowLocalExplorer ( )
protected

Show local explorer.

Definition at line 224 of file class.ilECSMappingSettingsGUI.php.

References $_GET, $_REQUEST, getMid(), getServer(), and ilECSNodeMappingLocalExplorer\setPostVar().

Referenced by cInitOverview().

{
global $tree;
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingLocalExplorer.php';
$this->ctrl->getLinkTarget($this,'cInitOverview'),
$this->getServer()->getServerId(),
$this->getMid()
);
$explorer->setPostVar('lnodes[]');
$lnodes = (array) $_REQUEST['lnodes'];
$checked_node = array_pop($lnodes);
if((int) $_REQUEST['lid'])
{
$checked_node = (int) $_REQUEST['lid'];
}
if($checked_node)
{
$explorer->setCheckedItems(array($checked_node));
}
else
{
$explorer->setCheckedItems(array(ROOT_FOLDER_ID));
}
$explorer->setTargetGet('lref_id');
$explorer->setSessionExpandVariable('lexpand');
$explorer->setExpand((int) $_GET['lexpand']);
$explorer->setExpandTarget($this->ctrl->getLinkTarget($this,'cInitOverview'));
$explorer->setOutput(0);
return $explorer;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSMappingSettingsGUI::cStart ( )
protected

Goto default page.

Returns
<type>

Definition at line 121 of file class.ilECSMappingSettingsGUI.php.

References cInitOverview(), cSettings(), ilECSNodeMappingSettings\getInstanceByServerMid(), getMid(), and getServer().

{
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
if(ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(),$this->getMid())->isCourseAllocationEnabled())
{
return $this->cInitOverview();
}
return $this->cSettings();
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::cUpdateSettings ( )
protected

Update course settings.

Definition at line 627 of file class.ilECSMappingSettingsGUI.php.

References $GLOBALS, cSettings(), ilECSNodeMappingSettings\getInstanceByServerMid(), getMid(), ilECSMappingUtils\getRoleMappingInfo(), getServer(), initFormCSettings(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
$form = $this->initFormCSettings();
if($form->checkInput())
{
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
$settings = ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(),$this->getMid());
$settings->enableCourseAllocation($form->getInput('enabled'));
$settings->setDefaultCourseCategory($form->getInput('default_cat'));
$settings->enableAllInOne($form->getInput('allinone'));
$settings->setAllInOneCategory($form->getInput('allinone_cat'));
$settings->enableAttributeMapping($form->getInput('multiple'));
$role_mappings = array();
foreach(ilECSMappingUtils::getRoleMappingInfo() as $name => $info)
{
$role_mappings[$name] = $form->getInput($name);
}
$settings->setRoleMappings($role_mappings);
$settings->update();
// store attribute settings
include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
$attributes = new ilECSCourseAttributes($this->getServer()->getServerId(),$this->getMid());
$attributes->delete();
$form_atts = $form->getInput('atts');
foreach($form_atts as $name)
{
if(!$name)
{
continue;
}
$att = new ilECSCourseAttribute();
$att->setServerId($this->getServer()->getServerId());
$att->setMid($this->getMid());
$att->setName($name);
$att->save();
}
//$att = new ilECSCourseAttribute();
//$att->setName($a_name)
ilUtil::sendSuccess($this->lng->txt('settings_saved'),true);
$GLOBALS['ilCtrl']->redirect($this,'cSettings');
}
ilUtil::sendFailure($this->lng->txt('err_check_input'));
$form->setValuesByPost();
$this->cSettings($form);
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::dConfirmDeleteTree ( )
protected

Delete tree settings.

Definition at line 794 of file class.ilECSMappingSettingsGUI.php.

References $_REQUEST, $GLOBALS, getMid(), getServer(), ilECSCmsData\lookupTitle(), and setSubTabs().

{
$this->setSubTabs(self::TAB_DIRECTORY);
$GLOBALS['ilTabs']->activateSubTab('dTrees');
$GLOBALS['ilTabs']->activateTab('ecs_dir_allocation');
include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
$confirm = new ilConfirmationGUI();
$confirm->setFormAction($this->ctrl->getFormAction($this));
$confirm->setHeaderText($this->lng->txt('ecs_confirm_delete_tree'));
$confirm->addItem(
'tid',
(int) $_REQUEST['tid'],
$this->getServer()->getServerId(),
$this->getMid(),
(int) $_REQUEST['tid']
)
);
$confirm->setConfirm($this->lng->txt('delete'), 'dDeleteTree');
$confirm->setCancel($this->lng->txt('cancel'), 'dTrees');
$GLOBALS['tpl']->setContent($confirm->getHTML());
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::dDeleteTree ( )
protected

Delete tree.

Definition at line 825 of file class.ilECSMappingSettingsGUI.php.

References $_REQUEST, $data, $GLOBALS, ilECSNodeMappingAssignments\deleteMappings(), ilECSImport\deleteRessources(), getMid(), getServer(), ilECSCmsData\lookupCmsIdsOfTree(), ilECSCmsTree\lookupRootId(), and ilUtil\sendSuccess().

{
include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
$GLOBALS['ilLog']->write('Deleting tree');
$tree = new ilECSCmsTree((int) $_REQUEST['tid']);
$tree->deleteTree($tree->getNodeData(ilECSCmsTree::lookupRootId((int) $_REQUEST['tid'])));
// also delete import information
include_once './Services/WebServices/ECS/classes/class.ilECSImport.php';
$this->getServer()->getServerId(),
$this->getMid(),
$this->getServer()->getServerId(),
$this->getMid(),
(int) $_REQUEST['tid']
)
);
$data->setServerId($this->getServer()->getServerId());
$data->setMid($this->getMid());
$data->setTreeId((int) $_REQUEST['tid']);
$data->deleteTree();
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
$this->getServer()->getServerId(),
$this->getMid(),
(int) $_REQUEST['tid']
);
ilUtil::sendSuccess($this->lng->txt('ecs_cms_tree_deleted'),true);
$this->ctrl->redirect($this,'dTrees');
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::dEditTree ( ilPropertyFormGUI  $form = null)
protected

Edit directory tree assignments.

Definition at line 870 of file class.ilECSMappingSettingsGUI.php.

References $GLOBALS, dInitFormTreeSettings(), dShowCmsExplorer(), and dShowLocalExplorer().

Referenced by dInitEditTree(), and dUpdateTreeSettings().

{
$GLOBALS['tpl']->addBlockFile('ADM_CONTENT','adm_content','tpl.ecs_edit_tree.html','Services/WebServices/ECS');
$this->ctrl->saveParameter($this,'cid');
$GLOBALS['ilTabs']->clearTargets();
$GLOBALS['ilTabs']->setBack2Target(
$this->lng->txt('ecs_back_settings'),
$this->ctrl->getLinkTarget($this,'cancel')
);
$GLOBALS['ilTabs']->setBackTarget(
$this->lng->txt('ecs_cms_dir_tree'),
$this->ctrl->getLinkTarget($this,'dTrees')
);
$GLOBALS['tpl']->setVariable('LEGEND',$GLOBALS['lng']->txt('ecs_status_legend'));
$GLOBALS['tpl']->setVariable('PENDING_UNMAPPED',$GLOBALS['lng']->txt('ecs_status_pending_unmapped'));
$GLOBALS['tpl']->setVariable('PENDING_UNMAPPED_DISCON',$GLOBALS['lng']->txt('ecs_status_pending_unmapped_discon'));
$GLOBALS['tpl']->setVariable('PENDING_UNMAPPED_NONDISCON',$GLOBALS['lng']->txt('ecs_status_pending_unmapped_nondiscon'));
$GLOBALS['tpl']->setVariable('MAPPED',$GLOBALS['lng']->txt('ecs_status_mapped'));
$GLOBALS['tpl']->setVariable('DELETED',$GLOBALS['lng']->txt('ecs_status_deleted'));
$form = $this->dInitFormTreeSettings($form);
$GLOBALS['tpl']->setVariable('GENERAL_FORM',$form->getHTML());
$GLOBALS['tpl']->setVariable('TFORM_ACTION',$this->ctrl->getFormAction($this,'dEditTree'));
$explorer = $this->dShowLocalExplorer();
$this->dShowCmsExplorer($explorer);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSMappingSettingsGUI::dInitEditTree ( )
protected

Init tree.

Returns

Definition at line 1171 of file class.ilECSMappingSettingsGUI.php.

References $_REQUEST, dEditTree(), getMid(), getServer(), and ilECSCmsData\updateStatus().

{
include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
$this->getServer()->getServerId(),
$this->getMid(),
(int) $_REQUEST['tid']
);
return $this->dEditTree();
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::dInitFormTreeSettings ( ilPropertyFormGUI  $form = null)
protected

Init form settings.

Definition at line 904 of file class.ilECSMappingSettingsGUI.php.

References $_REQUEST, $title, getMid(), getServer(), ilECSCmsData\lookupCmsId(), ilECSMappingUtils\lookupMappingStatus(), ilECSCmsTree\lookupRootId(), ilECSMappingUtils\MAPPED_MANUAL, ilECSMappingUtils\mappingStatusToString(), ilFormPropertyGUI\setDisabled(), ilNumberInputGUI\setValue(), and ilNonEditableValueGUI\setValue().

Referenced by dEditTree(), and dUpdateTreeSettings().

{
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSMappingUtils.php';
include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
if($form instanceof ilPropertyFormGUI)
{
return $form;
}
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignment.php';
$assignment = new ilECSNodeMappingAssignment(
$this->getServer()->getServerId(),
$this->getMid(),
(int) $_REQUEST['tid'],
0
);
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this,'dEditTree'));
$form->setTitle($this->lng->txt('general_settings'));
$form->addCommandButton('dUpdateTreeSettings', $this->lng->txt('save'));
$form->addCommandButton('dTrees', $this->lng->txt('cancel'));
$form->setTableWidth('30%');
// CMS id (readonly)
include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
$cmsid = new ilNumberInputGUI($this->lng->txt('ecs_cms_id'), 'cmsid');
$cmsid->setValue(
);
$cmsid->setDisabled(true);
$cmsid->setSize(7);
$cmsid->setMaxLength(12);
$form->addItem($cmsid);
$this->getServer()->getServerId(),
$this->getMid(),
(int) $_REQUEST['tid']);
$mapping_advanced = ($mapping_status != ilECSMappingUtils::MAPPED_MANUAL ? true : false);
// Status (readonly)
$status = new ilNonEditableValueGUI($this->lng->txt('status'), '');
$form->addItem($status);
// title update
$title = new ilCheckboxInputGUI($this->lng->txt('ecs_title_updates'), 'title');
$title->setValue(1);
$title->setChecked($assignment->isTitleUpdateEnabled());
#$title->setInfo($this->lng->txt('ecs_title_update_info'));
$form->addItem($title);
$position = new ilCheckboxInputGUI($this->lng->txt('ecs_position_updates'), 'position');
$position->setDisabled(!$mapping_advanced);
$position->setChecked($mapping_advanced && $assignment->isPositionUpdateEnabled());
$position->setValue(1);
#$position->setInfo($this->lng->txt('ecs_position_update_info'));
$form->addItem($position);
$tree = new ilCheckboxInputGUI($this->lng->txt('ecs_tree_updates'), 'tree');
$tree->setDisabled(!$mapping_advanced);
$tree->setChecked($mapping_advanced && $assignment->isTreeUpdateEnabled());
$tree->setValue(1);
#$tree->setInfo($this->lng->txt('ecs_tree_update_info'));
$form->addItem($tree);
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSMappingSettingsGUI::dMap ( )
protected

Do mapping.

Definition at line 1186 of file class.ilECSMappingSettingsGUI.php.

References $_POST, $_REQUEST, $ref_id, ilObject\_lookupObjId(), ilECSNodeMappingAssignments\deleteDisconnectableMappings(), ilECSNodeMappingAssignments\deleteMappingsByCsId(), getMid(), getServer(), ilECSNodeMappingAssignments\lookupDefaultTitleUpdate(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilECSCmsData\updateStatus().

{
if(!$_POST['lnodes'])
{
ilUtil::sendFailure($this->lng->txt('select_one'),true);
$this->ctrl->redirect($this,'dEditTree');
}
$ref_id = end($_POST['lnodes']);
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
$this->getServer()->getServerId(),
$this->getMid(),
(int) $_REQUEST['tid'],
);
$nodes = (array) $_POST['rnodes'];
$nodes = (array) array_reverse($nodes);
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignment.php';
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
foreach($nodes as $cms_id)
{
$assignment = new ilECSNodeMappingAssignment(
$this->getServer()->getServerId(),
$this->getMid(),
(int) $_REQUEST['tid'],
(int) $cms_id
);
$assignment->setRefId($ref_id);
$assignment->setObjId(ilObject::_lookupObjId($ref_id));
$assignment->enablePositionUpdate(false);
$assignment->enableTreeUpdate(false);
$this->getServer()->getServerId(),
$this->getMid(),
(int) $_REQUEST['tid']
));
$assignment->update();
// Delete subitems mappings for cms subtree
$cmsTree = new ilECSCmsTree((int) $_REQUEST['tid']);
$childs = $cmsTree->getSubTreeIds($cms_id);
$this->getServer()->getServerId(),
$this->getMid(),
(int) $_REQUEST['tid'],
$childs
);
}
$this->getServer()->getServerId(),
$this->getMid(),
(int) $_REQUEST['tid']
);
// Save parameter cid
$this->ctrl->setParameter($this,'lid',(int) $ref_id);
ilUtil::sendSuccess($this->lng->txt('settings_saved'),true);
$this->ctrl->redirect($this,'dEditTree');
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::dMappingOverview ( )
protected

Show directory trees.

Definition at line 1259 of file class.ilECSMappingSettingsGUI.php.

References $GLOBALS, and setSubTabs().

{
$this->setSubTabs(self::TAB_DIRECTORY);
$GLOBALS['ilTabs']->activateSubTab('dMappingOverview');
$GLOBALS['ilTabs']->activateTab('ecs_dir_allocation');
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::dSettings ( ilPropertyFormGUI  $form = NULL)
protected

Show directory allocation ilTabsGUI $ilTabs.

Definition at line 604 of file class.ilECSMappingSettingsGUI.php.

References $GLOBALS, initFormDSettings(), and setSubTabs().

Referenced by dStart().

{
global $ilTabs;
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
$this->setSubTabs(self::TAB_DIRECTORY);
$ilTabs->activateTab('ecs_dir_allocation');
$ilTabs->activateSubTab('dSettings');
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
if(!$form instanceof ilPropertyFormGUI)
{
$form = $this->initFormDSettings();
}
$GLOBALS['tpl']->setContent($form->getHTML());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSMappingSettingsGUI::dShowCmsExplorer ( ilExplorer  $localExplorer)
protected

Show cms explorer.

Definition at line 1100 of file class.ilECSMappingSettingsGUI.php.

References $_GET, $_REQUEST, $GLOBALS, $ref_id, getMid(), getServer(), ilECSNodeMappingAssignments\lookupAssignmentsByRefId(), ilECSNodeMappingAssignments\lookupMappedItemsForRefId(), and ilECSCmsTree\lookupRootId().

Referenced by dEditTree().

{
global $tree;
include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingCmsExplorer.php';
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
$explorer = new ilECSNodeMappingCmsExplorer(
$this->ctrl->getLinkTarget($this,'dEditTree'),
$this->getServer()->getServerId(),
$this->getMid(),
(int) $_REQUEST['tid']
);
$explorer->setRoot(ilECSCmsTree::lookupRootId((int) $_REQUEST['tid']));
$explorer->setTree(
(int) $_REQUEST['tid']
)
);
$explorer->setPostVar('rnodes[]');
// Read checked items from mapping of checked items in local explorer
$active_node = $tree->getRootId();
foreach($localExplorer->getCheckedItems() as $ref_id)
{
$explorer->setCheckedItems(
$this->getServer()->getServerId(),
$this->getMid(),
(int) $_REQUEST['tid'],
)
);
$active_node = $ref_id;
}
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
$cmsTree = new ilECSCmsTree((int) $_REQUEST['tid']);
$this->getServer()->getServerId(),
$this->getMid(),
(int) $_REQUEST['tid'],
$active_node
) as $cs_id)
{
foreach($cmsTree->getPathId($cs_id) as $path_id)
{
#$explorer->setExpand($path_id);
}
}
$explorer->setTargetGet('rref_id');
$explorer->setSessionExpandVariable('rexpand');
#if((int) $_REQUEST['rexpand'])
{
$explorer->setExpand((int) $_GET['rexpand']);
}
$explorer->setExpandTarget($this->ctrl->getLinkTarget($this,'dEditTree'));
$explorer->setOutput(0);
$GLOBALS['tpl']->setVariable('REMOTE_EXPLORER',$explorer->getOutput());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSMappingSettingsGUI::dShowLocalExplorer ( )
protected

Show local explorer.

Definition at line 1060 of file class.ilECSMappingSettingsGUI.php.

References $_GET, $_REQUEST, $GLOBALS, getMid(), getServer(), and ilECSNodeMappingLocalExplorer\setPostVar().

Referenced by dEditTree().

{
global $tree;
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingLocalExplorer.php';
$this->ctrl->getLinkTarget($this,'dEditTree'),
$this->getServer()->getServerId(),
$this->getMid()
);
$explorer->setPostVar('lnodes[]');
$lnodes = (array) $_REQUEST['lnodes'];
$checked_node = array_pop($lnodes);
if((int) $_REQUEST['lid'])
{
$checked_node = (int) $_REQUEST['lid'];
}
if($checked_node)
{
$explorer->setCheckedItems(array($checked_node));
}
else
{
$explorer->setCheckedItems(array(ROOT_FOLDER_ID));
}
$explorer->setTargetGet('lref_id');
$explorer->setSessionExpandVariable('lexpand');
$explorer->setExpand((int) $_GET['lexpand']);
$explorer->setExpandTarget($this->ctrl->getLinkTarget($this,'dEditTree'));
$explorer->setOutput(0);
$GLOBALS['tpl']->setVariable('LOCAL_EXPLORER',$explorer->getOutput());
return $explorer;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSMappingSettingsGUI::dStart ( )
protected

Goto default page.

Returns
<type>

Definition at line 135 of file class.ilECSMappingSettingsGUI.php.

References dSettings(), dTrees(), ilECSNodeMappingSettings\getInstanceByServerMid(), getMid(), and getServer().

{
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
if(ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(),$this->getMid())->isDirectoryMappingEnabled())
{
return $this->dTrees();
}
return $this->dSettings();
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::dSynchronizeTree ( )
protected

Synchronize Tree.

Definition at line 1016 of file class.ilECSMappingSettingsGUI.php.

References $_REQUEST, getServer(), and ilUtil\sendSuccess().

{
include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsTreeSynchronizer.php';
$this->getServer(),
$this->mid,
(int) $_REQUEST['tid']
);
$sync->sync();
ilUtil::sendSuccess($this->lng->txt('ecs_cms_tree_synchronized'),true);
$this->ctrl->redirect($this,'dTrees');
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::dSynchronizeTrees ( )
protected

Definition at line 1029 of file class.ilECSMappingSettingsGUI.php.

References $res, getServer(), ilUtil\sendFailure(), ilECSEventQueueReader\TYPE_DIRECTORY_TREES, and ilECSEvent\UPDATED.

{
include_once './Services/WebServices/ECS/classes/Tree/class.ilECSDirectoryTreeConnector.php';
try
{
$connector = new ilECSDirectoryTreeConnector($this->getServer());
$res = $connector->getDirectoryTrees();
foreach((array) $res->getLinkIds() as $cms_id)
{
include_once './Services/WebServices/ECS/classes/class.ilECSEventQueueReader.php';
include_once './Services/WebServices/ECS/classes/class.ilECSEvent.php';
$event = new ilECSEventQueueReader($this->getServer()->getServerId());
$event->add(
$cms_id,
);
}
$this->ctrl->redirect($this,'dTrees');
}
catch(Exception $e)
{
ilUtil::sendFailure($e->getMessage(),true);
$this->ctrl->redirect($this,'dTrees');
}
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::dTrees ( )
protected

Show directory trees.

Definition at line 765 of file class.ilECSMappingSettingsGUI.php.

References $GLOBALS, getMid(), getServer(), and setSubTabs().

Referenced by dStart().

{
global $ilToolbar;
$this->setSubTabs(self::TAB_DIRECTORY);
$GLOBALS['ilTabs']->activateSubTab('dTrees');
$GLOBALS['ilTabs']->activateTab('ecs_dir_allocation');
$ilToolbar->addButton(
$this->lng->txt('ecs_sync_trees'),
$this->ctrl->getLinkTarget($this, 'dSynchronizeTrees'));
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingTreeTableGUI.php';
$dtreeTable = new ilECSNodeMappingTreeTableGUI(
$this->getServer()->getServerId(),
$this->getMid(),
$this,
'dtree');
$dtreeTable->parse();
$GLOBALS['tpl']->setContent($dtreeTable->getHTML());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSMappingSettingsGUI::dUpdateSettings ( )
protected

Update node mapping settings.

Definition at line 713 of file class.ilECSMappingSettingsGUI.php.

References $ilCtrl, ilECSNodeMappingSettings\getInstanceByServerMid(), getMid(), getServer(), initFormDSettings(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $ilCtrl;
$form = $this->initFormDSettings();
if($form->checkInput())
{
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
$settings = ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(),$this->getMid());
$settings->enableDirectoryMapping((bool) $form->getInput('active'));
$settings->enableEmptyContainerCreation(!$form->getInput('empty'));
$settings->update();
ilUtil::sendSuccess($this->lng->txt('settings_saved'),true);
}
else
{
ilUtil::sendFailure($this->lng->txt('err_check_input'),true);
$form->setValuesByPost();
}
$ilCtrl->redirect($this,'dSettings');
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::dUpdateTreeSettings ( )
protected
Returns
boolean Update global settings

Definition at line 982 of file class.ilECSMappingSettingsGUI.php.

References $_REQUEST, dEditTree(), dInitFormTreeSettings(), getMid(), getServer(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignment.php';
include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
$assignment = new ilECSNodeMappingAssignment(
$this->getServer()->getServerId(),
$this->getMid(),
(int) $_REQUEST['tid'],
0
);
$assignment->setRefId(0);
$assignment->setObjId(0);
$form = $this->dInitFormTreeSettings();
if($form->checkInput())
{
$assignment->enableTitleUpdate($form->getInput('title'));
$assignment->enableTreeUpdate($form->getInput('tree'));
$assignment->enablePositionUpdate($form->getInput('position'));
$assignment->update();
ilUtil::sendSuccess($this->lng->txt('settings_saved',true));
$this->ctrl->redirect($this,'dEditTree');
}
$form->setValuesByPost();
ilUtil::sendFailure($this->lng->txt('err_check_input'));
$this->dEditTree($form);
return true;
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::executeCommand ( )

ilCtrl executeCommand

Definition at line 73 of file class.ilECSMappingSettingsGUI.php.

References $cmd, $GLOBALS, $ilCtrl, getServer(), and setTabs().

{
global $ilCtrl;
$GLOBALS['tpl']->setTitle($this->lng->txt('ecs_campus_connect_title'));
$this->ctrl->saveParameter($this,'server_id');
$this->ctrl->saveParameter($this,'mid');
$this->ctrl->saveParameter($this,'tid');
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->setTabs();
switch($next_class)
{
default:
if(!$cmd)
{
$cmd = "cStart";
}
$this->$cmd();
break;
}
$GLOBALS['tpl']->setTitle($this->getServer()->getTitle());
$GLOBALS['tpl']->setDescription('');
return true;
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::getContainer ( )

Get container object.

Returns
ilObjectGUI

Definition at line 47 of file class.ilECSMappingSettingsGUI.php.

References $container.

{
}
ilECSMappingSettingsGUI::initFormCSettings ( )
protected

Init settings form.

Definition at line 487 of file class.ilECSMappingSettingsGUI.php.

References $path, $tpl, ilECSMappingUtils\getCourseMappingFieldSelectOptions(), ilECSCourseAttributes\getInstance(), ilECSNodeMappingSettings\getInstanceByServerMid(), getMid(), ilECSMappingUtils\getRoleMappingInfo(), getServer(), ilCheckboxInputGUI\setChecked(), ilSelectInputGUI\setMulti(), ilFormPropertyGUI\setRequired(), and ilTextInputGUI\setValue().

Referenced by cSettings(), and cUpdateSettings().

{
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt('settings'));
// individual course allocation
$check = new ilCheckboxInputGUI($this->lng->txt('ecs_cmap_enable'), 'enabled');
$check->setChecked(ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(),$this->getMid())->isCourseAllocationEnabled());
$form->addItem($check);
// add default container
$imp = new ilCustomInputGUI($this->lng->txt('ecs_cmap_def_cat'),'default_cat');
$imp->setRequired(true);
$tpl = new ilTemplate('tpl.ecs_import_id_form.html',true,true,'Services/WebServices/ECS');
$tpl->setVariable('SIZE',5);
$tpl->setVariable('MAXLENGTH',11);
$tpl->setVariable('POST_VAR','default_cat');
$default = ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(),$this->getMid())->getDefaultCourseCategory();
$tpl->setVariable('PROPERTY_VALUE',$default);
if($default)
{
include_once './Services/Tree/classes/class.ilPathGUI.php';
$path = new ilPathGUI();
$path->enableTextOnly(false);
$path->enableHideLeaf(false);
$tpl->setVariable('COMPLETE_PATH',$path->getPath(ROOT_FOLDER_ID, $default));
}
$imp->setHtml($tpl->get());
$imp->setInfo($this->lng->txt('ecs_cmap_def_cat_info'));
$form->addItem($imp);
// all in one category
$allinone = new ilCheckboxInputGUI($this->lng->txt('ecs_cmap_all_in_one'),'allinone');
$allinone->setChecked(ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(),$this->getMid())->isAllInOneCategoryEnabled());
$allinone->setInfo($this->lng->txt('ecs_cmap_all_in_one_info'));
$allinone_cat = new ilCustomInputGUI($this->lng->txt('ecs_cmap_all_in_one_cat'),'allinone_cat');
$allinone_cat->setRequired(true);
$tpl = new ilTemplate('tpl.ecs_import_id_form.html',true,true,'Services/WebServices/ECS');
$tpl->setVariable('SIZE',5);
$tpl->setVariable('MAXLENGTH',11);
$tpl->setVariable('POST_VAR','allinone_cat');
$cat = ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(),$this->getMid())->getAllInOneCategory();
$tpl->setVariable('PROPERTY_VALUE',$cat);
if($cat)
{
include_once './Services/Tree/classes/class.ilPathGUI.php';
$path = new ilPathGUI();
$path->enableTextOnly(false);
$path->enableHideLeaf(false);
$tpl->setVariable('COMPLETE_PATH',$path->getPath(ROOT_FOLDER_ID, $default));
}
$allinone_cat->setHtml($tpl->get());
$allinone->addSubItem($allinone_cat);
$form->addItem($allinone);
// multiple attributes
$multiple = new ilCheckboxInputGUI($this->lng->txt('ecs_cmap_multiple_atts'),'multiple');
$multiple->setChecked(ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(),$this->getMid())->isAttributeMappingEnabled());
// attribute selection
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSMappingUtils.php';
include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
$attributes = new ilSelectInputGUI($this->lng->txt('ecs_cmap_attributes'),'atts');
$attributes->setMulti(true);
$attributes->setValue(
$this->getServer()->getServerId(),
$this->getMid()
)->getAttributeValues());
$attributes->setRequired(true);
$multiple->addSubItem($attributes);
$form->addItem($multiple);
// role mapping
$rm->setTitle($this->lng->txt('ecs_role_mappings'));
$form->addItem($rm);
$mapping_defs = ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(),$this->getMid())->getRoleMappings();
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSMappingUtils.php';
foreach(ilECSMappingUtils::getRoleMappingInfo() as $name => $info)
{
$role_map = new ilTextInputGUI($this->lng->txt($info['lang']),$name);
$role_map->setValue($mapping_defs[$name]);
$role_map->setSize(32);
$role_map->setMaxLength(64);
$role_map->setRequired($info['required']);
$form->addItem($role_map);
}
$form->addCommandButton('cUpdateSettings',$this->lng->txt('save'));
$form->addCommandButton('cSettings', $this->lng->txt('cancel'));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSMappingSettingsGUI::initFormDSettings ( )
protected

Definition at line 738 of file class.ilECSMappingSettingsGUI.php.

References ilECSNodeMappingSettings\getInstanceByServerMid(), getMid(), getServer(), and ilCheckboxInputGUI\setChecked().

Referenced by dSettings(), and dUpdateSettings().

{
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt('general_settings'));
$active = new ilCheckboxInputGUI($this->lng->txt('ecs_node_mapping_activate'), 'active');
$active->setChecked(ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(),$this->getMid())->isDirectoryMappingEnabled());
$form->addItem($active);
$create_empty = new ilCheckboxInputGUI($this->lng->txt('ecs_node_mapping_create_empty'), 'empty');
$create_empty->setChecked(!ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(),$this->getMid())->isEmptyContainerCreationEnabled());
$create_empty->setInfo($this->lng->txt('ecs_node_mapping_create_empty_info'));
$form->addItem($create_empty);
$form->addCommandButton('dUpdateSettings',$this->lng->txt('save'));
$form->addCommandButton('cancel', $this->lng->txt('cancel'));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSMappingSettingsGUI::setSubTabs (   $a_tab)
protected

Set Sub tabs ilTabsGUI $ilTabs.

Parameters
string$a_tab

Definition at line 1305 of file class.ilECSMappingSettingsGUI.php.

References ilECSCourseAttributes\getInstance(), ilECSNodeMappingSettings\getInstanceByServerMid(), getMid(), and getServer().

Referenced by cAttributes(), cInitOverview(), cSettings(), dConfirmDeleteTree(), dMappingOverview(), dSettings(), and dTrees().

{
global $ilTabs;
if($a_tab == self::TAB_DIRECTORY)
{
$ilTabs->addSubTab(
'dMappingOverview',
$this->lng->txt('ecs_cc_mapping_overview'),
$this->ctrl->getLinkTarget($this,'dMappingOverview')
);
$ilTabs->addSubTab(
'dTrees',
$this->lng->txt('ecs_cms_dir_tree'),
$this->ctrl->getLinkTarget($this,'dTrees')
);
$ilTabs->addSubTab(
'dSettings',
$this->lng->txt('settings'),
$this->ctrl->getLinkTarget($this,'dSettings')
);
}
if($a_tab == self::TAB_COURSE)
{
// Check if attributes are available
include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
$atts = ilECSCourseAttributes::getInstance($this->getServer()->getServerId(), $this->getMid());
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
if(ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(),$this->getMid())->isCourseAllocationEnabled())
{
$ilTabs->addSubTab(
'cInitTree',
$this->lng->txt('ecs_cmap_overview'),
$this->ctrl->getLinkTarget($this,'cInitOverview')
);
}
$ilTabs->addSubTab(
'cSettings',
$this->lng->txt('settings'),
$this->ctrl->getLinkTarget($this,'cSettings')
);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSMappingSettingsGUI::setTabs ( )
protected

Set tabs ilTabsGUI $ilTabs.

Definition at line 1272 of file class.ilECSMappingSettingsGUI.php.

References getMid(), getServer(), and ilECSParticipantSettings\loookupCmsMid().

Referenced by executeCommand().

{
global $ilTabs;
include_once './Services/WebServices/ECS/classes/class.ilECSParticipantSettings.php';
$ilTabs->clearTargets();
$ilTabs->setBackTarget(
$this->lng->txt('ecs_back_settings'),
$this->ctrl->getParentReturn($this)
);
// Directories are only visible for import type campus managment.
if(ilECSParticipantSettings::loookupCmsMid($this->getServer()->getServerId()) == $this->getMid())
{
$ilTabs->addTab(
'ecs_dir_allocation',
$this->lng->txt('ecs_dir_alloc'),
$this->ctrl->getLinkTarget($this,'dSettings')
);
}
$ilTabs->addTab(
'ecs_crs_allocation',
$this->lng->txt('ecs_crs_alloc'),
$this->ctrl->getLinkTarget($this,'cStart')
);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilECSMappingSettingsGUI::$container = null
private

Definition at line 20 of file class.ilECSMappingSettingsGUI.php.

Referenced by getContainer().

ilECSMappingSettingsGUI::$ctrl = null
protected

Definition at line 25 of file class.ilECSMappingSettingsGUI.php.

ilECSMappingSettingsGUI::$lng = null
protected

Definition at line 24 of file class.ilECSMappingSettingsGUI.php.

Referenced by __construct().

ilECSMappingSettingsGUI::$mid = null
private

Definition at line 22 of file class.ilECSMappingSettingsGUI.php.

Referenced by __construct(), and getMid().

ilECSMappingSettingsGUI::$server = null
private

Definition at line 21 of file class.ilECSMappingSettingsGUI.php.

Referenced by getServer().

const ilECSMappingSettingsGUI::TAB_COURSE = 2

Definition at line 18 of file class.ilECSMappingSettingsGUI.php.

const ilECSMappingSettingsGUI::TAB_DIRECTORY = 1

Definition at line 17 of file class.ilECSMappingSettingsGUI.php.


The documentation for this class was generated from the following file: