Skip to content

Commit

Permalink
Test: Add Raw Variables to Output of Formula-Qst
Browse files Browse the repository at this point in the history
  • Loading branch information
kergomard committed Dec 14, 2024
1 parent 6c5bd58 commit aaeffa8
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,15 @@ public function getSolutionOutput(
$user_solution = [];
if ($pass !== null) {
$user_solution = $this->object->getVariableSolutionValuesForPass($active_id, $pass);
} else {
$user_solution = array_reduce(
$this->object->fetchAllVariables($this->object->getQuestion()),
static function (array $c, assFormulaQuestionVariable $v): array {
$c[$v->getVariable()] = $v->getVariable();
return $c;
},
[]
);
}

if (($active_id > 0) && (!$show_correct_solution)) {
Expand Down

0 comments on commit aaeffa8

Please sign in to comment.