15 include_once
"./Services/Object/classes/class.ilObject.php";
16 include_once
"./Modules/Test/classes/inc.AssessmentConstants.php";
141 return array(
'questions',
'passes',
'passed',
'lastVisit',
'firstVisit',
'timeOfWork',
'numberOfQuestions',
142 'questionsWorkedThrough',
'markECTS',
'mark_official',
'mark',
'maxpoints',
'reached',
'user_id',
'login',
143 'name',
'passScoring');
153 $this->passes =
array();
154 $this->questions =
array();
155 $this->passed = FALSE;
176 $this->passed = ($a_passed ? TRUE : FALSE);
186 $this->name = $a_name;
196 $this->login = $a_login;
206 $this->reached = $a_reached;
216 $this->maxpoints = $a_max_points;
221 return $this->getMaxPoints() ? $this->
getReached() / $this->getMaxPoints() * 100.0 : 0;
231 $this->mark = $a_mark;
241 $this->markECTS = $a_mark_ects;
247 if (!is_object($this->passes[$questionpass])) $questionpass = 0;
248 if (is_object($this->passes[$questionpass]))
250 return $this->passes[$questionpass]->getNrOfAnsweredQuestions();
257 $this->questionsWorkedThrough = $a_nr;
263 if (!is_object($this->passes[$questionpass])) $questionpass = 0;
264 if (is_object($this->passes[$questionpass]))
266 return $this->passes[$questionpass]->getQuestionCount();
274 $this->numberOfQuestions = $a_nr;
285 foreach ($this->passes as
$pass)
287 $time += $pass->getWorkingTime();
294 $this->timeOfWork = $a_time_of_work;
304 $this->firstVisit = $a_time;
314 $this->lastVisit = $a_time;
324 $this->passes[$pass_nr] =
$pass;
329 if (array_key_exists($pass_nr, $this->passes))
331 return $this->passes[$pass_nr];
341 return count($this->passes);
363 foreach( $this->passes as
$pass )
367 if($reached >= $bestpoints && ($pass->areObligationsAnswered() || !$obligationsAnsweredPassExists) )
370 $bestpass = $pass->getPass();
380 foreach (array_keys($this->passes) as
$pass)
382 if ($pass > $lastpass) $lastpass =
$pass;
389 $this->questionTitles[$question_id] = $question_title;
394 return $this->questionTitles;
399 if (array_key_exists(
$pass, $this->questions))
401 return $this->questions[
$pass];
411 if( !isset($this->questions[
$pass]) )
417 "id" => $question_id,
418 "o_id" => $original_id,
419 "points" => $max_points,
420 "sequence" => $sequence
426 if (array_key_exists($index, $this->questions[
$pass]))
428 return $this->questions[
$pass][$index];
439 if (array_key_exists(
$pass, $this->passes))
441 $count = $this->passes[
$pass]->getQuestionCount();
449 if (array_key_exists(
$pass, $this->passes))
451 $reached = $this->passes[
$pass]->getReachedPoints();
453 $reached = ($reached < 0) ? 0 : $reached;
454 $reached = round($reached, 2);
461 if (!is_object($this->passes[
$pass])) $pass = 0;
462 if (!is_object($this->passes[$pass]))
return 0;
463 $available = $this->passes[
$pass]->getMaxPoints();
464 $available = round($available, 2);
472 $percent = ($available > 0 ) ? $reached / $available : 0;
478 $this->user_id = $a_usr_id;
488 $this->mark_official = $a_mark_official;
538 $requestedHintsCount = $this->passes[
$pass]->getRequestedHintsCount();
540 return $requestedHintsCount;
556 foreach( $this->passes as
$pass )
560 if($reached >= $bestpoints && ($pass->areObligationsAnswered() || !$obligationsAnsweredPassExists) )
563 $bestpassObject =
$pass;
567 return $bestpassObject;
580 foreach( array_keys($this->passes) as $passIndex )
582 if ($passIndex > $lastpassIndex) $lastpassIndex = $passIndex;
585 $lastpassObject = $this->passes[$lastpassIndex];
587 return $lastpassObject;
598 foreach( $this->passes as
$pass )
600 if( $pass->areObligationsAnswered() )
addQuestion($original_id, $question_id, $max_points, $sequence=NULL, $pass=0)
setECTSMark($a_mark_ects)
getQuestionsWorkedThroughInPercent()
getReachedPointsInPercent()
getRequestedHintsCount($pass)
returns the count of hints requested by participant for given testpass
setTimeOfWork($a_time_of_work)
& getQuestion($index, $pass=0)
getReachedPoints($pass=0)
setPassScoring($passScoring)
addQuestionTitle($question_id, $question_title)
Base Exception for all Exceptions relating to Modules/Test.
getScoredPassObject()
returns the object of class ilTestEvaluationPassData that relates to the the scored test pass (best p...
setNumberOfQuestions($a_nr)
getReachedPointsInPercentForPass($pass=0)
setMarkOfficial($a_mark_official)
Create styles array
The data for the language used.
getQuestionsWorkedThrough()
getBestPassObject()
returns the object of class ilTestEvaluationPassData that relates to the the best test pass ...
setQuestionsWorkedThrough($a_nr)
getLastPassObject()
returns the object of class ilTestEvaluationPassData that relates to the the last test pass ...
getQuestionCount($pass=0)
doesObligationsAnsweredPassExist()
returns the fact wether a test pass with all obligations answered exists or not
__construct($passScoring)
Constructor.
getAvailablePoints($pass=0)
getRequestedHintsCountFromScoredPass()
returns the count of hints requested by participant for scored testpass
setMaxpoints($a_max_points)
areObligationsAnswered()
returns the fact wether all obligations in the scored test pass are answered or not ...