ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilCourseObjectiveResultCache Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 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

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 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 25 of file class.ilCourseObjectiveResultCache.php.

Member Function Documentation

◆ getStatus()

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

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

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

38  : string
39  {
40  if (isset(self::$status[$a_usr_id][$a_crs_id])) {
41  return self::$status[$a_usr_id][$a_crs_id];
42  }
43  $tmp_res = new ilCourseObjectiveResult($a_usr_id);
44  return self::$status[$a_usr_id][$a_crs_id] = $tmp_res->getStatus($a_crs_id);
45  }
+ 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 30 of file class.ilCourseObjectiveResultCache.php.

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

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

◆ readSuggested()

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

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

References ilCourseObjectiveResult\_getSuggested().

47  : array
48  {
49  return ilCourseObjectiveResult::_getSuggested($a_usr_id, $a_crs_id, self::getStatus($a_usr_id, $a_crs_id));
50  }
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 28 of file class.ilCourseObjectiveResultCache.php.

◆ $suggested

array ilCourseObjectiveResultCache::$suggested = []
staticprivate

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


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