ILIAS  release_7 Revision v7.30-3-g800a261c036
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
4include_once "./Modules/Test/classes/inc.AssessmentConstants.php";
5include_once "./Modules/Test/classes/class.ilStatistics.php";
6
17{
18 public $test_id;
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}
An exception for terminatinating execution or to throw for unit testing.
This class calculates statistical data for a test which has to be calculated using all participant da...
calculateStatistics($eval_data)
Instanciates the statistics object.
getStatistics()
Returns the statistics object.
__construct($eval_data)
ilTestStatistics constructor