5 include_once
'Services/Tracking/classes/class.ilLPObjSettings.php';
25 if ($a_mode === null) {
26 include_once
'Services/Object/classes/class.ilObjectLP.php';
28 $a_mode = $olp->getCurrentMode();
32 if (isset(self::$class_by_obj_id[$a_obj_id])) {
33 return self::$class_by_obj_id[$a_obj_id];
39 if (array_key_exists($a_mode,
$map)) {
40 $class =
$map[$a_mode];
43 if ($class === null) {
44 include_once
'Services/Object/classes/class.ilObjectLP.php';
46 $mode = $olp->getCurrentMode();
48 return self::_getClassById($a_obj_id, $mode);
51 self::includeClass($class);
52 self::$class_by_obj_id[$a_obj_id] = $class;
58 echo "ilLPStatusFactory: unknown type " . $a_mode;
64 $path = ($a_class ==
'ilLPStatus')
65 ?
'Services/Tracking/classes/' 66 :
'Services/Tracking/classes/status/';
67 include_once
$path .
'class.' . $a_class .
'.php';
75 self::includeClass(
'ilLPStatusEvent');
76 return 'ilLPStatusEvent';
86 if ($a_mode === null) {
87 include_once
'Services/Object/classes/class.ilObjectLP.php';
89 $a_mode = $olp->getCurrentMode();
94 if (array_key_exists($a_mode,
$map)) {
95 $class =
$map[$a_mode];
98 if ($class === null) {
99 include_once
'Services/Object/classes/class.ilObjectLP.php';
101 $mode = $olp->getCurrentMode();
103 return self::_getInstance($a_obj_id, $mode);
106 self::includeClass($class);
107 return new $class($a_obj_id);
112 echo "ilLPStatusFactory: unknown type " . $a_mode;
static includeClass($a_class)
static _getInstance($a_obj_id, $a_mode=null)
static _getClassById($a_obj_id, $a_mode=null)
Class ilLPStatusFactory Creates status class instances for learning progress modes of an object...
static _getClassByIdAndType($a_obj_id, $a_type)
static getInstance($a_obj_id)