ILIAS  release_8 Revision v8.24
class.ilTestSkillPointAccount.php
Go to the documentation of this file.
1<?php
2
26{
28
30
31 private $numBookings;
32
33 public function __construct()
34 {
35 $this->totalMaxSkillPoints = 0;
36 $this->totalReachedSkillPoints = 0;
37
38 $this->numBookings = 0;
39 }
40
41 public function addBooking($maxSkillPoints, $reachedSkillPoints)
42 {
43 $this->totalMaxSkillPoints += $maxSkillPoints;
44 $this->totalReachedSkillPoints += $reachedSkillPoints;
45
46 $this->numBookings++;
47 }
48
49 public function getTotalMaxSkillPoints(): int
50 {
52 }
53
55 {
57 }
58
59 public function getNumBookings(): int
60 {
61 return $this->numBookings;
62 }
63
65 {
66 return (
67 ($this->getTotalReachedSkillPoints() * 100) / $this->getTotalMaxSkillPoints()
68 );
69 }
70}
addBooking($maxSkillPoints, $reachedSkillPoints)