Matt,

I believe there is a bug with the quiz module. It assigns quiz-takers a grade based on the total number of questions in the database, not on the number of questions in the quiz.

For example, I took the 20 question of a quiz and scored 18 out of 142 possible points (13%), which should be 18 out of 20 (90%).

I know you have been busy; if you don't have time to fix this bug soon. Would you please let me know?

Comments

skyredwang’s picture

Status: Active » Needs review

In quiz.module
Change
line 1330-1334
from

  $sql = 'SELECT qnr.child_nid, qnr.child_vid , n.type 
    FROM {quiz_node_relationship} qnr 
    INNER JOIN {node} n ON n.nid = qnr.child_nid
    WHERE qnr.parent_nid = %d';
  $results = db_query($sql, $quiz->nid);

to

$sql = 'SELECT question_nid AS child_nid, question_vid AS child_vid, type
FROM {quiz_node_results_answers}
LEFT JOIN {node} ON (question_nid = nid AND question_vid = vid)
WHERE result_id = %d';
$results = db_query($sql, $rid);

mbutcher’s picture

Status: Needs review » Fixed

Thanks, skyredwang, for the fix. It is now committed.

skyredwang’s picture

Status: Fixed » Active

mbutcher, the patch still has a problem. Quiz told someone that he got 17 out of 20, but reviewing the test, it only showed 2 questions answered wrong.

mbutcher’s picture

Are you still noticing this with recent dev releases of Quiz? I'm trying to re-create, but haven't yet been able to.

mbutcher’s picture

Version: 6.x-3.x-dev » 6.x-3.0-alpha1

Moving this up to 3.0 ALPHA

skyredwang’s picture

upgraded to alpha1. quick test. don't see the problem again.

I will test more.....

mbutcher’s picture

Status: Active » Fixed

I am going to mark this as fixed, given that nobody has seen this recently. If it pops up again, though, either re-open this or file a new (critical) issue.

Status: Fixed » Closed (fixed)

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

brain2xml’s picture

I just install 3.0

on quize result page I have

This person got of possible points.
Total score: %

mbutcher’s picture

Can you please (a) open a new issue, and (b) provide lots of details?

Matt