apostrophe in embedded question syntax

apostrophe in embedded question syntax

Napisane bez: Russell Thomson ()
Liczba ôdpowiedzi: 4

Moodle 2.6.5

Is there a problem with the apostrophe in the question below. Moodle marks it wrong.

I {2:SHORTANSWER:=had better call~='d better call} my mum to tell her I've arrived safely.

Regards

W ôdpowiedzi na Russell Thomson

Re: apostrophe in embedded question syntax

Napisane bez: Joseph Rézeau ()
Ôbrŏz Core developers Ôbrŏz Particularly helpful Moodlers Ôbrŏz Plugin developers Ôbrŏz Testers Ôbrŏz Translators

Tested in Moodle 2.7, and it does work as expected.

The probable reason for your problem is that the apostrophe entered when you created that Cloze question is not a "real" apostrophe (but a single quote character). This happens when you copy-paste text from a word processor or a Web page, etc. See http://en.wikipedia.org/wiki/Apostrophe#Computing.

screenshot #2

(1) is a single quote character

(2) is a real apostrophe

Result:

screenshot #1

Try again by typing your question text directly into the question editing interface text editor, it should work. Or copy-paste the example below:

I {2:SHORTANSWER:=had better call~='d better call} my mum to tell her I've arrived safely.

Joseph

 

W ôdpowiedzi na Joseph Rézeau

Re: apostrophe in embedded question syntax

Napisane bez: François Lizotte ()
Ôbrŏz Particularly helpful Moodlers

Joseph,

Your answer is very clear. But let's say we have hundred of shortanswer containing an apostrophe, is there a trick that would solve the issue quickly? Running a script in the database to automatically add alternative answers sounds scary to me, but nothing is impossible.

By the was, is this a real apostrophe: ' ?





W ôdpowiedzi na François Lizotte

Re: apostrophe in embedded question syntax

Napisane bez: Joseph Rézeau ()
Ôbrŏz Core developers Ôbrŏz Particularly helpful Moodlers Ôbrŏz Plugin developers Ôbrŏz Testers Ôbrŏz Translators

"let's say we have hundred of shortanswer containing an apostrophe, ..."

Well, if those are real apostrophe characters there is no problem. If they are not real apostrophes, I suggest exporting them (as Moodle XML), use a text editor to do the replacements and re-importing.

Joseph