ILIAS  release_7 Revision v7.30-3-g800a261c036
ilTrackingAppEventListener Class Reference

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

+ Inheritance diagram for ilTrackingAppEventListener:
+ Collaboration diagram for ilTrackingAppEventListener:

Static Public Member Functions

static handleEvent ($a_component, $a_event, $a_params)
 Handle an event in a listener. More...
 
static handleEvent ($a_component, $a_event, $a_parameter)
 Handle an event in a listener. More...
 

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 Update lp data from Services/Object events

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 32 of file class.ilTrackingAppEventListener.php.

Member Function Documentation

◆ handleEvent()

static ilTrackingAppEventListener::handleEvent (   $a_component,
  $a_event,
  $a_params 
)
static

Handle an event in a listener.

Parameters
string$a_componentcomponent, e.g. "Modules/Forum" or "Services/User"
string$a_eventevent e.g. "createUser", "updateUser", "deleteUser", ...
array$a_parameterparameter array (assoc), array("name" => ..., "phone_office" => ...)

Implements ilAppEventListener.

Definition at line 41 of file class.ilTrackingAppEventListener.php.

42 {
43 $obj_id = $a_params['obj_id'] ?? null;
44
45 switch ($a_component) {
46 case 'Services/Object':
47 switch ($a_event) {
48 case 'toTrash':
49 include_once './Services/Object/classes/class.ilObjectLP.php';
50 $olp = ilObjectLP::getInstance($obj_id);
51 $olp->handleToTrash();
52 break;
53
54 case 'delete':
55 // ilRepUtil will raise "delete" even if only reference was deleted!
56 $all_ref = ilObject::_getAllReferences($obj_id);
57 if (!sizeof($all_ref)) {
58 include_once './Services/Object/classes/class.ilObjectLP.php';
59 $olp = ilObjectLP::getInstance($obj_id);
60 $olp->handleDelete();
61 }
62 break;
63 }
64 break;
65
66 case 'Services/Tree':
67 switch ($a_event) {
68 case 'moveTree':
69 if ($a_params['tree'] == 'tree') {
70 include_once './Services/Object/classes/class.ilObjectLP.php';
71 ilObjectLP::handleMove($a_params['source_id']);
72 }
73 break;
74 }
75 break;
76
77 case 'Modules/Group':
78 case 'Modules/Course':
79 case 'Modules/LearningSequence':
80 switch ($a_event) {
81 case 'addParticipant':
82 ilLPStatusWrapper::_updateStatus((int) $obj_id, (int) ($a_params['usr_id'] ?? 0));
83 break;
84 }
85 }
86
87 return true;
88 }
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.
static getInstance($a_obj_id)
static handleMove($a_source_ref_id)
static _getAllReferences($a_id)
get all reference ids of object

References ilObject\_getAllReferences(), ilLPStatusWrapper\_updateStatus(), ilObjectLP\getInstance(), and ilObjectLP\handleMove().

+ Here is the call graph for this function:

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