The user is shown the correct answer and the answer he chose after taking the quiz.So this works well.(Image :quiz results.)

But when he views the result from 'My Results' the correct answer is not shown.(Image :own results)

Is this by design? (to avoid user seeing the answers and taking the Quiz again!)

Comments

mbutcher’s picture

Category: support » bug

As far as I can tell, this is not by design (unless my predecessor knew something I don't). I am changing it to a bug.

nirvanajyothi’s picture

StatusFileSize
new22.48 KB

ok.
Have attached the same image twice.am attaching the Quiz results image again ( ie.,thats shown after the user takes the quiz with both user answer and correct answer .)

mbutcher’s picture

Version: 6.x-2.1 » 6.x-3.0-alpha1
Status: Active » Postponed (maintainer needs more info)

This needs re-testing in Quiz 3

d-b’s picture

Version: 6.x-3.0-alpha1 » 6.x-3.0-beta1
Status: Postponed (maintainer needs more info) » Needs work

Bug is present in 3.0-beta-1

The results that load for a user directly after finishing the test are correct.

The table header for each question looks like:

<thead><tr><th>Answers</th><th>Correct Answer</th><th>User Answer</th><th>&nbsp;</th> </tr></thead>

And the correct/incorrect icon is displayed in the 'quiz_summary_qcell' class of cells.

Using the /user/quiz/X/userresults URL sent in the confirmation email produces a page that contains question tables that lack the 'Correct Answer' column.

<thead><tr><th>Answers</th><th>User Answer</th><th>&nbsp;</th> </tr></thead>

These tables also lack the 'quiz_summary_qcell' cells altogether, making it impossible to decide which questions one missed.

Hope this helps.

sivaji_ganesh_jojodae’s picture

Status: Needs work » Postponed (maintainer needs more info)

Need more info

1. Can you please attach a snapshot ?
a. after finishing the test
b. for /user/quiz/X/userresults

2. Which question type has this type of behavior matching, true/false or multichoice ?

d-b’s picture

StatusFileSize
new27.39 KB
new33.92 KB

1. Of course.

2. Multi-choice (with single correct answer)

sivaji_ganesh_jojodae’s picture

StatusFileSize
new113.1 KB
new99.01 KB

Tested against quiz 3.x-beta1, drupal 6.12. It works fine for me. See the snapshot.

sivaji_ganesh_jojodae’s picture

The warning messages and other known bugs in matching modules has been fixed 3.x dev branch.

d-b’s picture

I played with this some more and discovered that the results display correctly via the admin/ links, and also immediately after the test.

file: quiz.pages.inc
function: theme_quiz_user_summary
line: 465

$output .= theme('quiz_feedback', $questions, FALSE, TRUE);

This sets the $showpoints variable to false for a user visiting the result from the /user/quiz/X/userresults URL

$showpoints then suppresses both the 'Correct answer' column and the correct/incorrect icon indicator in the theme functions.

compare this to
file: quiz.pages.inc
function: theme_quiz_admin_summary
line: 824

$output .= theme('quiz_feedback', $questions, TRUE, TRUE);

visiting the report via /admin/quiz/reports/X/results in the correct display.

Unless there is a reason I'm missing to set $showpoints to FALSE for anyone accessing the results from the /user/quiz URL, it should be changed to TRUE in theme_quiz_user_summary. The other option would be to set it to

$quiz->pass_rate > 0

as it is in the theme_quiz_take_summary function to check if it's a pass/fail test. If that's the case though, then the other two functions (quiz_admin and quiz_user) should probably match it.

file: quiz.pages.inc
function: theme_quiz_user_summary
line: 465

-    $output .= theme('quiz_feedback', $questions, FALSE, TRUE);
+    $output .= theme('quiz_feedback', $questions, TRUE, TRUE);

Works for me anyway.

sivaji_ganesh_jojodae’s picture

Status: Postponed (maintainer needs more info) » Fixed

Thanks #9 helped me to fix this. committed to quiz 3.x branch.

Status: Fixed » Closed (fixed)

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