ILIAS  release_8 Revision v8.24
class.ilTestStatistics.php
Go to the documentation of this file.
1<?php
2
19include_once "./Modules/Test/classes/inc.AssessmentConstants.php";
20
31{
32 public $test_id;
34
40 public function __construct($eval_data)
41 {
42 $this->statistics = null;
43 $this->calculateStatistics($eval_data);
44 }
45
53 public function getStatistics(): ?object
54 {
55 return $this->statistics;
56 }
57
64 public function calculateStatistics($eval_data)
65 {
66 $median_array = array();
67
68 foreach ($eval_data->getParticipantIds() as $active_id) {
69 $participant = $eval_data->getParticipant($active_id);
70 array_push($median_array, $participant->getReached());
71 }
72
73 $this->statistics = new ilStatistics();
74 $this->statistics->setData($median_array);
75 }
76}
This class provides mathematical functions for statistics.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
calculateStatistics($eval_data)
Instanciates the statistics object.
getStatistics()
Returns the statistics object.
__construct($eval_data)
ilTestStatistics constructor