ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilTestParticipantScoring Class Reference
+ Collaboration diagram for ilTestParticipantScoring:

Public Member Functions

 __construct ()
 ilTestParticipantScoring constructor. More...
 
 getActiveId ()
 
 setActiveId (int $activeId)
 
 getScoredPass ()
 
 setScoredPass (int $scoredPass)
 
 getAnsweredQuestions ()
 
 setAnsweredQuestions (int $answeredQuestions)
 
 getTotalQuestions ()
 
 setTotalQuestions (int $totalQuestions)
 
 getReachedPoints ()
 
 setReachedPoints (float $reachedPoints)
 
 getMaxPoints ()
 
 setMaxPoints (float $maxPoints)
 
 isPassed ()
 
 setPassed (bool $passed)
 
 getFinalMark ()
 
 setFinalMark (string $finalMark)
 
 getPercentResult ()
 

Protected Attributes

 $activeId
 
 $scoredPass
 
 $answeredQuestions
 
 $totalQuestions
 
 $reachedPoints
 
 $maxPoints
 
 $passed
 
 $finalMark
 

Detailed Description

Definition at line 26 of file class.ilTestParticipantScoring.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestParticipantScoring::__construct ( )

ilTestParticipantScoring constructor.

Definition at line 71 of file class.ilTestParticipantScoring.php.

72  {
73  $this->activeId = 0;
74  $this->scoredPass = 0;
75  $this->answeredQuestions = 0;
76  $this->totalQuestions = 0;
77  $this->reachedPoints = 0.0;
78  $this->maxPoints = 0.0;
79  $this->passed = false;
80  $this->finalMark = '';
81  }

Member Function Documentation

◆ getActiveId()

ilTestParticipantScoring::getActiveId ( )
Returns
int

Definition at line 87 of file class.ilTestParticipantScoring.php.

References $activeId.

87  : int
88  {
89  return $this->activeId;
90  }

◆ getAnsweredQuestions()

ilTestParticipantScoring::getAnsweredQuestions ( )
Returns
int

Definition at line 119 of file class.ilTestParticipantScoring.php.

References $answeredQuestions.

119  : int
120  {
122  }

◆ getFinalMark()

ilTestParticipantScoring::getFinalMark ( )
Returns
string

Definition at line 199 of file class.ilTestParticipantScoring.php.

References $finalMark.

199  : string
200  {
201  return $this->finalMark;
202  }

◆ getMaxPoints()

ilTestParticipantScoring::getMaxPoints ( )
Returns
float

Definition at line 167 of file class.ilTestParticipantScoring.php.

References $maxPoints.

Referenced by getPercentResult().

167  : float
168  {
169  return $this->maxPoints;
170  }
+ Here is the caller graph for this function:

◆ getPercentResult()

ilTestParticipantScoring::getPercentResult ( )
Returns
int

Definition at line 215 of file class.ilTestParticipantScoring.php.

References getMaxPoints(), and getReachedPoints().

216  {
217  if ($this->getMaxPoints() > 0) {
218  return $this->getReachedPoints() / $this->getMaxPoints();
219  }
220 
221  return 0;
222  }
+ Here is the call graph for this function:

◆ getReachedPoints()

ilTestParticipantScoring::getReachedPoints ( )
Returns
float

Definition at line 151 of file class.ilTestParticipantScoring.php.

References $reachedPoints.

Referenced by getPercentResult().

151  : float
152  {
153  return $this->reachedPoints;
154  }
+ Here is the caller graph for this function:

◆ getScoredPass()

ilTestParticipantScoring::getScoredPass ( )
Returns
int

Definition at line 103 of file class.ilTestParticipantScoring.php.

References $scoredPass.

103  : int
104  {
105  return $this->scoredPass;
106  }

◆ getTotalQuestions()

ilTestParticipantScoring::getTotalQuestions ( )
Returns
int

Definition at line 135 of file class.ilTestParticipantScoring.php.

References $totalQuestions.

135  : int
136  {
137  return $this->totalQuestions;
138  }

◆ isPassed()

ilTestParticipantScoring::isPassed ( )
Returns
bool

Definition at line 183 of file class.ilTestParticipantScoring.php.

References $passed.

183  : bool
184  {
185  return $this->passed;
186  }

◆ setActiveId()

ilTestParticipantScoring::setActiveId ( int  $activeId)
Parameters
int$activeId

Definition at line 95 of file class.ilTestParticipantScoring.php.

References $activeId.

96  {
97  $this->activeId = $activeId;
98  }

◆ setAnsweredQuestions()

ilTestParticipantScoring::setAnsweredQuestions ( int  $answeredQuestions)
Parameters
int$answeredQuestions

Definition at line 127 of file class.ilTestParticipantScoring.php.

References $answeredQuestions.

128  {
129  $this->answeredQuestions = $answeredQuestions;
130  }

◆ setFinalMark()

ilTestParticipantScoring::setFinalMark ( string  $finalMark)
Parameters
string$finalMark

Definition at line 207 of file class.ilTestParticipantScoring.php.

References $finalMark.

208  {
209  $this->finalMark = $finalMark;
210  }

◆ setMaxPoints()

ilTestParticipantScoring::setMaxPoints ( float  $maxPoints)
Parameters
float$maxPoints

Definition at line 175 of file class.ilTestParticipantScoring.php.

References $maxPoints.

176  {
177  $this->maxPoints = $maxPoints;
178  }

◆ setPassed()

ilTestParticipantScoring::setPassed ( bool  $passed)
Parameters
bool$passed

Definition at line 191 of file class.ilTestParticipantScoring.php.

References $passed.

192  {
193  $this->passed = $passed;
194  }

◆ setReachedPoints()

ilTestParticipantScoring::setReachedPoints ( float  $reachedPoints)
Parameters
float$reachedPoints

Definition at line 159 of file class.ilTestParticipantScoring.php.

References $reachedPoints.

160  {
161  $this->reachedPoints = $reachedPoints;
162  }

◆ setScoredPass()

ilTestParticipantScoring::setScoredPass ( int  $scoredPass)
Parameters
int$scoredPass

Definition at line 111 of file class.ilTestParticipantScoring.php.

References $scoredPass.

112  {
113  $this->scoredPass = $scoredPass;
114  }

◆ setTotalQuestions()

ilTestParticipantScoring::setTotalQuestions ( int  $totalQuestions)
Parameters
int$totalQuestions

Definition at line 143 of file class.ilTestParticipantScoring.php.

References $totalQuestions.

144  {
145  $this->totalQuestions = $totalQuestions;
146  }

Field Documentation

◆ $activeId

ilTestParticipantScoring::$activeId
protected

Definition at line 31 of file class.ilTestParticipantScoring.php.

Referenced by getActiveId(), and setActiveId().

◆ $answeredQuestions

ilTestParticipantScoring::$answeredQuestions
protected

◆ $finalMark

ilTestParticipantScoring::$finalMark
protected

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

Referenced by getFinalMark(), and setFinalMark().

◆ $maxPoints

ilTestParticipantScoring::$maxPoints
protected

Definition at line 56 of file class.ilTestParticipantScoring.php.

Referenced by getMaxPoints(), and setMaxPoints().

◆ $passed

ilTestParticipantScoring::$passed
protected

Definition at line 61 of file class.ilTestParticipantScoring.php.

Referenced by isPassed(), and setPassed().

◆ $reachedPoints

ilTestParticipantScoring::$reachedPoints
protected

Definition at line 51 of file class.ilTestParticipantScoring.php.

Referenced by getReachedPoints(), and setReachedPoints().

◆ $scoredPass

ilTestParticipantScoring::$scoredPass
protected

Definition at line 36 of file class.ilTestParticipantScoring.php.

Referenced by getScoredPass(), and setScoredPass().

◆ $totalQuestions

ilTestParticipantScoring::$totalQuestions
protected

Definition at line 46 of file class.ilTestParticipantScoring.php.

Referenced by getTotalQuestions(), and setTotalQuestions().


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