5include_once
'Services/Tracking/classes/class.ilLPObjSettings.php';
35 if (!self::$instance) {
36 self::$instance =
new self();
49 $this->logger =
$DIC->logger()->trac();
68 if ($a_mode ===
null) {
69 include_once
'Services/Object/classes/class.ilObjectLP.php';
71 $a_mode = $olp->getCurrentMode();
75 if (isset(self::$class_by_obj_id[$a_obj_id])) {
76 return self::$class_by_obj_id[$a_obj_id];
82 if (array_key_exists($a_mode, $map)) {
83 $class = $map[$a_mode];
86 if ($class ===
null) {
87 include_once
'Services/Object/classes/class.ilObjectLP.php';
89 $mode = $olp->getCurrentMode();
95 self::$class_by_obj_id[$a_obj_id] = $class;
101 $message =
'Unknown LP mode given: ' . $a_mode;
108 $path = ($a_class ==
'ilLPStatus')
109 ?
'Services/Tracking/classes/'
110 :
'Services/Tracking/classes/status/';
111 include_once $path .
'class.' . $a_class .
'.php';
126 return 'ilLPStatusEvent';
130 $message =
'Unknown LP type given: ' . $a_type;
144 if ($a_mode ===
null) {
145 include_once
'Services/Object/classes/class.ilObjectLP.php';
147 $a_mode = $olp->getCurrentMode();
152 if (array_key_exists($a_mode, $map)) {
153 $class = $map[$a_mode];
156 if ($class ===
null) {
157 include_once
'Services/Object/classes/class.ilObjectLP.php';
159 $mode = $olp->getCurrentMode();
165 return new $class($a_obj_id);
170 $message =
'Unknown LP mode given: ' . $a_mode;
An exception for terminatinating execution or to throw for unit testing.
Thrown for invalid LP status.
Class ilLPStatusFactory Creates status class instances for learning progress modes of an object.
static includeClass($a_class)
__construct()
ilLPStatusFactory constructor.
static _getClassById($a_obj_id, $a_mode=null)
static getFactoryInstance()
static _getClassByIdAndType($a_obj_id, $a_type)
static _getInstance($a_obj_id, $a_mode=null)
static getInstance($a_obj_id)