diff --git a/main/exercise/fill_blanks.class.php b/main/exercise/fill_blanks.class.php index 6fef845c392..d9d27207beb 100755 --- a/main/exercise/fill_blanks.class.php +++ b/main/exercise/fill_blanks.class.php @@ -1201,7 +1201,8 @@ public static function getHtmlDisplayForAnswer( $answer, $feedbackType, $resultsDisabled = false, - $showTotalScoreAndUserChoices = false + $showTotalScoreAndUserChoices = false, + $exercise ) { $result = ''; $listStudentAnswerInfo = self::getAnswerInfo($answer, true); @@ -1215,7 +1216,8 @@ public static function getHtmlDisplayForAnswer( $listStudentAnswerInfo['words'][$i], $feedbackType, $resultsDisabled, - $showTotalScoreAndUserChoices + $showTotalScoreAndUserChoices, + $exercise ); } else { $listStudentAnswerInfo['student_answer'][$i] = self::getHtmlWrongAnswer( @@ -1223,7 +1225,8 @@ public static function getHtmlDisplayForAnswer( $listStudentAnswerInfo['words'][$i], $feedbackType, $resultsDisabled, - $showTotalScoreAndUserChoices + $showTotalScoreAndUserChoices, + $exercise ); } } @@ -1264,10 +1267,14 @@ public static function getHtmlAnswer( $right, $feedbackType, $resultsDisabled = false, - $showTotalScoreAndUserChoices = false + $showTotalScoreAndUserChoices = false, + $exercise ) { $hideExpectedAnswer = false; $hideUserSelection = false; + if (!$exercise->showExpectedChoiceColumn()) { + $hideExpectedAnswer = true; + } switch ($resultsDisabled) { case RESULT_DISABLE_SHOW_SCORE_AND_EXPECTED_ANSWERS_AND_RANKING: case RESULT_DISABLE_SHOW_ONLY_IN_CORRECT_ANSWER: @@ -1356,7 +1363,8 @@ public static function getHtmlRightAnswer( $correct, $feedbackType, $resultsDisabled = false, - $showTotalScoreAndUserChoices = false + $showTotalScoreAndUserChoices = false, + $exercise ) { return self::getHtmlAnswer( $answer, @@ -1364,7 +1372,8 @@ public static function getHtmlRightAnswer( true, $feedbackType, $resultsDisabled, - $showTotalScoreAndUserChoices + $showTotalScoreAndUserChoices, + $exercise ); } @@ -1384,7 +1393,8 @@ public static function getHtmlWrongAnswer( $correct, $feedbackType, $resultsDisabled = false, - $showTotalScoreAndUserChoices = false + $showTotalScoreAndUserChoices = false, + $exercise ) { return self::getHtmlAnswer( $answer, @@ -1392,7 +1402,8 @@ public static function getHtmlWrongAnswer( false, $feedbackType, $resultsDisabled, - $showTotalScoreAndUserChoices + $showTotalScoreAndUserChoices, + $exercise ); } diff --git a/main/inc/lib/exercise_show_functions.lib.php b/main/inc/lib/exercise_show_functions.lib.php index 530cf3680c5..0048f286dab 100755 --- a/main/inc/lib/exercise_show_functions.lib.php +++ b/main/inc/lib/exercise_show_functions.lib.php @@ -30,7 +30,8 @@ public static function display_fill_in_blanks_answer( $answer, $feedbackType, $resultsDisabled, - $showTotalScoreAndUserChoices + $showTotalScoreAndUserChoices, + $exercise ); if (empty($id)) {