class ilTimingCache More...
Public Member Functions | |
| & | _getTimings ($a_ref_id) |
| _showWarning ($a_ref_id, $a_usr_id) | |
class ilTimingCache
Definition at line 35 of file class.ilTimingCache.php.
| & ilTimingCache::_getTimings | ( | $ | a_ref_id | ) |
Definition at line 37 of file class.ilTimingCache.php.
References ilCourseItems::_getItem(), and ilTimingPlaned::_getPlanedTimingsByItem().
Referenced by _showWarning(), and ilLPItemListGUI::readTimings().
{
static $cache = array();
if(isset($cache[$a_ref_id]))
{
return $cache[$a_ref_id];
}
$cache[$a_ref_id]['item'] = ilCourseItems::_getItem($a_ref_id);
$cache[$a_ref_id]['user'] = ilTimingPlaned::_getPlanedTimingsByItem($a_ref_id);
return $cache[$a_ref_id];
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilTimingCache::_showWarning | ( | $ | a_ref_id, | |
| $ | a_usr_id | |||
| ) |
Definition at line 51 of file class.ilTimingCache.php.
References ilLPStatusWrapper::_getCompleted(), ilLPCollectionCache::_getItems(), and _getTimings().
Referenced by ilLPListOfProgressGUI::__renderContainerRow(), and ilLPListOfObjectsGUI::__renderContainerRow().
{
include_once './Services/Tracking/classes/class.ilLPCollectionCache.php';
include_once './Services/Tracking/classes/class.ilLPStatusWrapper.php';
global $ilObjDataCache;
$obj_id = $ilObjDataCache->lookupObjId($a_ref_id);
// if completed no warning
if(in_array($a_usr_id,ilLPStatusWrapper::_getCompleted($obj_id)))
{
return false;
}
// if editing time reached => show warning
$timings =& ilTimingCache::_getTimings($a_ref_id);
if($timings['item']['timing_type'] == IL_CRS_TIMINGS_PRESETTING)
{
if($timings['item']['changeable'] and $timings['user'][$a_usr_id]['end'])
{
$end = $timings['user'][$a_usr_id]['end'];
}
else
{
$end = $timings['item']['suggestion_end'];
}
if($end < time())
{
return true;
}
}
// No check subitems
foreach(ilLPCollectionCache::_getItems($obj_id) as $item)
{
if(ilTimingCache::_showWarning($item,$a_usr_id))
{
return true;
}
}
// Really ???
return false;
}
Here is the call graph for this function:
Here is the caller graph for this function:
1.7.1