ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilTrackingLearningHistoryProvider 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 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

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: completed lp objects

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

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

Member Function Documentation

◆ getEntries()

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

Implements ilLearningHistoryProviderInterface.

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

41 : array
42 {
43 $lng = $this->getLanguage();
44 $this->lng->loadLanguageModule("trac");
45 $from = new ilDateTime($ts_start, IL_CAL_UNIX);
46 $to = new ilDateTime($ts_end, IL_CAL_UNIX);
48 $this->getUserId(),
49 $from->get(IL_CAL_DATETIME),
50 $to->get(IL_CAL_DATETIME)
51 );
52 $entries = [];
53 foreach ($completions as $c) {
54 $ts = new ilDateTime($c["status_changed"], IL_CAL_DATETIME);
55 $in_txt = ilObject::_lookupType((int) $c["obj_id"]) === "crs"
56 ? $this->lng->txt("trac_lhist_obj_completed")
57 : $this->lng->txt("trac_lhist_obj_completed_in");
58 $entries[] = $this->getFactory()->entry(
59 $this->lng->txt("trac_lhist_obj_completed"),
60 $in_txt,
61 ilObject::_getIcon((int) $c["obj_id"]),
62 $ts->get(IL_CAL_UNIX),
63 $c["obj_id"]
64 );
65 }
66 return $entries;
67 }
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: deliver.php:25

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 72 of file class.ilTrackingLearningHistoryProvider.php.

72 : string
73 {
74 $lng = $this->getLanguage();
75 $this->lng->loadLanguageModule("lp");
76
77 return $this->lng->txt("learning_progress");
78 }

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 29 of file class.ilTrackingLearningHistoryProvider.php.

29 : bool
30 {
33 return true;
34 }
35 return false;
36 }

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: