ILIAS  release_8 Revision v8.23
class.ilCourseWaitingList.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=0);
4 
27 {
28  private ilLogger $logger;
29 
30  public function __construct(int $a_obj_id)
31  {
32  global $DIC;
33 
34  $this->logger = $DIC->logger()->crs();
35  parent::__construct($a_obj_id);
36  }
37 
38  public function addToList(int $a_usr_id): bool
39  {
40  if (!parent::addToList($a_usr_id)) {
41  return false;
42  }
43  $this->logger->debug('Raise new event: Modules/Course addToList');
44  $this->eventHandler->raise(
45  "Modules/Course",
46  'addToWaitingList',
47  [
48  'obj_id' => $this->getObjId(),
49  'usr_id' => $a_usr_id
50  ]
51  );
52  return true;
53  }
54 
55  public function removeFromList(int $a_usr_id): bool
56  {
57  if (!parent::removeFromList($a_usr_id)) {
58  return false;
59  }
60  $this->logger->debug('Raise new event: Modules/Course removeFromList');
61  $this->eventHandler->raise(
62  "Modules/Course",
63  'removeFromWaitingList',
64  [
65  'obj_id' => $this->getObjId(),
66  'usr_id' => $a_usr_id
67  ]
68  );
69  return true;
70  }
71 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)