5 include_once
'Services/Tracking/classes/class.ilLPObjSettings.php';
27 include_once
'Services/Object/classes/class.ilObjectLP.php';
29 $a_mode = $olp->getCurrentMode();
33 if (isset(self::$class_by_obj_id[$a_obj_id]))
35 return self::$class_by_obj_id[$a_obj_id];
41 if(array_key_exists($a_mode, $map))
43 $class = $map[$a_mode];
48 include_once
'Services/Object/classes/class.ilObjectLP.php';
50 $mode = $olp->getCurrentMode();
53 return self::_getClassById($a_obj_id, $mode);
58 self::includeClass($class);
59 self::$class_by_obj_id[$a_obj_id] = $class;
65 echo "ilLPStatusFactory: unknown type ".$a_mode;
71 $path = ($a_class ==
'ilLPStatus')
72 ?
'Services/Tracking/classes/' 73 :
'Services/Tracking/classes/status/';
74 include_once
$path.
'class.'.$a_class.
'.php';
83 self::includeClass(
'ilLPStatusEvent');
84 return 'ilLPStatusEvent';
87 echo "ilLPStatusFactory: unknown type: ".$a_type;
96 include_once
'Services/Object/classes/class.ilObjectLP.php';
98 $a_mode = $olp->getCurrentMode();
103 if(array_key_exists($a_mode, $map))
105 $class = $map[$a_mode];
110 include_once
'Services/Object/classes/class.ilObjectLP.php';
112 $mode = $olp->getCurrentMode();
115 return self::_getInstance($a_obj_id, $mode);
120 self::includeClass($class);
121 return new $class($a_obj_id);
126 echo "ilLPStatusFactory: unknown type ".$a_mode;
static includeClass($a_class)
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, $a_mode=NULL)
Create styles array
The data for the language used.
static getInstance($a_obj_id)