ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCourseObjectiveResultCache Class Reference

Caches results for a specific user and course. More...

+ Collaboration diagram for ilCourseObjectiveResultCache:

Static Public Member Functions

static isSuggested ($a_usr_id, $a_crs_id, $a_objective_id)
 check if objective is suggested
static getStatus ($a_usr_id, $a_crs_id)
 get status of user

Protected Member Functions

 readSuggested ($a_usr_id, $a_crs_id)
 read suggested objectives

Static Private Attributes

static $suggested = null
static $status = null

Detailed Description

Caches results for a specific user and course.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 34 of file class.ilCourseObjectiveResultCache.php.

Member Function Documentation

static ilCourseObjectiveResultCache::getStatus (   $a_usr_id,
  $a_crs_id 
)
static

get status of user

public

Parameters
intusr_id
intcrs_id
Returns

Definition at line 67 of file class.ilCourseObjectiveResultCache.php.

Referenced by ilCourseObjectiveListGUI\insertProgressInfo(), ilCourseObjectiveListGUI\insertTitle(), and ilContainerObjectiveGUI\showStatus().

{
if(isset(self::$status[$a_usr_id][$a_crs_id]))
{
return self::$status[$a_usr_id][$a_crs_id];
}
$tmp_res = new ilCourseObjectiveResult($a_usr_id);
return self::$status[$a_usr_id][$a_crs_id] = $tmp_res->getStatus($a_crs_id);
}

+ Here is the caller graph for this function:

static ilCourseObjectiveResultCache::isSuggested (   $a_usr_id,
  $a_crs_id,
  $a_objective_id 
)
static

check if objective is suggested

public

Parameters
intusr_id
intcourse_id
Returns
bool

Definition at line 49 of file class.ilCourseObjectiveResultCache.php.

References readSuggested().

Referenced by ilContainerObjectiveGUI\initDetails(), ilCourseObjectiveListGUI\insertProgressInfo(), and ilCourseObjectiveListGUI\insertTitle().

{
if(!is_array(self::$suggested[$a_usr_id][$a_crs_id]))
{
self::$suggested[$a_usr_id][$a_crs_id] = self::readSuggested($a_usr_id,$a_crs_id);
}
return in_array($a_objective_id,self::$suggested[$a_usr_id][$a_crs_id]) ? true : false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilCourseObjectiveResultCache::readSuggested (   $a_usr_id,
  $a_crs_id 
)
protected

read suggested objectives

protected

Parameters
@return

Definition at line 85 of file class.ilCourseObjectiveResultCache.php.

References ilCourseObjectiveResult\_getSuggested().

Referenced by isSuggested().

{
return ilCourseObjectiveResult::_getSuggested($a_usr_id,$a_crs_id,self::getStatus($a_usr_id,$a_crs_id));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilCourseObjectiveResultCache::$status = null
staticprivate

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

ilCourseObjectiveResultCache::$suggested = null
staticprivate

Definition at line 36 of file class.ilCourseObjectiveResultCache.php.


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