ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilTestSkillPointAccount.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
12{
14
16
17 private $numBookings;
18
19 public function __construct()
20 {
21 $this->totalMaxSkillPoints = 0;
22 $this->totalReachedSkillPoints = 0;
23
24 $this->numBookings = 0;
25 }
26
27 public function addBooking($maxSkillPoints, $reachedSkillPoints)
28 {
29 $this->totalMaxSkillPoints += $maxSkillPoints;
30 $this->totalReachedSkillPoints += $reachedSkillPoints;
31
32 $this->numBookings++;
33 }
34
35 public function getTotalMaxSkillPoints()
36 {
38 }
39
41 {
43 }
44
45 public function getNumBookings()
46 {
47 return $this->numBookings;
48 }
49
51 {
52 return (
53 ($this->getTotalReachedSkillPoints() * 100) / $this->getTotalMaxSkillPoints()
54 );
55 }
56}
addBooking($maxSkillPoints, $reachedSkillPoints)