Single Quotes in Cloze responses

Single Quotes in Cloze responses

by Alex Chapin -
Number of replies: 6
Moodle Version 1.6.3.

When participants submit responses with single quotes in cloze (i.e. embedded answers) question types and the quiz is set to show responses, single quotes are preceded by a backslash (i.e. escaped) when redisplayed after submission.

The quiz module seems to evaluate the response correctly (i.e. if answer and response are the same and contain single quotes, will be scored as correct).

However is problematic when quiz is set to multiple attempts since when participants submit responses the module changes responses with single quotes to include a backslash and so even if correct initially backslash makes answer wrong when redisplayed...

Is this a known issue or is there a way to implement to prevent the addition to backslashes when redisplaying responses after submitting.

(hope this is clear...)



Average of ratings: -
In reply to Alex Chapin

Re: Single Quotes in Cloze responses

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

Hi Alex,

I know there have been problems with the single quote (apostrophe) in the text of the SHORTANSWER sub-questions embedded within CLOZE questions in the Moodle quiz in the past. But I think these problems have been solved now. At least I do not have the behavior you mention in my local installation of Moodle 1.6.3 regularly updated to the latest version available.

What is the version of your file \question\type\multianswer\questiontype.php ? Mine is <?php // $Id: questiontype.php,v 1.7.2.8 2006/11/26 21:59:23 skodak Exp $

I expect you mean the SHORTANSWER sub-questions, because you do not mention this.

Could you describe what happens step-by-step, preferably with screen shots, and a real example of one of your CLOZE questions full text?

Joseph


Attachment image000.jpg
In reply to Joseph Rézeau

Re: Single Quotes in Cloze responses

by Alex Chapin -
Hi Joseph,
Thanks for quick response. I'm running Moodle version 1.6.3, but do have an older version of the file \question\type\multianswer\questiontype.php ? Mine is:
<?php // $Id: questiontype.php,v 1.7.2.6 2006/10/03 18:00:23 tjhunt Exp $

I do mean the short answer type of embedded question. Problem occurs on quiz set to allow multiple attempts with adaptive mode turned on. Here is sequence of events:
1. Participant starts quiz
2. Participant responds to a given cloze question (which contains a shortanswer with a single quote in it)
3. Participant clicks the submit button
4. Participants responses are shown (and correctly scored). Responses with a single quote in them now have a backslash preceding the single quote.

Have attached a screenshot. Thanks for any help you can provide.
Alex


Attachment moodle-quiz-debug01.gif
In reply to Alex Chapin

Re: Single Quotes in Cloze responses

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

Alex,

Just tried again some of your questions, including the "livres qu'il voulait" with apostrophe. Works fine for me in 1.6.3 with latest \question\type\multianswer\questiontype.php version.

You shoulde upgrade to the most recent version of that file.

Actually I had reported this problem in bug report MDL-6386 and it was corrected by Tim Hunt on 18/Oct/06 06:02 AM.

Joseph


Attachment image000.jpg
In reply to Joseph Rézeau

Re: Single Quotes in Cloze responses

by Alex Chapin -
Hey, that's great news! Odd that my Moodle version 1.6.3 didn't have the latest version of the questiontype.php file...

Is there a way I can get just the latest version of that file or the quiz module without downloading all of Moodle version 1.6.3?

BTW, would be an improvement I think if each question had an anchor so that when submitting responses to a question in adaptive mode, Moodle would, after submission, reload page and jump to that question again (instead of reloading and forcing users to scroll down to question they had submitted).

Thanks for your help.
Alex
In reply to Alex Chapin

Re: Single Quotes in Cloze responses

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Alex > Hey, that's great news! Odd that my Moodle version 1.6.3 didn't have the latest version of the questiontype.php file...

When did you install it? If you installed the current Previous Release Moodle 1.6.3 MOODLE_163 you'll see it's dated 10th October 2006, which if prior to the date when the appostrophe bug was repaired.

> Is there a way I can get just the latest version of that file or the quiz module without downloading all of Moodle version 1.6.3?

Thisi depends on which method you used to install your Moodle. If you use CVS (recommended) then upgrading is very easy. If not, then you might consider going to the Moodle Download page, go down to Previous Stable Branch Moodle 1.6.3+ MOODLE_16_STABLE Built Daily, download the package, unzip it and copy the questiontype.php file to the relevant folder, overwriting the older file there...

As for your "anchor" idea, why don't you post a suggestion in the bugtracker?

Joseph

In reply to Joseph Rézeau

Re: Single Quotes in Cloze responses

by Alex Chapin -
Yes, I did download previous release Moodle version 1.6.3, so this would explain why I had older version of file.

Have updated and am all set.

I'll post "anchor" idea to bugtracker as some point, perhaps will try to think bit more about best implementation

Thanks,
Alex