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.

CommentFileSizeAuthor
#11 quiz.patch13.61 KBaaron1234nz

Comments

sivaji_ganesh_jojodae’s picture

Status: Active » Postponed (maintainer needs more info)

Need 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 ?

Renee S’s picture

I'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.

slampy’s picture

Same 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.

slampy’s picture

Version: 6.x-3.3 » 6.x-3.4

And of course with the latest stable version also. :-)

slampy’s picture

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

I 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.

lion123’s picture

#5 works only for the text before the questions on the feedback. Questions are still displayed as n/a to me.

slampy’s picture

I 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:

if ($quiz->feedback_time == QUIZ_FEEDBACK_NEVER) {
  $content['body']['#value'] = theme('quiz_no_feedback');
{

to this:

if ($quiz->feedback_time == QUIZ_FEEDBACK_NEVER) {
  //$content['body']['#value'] = theme('quiz_no_feedback');
  $questions = 0;
  $summary = _quiz_get_summary_text($quiz, $score);
  $content['body']['#value'] = theme('quiz_take_summary', $quiz, $questions, $score, $summary);
}

Did you enable the feedback for the quiz?

stGeorge-1’s picture

This issue seems to be discussing the same bug as http://drupal.org/node/754246

falcon’s picture

Status: Needs review » Closed (duplicate)

Yes, 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.

TethysBlue’s picture

Thanks, 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

aaron1234nz’s picture

StatusFileSize
new13.61 KB

There 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.