5 include_once
'Services/Tracking/classes/class.ilLPObjSettings.php';
6 include_once
'Services/Tracking/classes/class.ilLPStatusFactory.php';
37 static $cache = array();
39 if(isset($cache[$a_obj_id]))
41 return $cache[$a_obj_id];
45 $cache[$a_obj_id] = call_user_func(array($class,
'_getNotAttempted'),$a_obj_id);
47 return $cache[$a_obj_id];
63 static $cache = array();
65 if(isset($cache[$a_obj_id]))
67 return $cache[$a_obj_id];
74 $cache[$a_obj_id] = call_user_func($tmp = array($class,
'_getInProgress'),$a_obj_id);
76 return $cache[$a_obj_id];
92 static $cache = array();
94 if(isset($cache[$a_obj_id]))
96 return $cache[$a_obj_id];
99 $cache[$a_obj_id] = call_user_func(array($class,
'_getCompleted'),$a_obj_id);
101 return $cache[$a_obj_id];
117 static $cache = array();
119 if(isset($cache[$a_obj_id]))
121 return $cache[$a_obj_id];
126 $cache[$a_obj_id] = call_user_func(array($class,
'_getFailed'),$a_obj_id);
128 return $cache[$a_obj_id];
136 static $cache = array();
138 if(isset($cache[$a_obj_id]))
140 return $cache[$a_obj_id];
144 $cache[$a_obj_id] = call_user_func(array($class,
'_getStatusInfo'),$a_obj_id);
145 return $cache[$a_obj_id];
153 static $cache = array();
155 if(isset($cache[$a_obj_id]))
157 return $cache[$a_obj_id];
162 $cache[$a_obj_id] = call_user_func(array($class,
'_getTypicalLearningTime'),$a_obj_id);
164 return $cache[$a_obj_id];
181 static $cache = array();
183 if(isset($cache[$a_obj_id.
'_'.$a_type]))
185 return $cache[$a_obj_id.
'_'.$a_type];
190 $cache[$a_obj_id.
'_'.$a_type] = call_user_func(array($class,
'_getNotAttempted'),$a_obj_id);
192 return $cache[$a_obj_id.
'_'.$a_type];
200 static $cache = array();
202 if(isset($cache[$a_obj_id.
'_'.$a_type]))
204 return $cache[$a_obj_id.
'_'.$a_type];
209 $cache[$a_obj_id.
'_'.$a_type] = call_user_func(array($class,
'_getInProgress'),$a_obj_id);
211 return $cache[$a_obj_id.
'_'.$a_type];
219 static $cache = array();
221 if(isset($cache[$a_obj_id.
'_'.$a_type]))
223 return $cache[$a_obj_id.
'_'.$a_type];
227 $cache[$a_obj_id.
'_'.$a_type] = call_user_func(array($class,
'_getCompleted'),$a_obj_id);
228 return $cache[$a_obj_id.
'_'.$a_type];
236 static $cache = array();
238 if(isset($cache[$a_obj_id.
'_'.$a_type]))
240 return $cache[$a_obj_id.
'_'.$a_type];
244 $cache[$a_obj_id.
'_'.$a_type] = call_user_func(array($class,
'_getFailed'),$a_obj_id);
245 return $cache[$a_obj_id.
'_'.$a_type];
249 static $cache = array();
251 if(isset($cache[$a_obj_id.
'_'.$a_type]))
253 return $cache[$a_obj_id.
'_'.$a_type];
258 $cache[$a_obj_id.
'_'.$a_type] = call_user_func(array($class,
'_getStatusInfo'),$a_obj_id);
260 return $cache[$a_obj_id.
'_'.$a_type];
269 static function _updateStatus($a_obj_id, $a_usr_id, $a_obj = null, $a_percentage =
false)
273 if (strtolower($class) !=
"illpstatus")
275 $trac_obj =
new $class($a_obj_id);
276 $trac_obj->_updateStatus($a_obj_id, $a_usr_id, $a_obj, $a_percentage);
288 $trac_obj =
new $class($a_obj_id);
289 $trac_obj->_setDirty($a_obj_id);
301 $trac_obj =
new $class($a_obj_id);
302 $trac_obj->refreshStatus($a_obj_id, $a_users);
313 if (isset(self::$status_cache[$a_obj_id][$a_usr_id]))
315 return self::$status_cache[$a_obj_id][$a_usr_id];
319 $trac_obj =
new $class($a_obj_id);
321 $st = $trac_obj->determineStatus($a_obj_id, $a_usr_id);
323 self::$status_cache[$a_obj_id][$a_usr_id] = $st;
330 unset(self::$status_cache[$a_obj_id][$a_usr_id]);