ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilTestStatistics.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 include_once "./Modules/Test/classes/inc.AssessmentConstants.php";
5 include_once "./Modules/Test/classes/class.ilStatistics.php";
6 
17 {
18  public $test_id;
19  public $statistics;
20 
29  public function __construct($eval_data)
30  {
31  $this->statistics = null;
32  $this->calculateStatistics($eval_data);
33  }
34 
42  public function getStatistics()
43  {
44  return $this->statistics;
45  }
46 
53  public function calculateStatistics($eval_data)
54  {
55  $median_array = array();
56 
57  foreach ($eval_data->getParticipantIds() as $active_id) {
58  $participant =&$eval_data->getParticipant($active_id);
59  array_push($median_array, $participant->getReached());
60  }
61 
62  $this->statistics = new ilStatistics();
63  $this->statistics->setData($median_array);
64  }
65 }
calculateStatistics($eval_data)
Instanciates the statistics object.
getStatistics()
Returns the statistics object.
__construct($eval_data)
ilTestStatistics constructor
This class calculates statistical data for a test which has to be calculated using all participant da...
Create styles array
The data for the language used.