Quiz summary and "pass" results pages do not display. Also, in Quiz Admin view, it indicates "Summary text if the user passed: No text defined" when the text is viewable below.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | quiz.patch | 13.61 KB | aaron1234nz |
Quiz summary and "pass" results pages do not display. Also, in Quiz Admin view, it indicates "Summary text if the user passed: No text defined" when the text is viewable below.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | quiz.patch | 13.61 KB | aaron1234nz |
Comments
Comment #1
sivaji_ganesh_jojodae commentedNeed more info.
* Is it a personality quiz ?
* Is your Quiz attendees are authenticated users or anonymous users ?
* What are the steps required to reproduce the bug ?
* What behavior were you expecting ?
* What happened instead ?
* Drupal path that causes this issue ?
Comment #2
Renee S commentedI'm getting a similar thing, but with anonymous users only. The dialogue shows "You got x out of y possible points." then the Quiz Summary says "n/a". For logged in users, however, it says "You got x out of y possible points." then the proper Quiz Summary shows up.
It's not a settable permissions thing, as far as I can tell; anonymous users have "view own quiz results" and "access quiz".
However, I'm using Q4-dev.
Comment #3
slampy commentedSame problem here. "Summary text if passed" and "Default summary text" only shows up for the admin user. For the student is doesn't.
Student's have "access quiz" permissions only and feedback is disabled at the end of the quiz.
Comment #4
slampy commentedAnd of course with the latest stable version also. :-)
Comment #5
slampy commentedI looked more into this issue, because I really need this feature. :-)
The problem is in the quiz.pages.inc files theme_quiz_take_summary($quiz, $questions, $score, $summary) function.
And with this line:
$output .= '<div id="quiz_summary">'. check_markup($summary, $quiz->format) .'</div><br />'."\n";I don't know what the $quiz->format variable holds but Drupal doesn't like it. So just delete it. :-)
This should fix this bug:
$output .= '<div id="quiz_summary">'. check_markup($summary) .'</div><br />'."\n";I am not a developer of this project and haven't looked more into why they put the $quiz->format in, but this certanly fixes this bug.
Comment #6
lion123 commented#5 works only for the text before the questions on the feedback. Questions are still displayed as n/a to me.
Comment #7
slampy commentedI have also made a small modification in the quiz.module. Because I don't want feedback at the end of the quiz I modified this:
to this:
Did you enable the feedback for the quiz?
Comment #8
stGeorge-1 commentedThis issue seems to be discussing the same bug as http://drupal.org/node/754246
Comment #9
falcon commentedYes, it seems to be incorrect use of check_markup. This is fixed in Quiz 4 anyway. Hopefully Quiz 4.0 RC will be out soon.
Comment #10
TethysBlue commentedThanks, slampy. That fixed my problem of not being able to see the "pass" summary text as an anonymous user, but does anyone know why the text for Result Options will not show up when a user's results are less than the pass rate? This is true for all user types (site master, authenticated user, and anonymous user).
The settings are:
Pass rate- 100%
Results Option 1 text-
Percent Start Range: 0
Percent End Range: 99
Permissions: All users checked for Access Quiz and View Own Results
Comment #11
aaron1234nz commentedThere are a number of places that check_markup should have the third parameter passed in as false (disable checking that the current user has access to the input filter). This applies when information is inputted by an admin and shown to a user. I've done a find through the code and have added the third parameter where I think it is necessary. Attached is the patch file that resulted.