Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00038 include_once 'Services/Tracking/classes/class.ilLPObjSettings.php';
00039 include_once 'Services/Tracking/classes/class.ilLPStatusFactory.php';
00040
00041 class ilLPStatusWrapper
00042 {
00043
00047 function _getCountNotAttempted($a_obj_id)
00048 {
00049 return count(ilLPStatusWrapper::_getNotAttempted($a_obj_id));
00050 }
00051
00055 function _getNotAttempted($a_obj_id)
00056 {
00057 static $cache = array();
00058
00059 if(isset($cache[$a_obj_id]))
00060 {
00061 return $cache[$a_obj_id];
00062 }
00063
00064 $class = ilLPStatusFactory::_getClassById($a_obj_id);
00065
00066 $cache[$a_obj_id] = call_user_func(array($class,'_getNotAttempted'),$a_obj_id);
00067
00068 return $cache[$a_obj_id];
00069 }
00070
00074 function _getCountInProgress($a_obj_id)
00075 {
00076 return count(ilLPStatusWrapper::_getInProgress($a_obj_id));
00077 }
00078
00082 function _getInProgress($a_obj_id)
00083 {
00084 static $cache = array();
00085
00086 if(isset($cache[$a_obj_id]))
00087 {
00088 return $cache[$a_obj_id];
00089 }
00090
00091 global $ilBench;
00092
00093 $class = ilLPStatusFactory::_getClassById($a_obj_id);
00094
00095 $cache[$a_obj_id] = call_user_func($tmp = array($class,'_getInProgress'),$a_obj_id);
00096
00097 return $cache[$a_obj_id];
00098 }
00099
00103 function _getCountCompleted($a_obj_id)
00104 {
00105 return count(ilLPStatusWrapper::_getCompleted($a_obj_id));
00106 }
00107
00111 function _getCompleted($a_obj_id)
00112 {
00113 static $cache = array();
00114
00115 if(isset($cache[$a_obj_id]))
00116 {
00117 return $cache[$a_obj_id];
00118 }
00119
00120 $class = ilLPStatusFactory::_getClassById($a_obj_id);
00121
00122 $cache[$a_obj_id] = call_user_func(array($class,'_getCompleted'),$a_obj_id);
00123
00124 return $cache[$a_obj_id];
00125 }
00126 }
00127 ?>