Skip to content

Commit

Permalink
Merge pull request #5618 from christianbeeznest/ofaj-21822
Browse files Browse the repository at this point in the history
Exercise: Fix fill in the blanks results - refs BT#21822
  • Loading branch information
NicoDucou authored Jun 27, 2024
2 parents 11fe93a + 14e258a commit bc36950
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion public/main/exercise/exercise.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion public/main/exercise/fill_blanks.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bc36950

Please sign in to comment.