Exercise: Fix deprecated syntax with optional param before mandatory in display_fill_in_blanks_answer()

pull/5101/head
Yannick Warnier 2 years ago
parent 18d135dd2b
commit c08a149442
  1. 8
      public/main/exercise/exercise.class.php
  2. 6
      public/main/inc/lib/exercise_show_functions.lib.php

@ -4940,8 +4940,8 @@ class Exercise
0, 0,
0, 0,
$results_disabled, $results_disabled,
'', $showTotalScoreAndUserChoicesInLastAttempt,
$showTotalScoreAndUserChoicesInLastAttempt ''
); );
} elseif (CALCULATED_ANSWER == $answerType) { } elseif (CALCULATED_ANSWER == $answerType) {
ExerciseShowFunctions::display_calculated_answer( ExerciseShowFunctions::display_calculated_answer(
@ -5334,8 +5334,8 @@ class Exercise
$exeId, $exeId,
$questionId, $questionId,
$results_disabled, $results_disabled,
$str, $showTotalScoreAndUserChoicesInLastAttempt,
$showTotalScoreAndUserChoicesInLastAttempt $str
); );
break; break;

@ -16,8 +16,8 @@ class ExerciseShowFunctions
* @param int $id Exercise ID * @param int $id Exercise ID
* @param int $questionId Question ID * @param int $questionId Question ID
* @param int $resultsDisabled * @param int $resultsDisabled
* @param string $originalStudentAnswer
* @param bool $showTotalScoreAndUserChoices * @param bool $showTotalScoreAndUserChoices
* @param string $originalStudentAnswer
*/ */
public static function display_fill_in_blanks_answer( public static function display_fill_in_blanks_answer(
$exercise, $exercise,
@ -26,8 +26,8 @@ class ExerciseShowFunctions
$id, $id,
$questionId, $questionId,
$resultsDisabled, $resultsDisabled,
$originalStudentAnswer = '', $showTotalScoreAndUserChoices,
$showTotalScoreAndUserChoices $originalStudentAnswer = ''
) { ) {
$answerHTML = FillBlanks::getHtmlDisplayForAnswer( $answerHTML = FillBlanks::getHtmlDisplayForAnswer(
$answer, $answer,

Loading…
Cancel
Save