Skip to content

Commit 198d25a

Browse files
matheuszychthojou
authored andcommitted
Fixes content of recapitulation not being displayed when file is choosen
1 parent 190e499 commit 198d25a

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

components/ILIAS/Test/src/Results/Data/Factory.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,9 @@ private function buildAttemptResults(
271271

272272
$feedback = $question_gui->getGenericFeedbackOutput($active_id, $attempt_id);
273273

274-
$recapitulation = null;
275-
if ($is_user_output && $settings->getShowRecapitulation()) {
276-
$recapitulation = $question_gui->getObject()->getSuggestedSolutionOutput();
277-
}
274+
$recapitulation = $is_user_output && $settings->getShowRecapitulation()
275+
? $question->getSuggestedSolutionOutput()
276+
: null;
278277

279278
$question_results[] = new QuestionResult(
280279
$qid,

components/ILIAS/TestQuestionPool/classes/class.assQuestion.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ public function getSuggestedSolutionOutput(): string
491491
);
492492

493493
ilWACSignedPath::setTokenMaxLifetimeInSeconds(60);
494-
$path_to_solution = $this->getSuggestedSolutionPathWeb() . $solution->getFilename();
494+
$path_to_solution = "{$this->getSuggestedSolutionPath()}{$solution->getFilename()}";
495495
if (!file_exists($path_to_solution)) {
496496
break;
497497
}
@@ -2845,8 +2845,7 @@ protected function getSuggestedSolutionsRepo(): SuggestedSolutionsDatabaseReposi
28452845

28462846
protected function loadSuggestedSolutions(): array
28472847
{
2848-
$question_id = $this->getId();
2849-
return $this->getSuggestedSolutionsRepo()->selectFor($question_id);
2848+
return $this->getSuggestedSolutionsRepo()->selectFor($this->getId());
28502849
}
28512850

28522851
/**

0 commit comments

Comments
 (0)