ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilTestEvaluationPassData Class Reference
+ Collaboration diagram for ilTestEvaluationPassData:

Public Member Functions

 __sleep ()
 
 __construct ()
 Constructor. More...
 
 getNrOfAnsweredQuestions ()
 
 setNrOfAnsweredQuestions (int $nrOfAnsweredQuestions)
 
 getReachedPoints ()
 
 setReachedPoints (float $reachedpoints)
 
 getMaxPoints ()
 
 setMaxPoints (float $maxpoints)
 
 getReachedPointsInPercent ()
 
 getMark ()
 
 setMark (Mark $mark)
 
 getQuestionCount ()
 
 setQuestionCount (int $questioncount)
 
 getStartTime ()
 
 setStartTime (?string $start_time)
 
 getLastAccessTime ()
 
 setLastAccessTime (?string $last_access_time)
 
 getWorkingTime ()
 
 setWorkingTime (int $workingtime)
 
 getPass ()
 
 setPass (int $pass)
 
 getAnsweredQuestions ()
 
 addAnsweredQuestion (int $question_id, float $max_points, float $reached_points, bool $is_answered, ?int $sequence=null, int $manual=0)
 
 getAnsweredQuestion (int $index)
 
 getAnsweredQuestionByQuestionId (int $question_id)
 
 getAnsweredQuestionCount ()
 
 getRequestedHintsCount ()
 
 setRequestedHintsCount (int $requestedHintsCount)
 
 getDeductedHintPoints ()
 
 setDeductedHintPoints (float $deductedHintPoints)
 
 getExamId ()
 
 setExamId (string $exam_id)
 
 getStatusOfAttempt ()
 
 setStatusOfAttempt (?StatusOfAttempt $status_of_attempt)
 

Data Fields

array $answeredQuestions
 

Private Attributes

DateTimeImmutable $start_time = null
 
DateTimeImmutable $last_access_time = null
 
int $workingtime
 
int $questioncount
 
float $maxpoints
 
float $reachedpoints
 
Mark $mark = null
 
int $nrOfAnsweredQuestions
 
int $pass
 
int $requestedHintsCount = null
 
float $deductedHintPoints = null
 
string $exam_id = ''
 
StatusOfAttempt $status_of_attempt = null
 

Detailed Description

Deprecated:
11; Result/EvaluationData will be refined.

Definition at line 27 of file class.ilTestEvaluationPassData.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestEvaluationPassData::__construct ( )

Constructor.

public

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

59  {
60  $this->answeredQuestions = [];
61  }

Member Function Documentation

◆ __sleep()

ilTestEvaluationPassData::__sleep ( )

Definition at line 47 of file class.ilTestEvaluationPassData.php.

48  {
49  return ['answeredQuestions', 'pass', 'nrOfAnsweredQuestions', 'reachedpoints',
50  'maxpoints', 'questioncount', 'workingtime', 'examId'];
51  }

◆ addAnsweredQuestion()

ilTestEvaluationPassData::addAnsweredQuestion ( int  $question_id,
float  $max_points,
float  $reached_points,
bool  $is_answered,
?int  $sequence = null,
int  $manual = 0 
)

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

Referenced by ilTestEvaluationFactory\addQuestionToAttempt().

174  : void {
175  $this->answeredQuestions[] = [
176  'id' => $question_id,
177  'points' => round($max_points, 2),
178  'reached' => round($reached_points, 2),
179  'isAnswered' => $is_answered,
180  'sequence' => $sequence,
181  'manual' => $manual
182  ];
183  }
+ Here is the caller graph for this function:

◆ getAnsweredQuestion()

ilTestEvaluationPassData::getAnsweredQuestion ( int  $index)

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

References null.

185  : ?array
186  {
187  if (array_key_exists($index, $this->answeredQuestions)) {
188  return $this->answeredQuestions[$index];
189  }
190 
191  return null;
192  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ getAnsweredQuestionByQuestionId()

ilTestEvaluationPassData::getAnsweredQuestionByQuestionId ( int  $question_id)

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

References null.

Referenced by ILIAS\Test\ExportImport\ResultsExportExcel\addUserContent(), and ILIAS\Test\Scoring\Manual\ScoringByQuestionTableBinder\buildFilteredArrayOfAttempts().

194  : ?array
195  {
196  foreach ($this->answeredQuestions as $question) {
197  if ($question['id'] == $question_id) {
198  return $question;
199  }
200  }
201  return null;
202  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ getAnsweredQuestionCount()

ilTestEvaluationPassData::getAnsweredQuestionCount ( )

Definition at line 204 of file class.ilTestEvaluationPassData.php.

204  : int
205  {
206  return count($this->answeredQuestions);
207  }

◆ getAnsweredQuestions()

ilTestEvaluationPassData::getAnsweredQuestions ( )

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

References $answeredQuestions.

Referenced by ILIAS\Test\Scoring\Manual\TestScoring\recalculatePass().

162  : array
163  {
165  }
+ Here is the caller graph for this function:

◆ getDeductedHintPoints()

ilTestEvaluationPassData::getDeductedHintPoints ( )

Definition at line 219 of file class.ilTestEvaluationPassData.php.

References $deductedHintPoints.

219  : ?float
220  {
222  }

◆ getExamId()

ilTestEvaluationPassData::getExamId ( )

Definition at line 229 of file class.ilTestEvaluationPassData.php.

References $exam_id.

229  : string
230  {
231  return $this->exam_id;
232  }

◆ getLastAccessTime()

ilTestEvaluationPassData::getLastAccessTime ( )

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

References $last_access_time.

130  : ?\DateTimeImmutable
131  {
133  }

◆ getMark()

ilTestEvaluationPassData::getMark ( )

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

References $mark.

98  : ?Mark
99  {
100  return $this->mark;
101  }
A class defining marks for assessment test objects.
Definition: Mark.php:35

◆ getMaxPoints()

ilTestEvaluationPassData::getMaxPoints ( )

Definition at line 83 of file class.ilTestEvaluationPassData.php.

References $maxpoints.

Referenced by getReachedPointsInPercent().

83  : float
84  {
85  return $this->maxpoints;
86  }
+ Here is the caller graph for this function:

◆ getNrOfAnsweredQuestions()

ilTestEvaluationPassData::getNrOfAnsweredQuestions ( )

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

References $nrOfAnsweredQuestions.

63  : int
64  {
66  }

◆ getPass()

◆ getQuestionCount()

ilTestEvaluationPassData::getQuestionCount ( )

Definition at line 108 of file class.ilTestEvaluationPassData.php.

References $questioncount.

108  : int
109  {
110  return $this->questioncount;
111  }

◆ getReachedPoints()

ilTestEvaluationPassData::getReachedPoints ( )

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

References $reachedpoints.

Referenced by getReachedPointsInPercent().

73  : float
74  {
75  return $this->reachedpoints;
76  }
+ Here is the caller graph for this function:

◆ getReachedPointsInPercent()

ilTestEvaluationPassData::getReachedPointsInPercent ( )

Definition at line 93 of file class.ilTestEvaluationPassData.php.

References getMaxPoints(), and getReachedPoints().

93  : float
94  {
95  return $this->getMaxPoints() ? $this->getReachedPoints() / $this->getMaxPoints() * 100.0 : 0.0;
96  }
+ Here is the call graph for this function:

◆ getRequestedHintsCount()

ilTestEvaluationPassData::getRequestedHintsCount ( )

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

References $requestedHintsCount.

209  : ?int
210  {
212  }

◆ getStartTime()

ilTestEvaluationPassData::getStartTime ( )

Definition at line 118 of file class.ilTestEvaluationPassData.php.

References $start_time.

118  : ?\DateTimeImmutable
119  {
120  return $this->start_time;
121  }

◆ getStatusOfAttempt()

ilTestEvaluationPassData::getStatusOfAttempt ( )

Definition at line 239 of file class.ilTestEvaluationPassData.php.

References $status_of_attempt.

240  {
241  if ($this->status_of_attempt) {
243  }
244 
245  return StatusOfAttempt::FINISHED_BY_UNKNOWN;
246  }

◆ getWorkingTime()

ilTestEvaluationPassData::getWorkingTime ( )

Definition at line 142 of file class.ilTestEvaluationPassData.php.

References $workingtime.

142  : int
143  {
144  return $this->workingtime;
145  }

◆ setDeductedHintPoints()

ilTestEvaluationPassData::setDeductedHintPoints ( float  $deductedHintPoints)

Definition at line 224 of file class.ilTestEvaluationPassData.php.

References $deductedHintPoints.

224  : void
225  {
226  $this->deductedHintPoints = $deductedHintPoints;
227  }

◆ setExamId()

ilTestEvaluationPassData::setExamId ( string  $exam_id)

Definition at line 234 of file class.ilTestEvaluationPassData.php.

References $exam_id.

234  : void
235  {
236  $this->exam_id = $exam_id;
237  }

◆ setLastAccessTime()

ilTestEvaluationPassData::setLastAccessTime ( ?string  $last_access_time)

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

References null.

135  : void
136  {
137  if ($last_access_time !== null) {
138  $this->last_access_time = new \DateTimeImmutable($last_access_time);
139  }
140  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ setMark()

ilTestEvaluationPassData::setMark ( Mark  $mark)

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

References $mark.

103  : void
104  {
105  $this->mark = $mark;
106  }

◆ setMaxPoints()

ilTestEvaluationPassData::setMaxPoints ( float  $maxpoints)

Definition at line 88 of file class.ilTestEvaluationPassData.php.

References $maxpoints.

Referenced by ilTestEvaluationFactory\addPointsAndQuestionCountToAttempt().

88  : void
89  {
90  $this->maxpoints = $maxpoints;
91  }
+ Here is the caller graph for this function:

◆ setNrOfAnsweredQuestions()

ilTestEvaluationPassData::setNrOfAnsweredQuestions ( int  $nrOfAnsweredQuestions)

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

References $nrOfAnsweredQuestions.

68  : void
69  {
70  $this->nrOfAnsweredQuestions = $nrOfAnsweredQuestions;
71  }

◆ setPass()

ilTestEvaluationPassData::setPass ( int  $pass)

Definition at line 157 of file class.ilTestEvaluationPassData.php.

References $pass.

157  : void
158  {
159  $this->pass = $pass;
160  }

◆ setQuestionCount()

ilTestEvaluationPassData::setQuestionCount ( int  $questioncount)

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

References $questioncount.

Referenced by ilTestEvaluationFactory\addPointsAndQuestionCountToAttempt().

113  : void
114  {
115  $this->questioncount = $questioncount;
116  }
+ Here is the caller graph for this function:

◆ setReachedPoints()

ilTestEvaluationPassData::setReachedPoints ( float  $reachedpoints)

Definition at line 78 of file class.ilTestEvaluationPassData.php.

References $reachedpoints.

78  : void
79  {
80  $this->reachedpoints = $reachedpoints;
81  }

◆ setRequestedHintsCount()

ilTestEvaluationPassData::setRequestedHintsCount ( int  $requestedHintsCount)

Definition at line 214 of file class.ilTestEvaluationPassData.php.

References $requestedHintsCount.

214  : void
215  {
216  $this->requestedHintsCount = $requestedHintsCount;
217  }

◆ setStartTime()

ilTestEvaluationPassData::setStartTime ( ?string  $start_time)

Definition at line 123 of file class.ilTestEvaluationPassData.php.

References null.

123  : void
124  {
125  if ($start_time !== null) {
126  $this->start_time = new \DateTimeImmutable($start_time);
127  }
128  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ setStatusOfAttempt()

ilTestEvaluationPassData::setStatusOfAttempt ( ?StatusOfAttempt  $status_of_attempt)

Definition at line 248 of file class.ilTestEvaluationPassData.php.

References $status_of_attempt.

248  : void
249  {
250  $this->status_of_attempt = $status_of_attempt;
251  }

◆ setWorkingTime()

ilTestEvaluationPassData::setWorkingTime ( int  $workingtime)

Definition at line 147 of file class.ilTestEvaluationPassData.php.

References $workingtime.

147  : void
148  {
149  $this->workingtime = $workingtime;
150  }

Field Documentation

◆ $answeredQuestions

array ilTestEvaluationPassData::$answeredQuestions

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

Referenced by getAnsweredQuestions().

◆ $deductedHintPoints

float ilTestEvaluationPassData::$deductedHintPoints = null
private

◆ $exam_id

string ilTestEvaluationPassData::$exam_id = ''
private

Definition at line 44 of file class.ilTestEvaluationPassData.php.

Referenced by getExamId(), and setExamId().

◆ $last_access_time

DateTimeImmutable ilTestEvaluationPassData::$last_access_time = null
private

Definition at line 34 of file class.ilTestEvaluationPassData.php.

Referenced by getLastAccessTime().

◆ $mark

Mark ilTestEvaluationPassData::$mark = null
private

Definition at line 39 of file class.ilTestEvaluationPassData.php.

Referenced by getMark(), and setMark().

◆ $maxpoints

float ilTestEvaluationPassData::$maxpoints
private

Definition at line 37 of file class.ilTestEvaluationPassData.php.

Referenced by getMaxPoints(), and setMaxPoints().

◆ $nrOfAnsweredQuestions

int ilTestEvaluationPassData::$nrOfAnsweredQuestions
private

◆ $pass

int ilTestEvaluationPassData::$pass
private

Definition at line 41 of file class.ilTestEvaluationPassData.php.

Referenced by getPass(), and setPass().

◆ $questioncount

int ilTestEvaluationPassData::$questioncount
private

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

Referenced by getQuestionCount(), and setQuestionCount().

◆ $reachedpoints

float ilTestEvaluationPassData::$reachedpoints
private

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

Referenced by getReachedPoints(), and setReachedPoints().

◆ $requestedHintsCount

int ilTestEvaluationPassData::$requestedHintsCount = null
private

◆ $start_time

DateTimeImmutable ilTestEvaluationPassData::$start_time = null
private

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

Referenced by getStartTime().

◆ $status_of_attempt

StatusOfAttempt ilTestEvaluationPassData::$status_of_attempt = null
private

Definition at line 45 of file class.ilTestEvaluationPassData.php.

Referenced by getStatusOfAttempt(), and setStatusOfAttempt().

◆ $workingtime

int ilTestEvaluationPassData::$workingtime
private

Definition at line 35 of file class.ilTestEvaluationPassData.php.

Referenced by getWorkingTime(), and setWorkingTime().


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