ILIAS  release_8 Revision v8.24
ilSkillResourcesManager Class Reference

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

+ Collaboration diagram for ilSkillResourcesManager:

Public Member Functions

 __construct (int $a_base_skill=0, int $a_tref_id=0)
 
 isLevelTooLow (array $a_levels, array $profile_levels, array $actual_levels)
 
 getSuggestedResources ()
 

Protected Attributes

ilSkillResources $res
 
int $current_target_level = 0
 

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 Manages skill resources

(business logic)

Author
Thomas Famula famul.nosp@m.a@le.nosp@m.ifos..nosp@m.de

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

Constructor & Destructor Documentation

◆ __construct()

ilSkillResourcesManager::__construct ( int  $a_base_skill = 0,
int  $a_tref_id = 0 
)

Definition at line 32 of file class.ilSkillResourcesManager.php.

33 {
34 $this->res = new ilSkillResources($a_base_skill, $a_tref_id);
35 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Member Function Documentation

◆ getSuggestedResources()

ilSkillResourcesManager::getSuggestedResources ( )
Returns
array{level_id: int, rep_ref_id: int, trigger: int, imparting: int}[]

Definition at line 61 of file class.ilSkillResourcesManager.php.

61 : array
62 {
63 $resources = $this->res->getResources();
64 $imp_resources = [];
65 foreach ($resources as $level) {
66 foreach ($level as $r) {
67 if ($r["imparting"] &&
68 $this->current_target_level == $r["level_id"]) {
69 $imp_resources[] = $r;
70 }
71 }
72 }
73
74 return $imp_resources;
75 }
$resources
Definition: ltiservices.php:68

References $resources.

◆ isLevelTooLow()

ilSkillResourcesManager::isLevelTooLow ( array  $a_levels,
array  $profile_levels,
array  $actual_levels 
)

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

37 : bool
38 {
39 $too_low = true;
40
41 foreach ($a_levels as $k => $v) {
42 foreach ($profile_levels as $pl) {
43 if ($pl["level_id"] == $v["id"] &&
44 $pl["base_skill_id"] == $v["skill_id"]) {
45 $too_low = true;
46 $this->current_target_level = $v["id"];
47 }
48 }
49
50 if ($actual_levels[$v["skill_id"]][$this->res->getTemplateRefId()] == $v["id"]) {
51 $too_low = false;
52 }
53 }
54
55 return $too_low;
56 }

Field Documentation

◆ $current_target_level

int ilSkillResourcesManager::$current_target_level = 0
protected

Definition at line 30 of file class.ilSkillResourcesManager.php.

◆ $res

ilSkillResources ilSkillResourcesManager::$res
protected

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


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