Nicholas found this while we were going over the combined patch. From what I remember, it seemed a bit inconsistent, because he got a 0 to work at some point. An example of the question he was putting in is:

"What is 100 - 100?"

Answer: 0

Comments

nicholasthompson’s picture

As I recall, this could be to do with the submission of the answers when making a question. One of the tests uses the empty() function in PHP. Maybe a better test could be:
if(trim($answer) != '')

Just an idea...

gilcot’s picture

Status: Active » Needs review
StatusFileSize
new3.48 KB

Nicolas, that's right.
here is the patch that correct it. included also some code formating according to Drupal standart.

add1sun’s picture

Version: 6.x-2.x-dev » 5.x-1.x-dev

This should be addressed before a stable release so marking this for 5.x-1.x

kscheirer’s picture

StatusFileSize
new743 bytes

this should take care of it

add1sun’s picture

Status: Needs review » Reviewed & tested by the community

schwingo. rtbc

add1sun’s picture

Status: Reviewed & tested by the community » Fixed

in 5 and HEAD

Anonymous’s picture

Status: Fixed » Closed (fixed)

  • Commit 83576ac on 5.x-2.x, 6.x-2.x, 6.x-3.x, 6.x-4.x, 6.x-5.x, 6.x-6.x, 7.x-4.x, master, 7.x-5.x by add1sun:
    #88686, #146898 allow multichoice to have 0 value answers and fixed...

  • Commit 83576ac on 5.x-2.x, 6.x-2.x, 6.x-3.x, 6.x-4.x, 6.x-5.x, 6.x-6.x, 7.x-4.x, master, 7.x-5.x, quiz-pages by add1sun:
    #88686, #146898 allow multichoice to have 0 value answers and fixed...

  • Commit 83576ac on 5.x-2.x, 6.x-2.x, 6.x-3.x, 6.x-4.x, 6.x-5.x, 6.x-6.x, 7.x-4.x, master, 7.x-5.x, quiz-pages, 2269219 by add1sun:
    #88686, #146898 allow multichoice to have 0 value answers and fixed...

  • Commit 83576ac on 5.x-2.x, 6.x-2.x, 6.x-3.x, 6.x-4.x, 6.x-5.x, 6.x-6.x, 7.x-4.x, master, 7.x-5.x, 2269219 by add1sun:
    #88686, #146898 allow multichoice to have 0 value answers and fixed...