ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilTestStatistics Class Reference

This class calculates statistical data for a test which has to be calculated using all participant datasets (like the median). More...

+ Collaboration diagram for ilTestStatistics:

Public Member Functions

 __construct ($eval_data)
 ilTestStatistics constructor More...
 
 getStatistics ()
 Returns the statistics object. More...
 
 calculateStatistics ($eval_data)
 Instanciates the statistics object. More...
 

Data Fields

 $test_id
 
 $statistics
 

Detailed Description

This class calculates statistical data for a test which has to be calculated using all participant datasets (like the median).

Author
Helmut Schottmüller helmu.nosp@m.t.sc.nosp@m.hottm.nosp@m.uell.nosp@m.er@ma.nosp@m.c.co.nosp@m.m
Version
$Id$

Definition at line 32 of file class.ilTestStatistics.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestStatistics::__construct (   $eval_data)

ilTestStatistics constructor

The constructor takes the id of an existing test object

Definition at line 42 of file class.ilTestStatistics.php.

References calculateStatistics().

43  {
44  $this->statistics = null;
45  $this->calculateStatistics($eval_data);
46  }
calculateStatistics($eval_data)
Instanciates the statistics object.
+ Here is the call graph for this function:

Member Function Documentation

◆ calculateStatistics()

ilTestStatistics::calculateStatistics (   $eval_data)

Instanciates the statistics object.

private

See also
$statistics

Definition at line 66 of file class.ilTestStatistics.php.

Referenced by __construct().

67  {
68  $median_array = [];
69 
70  foreach ($eval_data->getParticipantIds() as $active_id) {
71  $participant = $eval_data->getParticipant($active_id);
72  array_push($median_array, $participant->getReached());
73  }
74 
75  $this->statistics = new ilStatistics();
76  $this->statistics->setData($median_array);
77  }
Constants for the handling of elements which are not a number.
+ Here is the caller graph for this function:

◆ getStatistics()

ilTestStatistics::getStatistics ( )

Returns the statistics object.

Returns
object ilStatistics object public
See also
$statistics

Definition at line 55 of file class.ilTestStatistics.php.

References $statistics.

55  : ?object
56  {
57  return $this->statistics;
58  }

Field Documentation

◆ $statistics

ilTestStatistics::$statistics

Definition at line 35 of file class.ilTestStatistics.php.

Referenced by getStatistics().

◆ $test_id

ilTestStatistics::$test_id

Definition at line 34 of file class.ilTestStatistics.php.


The documentation for this class was generated from the following file: