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

Reads ECS events and stores them in the database. More...

+ Collaboration diagram for ilECSEventQueueReader:

Public Member Functions

 __construct ($a_server_id)
 Constructor. More...
 
 getServer ()
 get server setting More...
 
 getEvents ()
 get all events More...
 
 deleteAll ()
 Delete all events. More...
 
 deleteAllEContentEvents (array $a_types)
 Delete all econtents. More...
 
 refresh ()
 Fetch events from fifo Using fifo @access public. More...
 
 shift ()
 get and delete the first event entry More...
 
 add ($a_type, $a_id, $a_op)
 add More...
 
 delete ($a_event_id)
 delete @access private More...
 
 read ()
 Read @access public. More...
 

Static Public Member Functions

static getAllEContentTypes ()
 All available content types. More...
 
static handleImportReset (ilECSSetting $server)
 Reread all imported econtent. More...
 
static handleExportReset (ilECSSetting $server)
 Handle export reset. More...
 
static deleteServer ($a_server_id)
 Delete by server id @global ilDB $ilDB. More...
 
static deleteByServerId ($a_server_id)
 

Data Fields

const TYPE_EXPORTED = 'exported'
 
const TYPE_DIRECTORY_TREES = 'directory_trees'
 
const TYPE_CMS_COURSES = 'courses'
 
const TYPE_CMS_COURSE_MEMBERS = 'course_members'
 
const TYPE_REMOTE_COURSE = 'rcrs'
 
const TYPE_REMOTE_CATEGORY = 'rcat'
 
const TYPE_REMOTE_FILE = 'rfil'
 
const TYPE_REMOTE_GLOSSARY = 'rglo'
 
const TYPE_REMOTE_GROUP = 'rgrp'
 
const TYPE_REMOTE_LEARNING_MODULE = 'rlm'
 
const TYPE_REMOTE_WIKI = 'rwik'
 
const TYPE_REMOTE_TEST = 'rtst'
 
const TYPE_COURSE_URLS = 'course_urls'
 
const TYPE_ENROLMENT_STATUS = 'member_status'
 

Protected Member Functions

 deleteAllExportedEvents ()
 Delete all exported events. More...
 

Static Protected Member Functions

static getEventTypeFromObjectType ($a_obj_type)
 Convert object type to event type. More...
 
static getAllResourceIds (ilECSSetting $server, array $a_types, $a_sender_only=false)
 Get all resource ids by resource type. More...
 

Protected Attributes

 $log
 
 $db
 
 $events = array()
 
 $econtent_ids = array()
 

Private Member Functions

 writeEventToDB (ilECSEvent $ev)
 Write event to db. More...
 
 update ($a_type, $a_id, $a_operation)
 update one entry More...
 

Detailed Description

Reads ECS events and stores them in the database.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

ilECSEventQueueReader::__construct (   $a_server_id)

Constructor.

@access public

Definition at line 64 of file class.ilECSEventQueueReader.php.

65 {
66 global $DIC;
67
68 $ilLog = $DIC['ilLog'];
69 $ilDB = $DIC['ilDB'];
70
71 include_once('Services/WebServices/ECS/classes/class.ilECSSetting.php');
72
73 $this->settings = ilECSSetting::getInstanceByServerId($a_server_id);
74 $this->log = $ilLog;
75 $this->db = $ilDB;
76
77 $this->read();
78 }
static getInstanceByServerId($a_server_id)
Get singleton instance per server.
global $DIC
Definition: goto.php:24
settings()
Definition: settings.php:2
global $ilDB

References $DIC, $ilDB, ilECSSetting\getInstanceByServerId(), read(), and settings().

+ Here is the call graph for this function:

Member Function Documentation

◆ add()

ilECSEventQueueReader::add (   $a_type,
  $a_id,
  $a_op 
)

add

@access public

Definition at line 531 of file class.ilECSEventQueueReader.php.

532 {
533 global $DIC;
534
535 $ilDB = $DIC['ilDB'];
536
537 $next_id = $ilDB->nextId('ecs_events');
538 $query = "INSERT INTO ecs_events (event_id,type,id,op,server_id) " .
539 "VALUES (" .
540 $ilDB->quote($next_id, 'integer') . ", " .
541 $this->db->quote($a_type, 'text') . ", " .
542 $this->db->quote($a_id, 'integer') . ", " .
543 $this->db->quote($a_op, 'text') . ", " .
544 $ilDB->quote($this->getServer()->getServerId(), 'integer') . ' ' .
545 ")";
546 $res = $ilDB->manipulate($query);
547
548 $new_event['event_id'] = $next_id;
549 $new_event['type'] = $a_type;
550 $new_event['id'] = $a_id;
551 $new_event['op'] = $a_op;
552
553 $this->events[] = $new_event;
554 $this->econtent_ids[$a_id] = $a_id;
555 return true;
556 }
$query
foreach($_POST as $key=> $value) $res

References $DIC, $ilDB, $query, $res, and getServer().

+ Here is the call graph for this function:

◆ delete()

ilECSEventQueueReader::delete (   $a_event_id)

delete @access private

Parameters
intevent id

Definition at line 584 of file class.ilECSEventQueueReader.php.

585 {
586 global $DIC;
587
588 $ilDB = $DIC['ilDB'];
589
590 $query = "DELETE FROM ecs_events " .
591 "WHERE event_id = " . $this->db->quote($a_event_id, 'integer') . " " .
592 'AND server_id = ' . $ilDB->quote($this->getServer()->getServerId(), 'integer');
593 $res = $ilDB->manipulate($query);
594 unset($this->econtent_ids[$a_event_id]);
595 return true;
596 }

References $DIC, $ilDB, $query, $res, and getServer().

+ Here is the call graph for this function:

◆ deleteAll()

ilECSEventQueueReader::deleteAll ( )

Delete all events.

@access public

Definition at line 281 of file class.ilECSEventQueueReader.php.

282 {
283 global $DIC;
284
285 $ilDB = $DIC['ilDB'];
286
287 $query = "DELETE FROM ecs_events " .
288 'WHERE server_id = ' . $ilDB->quote($this->getServer()->getServerId(), 'integer');
289 $res = $ilDB->manipulate($query);
290 return true;
291 }

References $DIC, $ilDB, $query, $res, and getServer().

+ Here is the call graph for this function:

◆ deleteAllEContentEvents()

ilECSEventQueueReader::deleteAllEContentEvents ( array  $a_types)

Delete all econtents.

@access public

Parameters
array$a_types

Definition at line 299 of file class.ilECSEventQueueReader.php.

300 {
301 global $DIC;
302
303 $ilDB = $DIC['ilDB'];
304
305 $query = "DELETE FROM ecs_events " .
306 "WHERE " . $this->db->in("type", $a_types, "", "text") . ' ' .
307 'AND server_id = ' . $ilDB->quote($this->getServer()->getServerId(), 'integer');
308 $res = $ilDB->manipulate($query);
309 return true;
310 }

References $DIC, $ilDB, $query, $res, and getServer().

+ Here is the call graph for this function:

◆ deleteAllExportedEvents()

ilECSEventQueueReader::deleteAllExportedEvents ( )
protected

Delete all exported events.

@access public

Definition at line 317 of file class.ilECSEventQueueReader.php.

318 {
319 global $DIC;
320
321 $ilDB = $DIC['ilDB'];
322
323 $query = "DELETE FROM ecs_events " .
324 "WHERE type = " . $this->db->quote(self::TYPE_EXPORTED, 'text') . ' ' .
325 'AND server_id = ' . $ilDB->quote($this->getServer()->getServerId(), 'integer');
326 $res = $ilDB->manipulate($query);
327 return true;
328 }

References $DIC, $ilDB, $query, $res, and getServer().

+ Here is the call graph for this function:

◆ deleteByServerId()

static ilECSEventQueueReader::deleteByServerId (   $a_server_id)
static

Definition at line 626 of file class.ilECSEventQueueReader.php.

627 {
628 global $DIC;
629
630 $ilDB = $DIC['ilDB'];
631
632 $query = 'DELETE FROM ecs_events' .
633 ' WHERE server_id = ' . $ilDB->quote($a_server_id, 'integer');
634 $ilDB->manipulate($query);
635 return true;
636 }

References $DIC, $ilDB, and $query.

Referenced by ilECSSetting\delete().

+ Here is the caller graph for this function:

◆ deleteServer()

static ilECSEventQueueReader::deleteServer (   $a_server_id)
static

Delete by server id @global ilDB $ilDB.

Parameters
int$a_server_id

Definition at line 374 of file class.ilECSEventQueueReader.php.

375 {
376 global $DIC;
377
378 $ilDB = $DIC['ilDB'];
379
380 $query = 'DELETE FROM ecs_events ' .
381 'WHERE server_id = ' . $ilDB->quote($a_server_id, 'integer');
382 $ilDB->manipulate($query);
383 }

References $DIC, $ilDB, and $query.

Referenced by ilECSSettingsGUI\doDelete().

+ Here is the caller graph for this function:

◆ getAllEContentTypes()

static ilECSEventQueueReader::getAllEContentTypes ( )
static

All available content types.

Returns
array

Definition at line 97 of file class.ilECSEventQueueReader.php.

98 {
99 return array(self::TYPE_REMOTE_COURSE, self::TYPE_REMOTE_CATEGORY,
100 self::TYPE_REMOTE_FILE, self::TYPE_REMOTE_GLOSSARY, self::TYPE_REMOTE_GROUP,
101 self::TYPE_REMOTE_LEARNING_MODULE, self::TYPE_REMOTE_WIKI, self::TYPE_REMOTE_TEST);
102 }

Referenced by handleExportReset(), and handleImportReset().

+ Here is the caller graph for this function:

◆ getAllResourceIds()

static ilECSEventQueueReader::getAllResourceIds ( ilECSSetting  $server,
array  $a_types,
  $a_sender_only = false 
)
staticprotected

Get all resource ids by resource type.

Parameters
ilECSSetting$server
array$a_types
bool$a_sender_only
Returns
array type => ids

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

113 {
114 include_once 'Services/WebServices/ECS/classes/class.ilRemoteObjectBase.php';
115 $list = array();
116 foreach ($a_types as $type) {
118 if ($robj) {
119 $list[$type] = $robj->getAllResourceIds($server, $a_sender_only);
120 }
121 }
122
123 return $list;
124 }
static getInstanceByEventType($a_type)
Get instance by ilECSEvent(QueueReader) type.
$server
$type

References $server, $type, and ilRemoteObjectBase\getInstanceByEventType().

Referenced by handleExportReset(), and handleImportReset().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEvents()

ilECSEventQueueReader::getEvents ( )

get all events

@access public

Definition at line 271 of file class.ilECSEventQueueReader.php.

272 {
273 return $this->events ? $this->events : array();
274 }

◆ getEventTypeFromObjectType()

static ilECSEventQueueReader::getEventTypeFromObjectType (   $a_obj_type)
staticprotected

Convert object type to event type.

Parameters
string$a_obj_type
Returns
string

Definition at line 86 of file class.ilECSEventQueueReader.php.

87 {
88 // currently they are the same for all resource types
89 return $a_obj_type;
90 }

Referenced by handleImportReset().

+ Here is the caller graph for this function:

◆ getServer()

ilECSEventQueueReader::getServer ( )

get server setting

Returns
ilECSSetting

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

260 {
261 return $this->settings;
262 }

Referenced by add(), delete(), deleteAll(), deleteAllEContentEvents(), deleteAllExportedEvents(), read(), refresh(), update(), and writeEventToDB().

+ Here is the caller graph for this function:

◆ handleExportReset()

static ilECSEventQueueReader::handleExportReset ( ilECSSetting  $server)
static

Handle export reset.

Delete exported econtent and create it again

Returns
bool

throws ilException, ilECSConnectorException

Definition at line 220 of file class.ilECSEventQueueReader.php.

221 {
222 include_once('./Services/WebServices/ECS/classes/class.ilECSExport.php');
223
224 // Delete all export events
225 $queue = new ilECSEventQueueReader($server->getServerId());
226 $queue->deleteAllExportedEvents();
227
228 // Read all local export info
229 $local_econtent_ids = ilECSExport::_getAllEContentIds($server->getServerId());
230
231 $types = self::getAllEContentTypes();
232 $list = self::getAllResourceIds($server, $types, true);
233
234
235 // merge in one array
236 $all_remote_ids = array();
237 foreach ($list as $resource_type => $remote_ids) {
238 $all_remote_ids = array_merge($all_remote_ids, (array) $remote_ids);
239 }
240 $all_remote_ids = array_unique($all_remote_ids);
241
242 $GLOBALS['DIC']['ilLog']->write(__METHOD__ . ': Resources = ' . print_r($all_remote_ids, true));
243 $GLOBALS['DIC']['ilLog']->write(__METHOD__ . ': Local = ' . print_r($local_econtent_ids, true));
244 foreach ($local_econtent_ids as $local_econtent_id => $local_obj_id) {
245 if (!in_array($local_econtent_id, $all_remote_ids)) {
246 // Delete this deprecated info
247 $GLOBALS['DIC']['ilLog']->write(__METHOD__ . ': Deleting deprecated econtent id ' . $local_econtent_id);
248 ilECSExport::_deleteEContentIds($server->getServerId(), array($local_econtent_id));
249 }
250 }
251 return true;
252 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
Reads ECS events and stores them in the database.
static getAllEContentTypes()
All available content types.
static getAllResourceIds(ilECSSetting $server, array $a_types, $a_sender_only=false)
Get all resource ids by resource type.
static _deleteEContentIds($a_server_id, $a_ids)
Delete econtent ids for server.
static _getAllEContentIds($a_server_id)
get all exported econtent ids per server

References $GLOBALS, $server, ilECSExport\_deleteEContentIds(), ilECSExport\_getAllEContentIds(), getAllEContentTypes(), and getAllResourceIds().

Referenced by ilECSSettingsGUI\readAll().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleImportReset()

static ilECSEventQueueReader::handleImportReset ( ilECSSetting  $server)
static

Reread all imported econtent.

Returns
bool

throws ilException, ilECSConnectorException

Definition at line 133 of file class.ilECSEventQueueReader.php.

134 {
135 global $DIC;
136
137 $ilLog = $DIC['ilLog'];
138
139 include_once('Services/WebServices/ECS/classes/class.ilECSConnector.php');
140 include_once('Services/WebServices/ECS/classes/class.ilECSConnectorException.php');
141
142 try {
143 include_once('./Services/WebServices/ECS/classes/class.ilECSEventQueueReader.php');
144 include_once('./Services/WebServices/ECS/classes/class.ilECSImport.php');
145 include_once('./Services/WebServices/ECS/classes/class.ilECSExport.php');
146
147 $types = self::getAllEContentTypes();
148
149 $event_queue = new ilECSEventQueueReader($server->getServerId());
150 $event_queue->deleteAllEContentEvents($types);
151
152 $list = self::getAllResourceIds($server, $types);
153 $imported = ilECSImport::getAllImportedRemoteObjects($server->getServerId());
154
155 $GLOBALS['DIC']['ilLog']->write(__METHOD__ . ': Imported = ' . print_r($imported, true));
156 $GLOBALS['DIC']['ilLog']->write(__METHOD__ . ': List = ' . print_r($list, true));
157
158 foreach ($list as $resource_type => $link_ids) {
159 if (!in_array($resource_type, ilECSUtils::getPossibleRemoteTypes())) {
160 $GLOBALS['DIC']['ilLog']->write(__METHOD__ . ': Ignoring resource type ' . $resource_type);
161 continue;
162 }
163
164
165 foreach ((array) $link_ids as $link_id) {
166 if (!isset($imported[$link_id])) {
167 // Add create event for not imported econtent
168 $event_queue->add(
169 $resource_type,
170 $link_id,
172 );
173 } else {
174 // Add update event for already existing events
175 $event_queue->add(
176 $resource_type,
177 $link_id,
179 );
180 }
181
182 if (isset($imported[$link_id])) {
183 unset($imported[$link_id]);
184 }
185 }
186 }
187
188 if (is_array($imported)) {
189 // Delete event for deprecated econtent
190 include_once 'Services/WebServices/ECS/classes/class.ilECSObjectSettings.php';
191 foreach ($imported as $econtent_id => $obj_id) {
193 if ($type) {
194 $event_queue->add(
195 $type,
196 $econtent_id,
198 );
199 }
200 }
201 }
202 } catch (ilECSConnectorException $e1) {
203 $ilLog->write('Cannot connect to ECS server: ' . $e1->getMessage());
204 throw $e1;
205 } catch (ilException $e2) {
206 $ilLog->write('Update failed: ' . $e2->getMessage());
207 throw $e2;
208 }
209 return true;
210 }
static getEventTypeFromObjectType($a_obj_type)
Convert object type to event type.
static getAllImportedRemoteObjects($a_server_id)
get all imported links
static getPossibleRemoteTypes($a_with_captions=false)
Get all possible remote object types.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupType($a_id, $a_reference=false)
lookup object type

References $DIC, $GLOBALS, $server, $type, ilObject\_lookupType(), ilECSEvent\CREATED, ilECSEvent\DESTROYED, getAllEContentTypes(), ilECSImport\getAllImportedRemoteObjects(), getAllResourceIds(), getEventTypeFromObjectType(), ilECSUtils\getPossibleRemoteTypes(), and ilECSEvent\UPDATED.

Referenced by ilECSSettingsGUI\readAll().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read()

ilECSEventQueueReader::read ( )

Read @access public.

Definition at line 602 of file class.ilECSEventQueueReader.php.

603 {
604 global $DIC;
605
606 $ilDB = $DIC['ilDB'];
607
608 $query = "SELECT * FROM ecs_events " .
609 'WHERE server_id = ' . $ilDB->quote($this->getServer()->getServerId(), 'integer') . ' ' .
610 'ORDER BY event_id';
611
612 $res = $this->db->query($query);
613 $counter = 0;
614 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
615 $this->events[$counter]['event_id'] = $row->event_id;
616 $this->events[$counter]['type'] = $row->type;
617 $this->events[$counter]['id'] = $row->id;
618 $this->events[$counter]['op'] = $row->op;
619
620 $this->econtent_ids[$row->event_id] = $row->event_id;
621 ++$counter;
622 }
623 return true;
624 }

References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, and getServer().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ refresh()

ilECSEventQueueReader::refresh ( )

Fetch events from fifo Using fifo @access public.

Exceptions
ilECSConnectorException

Definition at line 336 of file class.ilECSEventQueueReader.php.

337 {
338 try {
339 include_once('Services/WebServices/ECS/classes/class.ilECSConnector.php');
340 include_once('Services/WebServices/ECS/classes/class.ilECSConnectorException.php');
341
342 $connector = new ilECSConnector($this->getServer());
343 while (true) {
344 $res = $connector->readEventFifo(false);
345
346 if (!count($res->getResult())) {
347 return true;
348 }
349
350 foreach ($res->getResult() as $result) {
351 include_once './Services/WebServices/ECS/classes/class.ilECSEvent.php';
352 $event = new ilECSEvent($result);
353
354 $GLOBALS['DIC']['ilLog']->write(__METHOD__ . ' ---------------------------- Handling new event ');
355 $GLOBALS['DIC']['ilLog']->write(__METHOD__ . print_r($event, true));
356 $GLOBALS['DIC']['ilLog']->write(__METHOD__ . ' ---------------------------- Done! ');
357
358 // Fill command queue
359 $this->writeEventToDB($event);
360 }
361 // Delete from fifo
362 $connector->readEventFifo(true);
363 }
364 } catch (ilECSConnectorException $e) {
365 $GLOBALS['DIC']['ilLog']->write(__METHOD__ . ': Cannot read event fifo. Aborting');
366 }
367 }
$result
writeEventToDB(ilECSEvent $ev)
Write event to db.

References Vendor\Package\$e, $GLOBALS, $res, $result, getServer(), and writeEventToDB().

+ Here is the call graph for this function:

◆ shift()

ilECSEventQueueReader::shift ( )

get and delete the first event entry

@access public

Returns
array event data or an empty array if the queue is empty

Definition at line 513 of file class.ilECSEventQueueReader.php.

514 {
515 $event = array_shift($this->events);
516 if ($event == null) {
517 return array();
518 } else {
519
520 #$this->delete($event['event_id']);
521 return $event;
522 }
523 }

◆ update()

ilECSEventQueueReader::update (   $a_type,
  $a_id,
  $a_operation 
)
private

update one entry

@access private

Definition at line 564 of file class.ilECSEventQueueReader.php.

565 {
566 global $DIC;
567
568 $ilDB = $DIC['ilDB'];
569
570 $query = "UPDATE ecs_events " .
571 "SET op = " . $this->db->quote($a_operation, 'text') . " " .
572 "WHERE type = " . $this->db->quote($a_type, 'text') . " " .
573 "AND id = " . $this->db->quote($a_id, 'integer') . " " .
574 'AND server_id = ' . $ilDB->quote($this->getServer()->getServerId(), 'integer');
575 $res = $ilDB->manipulate($query);
576 }

References $DIC, $ilDB, $query, $res, and getServer().

+ Here is the call graph for this function:

◆ writeEventToDB()

ilECSEventQueueReader::writeEventToDB ( ilECSEvent  $ev)
private

Write event to db.

Definition at line 388 of file class.ilECSEventQueueReader.php.

389 {
390 global $DIC;
391
392 $ilDB = $DIC['ilDB'];
393
394 // this should probably be moved elsewhere
395 switch ($ev->getRessourceType()) {
396 case 'directory_trees':
398 break;
399
400 case 'course_members':
402 break;
403
404 case 'courses':
406 break;
407
408 case 'courselinks':
410 break;
411
412 case 'categories':
414 break;
415
416 case 'files':
418 break;
419
420 case 'glossaries':
422 break;
423
424 case 'groups':
426 break;
427
428 case 'learningmodules':
430 break;
431
432 case 'wikis':
434 break;
435
436 case 'tests':
438 break;
439
440 case 'course_urls':
442 break;
443
444 case 'member_status':
446 break;
447
448 default:
449 // write custom event type
450 $type = $ev->getRessourceType();
451 break;
452 }
453
454 $query = "SELECT * FROM ecs_events " .
455 "WHERE type = " . $ilDB->quote($type, 'integer') . " " .
456 "AND id = " . $ilDB->quote($ev->getRessourceId(), 'integer') . " " .
457 'AND server_id = ' . $ilDB->quote($this->getServer()->getServerId(), 'integer');
458 $res = $ilDB->query($query);
459
460 $event_id = 0;
461 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
462 $event_id = $row->event_id;
463 }
464
465 if (!$event_id) {
466 // No previous entry exists => perform insert
467 $query = "INSERT ecs_events (event_id,type,id,op,server_id) " .
468 "VALUES( " .
469 $ilDB->quote($ilDB->nextId('ecs_events'), 'integer') . ',' .
470 $ilDB->quote($type, 'text') . ', ' .
471 $ilDB->quote($ev->getRessourceId(), 'integer') . ', ' .
472 $ilDB->quote($ev->getStatus(), 'text') . ', ' .
473 $ilDB->quote($this->getServer()->getServerId(), 'integer') . ' ' .
474 ')';
475 $ilDB->manipulate($query);
476 return true;
477 }
478 // Do update
479 $do_update = false;
480 switch ($ev->getStatus()) {
482 // Do update, although impossible
483 $do_update = true;
484 break;
485
487 $do_update = true;
488 break;
489
491 // Do nothing. Old status is ok.
492 break;
493 }
494
495 if (!$do_update) {
496 return true;
497 }
498 $query = "UPDATE ecs_events " .
499 "SET op = " . $ilDB->quote($ev->getStatus(), 'text') . " " .
500 "WHERE event_id = " . $ilDB->quote($event_id, 'integer') . ' ' .
501 'AND type = ' . $ilDB->quote($type) . ' ' .
502 'AND server_id = ' . $ilDB->quote($this->getServer()->getServerId(), 'integer');
503 $ilDB->manipulate($query);
504 return true;
505 }
getRessourceType()
Get ressource type.
getStatus()
get title
getRessourceId()
Get ressource id.

References $DIC, $ilDB, $query, $res, $type, ilECSEvent\CREATED, ilECSEvent\DESTROYED, ilDBConstants\FETCHMODE_OBJECT, ilECSEvent\getRessourceId(), ilECSEvent\getRessourceType(), getServer(), ilECSEvent\getStatus(), TYPE_CMS_COURSE_MEMBERS, TYPE_CMS_COURSES, TYPE_COURSE_URLS, TYPE_DIRECTORY_TREES, TYPE_ENROLMENT_STATUS, TYPE_REMOTE_CATEGORY, TYPE_REMOTE_COURSE, TYPE_REMOTE_FILE, TYPE_REMOTE_GLOSSARY, TYPE_REMOTE_GROUP, TYPE_REMOTE_LEARNING_MODULE, TYPE_REMOTE_TEST, TYPE_REMOTE_WIKI, and ilECSEvent\UPDATED.

Referenced by refresh().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $db

ilECSEventQueueReader::$db
protected

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

◆ $econtent_ids

ilECSEventQueueReader::$econtent_ids = array()
protected

Definition at line 57 of file class.ilECSEventQueueReader.php.

◆ $events

ilECSEventQueueReader::$events = array()
protected

Definition at line 56 of file class.ilECSEventQueueReader.php.

◆ $log

ilECSEventQueueReader::$log
protected

Definition at line 53 of file class.ilECSEventQueueReader.php.

◆ TYPE_CMS_COURSE_MEMBERS

const ilECSEventQueueReader::TYPE_CMS_COURSE_MEMBERS = 'course_members'

◆ TYPE_CMS_COURSES

const ilECSEventQueueReader::TYPE_CMS_COURSES = 'courses'

◆ TYPE_COURSE_URLS

const ilECSEventQueueReader::TYPE_COURSE_URLS = 'course_urls'

◆ TYPE_DIRECTORY_TREES

const ilECSEventQueueReader::TYPE_DIRECTORY_TREES = 'directory_trees'

◆ TYPE_ENROLMENT_STATUS

const ilECSEventQueueReader::TYPE_ENROLMENT_STATUS = 'member_status'

◆ TYPE_EXPORTED

const ilECSEventQueueReader::TYPE_EXPORTED = 'exported'

Definition at line 38 of file class.ilECSEventQueueReader.php.

◆ TYPE_REMOTE_CATEGORY

const ilECSEventQueueReader::TYPE_REMOTE_CATEGORY = 'rcat'

◆ TYPE_REMOTE_COURSE

const ilECSEventQueueReader::TYPE_REMOTE_COURSE = 'rcrs'

◆ TYPE_REMOTE_FILE

const ilECSEventQueueReader::TYPE_REMOTE_FILE = 'rfil'

◆ TYPE_REMOTE_GLOSSARY

const ilECSEventQueueReader::TYPE_REMOTE_GLOSSARY = 'rglo'

◆ TYPE_REMOTE_GROUP

const ilECSEventQueueReader::TYPE_REMOTE_GROUP = 'rgrp'

◆ TYPE_REMOTE_LEARNING_MODULE

const ilECSEventQueueReader::TYPE_REMOTE_LEARNING_MODULE = 'rlm'

◆ TYPE_REMOTE_TEST

const ilECSEventQueueReader::TYPE_REMOTE_TEST = 'rtst'

◆ TYPE_REMOTE_WIKI

const ilECSEventQueueReader::TYPE_REMOTE_WIKI = 'rwik'

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