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

Learning history service. More...

+ Collaboration diagram for ilLearningHistoryService:

Public Member Functions

 __construct (ilObjUser $user, ilLanguage $lng, \ILIAS\DI\UIServices $ui, ilAccessHandler $access, ilTree $tree)
 Constructor. More...
 
 repositoryTree ()
 Get tree. More...
 
 access ()
 Get access. More...
 
 user ()
 Get current user. More...
 
 language ()
 Get language object. More...
 
 ui ()
 Get ui service. More...
 
 factory ()
 Factory for learning history entries. More...
 
 provider ()
 Provider. More...
 
 isActive (int $user_id=0)
 Is the service active? The service will be active, if any of its providers are active. More...
 

Protected Attributes

 $current_user
 
 $lng
 
 $ui
 
 $access
 
 $tree
 

Detailed Description

Learning history service.

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

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

Constructor & Destructor Documentation

◆ __construct()

ilLearningHistoryService::__construct ( ilObjUser  $user,
ilLanguage  $lng,
\ILIAS\DI\UIServices  $ui,
ilAccessHandler  $access,
ilTree  $tree 
)

Constructor.

Parameters
ilObjUser$user
ilLanguage$lng
\ILIAS\DI\UIServices$ui
ilAccessHandler$access

Definition at line 45 of file class.ilLearningHistoryService.php.

References $access, $lng, $tree, $ui, $user, access(), and ui().

+ Here is the call graph for this function:

Member Function Documentation

◆ access()

ilLearningHistoryService::access ( )

Get access.

Returns
ilAccessHandler

Definition at line 69 of file class.ilLearningHistoryService.php.

References $access.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ factory()

ilLearningHistoryService::factory ( )

Factory for learning history entries.

Returns
ilLearningHistoryFactory

Definition at line 109 of file class.ilLearningHistoryService.php.

110  {
111  return new ilLearningHistoryFactory($this);
112  }

◆ isActive()

ilLearningHistoryService::isActive ( int  $user_id = 0)

Is the service active? The service will be active, if any of its providers are active.

Parameters
int$user_id
Returns
bool

Definition at line 130 of file class.ilLearningHistoryService.php.

References $DIC, provider(), and user().

131  {
132  global $DIC;
133 
134  $setting = $DIC->settings();
135  if ($setting->get("enable_learning_history") !== "1") {
136  return false;
137  }
138 
139  if ($user_id = 0) {
140  $user_id = $this->user()->getId();
141  }
142  foreach ($this->provider()->getAllProviders(true, $user_id) as $p) {
143  return true;
144  }
145  return false;
146  }
global $DIC
Definition: saml.php:7
+ Here is the call graph for this function:

◆ language()

ilLearningHistoryService::language ( )

Get language object.

Returns
ilLanguage

Definition at line 89 of file class.ilLearningHistoryService.php.

References $lng.

◆ provider()

ilLearningHistoryService::provider ( )

Provider.

Returns
ilLearningHistoryProviderFactory

Definition at line 119 of file class.ilLearningHistoryService.php.

Referenced by isActive().

120  {
121  return new ilLearningHistoryProviderFactory($this);
122  }
+ Here is the caller graph for this function:

◆ repositoryTree()

ilLearningHistoryService::repositoryTree ( )

Get tree.

Returns
ilTree

Definition at line 59 of file class.ilLearningHistoryService.php.

References $tree.

◆ ui()

ilLearningHistoryService::ui ( )

Get ui service.

Returns

Definition at line 99 of file class.ilLearningHistoryService.php.

References $ui.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ user()

ilLearningHistoryService::user ( )

Get current user.

Returns
ilObjUser

Definition at line 79 of file class.ilLearningHistoryService.php.

References $current_user.

Referenced by isActive().

+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilLearningHistoryService::$access
protected

Definition at line 31 of file class.ilLearningHistoryService.php.

Referenced by __construct(), and access().

◆ $current_user

ilLearningHistoryService::$current_user
protected

Definition at line 16 of file class.ilLearningHistoryService.php.

Referenced by user().

◆ $lng

ilLearningHistoryService::$lng
protected

Definition at line 21 of file class.ilLearningHistoryService.php.

Referenced by __construct(), and language().

◆ $tree

ilLearningHistoryService::$tree
protected

Definition at line 36 of file class.ilLearningHistoryService.php.

Referenced by __construct(), and repositoryTree().

◆ $ui

ilLearningHistoryService::$ui
protected

Definition at line 26 of file class.ilLearningHistoryService.php.

Referenced by __construct(), and ui().


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