This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
More...
|
static | handleEvent (string $a_component, string $a_event, array $a_parameter) |
| Handle an event in a listener. More...
|
|
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 Class ilCourseReferencePathInfo
Definition at line 22 of file class.ilCourseReferenceAppEventListener.php.
◆ __construct()
ilCourseReferenceAppEventListener::__construct |
( |
| ) |
|
|
private |
◆ handleEvent()
static ilCourseReferenceAppEventListener::handleEvent |
( |
string |
$a_component, |
|
|
string |
$a_event, |
|
|
array |
$a_parameter |
|
) |
| |
|
static |
Handle an event in a listener.
- Parameters
-
string | $a_component | component, e.g. "components/ILIAS/Forum" or "components/ILIAS/User" |
string | $a_event | event e.g. "createUser", "updateUser", "deleteUser", ... |
array | $a_parameter | parameter array (assoc), array("name" => ..., "phone_office" => ...) |
Implements ilAppEventListener.
Definition at line 120 of file class.ilCourseReferenceAppEventListener.php.
References ilLoggerFactory\getLogger().
123 switch ($a_component) {
124 case 'components/ILIAS/AccessControl':
126 $self->handleUserAssignments($a_event, $a_parameter);
static getLogger(string $a_component_id)
Get component logger.
◆ handleReferences()
ilCourseReferenceAppEventListener::handleReferences |
( |
|
$a_course_obj_id, |
|
|
|
$a_usr_id, |
|
|
|
$a_role_id |
|
) |
| |
|
protected |
- Parameters
-
$a_course_obj_id | |
$a_usr_id | |
$a_role_id | |
Definition at line 72 of file class.ilCourseReferenceAppEventListener.php.
References ilObject\_getAllReferences(), ilObject\_lookupTitle(), ilLogLevel\DEBUG, ilParticipants\getInstance(), ilCourseReferencePathInfo\getInstanceByRefId(), ilParticipants\IL_CRS_MEMBER, and ILIAS\Repository\logger().
Referenced by handleUserAssignments().
75 if (substr($role_title, 0, 10) !==
'il_crs_mem') {
76 $this->
logger->debug(
'Ignoring non member role: ' . $role_title);
83 $course_ref_id = end($course_ref_ids);
85 $childs = $this->tree->getChildsByType($course_ref_id,
'crsr');
88 foreach ($childs as $tree_node) {
89 $this->
logger->debug(
'Handling course reference: ' . $tree_node[
'title']);
93 if (!$path_info->hasParentCourse()) {
94 $this->
logger->debug(
'No reference member update: no direct parent course');
98 if (!$path_info->isMemberUpdateEnabled()) {
99 $this->
logger->debug(
'No reference member update: update disabled.');
103 $this->
logger->debug(
'Reference member update: adding user to course.');
104 $target_course_ref_id = $path_info->getTargetId();
static getInstance(int $a_ref_id)
static _getAllReferences(int $id)
get all reference ids for object ID
static _lookupTitle(int $obj_id)
static getInstanceByRefId(int $ref_id, int $target_ref_id=0)
◆ handleUserAssignments()
ilCourseReferenceAppEventListener::handleUserAssignments |
( |
|
$a_event, |
|
|
|
$a_parameter |
|
) |
| |
|
protected |
◆ $instance
ilCourseReferenceAppEventListener::$instance = null |
|
staticprivate |
◆ $logger
ilCourseReferenceAppEventListener::$logger = null |
|
private |
◆ $tree
ilCourseReferenceAppEventListener::$tree = null |
|
private |
The documentation for this class was generated from the following file: