ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilLearningSequenceAppEventListener Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilLearningSequenceAppEventListener:

Static Public Member Functions

static handleEvent (string $component, string $event, array $parameter)
 

Static Protected Member Functions

static getLSEventHandler ()
 
static getIlTree ()
 
static getIlLPStatusWrapper ()
 

Static Private Member Functions

static onServiceTrackingUpdateStatus (array $parameter)
 
static onObjectDeletion (array $parameter)
 
static onObjectToTrash (array $parameter)
 
static onObjectCloned (ilObject $new_obj, ilObject $origin_obj)
 
static onParticipantDeletion (array $parameter)
 

Static Private Attributes

static ilLSLPEventHandler $lp_event_handler = null
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning EventListener for LSO

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

Member Function Documentation

◆ getIlLPStatusWrapper()

static ilLearningSequenceAppEventListener::getIlLPStatusWrapper ( )
staticprotected

Definition at line 119 of file class.ilLearningSequenceAppEventListener.php.

120  {
121  return new ilLPStatusWrapper();
122  }
Class ilLPStatusWrapper This class is wrapper for all ilLPStatus classes.

◆ getIlTree()

static ilLearningSequenceAppEventListener::getIlTree ( )
staticprotected

Definition at line 113 of file class.ilLearningSequenceAppEventListener.php.

References $DIC.

113  : ilTree
114  {
115  global $DIC;
116  return $DIC['tree'];
117  }
global $DIC
Definition: feed.php:28

◆ getLSEventHandler()

static ilLearningSequenceAppEventListener::getLSEventHandler ( )
staticprotected

Definition at line 108 of file class.ilLearningSequenceAppEventListener.php.

109  {
110  return new ilLSEventHandler(self::getIlTree());
111  }

◆ handleEvent()

static ilLearningSequenceAppEventListener::handleEvent ( string  $component,
string  $event,
array  $parameter 
)
static

Definition at line 28 of file class.ilLearningSequenceAppEventListener.php.

28  : void
29  {
30  switch ($component) {
31  case "Services/Tracking":
32  switch ($event) {
33  case "updateStatus":
34  self::onServiceTrackingUpdateStatus($parameter);
35  break;
36  }
37  break;
38  case "Services/Object":
39  switch ($event) {
40  case "beforeDeletion":
41  self::onObjectDeletion($parameter);
42  break;
43  case "toTrash":
44  self::onObjectToTrash($parameter);
45  break;
46  case 'cloneObject':
47  $new_obj = $parameter['object'];
48  $origin_obj = $parameter['cloned_from_object'];
49  self::onObjectCloned($new_obj, $origin_obj);
50  break;
51  }
52  break;
53 
54  case "Modules/LearningSequence":
55  switch ($event) {
56  case "deleteParticipant":
57  self::onParticipantDeletion($parameter);
58  break;
59  case "addParticipant":
60  default:
61  break;
62  }
63  break;
64 
65  default:
66  throw new ilException(
67  "ilLearningSequenceAppEventListener::handleEvent: " .
68  "Won't handle events of '$component'."
69  );
70  }
71  }

◆ onObjectCloned()

static ilLearningSequenceAppEventListener::onObjectCloned ( ilObject  $new_obj,
ilObject  $origin_obj 
)
staticprivate

Definition at line 93 of file class.ilLearningSequenceAppEventListener.php.

93  : void
94  {
95  $handler = self::getLSEventHandler();
96  $handler->handleClonedObject($new_obj, $origin_obj);
97  }

◆ onObjectDeletion()

static ilLearningSequenceAppEventListener::onObjectDeletion ( array  $parameter)
staticprivate

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

81  : void
82  {
83  $handler = self::getLSEventHandler();
84  $handler->handleObjectDeletion($parameter);
85  }

◆ onObjectToTrash()

static ilLearningSequenceAppEventListener::onObjectToTrash ( array  $parameter)
staticprivate

Definition at line 87 of file class.ilLearningSequenceAppEventListener.php.

87  : void
88  {
89  $handler = self::getLSEventHandler();
90  $handler->handleObjectToTrash($parameter);
91  }

◆ onParticipantDeletion()

static ilLearningSequenceAppEventListener::onParticipantDeletion ( array  $parameter)
staticprivate

Definition at line 99 of file class.ilLearningSequenceAppEventListener.php.

References ILIAS\Repository\int().

99  : void
100  {
101  $handler = self::getLSEventHandler();
102  $obj_id = (int) $parameter['obj_id'];
103  $usr_id = (int) $parameter['usr_id'];
104 
105  $handler->handleParticipantDeletion($obj_id, $usr_id);
106  }
+ Here is the call graph for this function:

◆ onServiceTrackingUpdateStatus()

static ilLearningSequenceAppEventListener::onServiceTrackingUpdateStatus ( array  $parameter)
staticprivate

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

73  : void
74  {
75  if (self::$lp_event_handler === null) {
76  self::$lp_event_handler = new ilLSLPEventHandler(self::getIlTree(), self::getIlLPStatusWrapper());
77  }
78  self::$lp_event_handler->updateLPForChildEvent($parameter);
79  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Field Documentation

◆ $lp_event_handler

ilLSLPEventHandler ilLearningSequenceAppEventListener::$lp_event_handler = null
staticprivate

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


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