When I create a question using textfields, the answers are evaluated as incorrect when they are correct. See attached screenshot.
Is this a bug? What can I do about this?

Comments

sivaji_ganesh_jojodae’s picture

Are you entering the answer with white space?

Noticed myself that only in such case evaluation is happening wrong.

Anyway this is to be fixed.

sivaji_ganesh_jojodae’s picture

Status: Active » Needs review
StatusFileSize
new2.86 KB

Attaching the patch if anyone would need it for patching with drush or simiar.

sivaji_ganesh_jojodae’s picture

Title: Textfield not working » Right answer is evaluated as wrong when white space is present
Status: Needs review » Fixed

Committed the above patch. That should resolve this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nstillblue’s picture

Status: Closed (fixed) » Needs work

Thank you for your patch and commit, it's working now, but a new problem has arisen. I can no longer use < strong > tags in my questions, this breaks the cloze question...

sivaji_ganesh_jojodae’s picture

@nstillblue, I will see if I can fix that. In the meantime can you please provide the question text to reproduce the issue?

nstillblue’s picture

e.g. < strong > this < /strong > is a [test]

causes the cloze textfield not to show up when viewing the question.

The same problem occurs with < em > tags, but I can use < br > tags.

There is no problem for questions without tags:

e.g. this is a [test]

nstillblue’s picture

Any progress on this issue?

tostinni’s picture

This patch also apply for D6 although it fails on some non useful parts, so it would be nice to apply it to D6 too.
Thanks.

mikran’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new866 bytes

Here is a patch that fixes the issue raised in comments #5 and #7. Basically any text containing '/' caused an error.