ILIAS  Release_4_1_x_branch Revision 61804
 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 meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
Id:
class.ilTimingCache.php 27366 2011-01-12 11:45:08Z jluetzen

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 ilCourseItems\_getItem(), and ilTimingPlaned\_getPlanedTimingsByItem().

Referenced by _showWarning(), and ilLPTableBaseGUI\showTimingsWarning().

{
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(), ilLPObjSettings\_lookupMode(), ilObject\_lookupType(), IL_CRS_TIMINGS_PRESETTING, and LP_MODE_OBJECTIVES.

Referenced by ilLPTableBaseGUI\showTimingsWarning().

{
global $objDefinition;
include_once './Services/Tracking/classes/class.ilLPCollectionCache.php';
include_once './Services/Tracking/classes/class.ilLPStatusWrapper.php';
include_once './Services/Tracking/classes/class.ilLPObjSettings.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;
}
}
// objective_ids would get confused with ref_ids !
$objDefinition->isContainer(ilObject::_lookupType($obj_id)))
{
// 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: