ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTimingCache Class Reference

class ilTimingCache More...

+ Collaboration diagram for ilTimingCache:

Public Member Functions

_getTimings ($a_ref_id)
 _showWarning ($a_ref_id, $a_usr_id)

Detailed Description

class ilTimingCache

Author
Stefan Meyer smeye.nosp@m.r@da.nosp@m.tabay.nosp@m..de
Version
Id:
class.ilTimingCache.php 12865 2006-12-15 17:55:35Z smeyer

Definition at line 35 of file class.ilTimingCache.php.

Member Function Documentation

& ilTimingCache::_getTimings (   $a_ref_id)

Definition at line 37 of file class.ilTimingCache.php.

References $cache, 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(), _getTimings(), and IL_CRS_TIMINGS_PRESETTING.

Referenced by ilLPListOfObjectsGUI\__renderContainerRow(), and ilLPListOfProgressGUI\__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:


The documentation for this class was generated from the following file: