ILIAS  release_8 Revision v8.24
class.ilCourseReferenceLP.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
10{
14 private $logger = null;
15
16 protected function __construct($a_obj_id)
17 {
18 global $DIC;
19
20 parent::__construct($a_obj_id);
21
22 $this->logger = $DIC->logger()->crsr();
23 }
24
29 public function getMembers(bool $a_search = true): array
30 {
31 if (!$a_search) {
32 return [];
33 }
34 $target_ref_id = \ilObjCourseReference::_lookupTargetRefId($this->obj_id);
35 if (!$target_ref_id) {
36 return [];
37 }
38 $participants = \ilParticipants::getInstance($target_ref_id);
39 return $participants->getMembers();
40 }
41
42
46 public function getDefaultMode(): int
47 {
48 return \ilLPObjSettings::LP_MODE_DEACTIVATED;
49 }
50
55 public static function getDefaultModes(bool $a_lp_active): array
56 {
57 return [
60 ];
61 }
62
66 public function getValidModes(): array
67 {
68 return self::getDefaultModes(true);
69 }
70}
static _lookupTargetRefId(int $a_obj_id)
Class ilCourseReferenceLP.
getMembers(bool $a_search=true)
static getDefaultModes(bool $a_lp_active)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance(int $a_ref_id)
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc