ILIAS  Release_5_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 meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
Id:
class.ilTimingCache.php 44362 2013-08-22 08:36:03Z 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 ilTimingPlaned\_getPlanedTimingsByItem(), and ilObjectActivation\getItem().

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'] = ilObjectActivation::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 _getTimings(), ilLPStatus\_hasUserCompleted(), ilObjectLP\getInstance(), and ilObjectActivation\TIMINGS_PRESETTING.

Referenced by ilLPTableBaseGUI\showTimingsWarning().

{
global $ilObjDataCache;
$obj_id = $ilObjDataCache->lookupObjId($a_ref_id);
// if completed no warning
include_once './Services/Tracking/classes/class.ilLPStatus.php';
if(ilLPStatus::_hasUserCompleted($obj_id, $a_usr_id))
{
return false;
}
// if editing time reached => show warning
$timings =& ilTimingCache::_getTimings($a_ref_id);
if($timings['item']['timing_type'] == ilObjectActivation::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;
}
}
include_once './Services/Object/classes/class.ilObjectLP.php';
$olp = ilObjectLP::getInstance($obj_id);
$collection = $olp->getCollectionInstance();
if($collection instanceof ilLPCollectionOfRepositoryObjects)
{
foreach($collection->getItems() 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: