Skip to content

Commit

Permalink
TA: 37918, untyped getSolutions
Browse files Browse the repository at this point in the history
  • Loading branch information
nhaagen authored and kergomard committed Dec 16, 2024
1 parent 82a8bd2 commit 2a1588a
Show file tree
Hide file tree
Showing 14 changed files with 113 additions and 111 deletions.
18 changes: 9 additions & 9 deletions Modules/TestQuestionPool/classes/class.assClozeTestGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ public function getPreview($show_question_only = false, $showInlineFeedback = fa
* Get the question solution output
* @param integer $active_id The active user id
* @param integer $pass The test pass
* @param boolean $graphical_output Show visual feedback for right/wrong answers
* @param boolean $graphicalOutput Show visual feedback for right/wrong answers
* @param boolean $result_output Show the reached points for parts of the question
* @param boolean $show_question_only Show the question without the ILIAS content around
* @param boolean $show_feedback Show the question feedback
Expand All @@ -949,13 +949,13 @@ public function getPreview($show_question_only = false, $showInlineFeedback = fa
public function getSolutionOutput(
$active_id,
$pass = null,
bool $graphical_output = false,
bool $result_output = false,
bool $show_question_only = true,
bool $show_feedback = false,
bool $show_correct_solution = false,
bool $show_manual_scoring = false,
bool $show_question_text = true
$graphicalOutput = false,
$result_output = false,
$show_question_only = true,
$show_feedback = false,
$show_correct_solution = false,
$show_manual_scoring = false,
$show_question_text = true
): string {
// get the solution of the user for the active pass or from the last pass if allowed
$user_solution = [];
Expand All @@ -971,7 +971,7 @@ public function getSolutionOutput(
$user_solution,
$active_id,
$pass,
$graphical_output,
$graphicalOutput,
$result_output,
$show_question_only,
$show_feedback,
Expand Down
16 changes: 8 additions & 8 deletions Modules/TestQuestionPool/classes/class.assErrorTextGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,21 +252,21 @@ public function analyze(): void
public function getSolutionOutput(
$active_id,
$pass = null,
bool $graphical_output = false,
bool $result_output = false,
bool $show_question_only = true,
bool $show_feedback = false,
bool $show_correct_solution = false,
bool $show_manual_scoring = false,
bool $show_question_text = true
$graphicalOutput = false,
$result_output = false,
$show_question_only = true,
$show_feedback = false,
$show_correct_solution = false,
$show_manual_scoring = false,
$show_question_text = true
): string {
$user_solutions = $this->getUsersSolutionFromPreviewOrDatabase((int) $active_id, $pass);
$show_inline_feedback = false;
return $this->renderSolutionOutput(
$user_solutions,
$active_id,
$pass,
$graphical_output,
$graphicalOutput,
$result_output,
$show_question_only,
$show_feedback,
Expand Down
18 changes: 9 additions & 9 deletions Modules/TestQuestionPool/classes/class.assFormulaQuestionGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ public function checkInput(): bool
* Get the question solution output
* @param integer $active_id The active user id
* @param integer $pass The test pass
* @param boolean $graphical_output Show visual feedback for right/wrong answers
* @param boolean $graphicalOutput Show visual feedback for right/wrong answers
* @param boolean $result_output Show the reached points for parts of the question
* @param boolean $show_question_only Show the question without the ILIAS content around
* @param boolean $show_feedback Show the question feedback
Expand All @@ -772,13 +772,13 @@ public function checkInput(): bool
public function getSolutionOutput(
$active_id,
$pass = null,
bool $graphical_output = false,
bool $result_output = false,
bool $show_question_only = true,
bool $show_feedback = false,
bool $show_correct_solution = false,
bool $show_manual_scoring = false,
bool $show_question_text = true
$graphicalOutput = false,
$result_output = false,
$show_question_only = true,
$show_feedback = false,
$show_correct_solution = false,
$show_manual_scoring = false,
$show_question_text = true
): string {

$user_solution = [];
Expand Down Expand Up @@ -825,7 +825,7 @@ static function (array $c, assFormulaQuestionVariable $v): array {
$user_solution,
$active_id,
$pass,
$graphical_output,
$graphicalOutput,
$result_output,
$show_question_only,
$show_feedback,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ protected function completeTestOutputFormAction($formAction, $active_id, $pass)
* Get the question solution output
* @param integer $active_id The active user id
* @param integer $pass The test pass
* @param boolean $graphical_output Show visual feedback for right/wrong answers
* @param boolean $graphicalOutput Show visual feedback for right/wrong answers
* @param boolean $result_output Show the reached points for parts of the question
* @param boolean $show_question_only Show the question without the ILIAS content around
* @param boolean $show_feedback Show the question feedback
Expand All @@ -422,13 +422,13 @@ protected function completeTestOutputFormAction($formAction, $active_id, $pass)
public function getSolutionOutput(
$active_id,
$pass = null,
bool $graphical_output = false,
bool $result_output = false,
bool $show_question_only = true,
bool $show_feedback = false,
bool $show_correct_solution = false,
bool $show_manual_scoring = false,
bool $show_question_text = true
$graphicalOutput = false,
$result_output = false,
$show_question_only = true,
$show_feedback = false,
$show_correct_solution = false,
$show_manual_scoring = false,
$show_question_text = true
): string {
$user_solutions = array();

Expand Down Expand Up @@ -465,7 +465,7 @@ public function getSolutionOutput(
$user_solutions,
$active_id,
$pass,
$graphical_output,
$graphicalOutput,
$result_output,
$show_question_only,
$show_feedback,
Expand Down
16 changes: 8 additions & 8 deletions Modules/TestQuestionPool/classes/class.assKprimChoiceGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -556,13 +556,13 @@ public function getPreview($show_question_only = false, $showInlineFeedback = fa
public function getSolutionOutput(
$active_id,
$pass = null,
bool $graphical_output = false,
bool $result_output = false,
bool $show_question_only = true,
bool $show_feedback = false,
bool $show_correct_solution = false,
bool $show_manual_scoring = false,
bool $show_question_text = true
$graphicalOutput = false,
$result_output = false,
$show_question_only = true,
$show_feedback = false,
$show_correct_solution = false,
$show_manual_scoring = false,
$show_question_text = true
): string {
$user_solution = [];

Expand Down Expand Up @@ -590,7 +590,7 @@ public function getSolutionOutput(
$user_solution,
$active_id,
$pass,
$graphical_output,
$graphicalOutput,
$result_output,
$show_question_only,
$show_feedback,
Expand Down
18 changes: 9 additions & 9 deletions Modules/TestQuestionPool/classes/class.assLongMenuGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ public function populateAnswerSpecificFormPart(ilPropertyFormGUI $form): ilPrope
* Get the question solution output
* @param integer $active_id The active user id
* @param integer $pass The test pass
* @param boolean $graphical_output Show visual feedback for right/wrong answers
* @param boolean $graphicalOutput Show visual feedback for right/wrong answers
* @param boolean $result_output Show the reached points for parts of the question
* @param boolean $show_question_only Show the question without the ILIAS content around
* @param boolean $show_feedback Show the question feedback
Expand All @@ -356,13 +356,13 @@ public function populateAnswerSpecificFormPart(ilPropertyFormGUI $form): ilPrope
public function getSolutionOutput(
$active_id,
$pass = null,
bool $graphical_output = false,
bool $result_output = false,
bool $show_question_only = true,
bool $show_feedback = false,
bool $show_correct_solution = false,
bool $show_manual_scoring = false,
bool $show_question_text = true
$graphicalOutput = false,
$result_output = false,
$show_question_only = true,
$show_feedback = false,
$show_correct_solution = false,
$show_manual_scoring = false,
$show_question_text = true
): string {

if (($active_id > 0) && (!$show_correct_solution)) {
Expand All @@ -381,7 +381,7 @@ public function getSolutionOutput(
$user_solutions,
$active_id,
$pass,
$graphical_output,
$graphicalOutput,
$result_output,
$show_question_only,
$show_feedback,
Expand Down
19 changes: 10 additions & 9 deletions Modules/TestQuestionPool/classes/class.assMatchingQuestionGUI.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
Expand Down Expand Up @@ -444,7 +445,7 @@ public function populateQuestionSpecificFormPart(\ilPropertyFormGUI $form): ilPr
* Get the question solution output
* @param integer $active_id The active user id
* @param integer $pass The test pass
* @param boolean $graphical_output Show visual feedback for right/wrong answers
* @param boolean $graphicalOutput Show visual feedback for right/wrong answers
* @param boolean $result_output Show the reached points for parts of the question
* @param boolean $show_question_only Show the question without the ILIAS content around
* @param boolean $show_feedback Show the question feedback
Expand All @@ -455,13 +456,13 @@ public function populateQuestionSpecificFormPart(\ilPropertyFormGUI $form): ilPr
public function getSolutionOutput(
$active_id,
$pass = null,
bool $graphical_output = false,
bool $result_output = false,
bool $show_question_only = true,
bool $show_feedback = false,
bool $show_correct_solution = false,
bool $show_manual_scoring = false,
bool $show_question_text = true
$graphicalOutput = false,
$result_output = false,
$show_question_only = true,
$show_feedback = false,
$show_correct_solution = false,
$show_manual_scoring = false,
$show_question_text = true
): string {

$solutions = array();
Expand All @@ -483,7 +484,7 @@ public function getSolutionOutput(
$user_solutions,
$active_id,
$pass,
$graphical_output,
$graphicalOutput,
$result_output,
$show_question_only,
$show_feedback,
Expand Down
18 changes: 9 additions & 9 deletions Modules/TestQuestionPool/classes/class.assMultipleChoiceGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public function removechoice(): void
* Get the question solution output
* @param integer $active_id The active user id
* @param integer $pass The test pass
* @param boolean $graphical_output Show visual feedback for right/wrong answers
* @param boolean $graphicalOutput Show visual feedback for right/wrong answers
* @param boolean $result_output Show the reached points for parts of the question
* @param boolean $show_question_only Show the question without the ILIAS content around
* @param boolean $show_feedback Show the question feedback
Expand All @@ -212,13 +212,13 @@ public function removechoice(): void
public function getSolutionOutput(
$active_id,
$pass = null,
bool $graphical_output = false,
bool $result_output = false,
bool $show_question_only = true,
bool $show_feedback = false,
bool $show_correct_solution = false,
bool $show_manual_scoring = false,
bool $show_question_text = true,
$graphicalOutput = false,
$result_output = false,
$show_question_only = true,
$show_feedback = false,
$show_correct_solution = false,
$show_manual_scoring = false,
$show_question_text = true,
bool $show_inline_feedback = true
): string {
// shuffle output
Expand All @@ -243,7 +243,7 @@ public function getSolutionOutput(
$user_solution,
$active_id,
$pass,
$graphical_output,
$graphicalOutput,
$result_output,
$show_question_only,
$show_feedback,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
Expand Down Expand Up @@ -119,7 +120,7 @@ public function editQuestion($checkonly = false): bool
* Get the question solution output
* @param integer $active_id The active user id
* @param integer $pass The test pass
* @param boolean $graphical_output Show visual feedback for right/wrong answers
* @param boolean $graphicalOutput Show visual feedback for right/wrong answers
* @param boolean $result_output Show the reached points for parts of the question
* @param boolean $show_question_only Show the question without the ILIAS content around
* @param boolean $show_feedback Show the question feedback
Expand All @@ -130,13 +131,13 @@ public function editQuestion($checkonly = false): bool
public function getSolutionOutput(
$active_id,
$pass = null,
bool $graphical_output = false,
bool $result_output = false,
bool $show_question_only = true,
bool $show_feedback = false,
bool $show_correct_solution = false,
bool $show_manual_scoring = false,
bool $show_question_text = true
$graphicalOutput = false,
$result_output = false,
$show_question_only = true,
$show_feedback = false,
$show_correct_solution = false,
$show_manual_scoring = false,
$show_question_text = true
): string {

$user_solutions = [];
Expand All @@ -149,7 +150,7 @@ public function getSolutionOutput(
$user_solutions,
$active_id,
$pass,
$graphical_output,
$graphicalOutput,
$result_output,
$show_question_only,
$show_feedback,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ public function supportsIntermediateSolutionOutput()
* Get the question solution output
* @param integer $active_id The active user id
* @param integer $pass The test pass
* @param boolean $graphical_output Show visual feedback for right/wrong answers
* @param boolean $graphicalOutput Show visual feedback for right/wrong answers
* @param boolean $result_output Show the reached points for parts of the question
* @param boolean $show_question_only Show the question without the ILIAS content around
* @param boolean $show_feedback Show the question feedback
Expand All @@ -445,13 +445,13 @@ public function supportsIntermediateSolutionOutput()
public function getSolutionOutput(
$active_id,
$pass = null,
bool $graphical_output = false,
bool $result_output = false,
bool $show_question_only = true,
bool $show_feedback = false,
bool $show_correct_solution = false,
bool $show_manual_scoring = false,
bool $show_question_text = true
$graphicalOutput = false,
$result_output = false,
$show_question_only = true,
$show_feedback = false,
$show_correct_solution = false,
$show_manual_scoring = false,
$show_question_text = true
): string {
$solutionOrderingList = $this->object->getOrderingElementListForSolutionOutput(
$show_correct_solution,
Expand All @@ -464,7 +464,7 @@ public function getSolutionOutput(
$solutionOrderingList,
$active_id,
$pass,
$graphical_output,
$graphicalOutput,
$result_output,
$show_question_only,
$show_feedback,
Expand Down
Loading

0 comments on commit 2a1588a

Please sign in to comment.