Motivation: current options make scoring calculation impossible when questions have no 'wrong' answers

While building a health-related self-assessment tool, I found that the Quiz module's multichoice question type had no option available for scoring that suited the client's needs. Essentially, scoring selected incorrect options as -1, or scoring un-selected incorrect options as 1 makes the calculation impossible since there are no wrong answers. For example, consider a quiz with multiple questions similar to the following:

Have you ever been diagnosed with any of the following:

  • Condition X (2 points)
  • Condition Y (2 points)
  • Condition Z (2 points)
  • None of these

In this case, we want to provide results like:

  • If your score was zero, you're ok.
  • If your score was two, you should ask your physician about condition Q on your next visit.
  • If your score was four or higher, you should consult your physician about condition Q without delay

Assuming there were four such questions, and the user answered 'None of these' to two of them, that would negate one of the positive (2 point) answers and lower the score. The issue is that in these kinds of tools, (a) there are no 'wrong' answers, and (b) we don't really care if a user accidentally chooses 'None of these' and 'Condition Y'—we just care about the 'Condition Y' option.

Resolution:

Add a 'Zero-scoring' option to multichoice question. This is relatively simple and requires only small changes to multichoice.classes.inc and multichoice.module (it appears that it should require changes to multichoice.js too, but I can't see that this file is ever used).

This feature has been requested previously (for 6.x)

Patch agains 7.x-4.x forthcoming shortly.

Remaining tasks

Needs review by maintainer/community and approval by maintainer.

User interface changes

Adds one option to the configuration screen at admin/quiz/settings/questions_settings.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bedlam’s picture

Patch attached.

nikita.izotov’s picture

I've applyed that patch, looks like everything works fine, BUT!
I have one questionary where is still -1 point on incorrect answer.
when i'am doing new questionary looks like everything works, but not with old one :(

djdevin’s picture

Version: 7.x-4.x-dev » 7.x-5.x-dev
Status: Needs review » Active

Moving to 5.x, if it's still broken there we should fix it. This is from multichoice's "forgive" routine which tries to correct point values based on the question configuration.

djdevin’s picture

Priority: Normal » Major
falcon’s picture

With this new scoring routine I could just always select all the alternatives and achieve max score?

djdevin’s picture

This is true, I think this has to be an option though.

The use case for OP has come up for us many times as well and we've had to do custom grading to get it to work right. Since it's possible to set this configuration in the UI (but quiz resets it), I think it makes sense to allow it to happen - remove the forgive() function and then warn the user about it.

Essentially it is a personality quiz where you get points for specific answers but none of them are "wrong". We use Quiz for assessment but also for diagnoses. I think what we ended up doing was making every answer "correct" with a different point value, but they end up having to have a point value when we want some of them to be 0 and not -1.

falcon’s picture

I see. I think the old Quiz team decided not to support personality quizzes. In quiz 3 I believe there was a dedicated personality quiz setting which we removed since quiz didn't do a very good job as a personality quiz anyway.

I'm fine with adding this new option back. Although in my experience it's a quite common mistake for regular quizzes to think that one point for each correct answer and 0 for the wrong ones is a good idea. People don't think about the fact that users might just check all and get a perfect score. Replacing forgive with a warning is an alternative to adding another scoring method

mach5_kel’s picture

+1 for the feature if it can be implemented in 7.x-5

I am trying to have quiz with 4 possible answers (all correct), but one should give the score of 0. It unfortunately always scores as 1.

djdevin’s picture

SenneS’s picture

Status: Active » Reviewed & tested by the community

Applied patch and worked fine for me.

djdevin’s picture

Issue tags: +Needs tests
djdevin’s picture

Status: Reviewed & tested by the community » Needs work
skrtvm’s picture

How can I add 0.33 marks for a incorrect answer?