ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilTestSkillPointAccount.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
28{
30
32
33 private $numBookings;
34
35 public function __construct()
36 {
37 $this->totalMaxSkillPoints = 0;
38 $this->totalReachedSkillPoints = 0;
39
40 $this->numBookings = 0;
41 }
42
43 public function addBooking($max_skill_points, $reached_skill_points): void
44 {
45 $this->totalMaxSkillPoints += $max_skill_points;
46 $this->totalReachedSkillPoints += $reached_skill_points;
47
48 $this->numBookings++;
49 }
50
51 public function getTotalMaxSkillPoints(): float
52 {
54 }
55
56 public function getTotalReachedSkillPoints(): float
57 {
59 }
60
61 public function getNumBookings(): int
62 {
63 return $this->numBookings;
64 }
65
67 {
68 return $this->getTotalReachedSkillPoints() * 100 / $this->getTotalMaxSkillPoints();
69 }
70}
addBooking($max_skill_points, $reached_skill_points)