19 declare(strict_types=1);
53 return array(
'answeredQuestions',
'pass',
'nrOfAnsweredQuestions',
'reachedpoints',
54 'maxpoints',
'questioncount',
'workingtime',
'examId');
64 $this->answeredQuestions = [];
135 float $reached_points,
137 ?
int $sequence = null,
140 $this->answeredQuestions[] = [
141 "id" => $question_id,
142 "points" => round($max_points, 2),
143 "reached" => round($reached_points, 2),
144 'isAnswered' => $isAnswered,
145 "sequence" => $sequence,
152 if (array_key_exists($index, $this->answeredQuestions)) {
153 return $this->answeredQuestions[$index];
161 foreach ($this->answeredQuestions as $question) {
162 if ($question[
"id"] == $question_id) {
171 return count($this->answeredQuestions);
218 if (!is_null($this->obligationsAnswered)) {
222 if (is_array($this->answeredQuestions) && $this->answeredQuestions !== []) {
223 foreach ($this->answeredQuestions as $question) {
224 if (!$question[
'isAnswered']) {
233 'Neither the boolean property ilTestEvaluationPassData::obligationsAnswered was set, ' .
234 'nor the property array property ilTestEvaluationPassData::answeredQuestions contains elements!'
int $nrOfAnsweredQuestions
addAnsweredQuestion(int $question_id, float $max_points, float $reached_points, bool $isAnswered, ?int $sequence=null, int $manual=0)
setWorkingTime(int $workingtime)
__construct()
Constructor.
setObligationsAnswered(bool $obligationsAnswered)
float $deductedHintPoints
setQuestionCount(int $questioncount)
setDeductedHintPoints(float $deductedHintPoints)
setRequestedHintsCount(int $requestedHintsCount)
Test Evaluation Exception.
setMaxPoints(float $maxpoints)
bool $obligationsAnswered
getAnsweredQuestionCount()
setReachedPoints(float $reachedpoints)
setNrOfAnsweredQuestions(int $nrOfAnsweredQuestions)
areObligationsAnswered()
getter for property obligationsAnswered.
getAnsweredQuestionByQuestionId(int $question_id)
getNrOfAnsweredQuestions()
getAnsweredQuestion(int $index)
setExamId(string $exam_id)