ILIAS  Release_4_2_x_branch Revision 61807
 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 40079 2013-02-22 17:35:55Z 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 ilLPCollectionCache\_getItems(), _getTimings(), ilLPObjSettings\_lookupMode(), ilLPStatus\_lookupStatus(), ilObject\_lookupType(), IL_CRS_TIMINGS_PRESETTING, LP_MODE_OBJECTIVES, and LP_STATUS_COMPLETED_NUM.

Referenced by ilLPTableBaseGUI\showTimingsWarning().

{
global $objDefinition;
include_once './Services/Tracking/classes/class.ilLPCollectionCache.php';
include_once './Services/Tracking/classes/class.ilLPStatus.php';
include_once './Services/Tracking/classes/class.ilLPObjSettings.php';
global $ilObjDataCache;
$obj_id = $ilObjDataCache->lookupObjId($a_ref_id);
// if completed no warning
{
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: