Question page not recognizing answers with apostrophe

Re: Question page not recognizing answers with apostrophe

by Joseph Rézeau -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Shawn,

Thanks for reporting this bug, of which I was already aware. I have posted a bug report (MDL-26281) for which you can vote and where you will find an easy fix.

Joseph

Fix (for moodle 2.0)

in file lesson/pagetypes/shortanswer.php
around line 80
replace:

foreach ($answers as $answer) {
$i++;
$expectedanswer = $answer->answer; // for easier handling of $answer->answer

with

foreach ($answers as $answer) {
$i++;
$expectedanswer = s($answer->answer); // for easier handling of $answer->answer