ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilTestStatistics Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 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 file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 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 30 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 40 of file class.ilTestStatistics.php.

References calculateStatistics().

41  {
42  $this->statistics = null;
43  $this->calculateStatistics($eval_data);
44  }
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 64 of file class.ilTestStatistics.php.

Referenced by __construct().

65  {
66  $median_array = array();
67 
68  foreach ($eval_data->getParticipantIds() as $active_id) {
69  $participant = $eval_data->getParticipant($active_id);
70  array_push($median_array, $participant->getReached());
71  }
72 
73  $this->statistics = new ilStatistics();
74  $this->statistics->setData($median_array);
75  }
This class provides mathematical functions for statistics.
+ 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 53 of file class.ilTestStatistics.php.

References $statistics.

53  : ?object
54  {
55  return $this->statistics;
56  }

Field Documentation

◆ $statistics

ilTestStatistics::$statistics

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

Referenced by getStatistics().

◆ $test_id

ilTestStatistics::$test_id

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


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