ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5
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  var $test_id;
20 
29  function ilTestStatistics($eval_data)
30  {
31  $this->statistics = NULL;
32  $this->calculateStatistics($eval_data);
33  }
34 
42  function getStatistics()
43  {
44  return $this->statistics;
45  }
46 
53  function calculateStatistics($eval_data)
54  {
55  $median_array = array();
56 
57  foreach ($eval_data->getParticipantIds() as $active_id)
58  {
59  $participant =& $eval_data->getParticipant($active_id);
60  array_push($median_array, $participant->getReached());
61  }
62 
63  $this->statistics = new ilStatistics();
64  $this->statistics->setData($median_array);
65  }
66 }
67 
68 ?>
calculateStatistics($eval_data)
Instanciates the statistics object.
getStatistics()
Returns the statistics object.
ilTestStatistics($eval_data)
ilTestStatistics constructor
This class calculates statistical data for a test which has to be calculated using all participant da...