ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 67 of file class.ilCourseObjectiveResultCache.php.

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

68  {
69  if(isset(self::$status[$a_usr_id][$a_crs_id]))
70  {
71  return self::$status[$a_usr_id][$a_crs_id];
72  }
73  $tmp_res = new ilCourseObjectiveResult($a_usr_id);
74  return self::$status[$a_usr_id][$a_crs_id] = $tmp_res->getStatus($a_crs_id);
75  }
+ 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  {
53  self::$suggested[$a_usr_id][$a_crs_id] = self::readSuggested($a_usr_id,$a_crs_id);
54  }
55  return in_array($a_objective_id,self::$suggested[$a_usr_id][$a_crs_id]) ? true : false;
56  }
+ 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 85 of file class.ilCourseObjectiveResultCache.php.

References ilCourseObjectiveResult\_getSuggested().

86  {
87  return ilCourseObjectiveResult::_getSuggested($a_usr_id,$a_crs_id,self::getStatus($a_usr_id,$a_crs_id));
88  }
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: