ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
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 ()
 
 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
 
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 56 of file class.ilTestEvaluationPassData.php.

57  {
58  $this->answeredQuestions = [];
59  }

Member Function Documentation

◆ __sleep()

ilTestEvaluationPassData::__sleep ( )

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

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

◆ addAnsweredQuestion()

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

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

Referenced by ilTestEvaluationFactory\addQuestionToAttempt().

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

◆ getAnsweredQuestion()

ilTestEvaluationPassData::getAnsweredQuestion ( int  $index)

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

References null.

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

◆ getAnsweredQuestionByQuestionId()

ilTestEvaluationPassData::getAnsweredQuestionByQuestionId ( int  $question_id)

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

References null.

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

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

◆ getAnsweredQuestionCount()

ilTestEvaluationPassData::getAnsweredQuestionCount ( )

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

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

◆ getAnsweredQuestions()

ilTestEvaluationPassData::getAnsweredQuestions ( )

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

References $answeredQuestions.

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

160  : array
161  {
163  }
+ Here is the caller graph for this function:

◆ getExamId()

ilTestEvaluationPassData::getExamId ( )

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

References $exam_id.

207  : string
208  {
209  return $this->exam_id;
210  }

◆ getLastAccessTime()

ilTestEvaluationPassData::getLastAccessTime ( )

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

References $last_access_time.

128  : ?\DateTimeImmutable
129  {
131  }

◆ getMark()

ilTestEvaluationPassData::getMark ( )

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

References $mark.

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

◆ getMaxPoints()

ilTestEvaluationPassData::getMaxPoints ( )

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

References $maxpoints.

Referenced by getReachedPointsInPercent().

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

◆ getNrOfAnsweredQuestions()

ilTestEvaluationPassData::getNrOfAnsweredQuestions ( )

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

References $nrOfAnsweredQuestions.

61  : int
62  {
64  }

◆ getPass()

◆ getQuestionCount()

ilTestEvaluationPassData::getQuestionCount ( )

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

References $questioncount.

106  : int
107  {
108  return $this->questioncount;
109  }

◆ getReachedPoints()

ilTestEvaluationPassData::getReachedPoints ( )

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

References $reachedpoints.

Referenced by getReachedPointsInPercent().

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

◆ getReachedPointsInPercent()

ilTestEvaluationPassData::getReachedPointsInPercent ( )

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

References getMaxPoints(), and getReachedPoints().

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

◆ getStartTime()

ilTestEvaluationPassData::getStartTime ( )

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

References $start_time.

116  : ?\DateTimeImmutable
117  {
118  return $this->start_time;
119  }

◆ getStatusOfAttempt()

ilTestEvaluationPassData::getStatusOfAttempt ( )

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

References $status_of_attempt.

218  {
219  if ($this->status_of_attempt) {
221  }
222 
223  return StatusOfAttempt::FINISHED_BY_UNKNOWN;
224  }

◆ getWorkingTime()

ilTestEvaluationPassData::getWorkingTime ( )

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

References $workingtime.

140  : int
141  {
142  return $this->workingtime;
143  }

◆ setExamId()

ilTestEvaluationPassData::setExamId ( string  $exam_id)

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

References $exam_id.

212  : void
213  {
214  $this->exam_id = $exam_id;
215  }

◆ setLastAccessTime()

ilTestEvaluationPassData::setLastAccessTime ( ?string  $last_access_time)

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

References null.

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

◆ setMark()

ilTestEvaluationPassData::setMark ( Mark  $mark)

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

References $mark.

101  : void
102  {
103  $this->mark = $mark;
104  }

◆ setMaxPoints()

ilTestEvaluationPassData::setMaxPoints ( float  $maxpoints)

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

References $maxpoints.

Referenced by ilTestEvaluationFactory\addPointsAndQuestionCountToAttempt().

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

◆ setNrOfAnsweredQuestions()

ilTestEvaluationPassData::setNrOfAnsweredQuestions ( int  $nrOfAnsweredQuestions)

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

References $nrOfAnsweredQuestions.

66  : void
67  {
68  $this->nrOfAnsweredQuestions = $nrOfAnsweredQuestions;
69  }

◆ setPass()

ilTestEvaluationPassData::setPass ( int  $pass)

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

References $pass.

155  : void
156  {
157  $this->pass = $pass;
158  }

◆ setQuestionCount()

ilTestEvaluationPassData::setQuestionCount ( int  $questioncount)

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

References $questioncount.

Referenced by ilTestEvaluationFactory\addPointsAndQuestionCountToAttempt().

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

◆ setReachedPoints()

ilTestEvaluationPassData::setReachedPoints ( float  $reachedpoints)

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

References $reachedpoints.

76  : void
77  {
78  $this->reachedpoints = $reachedpoints;
79  }

◆ setStartTime()

ilTestEvaluationPassData::setStartTime ( ?string  $start_time)

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

References null.

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

◆ setStatusOfAttempt()

ilTestEvaluationPassData::setStatusOfAttempt ( ?StatusOfAttempt  $status_of_attempt)

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

References $status_of_attempt.

226  : void
227  {
228  $this->status_of_attempt = $status_of_attempt;
229  }

◆ setWorkingTime()

ilTestEvaluationPassData::setWorkingTime ( int  $workingtime)

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

References $workingtime.

145  : void
146  {
147  $this->workingtime = $workingtime;
148  }

Field Documentation

◆ $answeredQuestions

array ilTestEvaluationPassData::$answeredQuestions

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

Referenced by getAnsweredQuestions().

◆ $exam_id

string ilTestEvaluationPassData::$exam_id = ''
private

Definition at line 42 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().

◆ $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 43 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: