ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilCourseLearningHistoryProvider Class Reference

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

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

Public Member Functions

 isActive ()
 
 getEntries (int $ts_start, int $ts_end)
 
 getName ()
 
- Public Member Functions inherited from ilAbstractLearningHistoryProvider
 __construct (int $user_id, ilLearningHistoryFactory $factory, ilLanguage $lng, ?ilTemplate $template=null)
 
 isActive ()
 
 getEntries (int $ts_start, int $ts_end)
 
 getName ()
 

Additional Inherited Members

- Protected Member Functions inherited from ilAbstractLearningHistoryProvider
 getUserId ()
 
 getFactory ()
 
 getLanguage ()
 
 getEmphasizedTitle (string $title)
 
- Protected Attributes inherited from ilAbstractLearningHistoryProvider
int $user_id
 
ilLearningHistoryFactory $factory
 
ilLanguage $lng
 

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 Learning history provider: Course learning objectives

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

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

Member Function Documentation

◆ getEntries()

ilCourseLearningHistoryProvider::getEntries ( int  $ts_start,
int  $ts_end 
)

Implements ilLearningHistoryProviderInterface.

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

37 : array
38 {
39 $lng = $this->getLanguage();
41 $completions = ilLOUserResults::getCompletionsOfUser($this->getUserId(), $ts_start, $ts_end);
42
43 $entries = [];
44 foreach ($completions as $c) {
45 $text = str_replace(
46 "$3$",
47 $this->getEmphasizedTitle($c["title"]),
48 $lng->txt("crs_lhist_objective_completed")
49 );
50 $entries[] = $this->getFactory()->entry(
51 $text,
52 $text,
53 ilUtil::getImagePath("standard/icon_obj.svg"),
54 $c["tstamp"],
55 $c["course_id"]
56 );
57 }
58 return $entries;
59 }
static getCompletionsOfUser(int $a_user_id, int $a_from_ts, int $a_to_ts)
Get completed learning objectives for user and time frame.
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
$c
Definition: deliver.php:25

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

+ Here is the call graph for this function:

◆ getName()

ilCourseLearningHistoryProvider::getName ( )

Implements ilLearningHistoryProviderInterface.

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

64 : string
65 {
66 $lng = $this->getLanguage();
68
69 return $lng->txt("crs_objectives");
70 }

References ilAbstractLearningHistoryProvider\$lng, ilAbstractLearningHistoryProvider\getLanguage(), ilLanguage\loadLanguageModule(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ isActive()

ilCourseLearningHistoryProvider::isActive ( )

Implements ilLearningHistoryProviderInterface.

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

29 : bool
30 {
31 return true;
32 }

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