ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilCourseReferenceLP.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
9{
13 private $logger = null;
14
15 protected function __construct($a_obj_id)
16 {
17 global $DIC;
18
19 parent::__construct($a_obj_id);
20
21 $this->logger = $DIC->logger()->crsr();
22 }
23
28 public function getMembers($a_search = true)
29 {
30 if (!$a_search) {
31 return [];
32 }
33 $target_ref_id = \ilObjCourseReference::_lookupTargetRefId($this->obj_id);
34 if (!$target_ref_id) {
35 return [];
36 }
37 $participants = \ilParticipants::getInstance($target_ref_id);
38 return $participants->getMembers();
39 }
40
41
45 public function getDefaultMode()
46 {
47 return \ilLPObjSettings::LP_MODE_DEACTIVATED;
48 }
49
54 public static function getDefaultModes($a_lp_active)
55 {
56 return [
59 ];
60 }
61
65 public function getValidModes()
66 {
67 return self::getDefaultModes(true);
68 }
69}
An exception for terminatinating execution or to throw for unit testing.
static _lookupTargetRefId($a_obj_id)
Lookup target ref_id.
Class ilCourseReferenceLP.
static getDefaultModes($a_lp_active)
static getInstance($a_ref_id)
Get instance by ref_id.
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc