ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilSCTreeTasksGUI Class Reference

Handles tree tasks. More...

+ Inheritance diagram for ilSCTreeTasksGUI:
+ Collaboration diagram for ilSCTreeTasksGUI:

Public Member Functions

 getGroupTitle ()
 
 getGroupDescription ()
 
 getTitle ()
 Get title of task. More...
 
 getDescription ()
 Get title of task. More...
 
 getActions ()
 get actions for table gui More...
 
 analyzeStructure ()
 Analyze tree structure. More...
 
 listTree ()
 List tree. More...
 
 showTree ()
 Show already scanned tree. More...
 
 validateDuplicates ()
 start task More...
 
- Public Member Functions inherited from ilSCComponentTaskGUI
 __construct (ilSCTask $task=null)
 
 getActions ()
 Get actions for task table gui array( 'txt' => $lng->txt('sysc_action_repair') 'command' => 'repairTask' );. More...
 
 getTitle ()
 Get title of task. More...
 
 getDescription ()
 get description of task More...
 
 getGroupTitle ()
 Get title of group. More...
 
 getGroupDescription ()
 Get description of group. More...
 
 getTask ()
 
 executeCommand ()
 Execute command. More...
 

Data Fields

const TYPE_DUPLICATES = 'duplicates'
 
const TYPE_DUMP = 'dump'
 
const TYPE_MISSING = 'missing_reference'
 
const TYPE_MISSING_TREE = 'missing_tree'
 
const TYPE_STRUCTURE = 'structure'
 

Protected Member Functions

 confirmRepairStructure ()
 Show repair missing confirmation. More...
 
 repairStructure ()
 Repair structure. More...
 
 repairDuplicates ()
 repair More...
 
 deleteDuplicatesFromRepository ()
 
 deleteDuplicatesFromTrash ()
 
 findMissing ()
 find missing objects More...
 
 confirmRepairMissing ()
 Show repair missing confirmation. More...
 
 repairMissing ()
 Repair missing objects. More...
 
 findMissingTreeEntries ()
 find missing objects More...
 
 confirmRepairMissingTreeEntries ()
 Show repair missing confirmation. More...
 
 repairMissingTreeEntries ()
 Repair missing objects. More...
 
- Protected Member Functions inherited from ilSCComponentTaskGUI
 getLang ()
 Get language. More...
 
 getCtrl ()
 Get ctrl. More...
 
 showSimpleConfirmation ($a_text, $a_btn_text, $a_cmd)
 Show simple confirmation. More...
 
 cancel ()
 Cancel and return to task list. More...
 

Additional Inherited Members

- Protected Attributes inherited from ilSCComponentTaskGUI
 $ctrl
 
 $lng
 
 $task = null
 

Detailed Description

Member Function Documentation

◆ analyzeStructure()

ilSCTreeTasksGUI::analyzeStructure ( )

Analyze tree structure.

Definition at line 174 of file class.ilSCTreeTasksGUI.php.

References $tasks, ilSCComponentTaskGUI\getCtrl(), ilSCComponentTaskGUI\getLang(), ilSCComponentTaskGUI\getTask(), ilUtil\sendFailure(), and ilSCTask\STATUS_FAILED.

175  {
176  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
177  $tasks = new ilSCTreeTasks($this->getTask());
178  $num_failures = $tasks->validateStructure();
179 
180  if ($this->getTask()->getStatus() == ilSCTask::STATUS_FAILED) {
181  // error message
182  ilUtil::sendFailure($this->getLang()->txt('sysc_tree_structure_failures') . ' ' . $num_failures, true);
183  } else {
184  ilUtil::sendSuccess($this->getLang()->txt('sysc_message_success'), true);
185  }
186  $this->getCtrl()->returnToParent($this);
187  }
const STATUS_FAILED
$tasks
Definition: build.php:4
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Defines a system check task.
+ Here is the call graph for this function:

◆ confirmRepairMissing()

ilSCTreeTasksGUI::confirmRepairMissing ( )
protected

Show repair missing confirmation.

Returns
type

Definition at line 366 of file class.ilSCTreeTasksGUI.php.

References ilSCComponentTaskGUI\getLang(), and ilSCComponentTaskGUI\showSimpleConfirmation().

367  {
368  return $this->showSimpleConfirmation(
369  $this->getLang()->txt('sysc_message_tree_missing_confirm'),
370  $this->getLang()->txt('sysc_btn_tree_missing'),
371  'repairMissing'
372  );
373  }
showSimpleConfirmation($a_text, $a_btn_text, $a_cmd)
Show simple confirmation.
+ Here is the call graph for this function:

◆ confirmRepairMissingTreeEntries()

ilSCTreeTasksGUI::confirmRepairMissingTreeEntries ( )
protected

Show repair missing confirmation.

Returns
type

Definition at line 415 of file class.ilSCTreeTasksGUI.php.

References ilSCComponentTaskGUI\getLang(), and ilSCComponentTaskGUI\showSimpleConfirmation().

416  {
417  return $this->showSimpleConfirmation(
418  $this->getLang()->txt('sysc_message_tree_missing_confirm'),
419  $this->getLang()->txt('sysc_btn_tree_missing'),
420  'repairMissingTreeEntries'
421  );
422  }
showSimpleConfirmation($a_text, $a_btn_text, $a_cmd)
Show simple confirmation.
+ Here is the call graph for this function:

◆ confirmRepairStructure()

ilSCTreeTasksGUI::confirmRepairStructure ( )
protected

Show repair missing confirmation.

Returns
type

Definition at line 194 of file class.ilSCTreeTasksGUI.php.

References ilSCComponentTaskGUI\getLang(), and ilSCComponentTaskGUI\showSimpleConfirmation().

195  {
196  return $this->showSimpleConfirmation(
197  $this->getLang()->txt('sysc_message_tree_structure_confirm'),
198  $this->getLang()->txt('sysc_btn_tree_structure'),
199  'repairStructure'
200  );
201  }
showSimpleConfirmation($a_text, $a_btn_text, $a_cmd)
Show simple confirmation.
+ Here is the call graph for this function:

◆ deleteDuplicatesFromRepository()

ilSCTreeTasksGUI::deleteDuplicatesFromRepository ( )
protected

Definition at line 311 of file class.ilSCTreeTasksGUI.php.

References $GLOBALS, $tasks, ilSCTreeTasks\deleteDuplicateFromTree(), ilSCComponentTaskGUI\getCtrl(), ilSCComponentTaskGUI\getLang(), ilSCComponentTaskGUI\getTask(), and ilSCTreeTasks\repairPK().

312  {
313  $GLOBALS['DIC']['ilLog']->write(__METHOD__ . ': Removing from repository: ' . $_REQUEST['duplicate_id']);
314  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
315  ilSCTreeTasks::deleteDuplicateFromTree((int) $_REQUEST['duplicate_id'], false);
316 
317  $tasks = new ilSCTreeTasks($this->getTask());
318  if ($tasks->checkDuplicates()) {
320  }
321 
322  ilUtil::sendSuccess($this->getLang()->txt('sysc_deleted_duplicate'), true);
323  $this->getCtrl()->returnToParent($this);
324  }
$tasks
Definition: build.php:4
static deleteDuplicateFromTree($a_duplicate_id, $a_delete_trash)
Defines a system check task.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
+ Here is the call graph for this function:

◆ deleteDuplicatesFromTrash()

ilSCTreeTasksGUI::deleteDuplicatesFromTrash ( )
protected

Definition at line 326 of file class.ilSCTreeTasksGUI.php.

References $GLOBALS, $tasks, ilSCTreeTasks\deleteDuplicateFromTree(), ilSCComponentTaskGUI\getCtrl(), ilSCComponentTaskGUI\getLang(), ilSCComponentTaskGUI\getTask(), and ilSCTreeTasks\repairPK().

327  {
328  $GLOBALS['DIC']['ilLog']->write(__METHOD__ . ': Removing from repository: ' . $_REQUEST['duplicate_id']);
329  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
330  ilSCTreeTasks::deleteDuplicateFromTree((int) $_REQUEST['duplicate_id'], true);
331 
332 
333  $tasks = new ilSCTreeTasks($this->getTask());
334  if ($tasks->checkDuplicates()) {
336  }
337 
338  ilUtil::sendSuccess($this->getLang()->txt('sysc_deleted_duplicate'), true);
339  $this->getCtrl()->returnToParent($this);
340  }
$tasks
Definition: build.php:4
static deleteDuplicateFromTree($a_duplicate_id, $a_delete_trash)
Defines a system check task.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
+ Here is the call graph for this function:

◆ findMissing()

ilSCTreeTasksGUI::findMissing ( )
protected

find missing objects

Definition at line 345 of file class.ilSCTreeTasksGUI.php.

References $tasks, ilSCComponentTaskGUI\getCtrl(), ilSCComponentTaskGUI\getLang(), ilSCComponentTaskGUI\getTask(), ilUtil\sendFailure(), and ilSCTask\STATUS_FAILED.

346  {
347  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
348  $tasks = new ilSCTreeTasks($this->getTask());
349  $num_failures = $tasks->findMissing();
350 
351  if ($this->getTask()->getStatus() == ilSCTask::STATUS_FAILED) {
352  // error message
353  ilUtil::sendFailure($this->getLang()->txt('sysc_tree_missing_failures') . ' ' . $num_failures, true);
354  } else {
355  ilUtil::sendSuccess($this->getLang()->txt('sysc_message_success'), true);
356  }
357  $this->getCtrl()->returnToParent($this);
358  }
const STATUS_FAILED
$tasks
Definition: build.php:4
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Defines a system check task.
+ Here is the call graph for this function:

◆ findMissingTreeEntries()

ilSCTreeTasksGUI::findMissingTreeEntries ( )
protected

find missing objects

Definition at line 396 of file class.ilSCTreeTasksGUI.php.

References $tasks, ilSCComponentTaskGUI\getCtrl(), ilSCComponentTaskGUI\getLang(), ilSCComponentTaskGUI\getTask(), ilUtil\sendFailure(), and ilSCTask\STATUS_FAILED.

397  {
398  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
399  $tasks = new ilSCTreeTasks($this->getTask());
400  $num_failures = $tasks->findMissingTreeEntries();
401 
402  if ($this->getTask()->getStatus() == ilSCTask::STATUS_FAILED) {
403  // error message
404  ilUtil::sendFailure($this->getLang()->txt('sysc_tree_missing_tree_failures') . ' ' . $num_failures, true);
405  } else {
406  ilUtil::sendSuccess($this->getLang()->txt('sysc_message_success'), true);
407  }
408  $this->getCtrl()->returnToParent($this);
409  }
const STATUS_FAILED
$tasks
Definition: build.php:4
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Defines a system check task.
+ Here is the call graph for this function:

◆ getActions()

ilSCTreeTasksGUI::getActions ( )

get actions for table gui

Definition at line 81 of file class.ilSCTreeTasksGUI.php.

References ilSCComponentTaskGUI\getLang(), ilSCComponentTaskGUI\getTask(), and ilSCTask\STATUS_FAILED.

82  {
83  $repair = false;
84  if ($this->getTask()->getStatus() == ilSCTask::STATUS_FAILED) {
85  $repair = true;
86  }
87 
88  $actions = array();
89  switch ($this->getTask()->getIdentifier()) {
90  case self::TYPE_DUPLICATES:
91 
92  $actions[] = array(
93  'txt' => $this->getLang()->txt('sysc_action_validate'),
94  'command' => 'validateDuplicates'
95  );
96 
97  if ($repair) {
98  $actions[] = array(
99  'txt' => $this->getLang()->txt('sysc_action_repair'),
100  'command' => 'repairDuplicates'
101  );
102  }
103  break;
104 
105  case self::TYPE_DUMP:
106 
107  include_once './Services/Repository/classes/class.ilValidator.php';
108  $validator = new ilValidator();
109  if ($validator->hasScanLog()) {
110  $actions[] = array(
111  'txt' => $this->getLang()->txt('sysc_action_show_tree'),
112  'command' => 'showTree'
113  );
114  }
115 
116  $actions[] = array(
117  'txt' => $this->getLang()->txt('sysc_action_list_tree'),
118  'command' => 'listTree'
119  );
120  break;
121 
122  case self::TYPE_MISSING:
123 
124  $actions[] = array(
125  'txt' => $this->getLang()->txt('sysc_action_validate'),
126  'command' => 'findMissing'
127  );
128 
129  if ($repair) {
130  $actions[] = array(
131  'txt' => $this->getLang()->txt('sysc_action_repair'),
132  'command' => 'confirmRepairMissing'
133  );
134  }
135  break;
136 
137  case self::TYPE_MISSING_TREE:
138 
139  $actions[] = array(
140  'txt' => $this->getLang()->txt('sysc_action_validate'),
141  'command' => 'findMissingTreeEntries'
142  );
143 
144  if ($repair) {
145  $actions[] = array(
146  'txt' => $this->getLang()->txt('sysc_action_repair'),
147  'command' => 'confirmRepairMissingTreeEntries'
148  );
149  }
150  break;
151 
152  case self::TYPE_STRUCTURE:
153 
154  $actions[] = array(
155  'txt' => $this->getLang()->txt('sysc_action_validate'),
156  'command' => 'analyzeStructure'
157  );
158 
159  if ($repair) {
160  $actions[] = array(
161  'txt' => $this->getLang()->txt('sysc_action_repair'),
162  'command' => 'confirmRepairStructure'
163  );
164  }
165  break;
166 
167  }
168  return $actions;
169  }
const STATUS_FAILED
ILIAS Data Validator & Recovery Tool.
+ Here is the call graph for this function:

◆ getDescription()

ilSCTreeTasksGUI::getDescription ( )

Get title of task.

Definition at line 58 of file class.ilSCTreeTasksGUI.php.

References ilSCComponentTaskGUI\getLang(), and ilSCComponentTaskGUI\getTask().

59  {
60  switch ($this->getTask()->getIdentifier()) {
61  case self::TYPE_DUMP:
62  return $this->getLang()->txt('sysc_task_tree_dump_desc');
63 
64  case self::TYPE_DUPLICATES:
65  return $this->getLang()->txt('sysc_task_tree_duplicates_desc');
66 
67  case self::TYPE_MISSING:
68  return $this->getLang()->txt('sysc_task_tree_missing_reference_desc');
69 
70  case self::TYPE_MISSING_TREE:
71  return $this->getLang()->txt('sysc_task_tree_missing_tree_desc');
72 
73  case self::TYPE_STRUCTURE:
74  return $this->getLang()->txt('sysc_task_structure_desc');
75  }
76  }
+ Here is the call graph for this function:

◆ getGroupDescription()

ilSCTreeTasksGUI::getGroupDescription ( )

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

References ilSCComponentTaskGUI\getLang().

28  {
29  return $this->getLang()->txt('sysc_grp_tree_desc');
30  }
+ Here is the call graph for this function:

◆ getGroupTitle()

ilSCTreeTasksGUI::getGroupTitle ( )

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

References ilSCComponentTaskGUI\getLang().

23  {
24  return $this->getLang()->txt('sysc_grp_tree');
25  }
+ Here is the call graph for this function:

◆ getTitle()

ilSCTreeTasksGUI::getTitle ( )

Get title of task.

Definition at line 35 of file class.ilSCTreeTasksGUI.php.

References ilSCComponentTaskGUI\getLang(), and ilSCComponentTaskGUI\getTask().

36  {
37  switch ($this->getTask()->getIdentifier()) {
38  case self::TYPE_DUMP:
39  return $this->getLang()->txt('sysc_task_tree_dump');
40 
41  case self::TYPE_DUPLICATES:
42  return $this->getLang()->txt('sysc_task_tree_duplicates');
43 
44  case self::TYPE_MISSING:
45  return $this->getLang()->txt('sysc_task_tree_missing_reference');
46 
47  case self::TYPE_MISSING_TREE:
48  return $this->getLang()->txt('sysc_task_tree_missing_tree');
49 
50  case self::TYPE_STRUCTURE:
51  return $this->getLang()->txt('sysc_task_structure');
52  }
53  }
+ Here is the call graph for this function:

◆ listTree()

ilSCTreeTasksGUI::listTree ( )

List tree.

Definition at line 233 of file class.ilSCTreeTasksGUI.php.

References $GLOBALS, ilSCComponentTaskGUI\getCtrl(), ilSCComponentTaskGUI\getLang(), ilSCComponentTaskGUI\getTask(), IL_CAL_UNIX, ilUtil\sendFailure(), ilSCTask\STATUS_COMPLETED, and ilSCTask\STATUS_FAILED.

234  {
235  include_once './Services/Repository/classes/class.ilValidator.php';
236  $validator = new ilValidator(true);
237  $errors_count = $validator->dumpTree();
238 
239 
240  $GLOBALS['DIC']['ilLog']->write(print_r($this->getTask(), true));
241 
242  if ($errors_count) {
243  $this->getTask()->setStatus(ilSCTask::STATUS_FAILED);
244  ilUtil::sendFailure($this->getLang()->txt('sysc_tree_list_failures') . ' ' . $errors_count, true);
245  } else {
246  $this->getTask()->setStatus(ilSCTask::STATUS_COMPLETED);
247  ilUtil::sendFailure($this->getLang()->txt('sysc_message_success'), true);
248  }
249 
250  $this->getTask()->setLastUpdate(new ilDateTime(time(), IL_CAL_UNIX));
251  $this->getTask()->update();
252 
253  $this->getCtrl()->returnToParent($this);
254  }
const STATUS_FAILED
const IL_CAL_UNIX
Date and time handling
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
const STATUS_COMPLETED
ILIAS Data Validator & Recovery Tool.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
+ Here is the call graph for this function:

◆ repairDuplicates()

ilSCTreeTasksGUI::repairDuplicates ( )
protected

repair

Parameters
type$a_task_identifier

Definition at line 297 of file class.ilSCTreeTasksGUI.php.

References $GLOBALS, $table, and ilSCTreeTasks\findDeepestDuplicate().

298  {
299  // repair duplicates
300  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
301  $deepest_duplicate = ilSCTreeTasks::findDeepestDuplicate();
302 
303  include_once './Services/Tree/classes/class.ilSCTreeDuplicatesTableGUI.php';
304  $table = new ilSCTreeDuplicatesTableGUI($this, 'repairTask');
305  $table->init();
306  $table->parse($deepest_duplicate);
307 
308  $GLOBALS['DIC']['tpl']->setContent($table->getHTML());
309  }
static findDeepestDuplicate()
find duplicates type $ilDB
if(empty($password)) $table
Definition: pwgen.php:24
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
+ Here is the call graph for this function:

◆ repairMissing()

ilSCTreeTasksGUI::repairMissing ( )
protected

Repair missing objects.

Definition at line 378 of file class.ilSCTreeTasksGUI.php.

References $tasks, ilSCComponentTaskGUI\getCtrl(), ilSCComponentTaskGUI\getLang(), ilSCComponentTaskGUI\getTask(), IL_CAL_UNIX, and ilSCTask\STATUS_COMPLETED.

379  {
380  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
381  $tasks = new ilSCTreeTasks($this->getTask());
382  $tasks->repairMissing();
383 
384 
385  $this->getTask()->setStatus(ilSCTask::STATUS_COMPLETED);
386  $this->getTask()->setLastUpdate(new ilDateTime(time(), IL_CAL_UNIX));
387  $this->getTask()->update();
388 
389  ilUtil::sendSuccess($this->getLang()->txt('sysc_message_success'), true);
390  $this->getCtrl()->returnToParent($this);
391  }
const IL_CAL_UNIX
$tasks
Definition: build.php:4
Date and time handling
const STATUS_COMPLETED
Defines a system check task.
+ Here is the call graph for this function:

◆ repairMissingTreeEntries()

ilSCTreeTasksGUI::repairMissingTreeEntries ( )
protected

Repair missing objects.

Definition at line 427 of file class.ilSCTreeTasksGUI.php.

References $tasks, ilSCComponentTaskGUI\getCtrl(), ilSCComponentTaskGUI\getLang(), ilSCComponentTaskGUI\getTask(), IL_CAL_UNIX, and ilSCTask\STATUS_COMPLETED.

428  {
429  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
430  $tasks = new ilSCTreeTasks($this->getTask());
431  $tasks->repairMissingTreeEntries();
432 
433  $this->getTask()->setStatus(ilSCTask::STATUS_COMPLETED);
434  $this->getTask()->setLastUpdate(new ilDateTime(time(), IL_CAL_UNIX));
435  $this->getTask()->update();
436 
437  ilUtil::sendSuccess($this->getLang()->txt('sysc_message_success'), true);
438  $this->getCtrl()->returnToParent($this);
439  }
const IL_CAL_UNIX
$tasks
Definition: build.php:4
Date and time handling
const STATUS_COMPLETED
Defines a system check task.
+ Here is the call graph for this function:

◆ repairStructure()

ilSCTreeTasksGUI::repairStructure ( )
protected

Repair structure.

Definition at line 206 of file class.ilSCTreeTasksGUI.php.

References $GLOBALS, $tasks, ilMaterializedPathTree\createFromParentReleation(), ilSCComponentTaskGUI\getCtrl(), ilSCComponentTaskGUI\getLang(), ilSCComponentTaskGUI\getTask(), IL_CAL_UNIX, and ilSCTask\STATUS_COMPLETED.

207  {
208  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
209  $tasks = new ilSCTreeTasks($this->getTask());
210 
211 
212  if ($GLOBALS['DIC']['tree']->getTreeImplementation() instanceof ilMaterializedPathTree) {
214  } elseif ($GLOBALS['DIC']['tree']->getTreeImplementation() instanceof ilNestedSetTree) {
215  $GLOBALS['DIC']['tree']->renumber(ROOT_FOLDER_ID);
216  }
217 
218  $this->getTask()->setStatus(ilSCTask::STATUS_COMPLETED);
219  $this->getTask()->setLastUpdate(new ilDateTime(time(), IL_CAL_UNIX));
220  $this->getTask()->update();
221 
222  ilUtil::sendSuccess($this->getLang()->txt('sysc_message_success'), true);
223  $this->getCtrl()->returnToParent($this);
224  }
Base class for nested set path based trees.
const IL_CAL_UNIX
$tasks
Definition: build.php:4
Date and time handling
const STATUS_COMPLETED
Defines a system check task.
Base class for materialize path based trees Based on implementation of Werner Randelshofer.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
+ Here is the call graph for this function:

◆ showTree()

ilSCTreeTasksGUI::showTree ( )

Show already scanned tree.

Definition at line 259 of file class.ilSCTreeTasksGUI.php.

References $GLOBALS.

260  {
261  include_once "./Services/Repository/classes/class.ilValidator.php";
262  $validator = new ilValidator();
263  $scan_log = $validator->readScanLog();
264 
265  if (is_array($scan_log)) {
266  $scan_log = '<pre>' . implode("", $scan_log) . '</pre>';
267  $GLOBALS['DIC']['tpl']->setContent($scan_log);
268  }
269  }
ILIAS Data Validator & Recovery Tool.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.

◆ validateDuplicates()

ilSCTreeTasksGUI::validateDuplicates ( )

start task

Parameters
type$a_task_identifier

Definition at line 276 of file class.ilSCTreeTasksGUI.php.

References $tasks, ilSCComponentTaskGUI\getCtrl(), ilSCComponentTaskGUI\getLang(), ilSCComponentTaskGUI\getTask(), ilUtil\sendFailure(), and ilSCTask\STATUS_FAILED.

277  {
278  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
279  $tasks = new ilSCTreeTasks($this->getTask());
280  $num_failures = $tasks->validateDuplicates();
281 
282  if ($this->getTask()->getStatus() == ilSCTask::STATUS_FAILED) {
283  // error message
284  ilUtil::sendFailure($this->getLang()->txt('sysc_tree_duplicate_failures') . ' ' . $num_failures, true);
285  } else {
286  ilUtil::sendSuccess($this->getLang()->txt('sysc_message_success'), true);
287  }
288  $this->getCtrl()->returnToParent($this);
289  }
const STATUS_FAILED
$tasks
Definition: build.php:4
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Defines a system check task.
+ Here is the call graph for this function:

Field Documentation

◆ TYPE_DUMP

const ilSCTreeTasksGUI::TYPE_DUMP = 'dump'

Definition at line 16 of file class.ilSCTreeTasksGUI.php.

Referenced by ilSCComponentTaskFactory\getTask().

◆ TYPE_DUPLICATES

const ilSCTreeTasksGUI::TYPE_DUPLICATES = 'duplicates'

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

◆ TYPE_MISSING

const ilSCTreeTasksGUI::TYPE_MISSING = 'missing_reference'

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

◆ TYPE_MISSING_TREE

const ilSCTreeTasksGUI::TYPE_MISSING_TREE = 'missing_tree'

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

◆ TYPE_STRUCTURE

const ilSCTreeTasksGUI::TYPE_STRUCTURE = 'structure'

Definition at line 19 of file class.ilSCTreeTasksGUI.php.


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