From b36b4ea7de378aeee0a5e6d65435c5beafa65125 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 3 Aug 2011 16:58:50 +0200 Subject: [PATCH] Fixing Multiple answer true/false/don't know answer's feedback --- main/exercice/exercise.class.php | 2 +- main/inc/lib/exercise_show_functions.lib.php | 24 +++++++------------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/main/exercice/exercise.class.php b/main/exercice/exercise.class.php index 9d17ddfca6..8eabd81474 100755 --- a/main/exercice/exercise.class.php +++ b/main/exercice/exercise.class.php @@ -1888,7 +1888,7 @@ class Exercise { $option = $result[1]; $choice[$my_answer_id] = $option; } - $numAnswer=$objAnswerTmp->selectAutoId($answerId); + $numAnswer = $objAnswerTmp->selectAutoId($answerId); $studentChoice =$choice[$numAnswer]; } else { $studentChoice =$choice[$numAnswer]; diff --git a/main/inc/lib/exercise_show_functions.lib.php b/main/inc/lib/exercise_show_functions.lib.php index ecfa917cf5..bcb4ee7224 100755 --- a/main/inc/lib/exercise_show_functions.lib.php +++ b/main/inc/lib/exercise_show_functions.lib.php @@ -230,7 +230,7 @@ class ExerciseShowFunctions { $question = new MultipleAnswerTrueFalse(); $new_options = Question::readQuestionOption($questionId); - + //Your choice if (isset($new_options[$studentChoice])) { echo get_lang($new_options[$studentChoice]['name']); } else { @@ -240,7 +240,7 @@ class ExerciseShowFunctions { - + - '.nl2br(make_clickable($answerComment)).''; - } else { - echo ''.nl2br(make_clickable($answerComment)).''; - } + '.nl2br(make_clickable($answerComment)).''; } else { - echo ' '; + echo ''.nl2br(make_clickable($answerComment)).''; } ?>