ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilCourseLearningHistoryProvider Class Reference

Learning history provider: Course learning objectives. More...

+ Inheritance diagram for ilCourseLearningHistoryProvider:
+ Collaboration diagram for ilCourseLearningHistoryProvider:

Public Member Functions

 isActive ()
 Is active?
Returns
bool
More...
 
 getEntries ($ts_start, $ts_end)
 Get entries.
Parameters
int$ts_start
int$ts_end
Returns
ilLearningHistoryEntry[]
More...
 
 getName ()
 Get name of provider (in user language)
Returns
string
More...
 
- Public Member Functions inherited from ilAbstractLearningHistoryProvider
 __construct ( $user_id, ilLearningHistoryFactory $factory, ilLanguage $lng, ilTemplate $template=null)
 Constructor. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ilAbstractLearningHistoryProvider
 getUserId ()
 Get user id. More...
 
 getFactory ()
 Get factory. More...
 
 getLanguage ()
 Get language object. More...
 
 getEmphasizedTitle ($title)
 Get emphasized title. More...
 
- Protected Attributes inherited from ilAbstractLearningHistoryProvider
 $user_id
 
 $factory
 
 $lng
 

Detailed Description

Learning history provider: Course learning objectives.

Author
killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 11 of file class.ilCourseLearningHistoryProvider.php.

Member Function Documentation

◆ getEntries()

ilCourseLearningHistoryProvider::getEntries (   $ts_start,
  $ts_end 
)

Get entries.

Parameters
int$ts_start
int$ts_end
Returns
ilLearningHistoryEntry[]

Implements ilLearningHistoryProviderInterface.

Definition at line 25 of file class.ilCourseLearningHistoryProvider.php.

References $c, ilAbstractLearningHistoryProvider\$lng, $text, ilLOUserResults\getCompletionsOfUser(), ilAbstractLearningHistoryProvider\getEmphasizedTitle(), ilAbstractLearningHistoryProvider\getFactory(), ilUtil\getImagePath(), ilAbstractLearningHistoryProvider\getLanguage(), and ilAbstractLearningHistoryProvider\getUserId().

26  {
27  $lng = $this->getLanguage();
28  $lng->loadLanguageModule("crs");
29  $completions = ilLOUserResults::getCompletionsOfUser($this->getUserId(), $ts_start, $ts_end);
30 
31  $entries = [];
32  foreach ($completions as $c) {
33  $text = str_replace("$3$", $this->getEmphasizedTitle($c["title"]), $lng->txt("crs_lhist_objective_completed"));
34  $entries[] = $this->getFactory()->entry(
35  $text,
36  $text,
37  ilUtil::getImagePath("icon_obj.svg"),
38  $c["tstamp"],
39  $c["course_id"]
40  );
41  }
42  return $entries;
43  }
static getCompletionsOfUser($a_user_id, $a_from_ts, $a_to_ts)
Get completed learning objectives for user and time frame.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$text
Definition: errorreport.php:18
+ Here is the call graph for this function:

◆ getName()

ilCourseLearningHistoryProvider::getName ( )

Get name of provider (in user language)

Returns
string

Implements ilLearningHistoryProviderInterface.

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

References ilAbstractLearningHistoryProvider\$lng, and ilAbstractLearningHistoryProvider\getLanguage().

48  : string
49  {
50  $lng = $this->getLanguage();
51  $lng->loadLanguageModule("crs");
52 
53  return $lng->txt("crs_objectives");
54  }
+ Here is the call graph for this function:

◆ isActive()

ilCourseLearningHistoryProvider::isActive ( )

Is active?

Returns
bool

Implements ilLearningHistoryProviderInterface.

Definition at line 17 of file class.ilCourseLearningHistoryProvider.php.

18  {
19  return true;
20  }

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