diff --git a/public/main/exercise/exercise.class.php b/public/main/exercise/exercise.class.php index 8d0adc31d3b..94caf954633 100644 --- a/public/main/exercise/exercise.class.php +++ b/public/main/exercise/exercise.class.php @@ -4214,7 +4214,7 @@ public function manage_answer( $listMenu = FillBlanks::getFillTheBlankMenuAnswers($correctAnswer, false); if (!empty($studentAnswer)) { foreach ($listMenu as $key => $item) { - if ($key == $correctAnswer) { + if (sha1($item) === $studentAnswer) { $studentAnswerToShow = $item; break; } diff --git a/public/main/exercise/fill_blanks.class.php b/public/main/exercise/fill_blanks.class.php index 9e1d3b2014e..d0e361ad615 100644 --- a/public/main/exercise/fill_blanks.class.php +++ b/public/main/exercise/fill_blanks.class.php @@ -698,7 +698,7 @@ public static function isStudentAnswerGood($studentAnswer, $correctAnswer, $from $item = $listMenu[0]; if (!$fromDatabase) { $item = sha1($item); - $studentAnswer = sha1($studentAnswer); + //$studentAnswer = sha1($studentAnswer); } if ($item === $studentAnswer) { $result = true;