From: moodler Date: Tue, 9 Mar 2004 05:51:16 +0000 (+0000) Subject: Fix case of printing shortanswers with quotes in them X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a8d909c77b4886898359397ae530501f40ae5db8;p=moodle.git Fix case of printing shortanswers with quotes in them --- diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php index e76fe08ba9..70e14820eb 100644 --- a/mod/quiz/lib.php +++ b/mod/quiz/lib.php @@ -577,9 +577,9 @@ function quiz_print_question($number, $question, $grade, $quizid, echo format_text($question->questiontext, $question->questiontextformat, NULL, $courseid); quiz_print_possible_question_image($quizid, $question); if ($response) { - $value = "value=\"$response[0]\""; + $value = 'value="'.s($response[0]).'"'; } else { - $value = ""; + $value = ''; } echo "

$stranswer: id\" size=\"50\" $value />

"; if ($feedback) {