ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 28 of file class.ilTestParticipantScoring.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestParticipantScoring::__construct ( )

ilTestParticipantScoring constructor.

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

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

Member Function Documentation

◆ getActiveId()

ilTestParticipantScoring::getActiveId ( )
Returns
int

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

References $activeId.

◆ getAnsweredQuestions()

ilTestParticipantScoring::getAnsweredQuestions ( )
Returns
int

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

References $answeredQuestions.

◆ getFinalMark()

ilTestParticipantScoring::getFinalMark ( )
Returns
string

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

201 : string
202 {
203 return $this->finalMark;
204 }

References $finalMark.

◆ getMaxPoints()

ilTestParticipantScoring::getMaxPoints ( )
Returns
float

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

169 : float
170 {
171 return $this->maxPoints;
172 }

References $maxPoints.

Referenced by getPercentResult().

+ Here is the caller graph for this function:

◆ getPercentResult()

ilTestParticipantScoring::getPercentResult ( )
Returns
int

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

218 {
219 if ($this->getMaxPoints() > 0) {
220 return $this->getReachedPoints() / $this->getMaxPoints();
221 }
222
223 return 0;
224 }

References getMaxPoints(), and getReachedPoints().

+ Here is the call graph for this function:

◆ getReachedPoints()

ilTestParticipantScoring::getReachedPoints ( )
Returns
float

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

153 : float
154 {
156 }

References $reachedPoints.

Referenced by getPercentResult().

+ Here is the caller graph for this function:

◆ getScoredPass()

ilTestParticipantScoring::getScoredPass ( )
Returns
int

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

105 : int
106 {
107 return $this->scoredPass;
108 }

References $scoredPass.

◆ getTotalQuestions()

ilTestParticipantScoring::getTotalQuestions ( )
Returns
int

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

References $totalQuestions.

◆ isPassed()

ilTestParticipantScoring::isPassed ( )
Returns
bool

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

185 : bool
186 {
187 return $this->passed;
188 }

References $passed.

◆ setActiveId()

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

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

98 {
99 $this->activeId = $activeId;
100 }

References $activeId.

◆ setAnsweredQuestions()

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

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

130 {
131 $this->answeredQuestions = $answeredQuestions;
132 }

References $answeredQuestions.

◆ setFinalMark()

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

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

210 {
211 $this->finalMark = $finalMark;
212 }

References $finalMark.

◆ setMaxPoints()

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

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

178 {
179 $this->maxPoints = $maxPoints;
180 }

References $maxPoints.

◆ setPassed()

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

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

194 {
195 $this->passed = $passed;
196 }

References $passed.

◆ setReachedPoints()

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

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

162 {
163 $this->reachedPoints = $reachedPoints;
164 }

References $reachedPoints.

◆ setScoredPass()

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

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

114 {
115 $this->scoredPass = $scoredPass;
116 }

References $scoredPass.

◆ setTotalQuestions()

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

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

146 {
147 $this->totalQuestions = $totalQuestions;
148 }

References $totalQuestions.

Field Documentation

◆ $activeId

ilTestParticipantScoring::$activeId
protected

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

Referenced by getActiveId(), and setActiveId().

◆ $answeredQuestions

ilTestParticipantScoring::$answeredQuestions
protected

◆ $finalMark

ilTestParticipantScoring::$finalMark
protected

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

Referenced by getFinalMark(), and setFinalMark().

◆ $maxPoints

ilTestParticipantScoring::$maxPoints
protected

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

Referenced by getMaxPoints(), and setMaxPoints().

◆ $passed

ilTestParticipantScoring::$passed
protected

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

Referenced by isPassed(), and setPassed().

◆ $reachedPoints

ilTestParticipantScoring::$reachedPoints
protected

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

Referenced by getReachedPoints(), and setReachedPoints().

◆ $scoredPass

ilTestParticipantScoring::$scoredPass
protected

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

Referenced by getScoredPass(), and setScoredPass().

◆ $totalQuestions

ilTestParticipantScoring::$totalQuestions
protected

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

Referenced by getTotalQuestions(), and setTotalQuestions().


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