ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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 ?>