5 include_once
'Services/Tracking/classes/class.ilLPStatusFactory.php';
40 if(isset(self::$not_attempted_cache[$a_obj_id]))
42 return self::$not_attempted_cache[$a_obj_id];
46 self::$not_attempted_cache[$a_obj_id] = $class::_getNotAttempted($a_obj_id);
48 return self::$not_attempted_cache[$a_obj_id];
64 if(isset(self::$in_progress_cache[$a_obj_id]))
66 return self::$in_progress_cache[$a_obj_id];
72 self::$in_progress_cache[$a_obj_id] = $class::_getInProgress($a_obj_id);
74 return self::$in_progress_cache[$a_obj_id];
90 if(isset(self::$completed_cache[$a_obj_id]))
92 return self::$completed_cache[$a_obj_id];
95 self::$completed_cache[$a_obj_id] = $class::_getCompleted($a_obj_id);
97 return self::$completed_cache[$a_obj_id];
113 if(isset(self::$failed_cache[$a_obj_id]))
115 return self::$failed_cache[$a_obj_id];
120 self::$failed_cache[$a_obj_id] = $class::_getFailed($a_obj_id);
122 return self::$failed_cache[$a_obj_id];
130 if(isset(self::$info_cache[$a_obj_id]))
132 return self::$info_cache[$a_obj_id];
136 self::$info_cache[$a_obj_id] = $class::_getStatusInfo($a_obj_id);
137 return self::$info_cache[$a_obj_id];
142 unset(self::$info_cache[$a_obj_id]);
143 unset(self::$failed_cache[$a_obj_id]);
144 unset(self::$completed_cache[$a_obj_id]);
145 unset(self::$in_progress_cache[$a_obj_id]);
146 unset(self::$not_attempted_cache[$a_obj_id]);
154 static $cache =
array();
156 if(isset($cache[$a_obj_id]))
158 return $cache[$a_obj_id];
162 $cache[$a_obj_id] = $class::_getTypicalLearningTime($a_obj_id);
164 return $cache[$a_obj_id];
182 static $cache =
array();
184 if(isset($cache[$a_obj_id.
'_'.
$a_type]))
186 return $cache[$a_obj_id.
'_'.
$a_type];
190 $cache[$a_obj_id.
'_'.
$a_type] = $class::_getNotAttempted($a_obj_id);
192 return $cache[$a_obj_id.
'_'.
$a_type];
202 static $cache =
array();
204 if(isset($cache[$a_obj_id.
'_'.
$a_type]))
206 return $cache[$a_obj_id.
'_'.
$a_type];
210 $cache[$a_obj_id.
'_'.
$a_type] = $class::_getInProgress($a_obj_id);
212 return $cache[$a_obj_id.
'_'.
$a_type];
222 static $cache =
array();
224 if(isset($cache[$a_obj_id.
'_'.
$a_type]))
226 return $cache[$a_obj_id.
'_'.
$a_type];
230 $cache[$a_obj_id.
'_'.
$a_type] = $class::_getCompleted($a_obj_id);
232 return $cache[$a_obj_id.
'_'.
$a_type];
242 static $cache =
array();
244 if(isset($cache[$a_obj_id.
'_'.
$a_type]))
246 return $cache[$a_obj_id.
'_'.
$a_type];
250 $cache[$a_obj_id.
'_'.
$a_type] = $class::_getFailed($a_obj_id);
252 return $cache[$a_obj_id.
'_'.
$a_type];
257 static $cache =
array();
259 if(isset($cache[$a_obj_id.
'_'.
$a_type]))
261 return $cache[$a_obj_id.
'_'.
$a_type];
265 $cache[$a_obj_id.
'_'.
$a_type] = $class::_getStatusInfo($a_obj_id);
267 return $cache[$a_obj_id.
'_'.
$a_type];
276 static function _updateStatus($a_obj_id, $a_usr_id, $a_obj = null, $a_percentage =
false, $a_force_raise =
false)
279 if (strtolower(get_class($trac_obj)) !=
"illpstatus")
281 $trac_obj->_updateStatus($a_obj_id, $a_usr_id, $a_obj, $a_percentage, $a_force_raise);
293 $trac_obj->_setDirty($a_obj_id);
305 $trac_obj->refreshStatus($a_obj_id, $a_users);
316 if (isset(self::$status_cache[$a_obj_id][$a_usr_id]))
318 return self::$status_cache[$a_obj_id][$a_usr_id];
322 $st = $trac_obj->determineStatus($a_obj_id, $a_usr_id);
324 self::$status_cache[$a_obj_id][$a_usr_id] = $st;
331 unset(self::$status_cache[$a_obj_id][$a_usr_id]);
344 return $class::_lookupCompletedForObject($a_obj_id, $a_user_ids);
357 return $class::_lookupFailedForObject($a_obj_id, $a_user_ids);
370 return $class::_lookupInProgressForObject($a_obj_id, $a_user_ids);
static _getInProgress($a_obj_id)
Static function to read users who have the status 'in_progress'.
static _getCompleted($a_obj_id)
Static function to read the users who have the status 'completed'.
static _getCountCompleted($a_obj_id)
Static function to read the number of user who have the status 'completed'.
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.
static _lookupFailedForObject($a_obj_id, $a_user_ids=null)
Get failed users for object.
static _refreshStatus($a_obj_id, $a_users=null)
Set dirty.
static _getInProgressByType($a_obj_id, $a_type)
static _getCountFailedByType($a_obj_id, $a_type)
static _resetInfoCaches($a_obj_id)
static _getClassById($a_obj_id, $a_mode=NULL)
static _getNotAttempted($a_obj_id)
Static function to read the number of user who have the status 'not_attempted'.
static _getFailed($a_obj_id)
Static function to read the users who have the status 'completed'.
static $in_progress_cache
static _getFailedByType($a_obj_id, $a_type)
static _getNotAttemptedByType($a_obj_id, $a_type)
static _getCountNotAttempted($a_obj_id)
Static function to read the number of user who have the status 'not_attempted'.
static _getClassByIdAndType($a_obj_id, $a_type)
static _setDirty($a_obj_id)
Set dirty.
static _getInstance($a_obj_id, $a_mode=NULL)
Create styles array
The data for the language used.
static _getStatusInfo($a_obj_id)
Reads informations about the object e.g test results, tlt, number of visits.
static _getCountInProgress($a_obj_id)
Static function to read the number of user who have the status 'in_progress'.
static _getCompletedByType($a_obj_id, $a_type)
static _removeStatusCache($a_obj_id, $a_usr_id)
static _lookupInProgressForObject($a_obj_id, $a_user_ids=null)
Get in progress users for object.
static _getCountCompletedByType($a_obj_id, $a_type)
static $not_attempted_cache
static _getCountFailed($a_obj_id)
Static function to read the number of user who have the status 'failed'.
static _getCountNotAttemptedByType($a_obj_id, $a_type)
Static function to read the number of user who have the status 'not_attempted'.
static _lookupCompletedForObject($a_obj_id, $a_user_ids=null)
Get completed users for object.
Class ilLPStatusWrapper This class is wrapper for all ilLPStatus classes.
static _getStatusInfoByType($a_obj_id, $a_type)
static _getTypicalLearningTime($a_obj_id)
Reads Typical learning time.
static _getCountInProgressByType($a_obj_id, $a_type)
static _determineStatus($a_obj_id, $a_usr_id)
Determine status.