4require_once(
'Modules/Test/exceptions/class.ilTestEvaluationException.php');
96 return array(
'answeredQuestions',
'pass',
'nrOfAnsweredQuestions',
'reachedpoints',
97 'maxpoints',
'questioncount',
'workingtime',
'examId');
107 $this->answeredQuestions = array();
167 $this->pass = $a_pass;
175 public function addAnsweredQuestion($question_id, $max_points, $reached_points, $isAnswered, $sequence =
null, $manual = 0)
177 $this->answeredQuestions[] = array(
178 "id" => $question_id,
179 "points" => round($max_points, 2),
180 "reached" => round($reached_points, 2),
181 'isAnswered' => $isAnswered,
182 "sequence" => $sequence,
189 if (array_key_exists(
$index, $this->answeredQuestions)) {
190 return $this->answeredQuestions[
$index];
198 foreach ($this->answeredQuestions as $question) {
199 if ($question[
"id"] == $question_id) {
208 return count($this->answeredQuestions);
289 if (!is_null($this->obligationsAnswered)) {
293 if (is_array($this->answeredQuestions) && count($this->answeredQuestions)) {
294 foreach ($this->answeredQuestions as $question) {
295 if (!$question[
'isAnswered']) {
304 'Neither the boolean property ilTestEvaluationPassData::obligationsAnswered was set, ' .
305 'nor the property array property ilTestEvaluationPassData::answeredQuestions contains elements!'
An exception for terminatinating execution or to throw for unit testing.
Test Evaluation Exception.
getAnsweredQuestionByQuestionId($question_id)
getAnsweredQuestionCount()
setRequestedHintsCount($requestedHintsCount)
Setter for $requestedHintsCount.
getNrOfAnsweredQuestions()
__construct()
Constructor.
addAnsweredQuestion($question_id, $max_points, $reached_points, $isAnswered, $sequence=null, $manual=0)
setExamId(string $examId)
setObligationsAnswered($obligationsAnswered)
setter for property obligationsAnswered
setWorkingTime($workingtime)
setDeductedHintPoints($deductedHintPoints)
Setter for $deductedHintPoints.
setNrOfAnsweredQuestions($nrOfAnsweredQuestions)
getRequestedHintsCount()
Getter for $requestedHintsCount.
setReachedPoints($reachedpoints)
getAnsweredQuestion($index)
setQuestionCount($questioncount)
areObligationsAnswered()
getter for property obligationsAnswered.
getDeductedHintPoints()
Getter for $deductedHintPoints.