ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 More...
 
static getStatus ($a_usr_id, $a_crs_id)
 get status of user More...
 

Protected Member Functions

 readSuggested ($a_usr_id, $a_crs_id)
 read suggested objectives More...
 

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

◆ getStatus()

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

get status of user

public

Parameters
intusr_id
intcrs_id
Returns

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

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

67  {
68  if (isset(self::$status[$a_usr_id][$a_crs_id])) {
69  return self::$status[$a_usr_id][$a_crs_id];
70  }
71  $tmp_res = new ilCourseObjectiveResult($a_usr_id);
72  return self::$status[$a_usr_id][$a_crs_id] = $tmp_res->getStatus($a_crs_id);
73  }
+ Here is the caller graph for this function:

◆ isSuggested()

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.

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

50  {
51  if (!is_array(self::$suggested[$a_usr_id][$a_crs_id])) {
52  self::$suggested[$a_usr_id][$a_crs_id] = self::readSuggested($a_usr_id, $a_crs_id);
53  }
54  return in_array($a_objective_id, self::$suggested[$a_usr_id][$a_crs_id]) ? true : false;
55  }
+ Here is the caller graph for this function:

◆ readSuggested()

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

read suggested objectives

protected

Parameters

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

References ilCourseObjectiveResult\_getSuggested().

84  {
85  return ilCourseObjectiveResult::_getSuggested($a_usr_id, $a_crs_id, self::getStatus($a_usr_id, $a_crs_id));
86  }
static _getSuggested($a_user_id, $a_crs_id, $a_status=IL_OBJECTIVE_STATUS_FINAL)
+ Here is the call graph for this function:

Field Documentation

◆ $status

ilCourseObjectiveResultCache::$status = null
staticprivate

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

◆ $suggested

ilCourseObjectiveResultCache::$suggested = null
staticprivate

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


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