ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ILIAS\Test\Results\Data\ParticipantResult Class Reference

Class ParticipantResult is a model representation of an entry in the test_result_cache table. More...

+ Collaboration diagram for ILIAS\Test\Results\Data\ParticipantResult:

Public Member Functions

 __construct (private int $active_id, private int $attempt, private float $max_points, private float $reached_points, private Mark $mark, private int $timestamp, private bool $passed_once,)
 
 withPassedOnce (bool $passed_once)
 
 getPercentage ()
 
 getActiveId ()
 
 getAttempt ()
 
 getMaxPoints ()
 
 getReachedPoints ()
 
 getMark ()
 
 getMarkOfficial ()
 
 getMarkShort ()
 
 isPassed ()
 
 isFailed ()
 
 getTimestamp ()
 
 isPassedOnce ()
 

Detailed Description

Class ParticipantResult is a model representation of an entry in the test_result_cache table.

Definition at line 28 of file ParticipantResult.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Test\Results\Data\ParticipantResult::__construct ( private int  $active_id,
private int  $attempt,
private float  $max_points,
private float  $reached_points,
private Mark  $mark,
private int  $timestamp,
private bool  $passed_once 
)

Definition at line 30 of file ParticipantResult.php.

38  {
39  }

Member Function Documentation

◆ getActiveId()

ILIAS\Test\Results\Data\ParticipantResult::getActiveId ( )

Definition at line 53 of file ParticipantResult.php.

53  : int
54  {
55  return $this->active_id;
56  }

◆ getAttempt()

ILIAS\Test\Results\Data\ParticipantResult::getAttempt ( )

Definition at line 58 of file ParticipantResult.php.

58  : int
59  {
60  return $this->attempt;
61  }

◆ getMark()

ILIAS\Test\Results\Data\ParticipantResult::getMark ( )

Definition at line 73 of file ParticipantResult.php.

73  : Mark
74  {
75  return $this->mark;
76  }

◆ getMarkOfficial()

ILIAS\Test\Results\Data\ParticipantResult::getMarkOfficial ( )

Definition at line 78 of file ParticipantResult.php.

78  : string
79  {
80  return $this->mark->getOfficialName();
81  }

◆ getMarkShort()

ILIAS\Test\Results\Data\ParticipantResult::getMarkShort ( )

Definition at line 83 of file ParticipantResult.php.

83  : string
84  {
85  return $this->mark->getShortName();
86  }

◆ getMaxPoints()

ILIAS\Test\Results\Data\ParticipantResult::getMaxPoints ( )

Definition at line 63 of file ParticipantResult.php.

63  : float
64  {
65  return $this->max_points;
66  }

◆ getPercentage()

ILIAS\Test\Results\Data\ParticipantResult::getPercentage ( )

Definition at line 48 of file ParticipantResult.php.

48  : float
49  {
50  return $this->max_points > 0 ? $this->reached_points / $this->max_points * 100 : 0.0;
51  }

◆ getReachedPoints()

ILIAS\Test\Results\Data\ParticipantResult::getReachedPoints ( )

Definition at line 68 of file ParticipantResult.php.

68  : float
69  {
70  return $this->reached_points;
71  }

◆ getTimestamp()

ILIAS\Test\Results\Data\ParticipantResult::getTimestamp ( )

Definition at line 98 of file ParticipantResult.php.

References $timestamp.

98  : int
99  {
100  return $this->timestamp;
101  }
foreach($mandatory_scripts as $file) $timestamp
Definition: buildRTE.php:70

◆ isFailed()

ILIAS\Test\Results\Data\ParticipantResult::isFailed ( )

Definition at line 93 of file ParticipantResult.php.

93  : bool
94  {
95  return !$this->mark->getPassed();
96  }

◆ isPassed()

ILIAS\Test\Results\Data\ParticipantResult::isPassed ( )

Definition at line 88 of file ParticipantResult.php.

88  : bool
89  {
90  return $this->mark->getPassed();
91  }

◆ isPassedOnce()

ILIAS\Test\Results\Data\ParticipantResult::isPassedOnce ( )

Definition at line 103 of file ParticipantResult.php.

103  : bool
104  {
105  return $this->passed_once;
106  }

◆ withPassedOnce()

ILIAS\Test\Results\Data\ParticipantResult::withPassedOnce ( bool  $passed_once)

Definition at line 41 of file ParticipantResult.php.

41  : self
42  {
43  $clone = clone $this;
44  $clone->passed_once = $passed_once;
45  return $clone;
46  }

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