ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 13 of file class.ilTestParticipantScoring.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestParticipantScoring::__construct ( )

ilTestParticipantScoring constructor.

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

59 {
60 $this->activeId = 0;
61 $this->scoredPass = 0;
62 $this->answeredQuestions = 0;
63 $this->totalQuestions = 0;
64 $this->reachedPoints = 0.0;
65 $this->maxPoints = 0.0;
66 $this->passed = false;
67 $this->finalMark = '';
68 }

Member Function Documentation

◆ getActiveId()

ilTestParticipantScoring::getActiveId ( )
Returns
int

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

References $activeId.

◆ getAnsweredQuestions()

ilTestParticipantScoring::getAnsweredQuestions ( )
Returns
int

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

References $answeredQuestions.

◆ getFinalMark()

ilTestParticipantScoring::getFinalMark ( )
Returns
string

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

186 : string
187 {
188 return $this->finalMark;
189 }

References $finalMark.

◆ getMaxPoints()

ilTestParticipantScoring::getMaxPoints ( )
Returns
float

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

154 : float
155 {
156 return $this->maxPoints;
157 }

References $maxPoints.

Referenced by getPercentResult().

+ Here is the caller graph for this function:

◆ getPercentResult()

ilTestParticipantScoring::getPercentResult ( )
Returns
int

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

203 {
204 if ($this->getMaxPoints() > 0) {
205 return $this->getReachedPoints() / $this->getMaxPoints();
206 }
207
208 return 0;
209 }

References getMaxPoints(), and getReachedPoints().

+ Here is the call graph for this function:

◆ getReachedPoints()

ilTestParticipantScoring::getReachedPoints ( )
Returns
float

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

138 : float
139 {
141 }

References $reachedPoints.

Referenced by getPercentResult().

+ Here is the caller graph for this function:

◆ getScoredPass()

ilTestParticipantScoring::getScoredPass ( )
Returns
int

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

References $scoredPass.

◆ getTotalQuestions()

ilTestParticipantScoring::getTotalQuestions ( )
Returns
int

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

References $totalQuestions.

◆ isPassed()

ilTestParticipantScoring::isPassed ( )
Returns
bool

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

170 : bool
171 {
172 return $this->passed;
173 }

References $passed.

◆ setActiveId()

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

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

83 {
84 $this->activeId = $activeId;
85 }

References $activeId.

◆ setAnsweredQuestions()

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

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

115 {
116 $this->answeredQuestions = $answeredQuestions;
117 }

References $answeredQuestions.

◆ setFinalMark()

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

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

195 {
196 $this->finalMark = $finalMark;
197 }

References $finalMark.

◆ setMaxPoints()

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

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

163 {
164 $this->maxPoints = $maxPoints;
165 }

References $maxPoints.

◆ setPassed()

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

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

179 {
180 $this->passed = $passed;
181 }

References $passed.

◆ setReachedPoints()

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

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

147 {
148 $this->reachedPoints = $reachedPoints;
149 }

References $reachedPoints.

◆ setScoredPass()

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

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

99 {
100 $this->scoredPass = $scoredPass;
101 }

References $scoredPass.

◆ setTotalQuestions()

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

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

131 {
132 $this->totalQuestions = $totalQuestions;
133 }

References $totalQuestions.

Field Documentation

◆ $activeId

ilTestParticipantScoring::$activeId
protected

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

Referenced by getActiveId(), and setActiveId().

◆ $answeredQuestions

ilTestParticipantScoring::$answeredQuestions
protected

◆ $finalMark

ilTestParticipantScoring::$finalMark
protected

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

Referenced by getFinalMark(), and setFinalMark().

◆ $maxPoints

ilTestParticipantScoring::$maxPoints
protected

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

Referenced by getMaxPoints(), and setMaxPoints().

◆ $passed

ilTestParticipantScoring::$passed
protected

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

Referenced by isPassed(), and setPassed().

◆ $reachedPoints

ilTestParticipantScoring::$reachedPoints
protected

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

Referenced by getReachedPoints(), and setReachedPoints().

◆ $scoredPass

ilTestParticipantScoring::$scoredPass
protected

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

Referenced by getScoredPass(), and setScoredPass().

◆ $totalQuestions

ilTestParticipantScoring::$totalQuestions
protected

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

Referenced by getTotalQuestions(), and setTotalQuestions().


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