19 declare(strict_types=1);
31 $repo = $this->getMockBuilder(SkillProfileCompletionDBRepository::class)->disableOriginalConstructor()->getMock();
40 public function getActualMaxLevels(
43 string $gap_mode =
"",
44 string $gap_mode_type =
"",
45 int $gap_mode_obj_id = 0,
46 string $trigger_user =
"" 50 if ($user_id === 101) {
51 $actual_levels[301][0] = 501;
52 $actual_levels[302][0] = 504;
53 $actual_levels[303][0] = 503;
54 $actual_levels[304][0] = 502;
55 $actual_levels[305][0] = 502;
56 } elseif ($user_id === 102) {
57 $actual_levels[301][0] = 505;
58 $actual_levels[302][0] = 505;
59 $actual_levels[303][0] = 505;
60 $actual_levels[304][0] = 505;
61 $actual_levels[305][0] = 505;
62 } elseif ($user_id === 103) {
63 $actual_levels[301][0] = 505;
64 $actual_levels[302][0] = 501;
65 $actual_levels[303][0] = 505;
66 $actual_levels[304][0] = 501;
67 $actual_levels[305][0] = 501;
68 } elseif ($user_id === 104) {
69 $actual_levels[301][0] = 505;
70 $actual_levels[305][0] = 501;
71 } elseif ($user_id === 105) {
75 return $actual_levels;
82 $p_repo = $this->getMockBuilder(SkillProfileDBRepository::class)->disableOriginalConstructor()->getMock();
83 $pl_repo = $this->getMockBuilder(SkillProfileLevelsDBRepository::class)->disableOriginalConstructor()->getMock();
84 $pu_repo = $this->getMockBuilder(SkillProfileUserDBRepository::class)->disableOriginalConstructor()->getMock();
85 $pr_repo = $this->getMockBuilder(SkillProfileRoleDBRepository::class)->disableOriginalConstructor()->getMock();
96 public function getSkillLevels(
int $profile_id): array
100 if ($profile_id > 0) {
117 $this->assertSame(0, $manager->getProfileProgress(101, 201));
118 $this->assertSame(100, $manager->getProfileProgress(102, 201));
119 $this->assertSame(40, $manager->getProfileProgress(103, 201));
120 $this->assertSame(20, $manager->getProfileProgress(104, 201));
121 $this->assertSame(0, $manager->getProfileProgress(105, 201));
122 $this->assertSame(0, $manager->getProfileProgress(101, 0));
123 $this->assertSame(0, $manager->getProfileProgress(0, 201));
124 $this->assertSame(0, $manager->getProfileProgress(0, 0));
__construct()
Constructor setup ILIAS global object public.
Repository for skill profile completion.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Manages skill profile completion.