19 declare(strict_types=1);
    47         $passOverwiewData = [];
    49         $scoredPass = $this->
object->_getResultPass($active_id);
    53         $testReachedPoints = 0;
    56         for ($pass = 0; $pass <= $lastPass; $pass++) {
    59             if ($passFinishDate <= 0) {
    64                 $result_data = $this->
object->getTestResult($active_id, $pass);
    66                 if (!$result_data[
"pass"][
"total_max_points"]) {
    69                     $passPercentage = ($result_data[
"pass"][
"total_reached_points"] / $result_data[
"pass"][
"total_max_points"]) * 100;
    72                 $passMaxPoints = $result_data[
"pass"][
"total_max_points"];
    73                 $passReachedPoints = $result_data[
"pass"][
"total_reached_points"];
    75                 $passAnsweredQuestions = $this->
object->getAnsweredQuestionCount($active_id, $pass);
    76                 $passTotalQuestions = count($result_data) - 2;
    78                 if ($pass == $scoredPass) {
    81                     if (!$result_data[
"test"][
"total_max_points"]) {
    84                         $testPercentage = ($result_data[
"test"][
"total_reached_points"] / $result_data[
"test"][
"total_max_points"]) * 100;
    87                     $testMaxPoints = $result_data[
"test"][
"total_max_points"];
    88                     $testReachedPoints = $result_data[
"test"][
"total_reached_points"];
    90                     $passOverwiewData[
'test'] = [
    91                         'active_id' => $active_id,
    92                         'scored_pass' => $scoredPass,
    93                         'max_points' => $testMaxPoints,
    94                         'reached_points' => $testReachedPoints,
    95                         'percentage' => $testPercentage
    98                     $isScoredPass = 
false;
   101                 $passOverwiewData[
'passes'][] = [
   102                     'active_id' => $active_id,
   104                     'finishdate' => $passFinishDate,
   105                     'max_points' => $passMaxPoints,
   106                     'reached_points' => $passReachedPoints,
   107                     'percentage' => $passPercentage,
   108                     'answered_questions' => $passAnsweredQuestions,
   109                     'total_questions' => $passTotalQuestions,
   110                     'is_scored_pass' => $isScoredPass
   115         return $passOverwiewData;
   130         $test_sequence_factory = 
new ilTestSequenceFactory($this->
object, $this->db, $this->questionrepository);
   132         if ($this->
object->isRandomTest()) {
   138         $virtual_sequence->setActiveId($testSession->
getActiveId());
   140         $virtual_sequence->init();
   142         return $virtual_sequence;
   150             $results = $this->
object->getTestResult(
   161         $virtualPassResults = [];
   164             foreach ($resultsByPass[$pass] as $key => $questionResult) {
   165                 if ($key === 
'test' || $key === 
'pass') {
   169                 if ($questionResult[
'qid'] == $questionId) {
   170                     $questionResult[
'pass'] = $pass;
   171                     $virtualPassResults[$questionId] = $questionResult;
   177         return $virtualPassResults;
   184         $marked_questions = [];
   186         if ($this->
object->getShowMarker()) {
   191         $firstQuestion = 
true;
   193         foreach ($result_array as $key => $value) {
   195                 $this->
object->isFollowupQuestionAnswerFixationEnabled()
   196                 && !$value[
'presented'] && !$firstQuestion
   200             if ($this->
object->getListOfQuestionsDescription()) {
   201                 $description = $value[
"description"];
   205             if (!$this->
object->getTitleOutput()) {
   206                 $points = $value[
"points"];
   210             if (count($marked_questions)) {
   211                 if (array_key_exists($value[
"qid"], $marked_questions)) {
   212                     $obj = $marked_questions[$value[
"qid"]];
   213                     if ($obj[
"solved"] == 1) {
   220                 'order' => $value[
'nr'],
   221                 'title' => $this->
object->getQuestionTitle($value[
'title'], $value[
'nr'], $value[
'points']),
   222                 'description' => $description,
   223                 'disabled' => $disableLink,
   224                 'worked_through' => $value[
'worked_through'],
   225                 'postponed' => $value[
'postponed'],
   228                 'sequence' => $value[
'sequence'],
   229                 'isAnswered' => $value[
'isAnswered'],
   230                 'has_authorized_answer' => $value[
'has_authorized_answer']
   232             $firstQuestion = 
false;
 
getVirtualSequenceUserResults(ilTestVirtualSequence $virtualSequence)
 
static _getPass($active_id)
Retrieves the actual pass of a given user for a given test. 
 
static lookupPassResultsUpdateTimestamp($active_id, $pass)
 
static isManScoringDone(int $active_id)
 
getPassOverviewData(int $active_id, bool $short=false)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static setManScoringDone(int $activeId, bool $manScoringDone)
 
buildVirtualSequence(ilTestSession $testSession)
 
getQuestionSummaryData(ilTestSequenceSummaryProvider $testSequence)
 
static _getSolvedQuestions($active_id, $question_fi=null)
get solved questions 
 
__construct(protected ilObjTest $object, protected ilDBInterface $db, protected GeneralQuestionPropertiesRepository $questionrepository)
public