ILIAS  release_8 Revision v8.24
ilTrackingLearningHistoryProvider Class Reference

Learning history provider: completed lp objects. More...

+ Inheritance diagram for ilTrackingLearningHistoryProvider:
+ Collaboration diagram for ilTrackingLearningHistoryProvider:

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

Learning history provider: completed lp objects.

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

Definition at line 10 of file class.ilTrackingLearningHistoryProvider.php.

Member Function Documentation

◆ getEntries()

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

Implements ilLearningHistoryProviderInterface.

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

27 : array
28 {
29 $lng = $this->getLanguage();
30 $this->lng->loadLanguageModule("trac");
31 $from = new ilDateTime($ts_start, IL_CAL_UNIX);
32 $to = new ilDateTime($ts_end, IL_CAL_UNIX);
34 $this->getUserId(),
35 $from->get(IL_CAL_DATETIME),
36 $to->get(IL_CAL_DATETIME)
37 );
38 $entries = [];
39 foreach ($completions as $c) {
40 $ts = new ilDateTime($c["status_changed"], IL_CAL_DATETIME);
41 $in_txt = ilObject::_lookupType((int) $c["obj_id"]) === "crs"
42 ? $this->lng->txt("trac_lhist_obj_completed")
43 : $this->lng->txt("trac_lhist_obj_completed_in");
44 $entries[] = $this->getFactory()->entry(
45 $this->lng->txt("trac_lhist_obj_completed"),
46 $in_txt,
47 ilObject::_getIcon((int) $c["obj_id"]),
48 $ts->get(IL_CAL_UNIX),
49 $c["obj_id"]
50 );
51 }
52 return $entries;
53 }
const IL_CAL_UNIX
const IL_CAL_DATETIME
@classDescription Date and time handling
static getCompletionsOfUser(int $user_id, string $from, string $to)
static _lookupType(int $id, bool $reference=false)
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
$c
Definition: cli.php:38

References $c, ilAbstractLearningHistoryProvider\$lng, ilObject\_getIcon(), ilObject\_lookupType(), ilLPMarks\getCompletionsOfUser(), ilAbstractLearningHistoryProvider\getFactory(), ilAbstractLearningHistoryProvider\getLanguage(), ilAbstractLearningHistoryProvider\getUserId(), IL_CAL_DATETIME, IL_CAL_UNIX, and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getName()

ilTrackingLearningHistoryProvider::getName ( )

Implements ilLearningHistoryProviderInterface.

Definition at line 58 of file class.ilTrackingLearningHistoryProvider.php.

58 : string
59 {
60 $lng = $this->getLanguage();
61 $this->lng->loadLanguageModule("lp");
62
63 return $this->lng->txt("learning_progress");
64 }

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

+ Here is the call graph for this function:

◆ isActive()

ilTrackingLearningHistoryProvider::isActive ( )

Implements ilLearningHistoryProviderInterface.

Definition at line 15 of file class.ilTrackingLearningHistoryProvider.php.

15 : bool
16 {
19 return true;
20 }
21 return false;
22 }

References ilObjUserTracking\_enabledLearningProgress(), and ilObjUserTracking\_hasLearningProgressLearner().

+ Here is the call graph for this function:

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