ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilECSMappingSettingsGUI Class Reference
+ Collaboration diagram for ilECSMappingSettingsGUI:

Public Member Functions

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

Data Fields

const TAB_DIRECTORY = 1
 
const TAB_COURSE = 2
 

Protected Member Functions

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

Protected Attributes

 $log
 
 $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

◆ __construct()

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

Constructor.

Parameters
ilObjectGUI$settingsContainer

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

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

37  {
38  global $lng,$ilCtrl;
39 
40  $this->log = $GLOBALS['DIC']->logger()->wsrv();
41 
42  $this->container = $settingsContainer;
43  $this->server = ilECSSetting::getInstanceByServerId($server_id);
44  $this->mid = $mid;
45  $this->lng = $lng;
46  $this->lng->loadLanguageModule('ecs');
47  $this->ctrl = $ilCtrl;
48  }
static getInstanceByServerId($a_server_id)
Get singleton instance per server.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

Member Function Documentation

◆ cAddAttribute()

ilECSMappingSettingsGUI::cAddAttribute ( )
protected

Add one attribute in form.

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

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

205  {
206  include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
207  $next_attribute = ilECSCourseAttributes::getInstance($this->getServer()->getServerId(), $this->getMid())->getNextAttributeName((string) $_REQUEST['ecs_ca']);
208  $this->cInitOverview(null, $next_attribute);
209  }
cInitOverview($form=null, $current_attribute=null)
Show overview page.
static getInstance($a_server_id, $a_mid)
Get instance.
+ Here is the call graph for this function:

◆ cancel()

ilECSMappingSettingsGUI::cancel ( )

return to parent container

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

References $GLOBALS.

113  {
114  $GLOBALS['ilCtrl']->returnToParent($this);
115  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

◆ cAttributes()

ilECSMappingSettingsGUI::cAttributes ( )
protected

Show active attributes ilTabsGUI $ilTabs.

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

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

672  {
673  global $ilTabs;
674 
675  $this->setSubTabs(self::TAB_COURSE);
676  $ilTabs->setTabActive('ecs_crs_allocation');
677  $ilTabs->setSubTabActive('cAttributes');
678 
679  include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributesTableGUI.php';
680  $table = new ilECSCourseAttributesTableGUI(
681  $this,
682  'attributes',
683  $this->getServer()->getServerId(),
684  $this->getMid()
685  );
686  $table->init();
687  $table->parse(
689  $this->getServer()->getServerId(),
690  $this->getMid()
691  )->getAttributes()
692  );
693 
694  $GLOBALS['tpl']->setContent($table->getHTML());
695  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static getInstance($a_server_id, $a_mid)
Get instance.
if(empty($password)) $table
Definition: pwgen.php:24
setSubTabs($a_tab)
Set Sub tabs ilTabsGUI $ilTabs.
+ Here is the call graph for this function:

◆ cDeleteAttribute()

ilECSMappingSettingsGUI::cDeleteAttribute ( )
protected

Delete last attribute in form.

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

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

215  {
216  include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
217  $prev_attribute = ilECSCourseAttributes::getInstance($this->getServer()->getServerId(), $this->getMid())->getPreviousAttributeName((string) $_REQUEST['ecs_ca']);
218  $this->cInitOverview(null, $prev_attribute);
219  }
cInitOverview($form=null, $current_attribute=null)
Show overview page.
static getInstance($a_server_id, $a_mid)
Get instance.
+ Here is the call graph for this function:

◆ cDeleteRulesOfNode()

ilECSMappingSettingsGUI::cDeleteRulesOfNode ( )
protected

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

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

427  {
428  $current_node = (int) $_REQUEST['lnodes'];
429 
430  include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseMappingRule.php';
432  $this->getServer()->getServerId(),
433  $this->getMid(),
434  $current_node
435  );
436 
437  foreach ($rules as $rid) {
438  $rule = new ilECSCourseMappingRule($rid);
439  $rule->delete();
440  }
441  ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
442  $this->ctrl->redirect($this, 'cInitOverview');
443  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static getRulesOfRefId($a_sid, $a_mid, $a_ref_id)
Get all rule of ref_id type $ilDB.
$rule
Definition: showstats.php:43
+ Here is the call graph for this function:

◆ cInitMappingForm()

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

Init the mapping form.

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

References $attributes, $form, $rule, $section, ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilECSCourseAttributes\getInstance(), ilECSCourseMappingRule\getInstanceByAttribute(), getMid(), getServer(), ilECSCourseMappingRule\hasRules(), ilCheckboxInputGUI\setChecked(), ilRadioOption\setInfo(), ilRadioGroupInputGUI\setValue(), and ilRadioOption\setValue().

Referenced by cInitOverview(), and cSaveOverview().

259  {
260  include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
261  $attributes_obj = ilECSCourseAttributes::getInstance($this->getServer()->getServerId(), $this->getMid());
262 
263  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
264  $form = new ilPropertyFormGUI();
265  $form->setTableWidth("100%");
266  $this->ctrl->setParameter($this, 'ecs_ca', $current_attribute);
267  $form->setFormAction($this->ctrl->getFormAction($this));
268  $this->ctrl->setParameter($this, 'ecs_ca', '');
269 
270  $form->setTitle($this->lng->txt('ecs_cmap_mapping_form_title') . ' ' . ilObject::_lookupTitle(ilObject::_lookupObjId($current_node)));
271 
272  // Iterate through all current attributes
273  $attributes = $attributes_obj->getAttributeSequence($current_attribute);
274  foreach ($attributes as $att_name) {
275  include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseMappingRule.php';
276  $rule = ilECSCourseMappingRule::getInstanceByAttribute($this->getServer()->getServerId(), $this->getMid(), $current_node, $att_name);
277 
279  $section->setTitle($this->lng->txt('ecs_cmap_att_' . $att_name));
280 
281  // Filter
282  $form->addItem($section);
283 
284  $isfilter = new ilRadioGroupInputGUI($this->lng->txt('ecs_cmap_form_filter'), $att_name . '_is_filter');
285  $isfilter->setValue($rule->isFilterEnabled() ? 1 : 0);
286 
287  $all_values = new ilRadioOption($this->lng->txt('ecs_cmap_form_all_values'), 0);
288  $isfilter->addOption($all_values);
289 
290  $use_filter = new ilRadioOption($this->lng->txt('ecs_cmap_form_filter_by_values'), 1);
291  $filter = new ilTextInputGUI('', $att_name . '_filter');
292  $filter->setInfo($this->lng->txt('ecs_cmap_form_filter_info'));
293  $filter->setSize(50);
294  $filter->setMaxLength(512);
295  $filter->setRequired(true);
296  $filter->setValue($rule->getFilter());
297  $use_filter->addSubItem($filter);
298 
299  $isfilter->addOption($use_filter);
300 
301  $form->addItem($isfilter);
302 
303  // Create subdirs
304  $subdirs = new ilCheckboxInputGUI($this->lng->txt('ecs_cmap_form_create_subdirs'), $att_name . '_subdirs');
305  $subdirs->setChecked($rule->isSubdirCreationEnabled());
306  $subdirs->setValue(1);
307 
308  // Subdir types (disabled in spec)
309  /*
310  $subdir_type = new ilRadioGroupInputGUI($this->lng->txt('ecs_cmap_form_subdir_type'), $att_name.'_subdir_type');
311  $subdir_type->setValue($rule->getSubDirectoryType());
312 
313  $value = new ilRadioOption($this->lng->txt('ecs_cmap_form_subdir_value'), ilECSCourseMappingRule::SUBDIR_VALUE);
314  $subdir_type->addOption($value);
315 
316  $name = new ilRadioOption($this->lng->txt('ecs_cmap_form_subdir_name'), ilECSCourseMappingRule::SUBDIR_ATTRIBUTE_NAME);
317  $subdir_type->addOption($name);
318 
319  $subdirs->addSubItem($subdir_type);
320  */
321  $form->addItem($subdirs);
322 
323  // Directory relations
324  /*
325  $upper_attributes = ilECSCourseAttributes::getInstance(
326  $this->getServer()->getServerId(),
327  $this->getMid())->getUpperAttributes($att_name);
328 
329  if($upper_attributes)
330  {
331  $dir_relation = new ilRadioGroupInputGUI($this->lng->txt('ecs_cmap_form_dir_relation'),$att_name.'_dir_relation');
332 
333  $current_dir = new ilRadioOption($this->lng->txt('ecs_cmap_form_current_dir'),'');
334  $dir_relation->addOption($current_dir);
335  }
336  foreach($upper_attributes as $subdir_name)
337  {
338  $subdir = new ilRadioOption($this->lng->txt('ecs_cmap_att_'.$subdir_name),$subdir_name);
339  $dir_relation->addOption($subdir);
340  }
341  if($upper_attributes)
342  {
343  $dir_relation->setValue((string) $rule->getDirectory());
344  $form->addItem($dir_relation);
345  }
346  */
347  }
348 
349  // add list of attributes
350  $hidden_atts = new ilHiddenInputGUI('attributes');
351  $hidden_atts->setValue(implode(',', $attributes));
352  $form->addItem($hidden_atts);
353 
354 
355  if ($current_attribute) {
356  $form->addCommandButton('cSaveOverview', $this->lng->txt('save'));
357  }
358 
359  if ($attributes_obj->getNextAttributeName($current_attribute)) {
360  $form->addCommandButton('cAddAttribute', $this->lng->txt('ecs_cmap_add_attribute_btn'));
361  }
362  if ($attributes_obj->getPreviousAttributeName($current_attribute)) {
363  $form->addCommandButton('cDeleteAttribute', $this->lng->txt('ecs_cmap_delete_attribute_btn'));
364  }
366  $this->getServer()->getServerId(),
367  $this->getMid(),
368  $current_node
369  )) {
370  $form->addCommandButton('cDeleteRulesOfNode', $this->lng->txt('ecs_cmap_delete_rule'));
371  }
372 
373  #$form->addCommandButton('cInitOverview', $this->lng->txt('cancel'));
374 
375  $form->setShowTopButtons(false);
376 
377  return $form;
378  }
This class represents an option in a radio group.
static hasRules($a_sid, $a_mid, $a_ref_id)
This class represents a property form user interface.
This class represents a section header in a property form.
$attributes
This class represents a checkbox property in a property form.
static _lookupTitle($a_id)
lookup object title
setInfo($a_info)
Set Info.
$section
Definition: Utf8Test.php:83
setChecked($a_checked)
Set Checked.
This class represents a hidden form property in a property form.
This class represents a property in a property form.
setValue($a_value)
Set Value.
if(isset($_POST['submit'])) $form
$rule
Definition: showstats.php:43
static _lookupObjId($a_id)
static getInstance($a_server_id, $a_mid)
Get instance.
This class represents a text property in a property form.
static getInstanceByAttribute($a_sid, $a_mid, $a_ref_id, $a_att)
Get rule instance by attribute type $ilDB.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cInitOverview()

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

Show overview page.

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

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

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

152  {
153  global $ilTabs;
154 
155  $current_node = (array) (($_REQUEST['lnodes']) ? $_REQUEST['lnodes'] : ROOT_FOLDER_ID);
156  $current_node = end($current_node);
157 
158  $this->ctrl->setParameter($this, 'lnodes', $current_node);
159 
160  $this->setSubTabs(self::TAB_COURSE);
161  $ilTabs->activateTab('ecs_crs_allocation');
162  $ilTabs->activateSubTab('cInitTree');
163 
164  $GLOBALS['tpl']->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.ecs_cmap_overview.html', 'Services/WebServices/ECS');
165 
166  $explorer = $this->cShowLocalExplorer();
167  if (!$form instanceof ilPropertyFormGUI) {
168  include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseMappingRule.php';
169  include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
170 
171  if ($current_attribute === null) {
172  // check request
173  $current_attribute = (string) $_REQUEST['ecs_ca'];
174  if (!$current_attribute) {
176  $this->getServer()->getServerId(),
177  $this->getMid(),
178  $current_node
179  );
180 
181  $current_attribute =
182  $existing ?
183  $existing :
184  '';
185  /*
186  ilECSCourseAttributes::getInstance(
187  $this->getServer()->getServerId(),
188  $this->getMid())->getFirstAttributeName()
189  );
190  */
191  }
192  }
193  $form = $this->cInitMappingForm($current_node, $current_attribute);
194  }
195 
196  $GLOBALS['tpl']->setVariable('TFORM_ACTION', $this->ctrl->getFormAction($this));
197  $GLOBALS['tpl']->setVariable('LOCAL_EXPLORER', $explorer->getOutput());
198  $GLOBALS['tpl']->setVariable('MAPPING_FORM', $form->getHTML());
199  }
Add rich text string
This class represents a property form user interface.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
cShowLocalExplorer()
Show local explorer.
if(isset($_POST['submit'])) $form
static lookupLastExistingAttribute($a_sid, $a_mid, $a_ref_id)
Lookup existing attributes.
Create styles array
The data for the language used.
cInitMappingForm($current_node, $current_attribute)
Init the mapping form.
setSubTabs($a_tab)
Set Sub tabs ilTabsGUI $ilTabs.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cSaveOverview()

ilECSMappingSettingsGUI::cSaveOverview ( )
protected

Save overview.

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

References $form, $rule, array, cInitMappingForm(), cInitOverview(), ilECSCourseMappingRule\getInstanceByAttribute(), getMid(), getServer(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and string.

384  {
385  $current_node = (int) $_REQUEST['lnodes'];
386  $current_att = (string) $_REQUEST['ecs_ca'];
387  $form = $this->cInitMappingForm($current_node, $current_att);
388 
389  if ($form->checkInput()) {
390  // save ...
391  $all_attributes = explode(',', $form->getInput('attributes'));
392  foreach ((array) $all_attributes as $att_name) {
394  $this->getServer()->getServerId(),
395  $this->getMid(),
396  $current_node,
397  $att_name
398  );
399  $rule->setServerId($this->getServer()->getServerId());
400  $rule->setMid($this->getMid());
401  $rule->setRefId($current_node);
402  $rule->setAttribute($att_name);
403  $rule->enableFilter($form->getInput($att_name . '_is_filter'));
404  $rule->setFilter($form->getInput($att_name . '_filter'));
405  $rule->enableSubdirCreation($form->getInput($att_name . '_subdirs'));
406  //$rule->setSubDirectoryType($form->getInput($att_name.'_subdir_type'));
407  //$rule->setDirectory($form->getInput($att_name.'_dir_relation'));
408 
409  if ($rule->getRuleId()) {
410  $rule->update();
411  } else {
412  $rule->save();
413  }
414  }
415 
416  ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
417  $this->ctrl->setParameter($this, 'lnodes', $current_node);
418  $this->ctrl->redirect($this, 'cInitOverview');
419  }
420 
421  $form->setValuesByPost();
422  ilUtil::sendFailure($this->lng->txt('err_check_input'));
423  $this->cInitOverview($form, $current_att);
424  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Add rich text string
if(isset($_POST['submit'])) $form
$rule
Definition: showstats.php:43
cInitOverview($form=null, $current_attribute=null)
Show overview page.
Create styles array
The data for the language used.
static getInstanceByAttribute($a_sid, $a_mid, $a_ref_id, $a_att)
Get rule instance by attribute type $ilDB.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
cInitMappingForm($current_node, $current_attribute)
Init the mapping form.
+ Here is the call graph for this function:

◆ cSettings()

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

Show course allocation ilTabsGUI $ilTabs.

Returns
bool

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

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

Referenced by cStart(), and cUpdateSettings().

454  {
455  global $ilTabs;
456 
457  $this->setSubTabs(self::TAB_COURSE);
458  $ilTabs->activateTab('ecs_crs_allocation');
459  $ilTabs->activateSubTab('cSettings');
460 
461  if (!$form instanceof ilPropertyFormGUI) {
462  $form = $this->initFormCSettings();
463  }
464 
465  $GLOBALS['tpl']->setContent($form->getHTML());
466 
467  return true;
468  }
This class represents a property form user interface.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
setSubTabs($a_tab)
Set Sub tabs ilTabsGUI $ilTabs.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cShowLocalExplorer()

ilECSMappingSettingsGUI::cShowLocalExplorer ( )
protected

Show local explorer.

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

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

Referenced by cInitOverview().

225  {
226  global $tree;
227 
228  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingLocalExplorer.php';
229  $explorer = new ilECSNodeMappingLocalExplorer(
230  $this->ctrl->getLinkTarget($this, 'cInitOverview'),
231  $this->getServer()->getServerId(),
232  $this->getMid()
233  );
234  $explorer->setPostVar('lnodes[]');
235 
236  $lnodes = (array) $_REQUEST['lnodes'];
237  $checked_node = array_pop($lnodes);
238  if ((int) $_REQUEST['lid']) {
239  $checked_node = (int) $_REQUEST['lid'];
240  }
241 
242  if ($checked_node) {
243  $explorer->setCheckedItems(array($checked_node));
244  } else {
245  $explorer->setCheckedItems(array(ROOT_FOLDER_ID));
246  }
247  $explorer->setTargetGet('lref_id');
248  $explorer->setSessionExpandVariable('lexpand');
249  $explorer->setExpand((int) $_GET['lexpand']);
250  $explorer->setExpandTarget($this->ctrl->getLinkTarget($this, 'cInitOverview'));
251  $explorer->setOutput(0);
252  return $explorer;
253  }
$_GET["client_id"]
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cStart()

ilECSMappingSettingsGUI::cStart ( )
protected

Goto default page.

Returns
<type>

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

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

127  {
128  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
129  if (ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(), $this->getMid())->isCourseAllocationEnabled()) {
130  return $this->cInitOverview();
131  }
132  return $this->cSettings();
133  }
cSettings(ilPropertyFormGUI $form=null)
Show course allocation ilTabsGUI $ilTabs.
static getInstanceByServerMid($a_server_id, $a_mid)
Get instance.
cInitOverview($form=null, $current_attribute=null)
Show overview page.
+ Here is the call graph for this function:

◆ cUpdateSettings()

ilECSMappingSettingsGUI::cUpdateSettings ( )
protected

Update course settings.

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

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

617  {
618  $form = $this->initFormCSettings();
619  if ($form->checkInput()) {
620  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
621  $settings = ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(), $this->getMid());
622  $settings->enableCourseAllocation($form->getInput('enabled'));
623  $settings->setDefaultCourseCategory($form->getInput('default_cat'));
624  $settings->enableAllInOne($form->getInput('allinone'));
625  $settings->setAllInOneCategory($form->getInput('allinone_cat'));
626  $settings->enableAttributeMapping($form->getInput('multiple'));
627  $settings->setAuthMode($form->getInput('auth_mode'));
628 
629 
630  $role_mappings = array();
632  $role_mappings[$name] = $form->getInput($name);
633  }
634  $settings->setRoleMappings($role_mappings);
635  $settings->update();
636 
637  // store attribute settings
638  include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
639  $attributes = new ilECSCourseAttributes($this->getServer()->getServerId(), $this->getMid());
640  $attributes->delete();
641 
642  $form_atts = $form->getInput('atts');
643 
644  foreach ($form_atts as $name) {
645  if (!$name) {
646  continue;
647  }
648 
649  $att = new ilECSCourseAttribute();
650  $att->setServerId($this->getServer()->getServerId());
651  $att->setMid($this->getMid());
652  $att->setName($name);
653  $att->save();
654  }
655 
656  //$att = new ilECSCourseAttribute();
657  //$att->setName($a_name)
658 
659  ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
660  $GLOBALS['ilCtrl']->redirect($this, 'cSettings');
661  }
662  ilUtil::sendFailure($this->lng->txt('err_check_input'));
663  $form->setValuesByPost();
664  $this->cSettings($form);
665  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static getRoleMappingInfo($a_role_type_info=0)
Get role mapping info.
cSettings(ilPropertyFormGUI $form=null)
Show course allocation ilTabsGUI $ilTabs.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static getInstanceByServerMid($a_server_id, $a_mid)
Get instance.
$attributes
if($format !==null) $name
Definition: metadata.php:146
if(isset($_POST['submit'])) $form
Storage of course attributes for assignment rules.
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Storage of course attributes for assignment rules.
$info
Definition: index.php:5
+ Here is the call graph for this function:

◆ dConfirmDeleteTree()

ilECSMappingSettingsGUI::dConfirmDeleteTree ( )
protected

Delete tree settings.

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

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

783  {
784  $this->setSubTabs(self::TAB_DIRECTORY);
785  $GLOBALS['ilTabs']->activateSubTab('dTrees');
786  $GLOBALS['ilTabs']->activateTab('ecs_dir_allocation');
787 
788  include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
789  include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
790 
791  $confirm = new ilConfirmationGUI();
792  $confirm->setFormAction($this->ctrl->getFormAction($this));
793  $confirm->setHeaderText($this->lng->txt('ecs_confirm_delete_tree'));
794 
795  $confirm->addItem(
796  'tid',
797  (int) $_REQUEST['tid'],
799  $this->getServer()->getServerId(),
800  $this->getMid(),
801  (int) $_REQUEST['tid']
802  )
803  );
804  $confirm->setConfirm($this->lng->txt('delete'), 'dDeleteTree');
805  $confirm->setCancel($this->lng->txt('cancel'), 'dTrees');
806 
807  $GLOBALS['tpl']->setContent($confirm->getHTML());
808  }
static lookupTitle($a_server_id, $a_mid, $a_tree_id)
Lookup title by obj id.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
Confirmation screen class.
setSubTabs($a_tab)
Set Sub tabs ilTabsGUI $ilTabs.
+ Here is the call graph for this function:

◆ dDeleteTree()

ilECSMappingSettingsGUI::dDeleteTree ( )
protected

Delete tree.

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

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

814  {
815  include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
816  include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
817 
818  $GLOBALS['ilLog']->write('Deleting tree');
819 
820  $tree = new ilECSCmsTree((int) $_REQUEST['tid']);
821  $tree->deleteTree($tree->getNodeData(ilECSCmsTree::lookupRootId((int) $_REQUEST['tid'])));
822 
823 
824 
825  // also delete import information
826  include_once './Services/WebServices/ECS/classes/class.ilECSImport.php';
828  $this->getServer()->getServerId(),
829  $this->getMid(),
831  $this->getServer()->getServerId(),
832  $this->getMid(),
833  (int) $_REQUEST['tid']
834  )
835  );
836 
837  $data = new ilECSCmsData();
838  $data->setServerId($this->getServer()->getServerId());
839  $data->setMid($this->getMid());
840  $data->setTreeId((int) $_REQUEST['tid']);
841  $data->deleteTree();
842 
843 
844  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
846  $this->getServer()->getServerId(),
847  $this->getMid(),
848  (int) $_REQUEST['tid']
849  );
850 
851  ilUtil::sendSuccess($this->lng->txt('ecs_cms_tree_deleted'), true);
852  $this->ctrl->redirect($this, 'dTrees');
853  }
static lookupCmsIdsOfTree($a_server_id, $a_mid, $a_tree_id)
$ilDB $ilDB
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static lookupRootId($a_tree_id)
lookup root id
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static deleteMappings($a_server_id, $a_mid, $a_tree_id)
Delete mappings $ilDB $ilDB.
static deleteRessources($a_server_id, $a_mid, $a_econtent_ids)
Delete ressources $ilDB.
+ Here is the call graph for this function:

◆ dEditTree()

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

Edit directory tree assignments.

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

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

Referenced by dInitEditTree(), and dUpdateTreeSettings().

859  {
860  $GLOBALS['tpl']->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.ecs_edit_tree.html', 'Services/WebServices/ECS');
861 
862  $this->ctrl->saveParameter($this, 'cid');
863 
864  $GLOBALS['ilTabs']->clearTargets();
865  $GLOBALS['ilTabs']->setBack2Target(
866  $this->lng->txt('ecs_back_settings'),
867  $this->ctrl->getLinkTarget($this, 'cancel')
868  );
869  $GLOBALS['ilTabs']->setBackTarget(
870  $this->lng->txt('ecs_cms_dir_tree'),
871  $this->ctrl->getLinkTarget($this, 'dTrees')
872  );
873 
874  $GLOBALS['tpl']->setVariable('LEGEND', $GLOBALS['lng']->txt('ecs_status_legend'));
875  $GLOBALS['tpl']->setVariable('PENDING_UNMAPPED', $GLOBALS['lng']->txt('ecs_status_pending_unmapped'));
876  $GLOBALS['tpl']->setVariable('PENDING_UNMAPPED_DISCON', $GLOBALS['lng']->txt('ecs_status_pending_unmapped_discon'));
877  $GLOBALS['tpl']->setVariable('PENDING_UNMAPPED_NONDISCON', $GLOBALS['lng']->txt('ecs_status_pending_unmapped_nondiscon'));
878  $GLOBALS['tpl']->setVariable('MAPPED', $GLOBALS['lng']->txt('ecs_status_mapped'));
879  $GLOBALS['tpl']->setVariable('DELETED', $GLOBALS['lng']->txt('ecs_status_deleted'));
880 
881  $form = $this->dInitFormTreeSettings($form);
882  $GLOBALS['tpl']->setVariable('GENERAL_FORM', $form->getHTML());
883  $GLOBALS['tpl']->setVariable('TFORM_ACTION', $this->ctrl->getFormAction($this, 'dEditTree'));
884 
885  $explorer = $this->dShowLocalExplorer();
886  $this->dShowCmsExplorer($explorer);
887  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
dShowCmsExplorer(ilExplorer $localExplorer)
Show cms explorer.
dInitFormTreeSettings(ilPropertyFormGUI $form=null)
Init form settings.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dInitEditTree()

ilECSMappingSettingsGUI::dInitEditTree ( )
protected

Init tree.

Returns

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

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

1152  {
1153  include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
1155  $this->getServer()->getServerId(),
1156  $this->getMid(),
1157  (int) $_REQUEST['tid']
1158  );
1159  return $this->dEditTree();
1160  }
static updateStatus($a_server_id, $a_mid, $a_tree_id)
dEditTree(ilPropertyFormGUI $form=null)
Edit directory tree assignments.
+ Here is the call graph for this function:

◆ dInitFormTreeSettings()

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

Init form settings.

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

References $form, $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().

893  {
894  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSMappingUtils.php';
895  include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
896 
897  if ($form instanceof ilPropertyFormGUI) {
898  return $form;
899  }
900 
901  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignment.php';
902  $assignment = new ilECSNodeMappingAssignment(
903  $this->getServer()->getServerId(),
904  $this->getMid(),
905  (int) $_REQUEST['tid'],
906  0
907  );
908 
909  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
910  $form = new ilPropertyFormGUI();
911  $form->setFormAction($this->ctrl->getFormAction($this, 'dEditTree'));
912  $form->setTitle($this->lng->txt('general_settings'));
913  $form->addCommandButton('dUpdateTreeSettings', $this->lng->txt('save'));
914  $form->addCommandButton('dTrees', $this->lng->txt('cancel'));
915  $form->setTableWidth('30%');
916 
917  // CMS id (readonly)
918  include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
919  $cmsid = new ilNumberInputGUI($this->lng->txt('ecs_cms_id'), 'cmsid');
920  $cmsid->setValue(
922  );
923  $cmsid->setDisabled(true);
924  $cmsid->setSize(7);
925  $cmsid->setMaxLength(12);
926  $form->addItem($cmsid);
927 
928 
929  $mapping_status = ilECSMappingUtils::lookupMappingStatus(
930  $this->getServer()->getServerId(),
931  $this->getMid(),
932  (int) $_REQUEST['tid']
933  );
934  $mapping_advanced = ($mapping_status != ilECSMappingUtils::MAPPED_MANUAL ? true : false);
935 
936  // Status (readonly)
937  $status = new ilNonEditableValueGUI($this->lng->txt('status'), '');
938  $status->setValue(ilECSMappingUtils::mappingStatusToString($mapping_status));
939  $form->addItem($status);
940 
941  // title update
942  $title = new ilCheckboxInputGUI($this->lng->txt('ecs_title_updates'), 'title');
943  $title->setValue(1);
944  $title->setChecked($assignment->isTitleUpdateEnabled());
945  #$title->setInfo($this->lng->txt('ecs_title_update_info'));
946  $form->addItem($title);
947 
948 
949  $position = new ilCheckboxInputGUI($this->lng->txt('ecs_position_updates'), 'position');
950  $position->setDisabled(!$mapping_advanced);
951  $position->setChecked($mapping_advanced && $assignment->isPositionUpdateEnabled());
952  $position->setValue(1);
953  #$position->setInfo($this->lng->txt('ecs_position_update_info'));
954  $form->addItem($position);
955 
956  $tree = new ilCheckboxInputGUI($this->lng->txt('ecs_tree_updates'), 'tree');
957  $tree->setDisabled(!$mapping_advanced);
958  $tree->setChecked($mapping_advanced && $assignment->isTreeUpdateEnabled());
959  $tree->setValue(1);
960  #$tree->setInfo($this->lng->txt('ecs_tree_update_info'));
961  $form->addItem($tree);
962 
963  return $form;
964  }
setValue($a_value)
Set Value.
This class represents a property form user interface.
static lookupRootId($a_tree_id)
lookup root id
This class represents a checkbox property in a property form.
setFormAction($a_formaction)
Set FormAction.
addItem($a_item)
Add Item (Property, SectionHeader).
static lookupMappingStatus($a_server_id, $a_mid, $a_tree_id)
Lookup mapping status.
static mappingStatusToString($a_status)
Get mapping status as string.
setTitle($a_title)
Set Title.
if(isset($_POST['submit'])) $form
This class represents a number property in a property form.
addCommandButton($a_cmd, $a_text, $a_id="")
Add Command button.
static lookupCmsId($a_obj_id)
Lookup cms id.
This class represents a non editable value in a property form.
setTableWidth($a_width)
Set table width.
setDisabled($a_disabled)
Set Disabled.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dMap()

ilECSMappingSettingsGUI::dMap ( )
protected

Do mapping.

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

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

1167  {
1168  if (!$_POST['lnodes']) {
1169  ilUtil::sendFailure($this->lng->txt('select_one'), true);
1170  $this->ctrl->redirect($this, 'dEditTree');
1171  }
1172 
1173  $ref_id = end($_POST['lnodes']);
1174 
1175  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
1177  $this->getServer()->getServerId(),
1178  $this->getMid(),
1179  (int) $_REQUEST['tid'],
1180  $ref_id
1181  );
1182 
1183 
1184  $nodes = (array) $_POST['rnodes'];
1185  $nodes = (array) array_reverse($nodes);
1186 
1187  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignment.php';
1188  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
1189  include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
1190  foreach ($nodes as $cms_id) {
1191  $assignment = new ilECSNodeMappingAssignment(
1192  $this->getServer()->getServerId(),
1193  $this->getMid(),
1194  (int) $_REQUEST['tid'],
1195  (int) $cms_id
1196  );
1197  $assignment->setRefId($ref_id);
1198  $assignment->setObjId(ilObject::_lookupObjId($ref_id));
1199  $assignment->enablePositionUpdate(false);
1200  $assignment->enableTreeUpdate(false);
1201  $assignment->enableTitleUpdate(ilECSNodeMappingAssignments::lookupDefaultTitleUpdate(
1202  $this->getServer()->getServerId(),
1203  $this->getMid(),
1204  (int) $_REQUEST['tid']
1205  ));
1206  $assignment->update();
1207 
1208  // Delete subitems mappings for cms subtree
1209  $cmsTree = new ilECSCmsTree((int) $_REQUEST['tid']);
1210  $childs = $cmsTree->getSubTreeIds($cms_id);
1211 
1213  $this->getServer()->getServerId(),
1214  $this->getMid(),
1215  (int) $_REQUEST['tid'],
1216  $childs
1217  );
1218  }
1219 
1221  $this->getServer()->getServerId(),
1222  $this->getMid(),
1223  (int) $_REQUEST['tid']
1224  );
1225 
1226  // Save parameter cid
1227  $this->ctrl->setParameter($this, 'lid', (int) $ref_id);
1228 
1229  ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
1230  $this->ctrl->redirect($this, 'dEditTree');
1231  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static updateStatus($a_server_id, $a_mid, $a_tree_id)
static lookupDefaultTitleUpdate($a_server_id, $a_mid, $a_tree_id)
Lookup default title update setting.
static deleteDisconnectableMappings($a_server_id, $a_mid, $a_tree_id, $a_ref_id)
delete disconnectable mappings
static _lookupObjId($a_id)
static deleteMappingsByCsId($a_server_id, $a_mid, $a_tree_id, $cs_ids)
Delete mappings $ilDB.
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_POST["username"]
+ Here is the call graph for this function:

◆ dMappingOverview()

ilECSMappingSettingsGUI::dMappingOverview ( )
protected

Show directory trees.

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

References $GLOBALS, and setSubTabs().

1237  {
1238  $this->setSubTabs(self::TAB_DIRECTORY);
1239  $GLOBALS['ilTabs']->activateSubTab('dMappingOverview');
1240  $GLOBALS['ilTabs']->activateTab('ecs_dir_allocation');
1241  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
setSubTabs($a_tab)
Set Sub tabs ilTabsGUI $ilTabs.
+ Here is the call graph for this function:

◆ dSettings()

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

Show directory allocation ilTabsGUI $ilTabs.

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

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

Referenced by dStart().

595  {
596  global $ilTabs;
597 
598  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
599  $this->setSubTabs(self::TAB_DIRECTORY);
600  $ilTabs->activateTab('ecs_dir_allocation');
601  $ilTabs->activateSubTab('dSettings');
602 
603  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
604  if (!$form instanceof ilPropertyFormGUI) {
605  $form = $this->initFormDSettings();
606  }
607 
608  $GLOBALS['tpl']->setContent($form->getHTML());
609 
610  return true;
611  }
This class represents a property form user interface.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
setSubTabs($a_tab)
Set Sub tabs ilTabsGUI $ilTabs.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dShowCmsExplorer()

ilECSMappingSettingsGUI::dShowCmsExplorer ( ilExplorer  $localExplorer)
protected

Show cms explorer.

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

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

Referenced by dEditTree().

1085  {
1086  global $tree;
1087 
1088  include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
1089  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingCmsExplorer.php';
1090  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
1091 
1092  $explorer = new ilECSNodeMappingCmsExplorer(
1093  $this->ctrl->getLinkTarget($this, 'dEditTree'),
1094  $this->getServer()->getServerId(),
1095  $this->getMid(),
1096  (int) $_REQUEST['tid']
1097  );
1098  $explorer->setRoot(ilECSCmsTree::lookupRootId((int) $_REQUEST['tid']));
1099  $explorer->setTree(
1100  new ilECSCmsTree(
1101  (int) $_REQUEST['tid']
1102  )
1103  );
1104  $explorer->setPostVar('rnodes[]');
1105 
1106  // Read checked items from mapping of checked items in local explorer
1107  $active_node = $tree->getRootId();
1108  foreach ($localExplorer->getCheckedItems() as $ref_id) {
1109  $explorer->setCheckedItems(
1111  $this->getServer()->getServerId(),
1112  $this->getMid(),
1113  (int) $_REQUEST['tid'],
1114  $ref_id
1115  )
1116  );
1117  $active_node = $ref_id;
1118  }
1119 
1120 
1121  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
1122  include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
1123  $cmsTree = new ilECSCmsTree((int) $_REQUEST['tid']);
1125  $this->getServer()->getServerId(),
1126  $this->getMid(),
1127  (int) $_REQUEST['tid'],
1128  $active_node
1129  ) as $cs_id) {
1130  foreach ($cmsTree->getPathId($cs_id) as $path_id) {
1131  #$explorer->setExpand($path_id);
1132  }
1133  }
1134 
1135  $explorer->setTargetGet('rref_id');
1136  $explorer->setSessionExpandVariable('rexpand');
1137 
1138  #if((int) $_REQUEST['rexpand'])
1139  {
1140  $explorer->setExpand((int) $_GET['rexpand']);
1141  }
1142  $explorer->setExpandTarget($this->ctrl->getLinkTarget($this, 'dEditTree'));
1143  $explorer->setOutput(0);
1144  $GLOBALS['tpl']->setVariable('REMOTE_EXPLORER', $explorer->getOutput());
1145  }
$_GET["client_id"]
static lookupRootId($a_tree_id)
lookup root id
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static lookupAssignmentsByRefId($a_server_id, $a_mid, $a_tree_id, $a_ref_id)
Lookup assignments.
static lookupMappedItemsForRefId($a_server_id, $a_mid, $a_tree_id, $a_ref_id)
Get cs ids for ref_id <type> $ilDB.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dShowLocalExplorer()

ilECSMappingSettingsGUI::dShowLocalExplorer ( )
protected

Show local explorer.

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

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

Referenced by dEditTree().

1049  {
1050  global $tree;
1051 
1052  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingLocalExplorer.php';
1053  $explorer = new ilECSNodeMappingLocalExplorer(
1054  $this->ctrl->getLinkTarget($this, 'dEditTree'),
1055  $this->getServer()->getServerId(),
1056  $this->getMid()
1057  );
1058  $explorer->setPostVar('lnodes[]');
1059 
1060  $lnodes = (array) $_REQUEST['lnodes'];
1061  $checked_node = array_pop($lnodes);
1062  if ((int) $_REQUEST['lid']) {
1063  $checked_node = (int) $_REQUEST['lid'];
1064  }
1065 
1066  if ($checked_node) {
1067  $explorer->setCheckedItems(array($checked_node));
1068  } else {
1069  $explorer->setCheckedItems(array(ROOT_FOLDER_ID));
1070  }
1071  $explorer->setTargetGet('lref_id');
1072  $explorer->setSessionExpandVariable('lexpand');
1073  $explorer->setExpand((int) $_GET['lexpand']);
1074  $explorer->setExpandTarget($this->ctrl->getLinkTarget($this, 'dEditTree'));
1075  $explorer->setOutput(0);
1076  $GLOBALS['tpl']->setVariable('LOCAL_EXPLORER', $explorer->getOutput());
1077 
1078  return $explorer;
1079  }
$_GET["client_id"]
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dStart()

ilECSMappingSettingsGUI::dStart ( )
protected

Goto default page.

Returns
<type>

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

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

140  {
141  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
142  if (ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(), $this->getMid())->isDirectoryMappingEnabled()) {
143  return $this->dTrees();
144  }
145  return $this->dSettings();
146  }
dSettings(ilPropertyFormGUI $form=null)
Show directory allocation ilTabsGUI $ilTabs.
static getInstanceByServerMid($a_server_id, $a_mid)
Get instance.
+ Here is the call graph for this function:

◆ dSynchronizeTree()

ilECSMappingSettingsGUI::dSynchronizeTree ( )
protected

Synchronize Tree.

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

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

1004  {
1005  include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsTreeSynchronizer.php';
1007  $this->getServer(),
1008  $this->mid,
1009  (int) $_REQUEST['tid']
1010  );
1011  $sync->sync();
1012  ilUtil::sendSuccess($this->lng->txt('ecs_cms_tree_synchronized'), true);
1013  $this->ctrl->redirect($this, 'dTrees');
1014  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$sync
+ Here is the call graph for this function:

◆ dSynchronizeTrees()

ilECSMappingSettingsGUI::dSynchronizeTrees ( )
protected

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

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

1017  {
1018  include_once './Services/WebServices/ECS/classes/Tree/class.ilECSDirectoryTreeConnector.php';
1019 
1020  $this->log->dump('Start synchronizing cms directory trees');
1021 
1022  try {
1023  $connector = new ilECSDirectoryTreeConnector($this->getServer());
1024  $res = $connector->getDirectoryTrees();
1025 
1026  $this->log->dump($res, ilLogLevel::DEBUG);
1027 
1028  foreach ((array) $res->getLinkIds() as $cms_id) {
1029  include_once './Services/WebServices/ECS/classes/class.ilECSEventQueueReader.php';
1030  include_once './Services/WebServices/ECS/classes/class.ilECSEvent.php';
1031  $event = new ilECSEventQueueReader($this->getServer()->getServerId());
1032  $event->add(
1034  $cms_id,
1036  );
1037  }
1038  $this->ctrl->redirect($this, 'dTrees');
1039  } catch (Exception $e) {
1040  ilUtil::sendFailure($e->getMessage(), true);
1041  $this->ctrl->redirect($this, 'dTrees');
1042  }
1043  }
foreach($_POST as $key=> $value) $res
Reads ECS events and stores them in the database.
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ dTrees()

ilECSMappingSettingsGUI::dTrees ( )
protected

Show directory trees.

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

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

Referenced by dStart().

752  {
753  global $ilToolbar;
754 
755  $this->setSubTabs(self::TAB_DIRECTORY);
756  $GLOBALS['ilTabs']->activateSubTab('dTrees');
757  $GLOBALS['ilTabs']->activateTab('ecs_dir_allocation');
758 
759  $ilToolbar->addButton(
760  $this->lng->txt('ecs_sync_trees'),
761  $this->ctrl->getLinkTarget($this, 'dSynchronizeTrees')
762  );
763 
764  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingTreeTableGUI.php';
765 
766  $dtreeTable = new ilECSNodeMappingTreeTableGUI(
767  $this->getServer()->getServerId(),
768  $this->getMid(),
769  $this,
770  'dtree'
771  );
772 
773 
774  $dtreeTable->parse();
775  $GLOBALS['tpl']->setContent($dtreeTable->getHTML());
776  return true;
777  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
setSubTabs($a_tab)
Set Sub tabs ilTabsGUI $ilTabs.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dUpdateSettings()

ilECSMappingSettingsGUI::dUpdateSettings ( )
protected

Update node mapping settings.

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

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

703  {
704  global $ilCtrl;
705 
706  $form = $this->initFormDSettings();
707  if ($form->checkInput()) {
708  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
709  $settings = ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(), $this->getMid());
710  $settings->enableDirectoryMapping((bool) $form->getInput('active'));
711  $settings->enableEmptyContainerCreation(!$form->getInput('empty'));
712  $settings->update();
713  ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
714  } else {
715  ilUtil::sendFailure($this->lng->txt('err_check_input'), true);
716  $form->setValuesByPost();
717  }
718  $ilCtrl->redirect($this, 'dSettings');
719  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static getInstanceByServerMid($a_server_id, $a_mid)
Get instance.
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ dUpdateTreeSettings()

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

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

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

971  {
972  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignment.php';
973  include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
974  $assignment = new ilECSNodeMappingAssignment(
975  $this->getServer()->getServerId(),
976  $this->getMid(),
977  (int) $_REQUEST['tid'],
978  0
979  );
980  $assignment->setRefId(0);
981  $assignment->setObjId(0);
982 
983  $form = $this->dInitFormTreeSettings();
984  if ($form->checkInput()) {
985  $assignment->enableTitleUpdate($form->getInput('title'));
986  $assignment->enableTreeUpdate($form->getInput('tree'));
987  $assignment->enablePositionUpdate($form->getInput('position'));
988  $assignment->update();
989 
990  ilUtil::sendSuccess($this->lng->txt('settings_saved', true));
991  $this->ctrl->redirect($this, 'dEditTree');
992  }
993 
994  $form->setValuesByPost();
995  ilUtil::sendFailure($this->lng->txt('err_check_input'));
996  $this->dEditTree($form);
997  return true;
998  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
dEditTree(ilPropertyFormGUI $form=null)
Edit directory tree assignments.
if(isset($_POST['submit'])) $form
dInitFormTreeSettings(ilPropertyFormGUI $form=null)
Init form settings.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ executeCommand()

ilECSMappingSettingsGUI::executeCommand ( )

ilCtrl executeCommand

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

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

81  {
82  global $ilCtrl;
83 
84  $GLOBALS['tpl']->setTitle($this->lng->txt('ecs_campus_connect_title'));
85 
86  $this->ctrl->saveParameter($this, 'server_id');
87  $this->ctrl->saveParameter($this, 'mid');
88  $this->ctrl->saveParameter($this, 'tid');
89 
90  $next_class = $this->ctrl->getNextClass($this);
91  $cmd = $this->ctrl->getCmd();
92 
93  $this->setTabs();
94  switch ($next_class) {
95  default:
96  if (!$cmd) {
97  $cmd = "cStart";
98  }
99  $this->$cmd();
100  break;
101  }
102 
103  $GLOBALS['tpl']->setTitle($this->getServer()->getTitle());
104  $GLOBALS['tpl']->setDescription('');
105 
106  return true;
107  }
setTabs()
Set tabs ilTabsGUI $ilTabs.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ getContainer()

ilECSMappingSettingsGUI::getContainer ( )

Get container object.

Returns
ilObjectGUI

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

References $container.

◆ getMid()

◆ getServer()

◆ initFormCSettings()

ilECSMappingSettingsGUI::initFormCSettings ( )
protected

Init settings form.

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

References $attributes, $form, $info, $name, $path, $tpl, ilECSMappingUtils\getAuthModeSelection(), ilECSMappingUtils\getCourseMappingFieldSelectOptions(), ilECSCourseAttributes\getInstance(), ilECSNodeMappingSettings\getInstanceByServerMid(), getMid(), ilECSMappingUtils\getRoleMappingInfo(), getServer(), ilCheckboxInputGUI\setChecked(), ilSelectInputGUI\setOptions(), ilFormPropertyGUI\setRequired(), and ilTextInputGUI\setValue().

Referenced by cSettings(), and cUpdateSettings().

474  {
475  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
476 
477  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
478  $form = new ilPropertyFormGUI();
479  $form->setFormAction($this->ctrl->getFormAction($this));
480  $form->setTitle($this->lng->txt('settings'));
481 
482  // individual course allocation
483  $check = new ilCheckboxInputGUI($this->lng->txt('ecs_cmap_enable'), 'enabled');
484  $check->setChecked(ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(), $this->getMid())->isCourseAllocationEnabled());
485  $form->addItem($check);
486 
487 
488  // add default container
489  $imp = new ilCustomInputGUI($this->lng->txt('ecs_cmap_def_cat'), 'default_cat');
490  $imp->setRequired(true);
491 
492  $tpl = new ilTemplate('tpl.ecs_import_id_form.html', true, true, 'Services/WebServices/ECS');
493  $tpl->setVariable('SIZE', 5);
494  $tpl->setVariable('MAXLENGTH', 11);
495  $tpl->setVariable('POST_VAR', 'default_cat');
496 
497  $default = ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(), $this->getMid())->getDefaultCourseCategory();
498  $tpl->setVariable('PROPERTY_VALUE', $default);
499 
500  if ($default) {
501  include_once './Services/Tree/classes/class.ilPathGUI.php';
502  $path = new ilPathGUI();
503  $path->enableTextOnly(false);
504  $path->enableHideLeaf(false);
505  $tpl->setVariable('COMPLETE_PATH', $path->getPath(ROOT_FOLDER_ID, $default));
506  }
507 
508  $imp->setHtml($tpl->get());
509  $imp->setInfo($this->lng->txt('ecs_cmap_def_cat_info'));
510  $form->addItem($imp);
511 
512  // all in one category
513  $allinone = new ilCheckboxInputGUI($this->lng->txt('ecs_cmap_all_in_one'), 'allinone');
514  $allinone->setChecked(ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(), $this->getMid())->isAllInOneCategoryEnabled());
515  $allinone->setInfo($this->lng->txt('ecs_cmap_all_in_one_info'));
516 
517  $allinone_cat = new ilCustomInputGUI($this->lng->txt('ecs_cmap_all_in_one_cat'), 'allinone_cat');
518  $allinone_cat->setRequired(true);
519 
520  $tpl = new ilTemplate('tpl.ecs_import_id_form.html', true, true, 'Services/WebServices/ECS');
521  $tpl->setVariable('SIZE', 5);
522  $tpl->setVariable('MAXLENGTH', 11);
523  $tpl->setVariable('POST_VAR', 'allinone_cat');
524 
525  $cat = ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(), $this->getMid())->getAllInOneCategory();
526  $tpl->setVariable('PROPERTY_VALUE', $cat);
527  if ($cat) {
528  include_once './Services/Tree/classes/class.ilPathGUI.php';
529  $path = new ilPathGUI();
530  $path->enableTextOnly(false);
531  $path->enableHideLeaf(false);
532  $tpl->setVariable('COMPLETE_PATH', $path->getPath(ROOT_FOLDER_ID, $default));
533  }
534 
535  $allinone_cat->setHtml($tpl->get());
536  $allinone->addSubItem($allinone_cat);
537  $form->addItem($allinone);
538 
539  // multiple attributes
540  $multiple = new ilCheckboxInputGUI($this->lng->txt('ecs_cmap_multiple_atts'), 'multiple');
541  $multiple->setChecked(ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(), $this->getMid())->isAttributeMappingEnabled());
542 
543  // attribute selection
544  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSMappingUtils.php';
545  include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
546  $attributes = new ilSelectInputGUI($this->lng->txt('ecs_cmap_attributes'), 'atts');
547  $attributes->setMulti(true);
548  $attributes->setValue(
550  $this->getServer()->getServerId(),
551  $this->getMid()
552  )->getAttributeValues()
553  );
554  $attributes->setRequired(true);
556  $multiple->addSubItem($attributes);
557 
558  $form->addItem($multiple);
559 
560  // role mapping
561  $rm = new ilFormSectionHeaderGUI();
562  $rm->setTitle($this->lng->txt('ecs_role_mappings'));
563  $form->addItem($rm);
564 
565  // auth type
566  $auth_type = new ilSelectInputGUI($this->lng->txt('ecs_member_auth_type'), 'auth_mode');
568  $auth_type->setRequired(true);
569  $auth_type->setValue(ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(), $this->getMid())->getAuthMode());
570  $form->addItem($auth_type);
571 
572  $mapping_defs = ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(), $this->getMid())->getRoleMappings();
573 
574  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSMappingUtils.php';
576  $role_map = new ilTextInputGUI($this->lng->txt($info['lang']), $name);
577  $role_map->setValue($mapping_defs[$name]);
578  $role_map->setSize(32);
579  $role_map->setMaxLength(64);
580  $role_map->setRequired($info['required']);
581  $form->addItem($role_map);
582  }
583 
584  $form->addCommandButton('cUpdateSettings', $this->lng->txt('save'));
585  $form->addCommandButton('cSettings', $this->lng->txt('cancel'));
586 
587  return $form;
588  }
Creates a path for a start and endnode.
static getRoleMappingInfo($a_role_type_info=0)
Get role mapping info.
This class represents a selection list property in a property form.
This class represents a property form user interface.
$tpl
Definition: ilias.php:10
This class represents a section header in a property form.
static getInstanceByServerMid($a_server_id, $a_mid)
Get instance.
$attributes
This class represents a checkbox property in a property form.
static getCourseMappingFieldSelectOptions()
setChecked($a_checked)
Set Checked.
if($format !==null) $name
Definition: metadata.php:146
if(isset($_POST['submit'])) $form
static getAuthModeSelection()
Get auth mode selection.
static getInstance($a_server_id, $a_mid)
Get instance.
special template class to simplify handling of ITX/PEAR
This class represents a text property in a property form.
setOptions($a_options)
Set Options.
This class represents a custom property in a property form.
$info
Definition: index.php:5
setValue($a_value)
Set Value.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormDSettings()

ilECSMappingSettingsGUI::initFormDSettings ( )
protected

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

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

Referenced by dSettings(), and dUpdateSettings().

725  {
726  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
727  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
728 
729  $form = new ilPropertyFormGUI();
730  $form->setFormAction($this->ctrl->getFormAction($this));
731  $form->setTitle($this->lng->txt('general_settings'));
732 
733  $active = new ilCheckboxInputGUI($this->lng->txt('ecs_node_mapping_activate'), 'active');
734  $active->setChecked(ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(), $this->getMid())->isDirectoryMappingEnabled());
735  $form->addItem($active);
736 
737  $create_empty = new ilCheckboxInputGUI($this->lng->txt('ecs_node_mapping_create_empty'), 'empty');
738  $create_empty->setChecked(!ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(), $this->getMid())->isEmptyContainerCreationEnabled());
739  $create_empty->setInfo($this->lng->txt('ecs_node_mapping_create_empty_info'));
740  $form->addItem($create_empty);
741 
742  $form->addCommandButton('dUpdateSettings', $this->lng->txt('save'));
743  $form->addCommandButton('cancel', $this->lng->txt('cancel'));
744 
745  return $form;
746  }
This class represents a property form user interface.
static getInstanceByServerMid($a_server_id, $a_mid)
Get instance.
This class represents a checkbox property in a property form.
setChecked($a_checked)
Set Checked.
if(isset($_POST['submit'])) $form
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSubTabs()

ilECSMappingSettingsGUI::setSubTabs (   $a_tab)
protected

Set Sub tabs ilTabsGUI $ilTabs.

Parameters
string$a_tab

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

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

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

1282  {
1283  global $ilTabs;
1284 
1285  if ($a_tab == self::TAB_DIRECTORY) {
1286  $ilTabs->addSubTab(
1287  'dMappingOverview',
1288  $this->lng->txt('ecs_cc_mapping_overview'),
1289  $this->ctrl->getLinkTarget($this, 'dMappingOverview')
1290  );
1291  $ilTabs->addSubTab(
1292  'dTrees',
1293  $this->lng->txt('ecs_cms_dir_tree'),
1294  $this->ctrl->getLinkTarget($this, 'dTrees')
1295  );
1296  $ilTabs->addSubTab(
1297  'dSettings',
1298  $this->lng->txt('settings'),
1299  $this->ctrl->getLinkTarget($this, 'dSettings')
1300  );
1301  }
1302  if ($a_tab == self::TAB_COURSE) {
1303  // Check if attributes are available
1304  include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseAttributes.php';
1305  $atts = ilECSCourseAttributes::getInstance($this->getServer()->getServerId(), $this->getMid());
1306 
1307  include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
1308  if (ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(), $this->getMid())->isCourseAllocationEnabled()) {
1309  $ilTabs->addSubTab(
1310  'cInitTree',
1311  $this->lng->txt('ecs_cmap_overview'),
1312  $this->ctrl->getLinkTarget($this, 'cInitOverview')
1313  );
1314  }
1315 
1316  $ilTabs->addSubTab(
1317  'cSettings',
1318  $this->lng->txt('settings'),
1319  $this->ctrl->getLinkTarget($this, 'cSettings')
1320  );
1321  }
1322  }
static getInstanceByServerMid($a_server_id, $a_mid)
Get instance.
static getInstance($a_server_id, $a_mid)
Get instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTabs()

ilECSMappingSettingsGUI::setTabs ( )
protected

Set tabs ilTabsGUI $ilTabs.

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

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

Referenced by executeCommand().

1250  {
1251  global $ilTabs;
1252 
1253  include_once './Services/WebServices/ECS/classes/class.ilECSParticipantSettings.php';
1254 
1255  $ilTabs->clearTargets();
1256  $ilTabs->setBackTarget(
1257  $this->lng->txt('ecs_back_settings'),
1258  $this->ctrl->getParentReturn($this)
1259  );
1260  // Directories are only visible for import type campus managment.
1261  if (ilECSParticipantSettings::loookupCmsMid($this->getServer()->getServerId()) == $this->getMid()) {
1262  $ilTabs->addTab(
1263  'ecs_dir_allocation',
1264  $this->lng->txt('ecs_dir_alloc'),
1265  $this->ctrl->getLinkTarget($this, 'dSettings')
1266  );
1267  }
1268 
1269  $ilTabs->addTab(
1270  'ecs_crs_allocation',
1271  $this->lng->txt('ecs_crs_alloc'),
1272  $this->ctrl->getLinkTarget($this, 'cStart')
1273  );
1274  }
static loookupCmsMid($a_server_id)
Lookup mid of current cms participant $ilDB.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $container

ilECSMappingSettingsGUI::$container = null
private

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

Referenced by getContainer().

◆ $ctrl

ilECSMappingSettingsGUI::$ctrl = null
protected

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

◆ $lng

ilECSMappingSettingsGUI::$lng = null
protected

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

Referenced by __construct().

◆ $log

ilECSMappingSettingsGUI::$log
protected

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

◆ $mid

ilECSMappingSettingsGUI::$mid = null
private

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

Referenced by __construct(), and getMid().

◆ $server

ilECSMappingSettingsGUI::$server = null
private

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

Referenced by getServer().

◆ TAB_COURSE

const ilECSMappingSettingsGUI::TAB_COURSE = 2

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

◆ TAB_DIRECTORY

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: