ILIAS  release_7 Revision v7.30-3-g800a261c036
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

@access public

Parameters
intusr_id
intcrs_id
Returns

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

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 }

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

+ 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

@access public

Parameters
intusr_id
intcourse_id
Returns
bool

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

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 }
return true
Flag indicating whether or not HTTP headers will be sent when outputting captcha image/audio.
readSuggested($a_usr_id, $a_crs_id)
read suggested objectives

References readSuggested(), and true.

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readSuggested()

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

read suggested objectives

@access protected

Parameters

return

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

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)

References ilCourseObjectiveResult\_getSuggested().

Referenced by isSuggested().

+ Here is the call graph for this function:
+ Here is the caller 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: