ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 183 of file class.ilSCTreeTasksGUI.php.

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

184  {
185  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
186  $tasks = new ilSCTreeTasks($this->getTask());
187  $num_failures = $tasks->validateStructure();
188 
189  if($this->getTask()->getStatus() == ilSCTask::STATUS_FAILED)
190  {
191  // error message
192  ilUtil::sendFailure($this->getLang()->txt('sysc_tree_structure_failures').' '.$num_failures,TRUE);
193  }
194  else
195  {
196  ilUtil::sendSuccess($this->getLang()->txt('sysc_message_success'),TRUE);
197  }
198  $this->getCtrl()->returnToParent($this);
199  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
const STATUS_FAILED
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 394 of file class.ilSCTreeTasksGUI.php.

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

395  {
396  return $this->showSimpleConfirmation(
397  $this->getLang()->txt('sysc_message_tree_missing_confirm'),
398  $this->getLang()->txt('sysc_btn_tree_missing'),
399  'repairMissing'
400  );
401  }
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 446 of file class.ilSCTreeTasksGUI.php.

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

447  {
448  return $this->showSimpleConfirmation(
449  $this->getLang()->txt('sysc_message_tree_missing_confirm'),
450  $this->getLang()->txt('sysc_btn_tree_missing'),
451  'repairMissingTreeEntries'
452  );
453  }
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 206 of file class.ilSCTreeTasksGUI.php.

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

207  {
208  return $this->showSimpleConfirmation(
209  $this->getLang()->txt('sysc_message_tree_structure_confirm'),
210  $this->getLang()->txt('sysc_btn_tree_structure'),
211  'repairStructure'
212  );
213  }
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 333 of file class.ilSCTreeTasksGUI.php.

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

334  {
335  $GLOBALS['ilLog']->write(__METHOD__.': Removing from repository: '.$_REQUEST['duplicate_id']);
336  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
337  ilSCTreeTasks::deleteDuplicateFromTree((int) $_REQUEST['duplicate_id'], FALSE);
338 
339  $tasks = new ilSCTreeTasks($this->getTask());
340  if($tasks->checkDuplicates())
341  {
343  }
344 
345  ilUtil::sendSuccess($this->getLang()->txt('sysc_deleted_duplicate'),TRUE);
346  $this->getCtrl()->returnToParent($this);
347 
348  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static deleteDuplicateFromTree($a_duplicate_id, $a_delete_trash)
Defines a system check task.
+ Here is the call graph for this function:

◆ deleteDuplicatesFromTrash()

ilSCTreeTasksGUI::deleteDuplicatesFromTrash ( )
protected

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

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

351  {
352  $GLOBALS['ilLog']->write(__METHOD__.': Removing from repository: '.$_REQUEST['duplicate_id']);
353  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
354  ilSCTreeTasks::deleteDuplicateFromTree((int) $_REQUEST['duplicate_id'], TRUE);
355 
356 
357  $tasks = new ilSCTreeTasks($this->getTask());
358  if($tasks->checkDuplicates())
359  {
361  }
362 
363  ilUtil::sendSuccess($this->getLang()->txt('sysc_deleted_duplicate'),TRUE);
364  $this->getCtrl()->returnToParent($this);
365  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static deleteDuplicateFromTree($a_duplicate_id, $a_delete_trash)
Defines a system check task.
+ Here is the call graph for this function:

◆ findMissing()

ilSCTreeTasksGUI::findMissing ( )
protected

find missing objects

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

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

371  {
372  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
373  $tasks = new ilSCTreeTasks($this->getTask());
374  $num_failures = $tasks->findMissing();
375 
376  if($this->getTask()->getStatus() == ilSCTask::STATUS_FAILED)
377  {
378  // error message
379  ilUtil::sendFailure($this->getLang()->txt('sysc_tree_missing_failures').' '.$num_failures,TRUE);
380  }
381  else
382  {
383  ilUtil::sendSuccess($this->getLang()->txt('sysc_message_success'),TRUE);
384  }
385  $this->getCtrl()->returnToParent($this);
386  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
const STATUS_FAILED
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 424 of file class.ilSCTreeTasksGUI.php.

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

425  {
426  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
427  $tasks = new ilSCTreeTasks($this->getTask());
428  $num_failures = $tasks->findMissingTreeEntries();
429 
430  if($this->getTask()->getStatus() == ilSCTask::STATUS_FAILED)
431  {
432  // error message
433  ilUtil::sendFailure($this->getLang()->txt('sysc_tree_missing_tree_failures').' '.$num_failures,TRUE);
434  }
435  else
436  {
437  ilUtil::sendSuccess($this->getLang()->txt('sysc_message_success'),TRUE);
438  }
439  $this->getCtrl()->returnToParent($this);
440  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
const STATUS_FAILED
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 83 of file class.ilSCTreeTasksGUI.php.

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

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

◆ getDescription()

ilSCTreeTasksGUI::getDescription ( )

Get title of task.

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

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

60  {
61  switch($this->getTask()->getIdentifier())
62  {
63  case self::TYPE_DUMP:
64  return $this->getLang()->txt('sysc_task_tree_dump_desc');
65 
66  case self::TYPE_DUPLICATES:
67  return $this->getLang()->txt('sysc_task_tree_duplicates_desc');
68 
69  case self::TYPE_MISSING:
70  return $this->getLang()->txt('sysc_task_tree_missing_reference_desc');
71 
72  case self::TYPE_MISSING_TREE:
73  return $this->getLang()->txt('sysc_task_tree_missing_tree_desc');
74 
75  case self::TYPE_STRUCTURE:
76  return $this->getLang()->txt('sysc_task_structure_desc');
77  }
78  }
+ 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  {
39  case self::TYPE_DUMP:
40  return $this->getLang()->txt('sysc_task_tree_dump');
41 
42  case self::TYPE_DUPLICATES:
43  return $this->getLang()->txt('sysc_task_tree_duplicates');
44 
45  case self::TYPE_MISSING:
46  return $this->getLang()->txt('sysc_task_tree_missing_reference');
47 
48  case self::TYPE_MISSING_TREE:
49  return $this->getLang()->txt('sysc_task_tree_missing_tree');
50 
51  case self::TYPE_STRUCTURE:
52  return $this->getLang()->txt('sysc_task_structure');
53  }
54  }
+ Here is the call graph for this function:

◆ listTree()

ilSCTreeTasksGUI::listTree ( )

List tree.

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

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

249  {
250  include_once './Services/Repository/classes/class.ilValidator.php';
251  $validator = new ilValidator(TRUE);
252  $errors_count = $validator->dumpTree();
253 
254 
255  $GLOBALS['ilLog']->write(print_r($this->getTask(),TRUE));
256 
257  if($errors_count)
258  {
259  $this->getTask()->setStatus(ilSCTask::STATUS_FAILED);
260  ilUtil::sendFailure($this->getLang()->txt('sysc_tree_list_failures').' '.$errors_count,TRUE);
261  }
262  else
263  {
264  $this->getTask()->setStatus(ilSCTask::STATUS_COMPLETED);
265  ilUtil::sendFailure($this->getLang()->txt('sysc_message_success'),TRUE);
266  }
267 
268  $this->getTask()->setLastUpdate(new ilDateTime(time(),IL_CAL_UNIX));
269  $this->getTask()->update();
270 
271  $this->getCtrl()->returnToParent($this);
272  }
const STATUS_FAILED
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
const IL_CAL_UNIX
Date and time handling
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
const STATUS_COMPLETED
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
ILIAS Data Validator & Recovery Tool.
+ Here is the call graph for this function:

◆ repairDuplicates()

ilSCTreeTasksGUI::repairDuplicates ( )
protected

repair

Parameters
type$a_task_identifier

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

References $GLOBALS, and ilSCTreeTasks\findDeepestDuplicate().

320  {
321  // repair duplicates
322  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
323  $deepest_duplicate = ilSCTreeTasks::findDeepestDuplicate();
324 
325  include_once './Services/Tree/classes/class.ilSCTreeDuplicatesTableGUI.php';
326  $table = new ilSCTreeDuplicatesTableGUI($this,'repairTask');
327  $table->init();
328  $table->parse($deepest_duplicate);
329 
330  $GLOBALS['tpl']->setContent($table->getHTML());
331  }
static findDeepestDuplicate()
find duplicates type $ilDB
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
+ Here is the call graph for this function:

◆ repairMissing()

ilSCTreeTasksGUI::repairMissing ( )
protected

Repair missing objects.

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

References ilSCComponentTaskGUI\getCtrl(), ilSCComponentTaskGUI\getLang(), ilSCComponentTaskGUI\getTask(), IL_CAL_UNIX, ilUtil\sendSuccess(), ilSCTask\STATUS_COMPLETED, and time.

407  {
408  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
409  $tasks = new ilSCTreeTasks($this->getTask());
410  $tasks->repairMissing();
411 
412 
413  $this->getTask()->setStatus(ilSCTask::STATUS_COMPLETED);
414  $this->getTask()->setLastUpdate(new ilDateTime(time(),IL_CAL_UNIX));
415  $this->getTask()->update();
416 
417  ilUtil::sendSuccess($this->getLang()->txt('sysc_message_success'),TRUE);
418  $this->getCtrl()->returnToParent($this);
419  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
const IL_CAL_UNIX
Date and time handling
const STATUS_COMPLETED
Defines a system check task.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the call graph for this function:

◆ repairMissingTreeEntries()

ilSCTreeTasksGUI::repairMissingTreeEntries ( )
protected

Repair missing objects.

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

References ilSCComponentTaskGUI\getCtrl(), ilSCComponentTaskGUI\getLang(), ilSCComponentTaskGUI\getTask(), IL_CAL_UNIX, ilUtil\sendSuccess(), ilSCTask\STATUS_COMPLETED, and time.

459  {
460  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
461  $tasks = new ilSCTreeTasks($this->getTask());
462  $tasks->repairMissingTreeEntries();
463 
464  $this->getTask()->setStatus(ilSCTask::STATUS_COMPLETED);
465  $this->getTask()->setLastUpdate(new ilDateTime(time(),IL_CAL_UNIX));
466  $this->getTask()->update();
467 
468  ilUtil::sendSuccess($this->getLang()->txt('sysc_message_success'),TRUE);
469  $this->getCtrl()->returnToParent($this);
470  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
const IL_CAL_UNIX
Date and time handling
const STATUS_COMPLETED
Defines a system check task.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the call graph for this function:

◆ repairStructure()

ilSCTreeTasksGUI::repairStructure ( )
protected

Repair structure.

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

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

219  {
220  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
221  $tasks = new ilSCTreeTasks($this->getTask());
222 
223 
224  if($GLOBALS['tree']->getTreeImplementation() instanceof ilMaterializedPathTree)
225  {
227  }
228  elseif($GLOBALS['tree']->getTreeImplementation() instanceof ilNestedSetTree)
229  {
230  $GLOBALS['tree']->renumber(ROOT_FOLDER_ID);
231  }
232 
233  $this->getTask()->setStatus(ilSCTask::STATUS_COMPLETED);
234  $this->getTask()->setLastUpdate(new ilDateTime(time(),IL_CAL_UNIX));
235  $this->getTask()->update();
236 
237  ilUtil::sendSuccess($this->getLang()->txt('sysc_message_success'),TRUE);
238  $this->getCtrl()->returnToParent($this);
239  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
Base class for nested set path based trees.
const IL_CAL_UNIX
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.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the call graph for this function:

◆ showTree()

ilSCTreeTasksGUI::showTree ( )

Show already scanned tree.

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

References $GLOBALS.

278  {
279  include_once "./Services/Repository/classes/class.ilValidator.php";
280  $validator = new ilValidator();
281  $scan_log = $validator->readScanLog();
282 
283  if (is_array($scan_log))
284  {
285  $scan_log = '<pre>'.implode("",$scan_log).'</pre>';
286  $GLOBALS['tpl']->setContent($scan_log);
287  }
288  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
ILIAS Data Validator & Recovery Tool.

◆ validateDuplicates()

ilSCTreeTasksGUI::validateDuplicates ( )

start task

Parameters
type$a_task_identifier

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

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

296  {
297  include_once './Services/Tree/classes/class.ilSCTreeTasks.php';
298  $tasks = new ilSCTreeTasks($this->getTask());
299  $num_failures = $tasks->validateDuplicates();
300 
301  if($this->getTask()->getStatus() == ilSCTask::STATUS_FAILED)
302  {
303  // error message
304  ilUtil::sendFailure($this->getLang()->txt('sysc_tree_duplicate_failures').' '.$num_failures,TRUE);
305  }
306  else
307  {
308  ilUtil::sendSuccess($this->getLang()->txt('sysc_message_success'),TRUE);
309  }
310  $this->getCtrl()->returnToParent($this);
311  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
const STATUS_FAILED
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.

◆ 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: