ILIAS  trunk Revision v11.0_alpha-1731-gff9cd7e2bd3
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilCourseObjectiveResultCache Class Reference

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

+ Collaboration diagram for ilCourseObjectiveResultCache:

Static Public Member Functions

static isSuggested (int $a_usr_id, int $a_crs_id, int $a_objective_id)
 
static getStatus (int $a_usr_id, int $a_crs_id)
 

Static Protected Member Functions

static readSuggested (int $a_usr_id, int $a_crs_id)
 

Static Private Attributes

static array $suggested = []
 
static array $status = []
 

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 \

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

Member Function Documentation

◆ getStatus()

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

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

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

39  : string
40  {
41  if (isset(self::$status[$a_usr_id][$a_crs_id])) {
42  return self::$status[$a_usr_id][$a_crs_id];
43  }
44  $tmp_res = new ilCourseObjectiveResult($a_usr_id);
45  return self::$status[$a_usr_id][$a_crs_id] = $tmp_res->getStatus($a_crs_id);
46  }
+ Here is the caller graph for this function:

◆ isSuggested()

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

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

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

31  : bool
32  {
33  if (!isset(self::$suggested[$a_usr_id][$a_crs_id])) {
34  self::$suggested[$a_usr_id][$a_crs_id] = self::readSuggested($a_usr_id, $a_crs_id);
35  }
36  return in_array($a_objective_id, self::$suggested[$a_usr_id][$a_crs_id]);
37  }
+ Here is the caller graph for this function:

◆ readSuggested()

static ilCourseObjectiveResultCache::readSuggested ( int  $a_usr_id,
int  $a_crs_id 
)
staticprotected

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

References ilCourseObjectiveResult\_getSuggested().

48  : array
49  {
50  return ilCourseObjectiveResult::_getSuggested($a_usr_id, $a_crs_id, self::getStatus($a_usr_id, $a_crs_id));
51  }
static _getSuggested(int $a_user_id, int $a_crs_id, string $a_status=self::IL_OBJECTIVE_STATUS_FINAL)
+ Here is the call graph for this function:

Field Documentation

◆ $status

array ilCourseObjectiveResultCache::$status = []
staticprivate

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

◆ $suggested

array ilCourseObjectiveResultCache::$suggested = []
staticprivate

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


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