I'm trying to add a block to all quiz results pages. However, when a user finishes a quiz, the url is '../node/330/take', (which is the same as all of the questions), rather than something like '../node/330/results/110'. I don't want to add the block to the question pages. It's the same whether user is anonymous or authenticated. Am I doing something wrong?


llillf’s picture

I have the similar issue. does anyone know a possible solution?

Thanks a lot!

drewbe121212’s picture

Issue summary: View changes

There is a hook (at least in version 7-4x) available called 'hook_quiz_finished'. I have never tested this, but you should be able to do something similiar:

function mymodule_quiz_finished($quiz, $score, $rid)
   drupal_goto('/node/' . $quiz->nid . '/results/' . $rid);
Sivaji’s picture

It is recommended not to use drupal_goto() in any hook implementation as it might prevent the executions of subsequent implementations. Workaround would be to set highest weight to module calling drupal_goto().

djdevin’s picture

Version: 6.x-4.4 » 7.x-5.x-dev
Status: Active » Fixed

Fixed in 7.x-5.x

The quiz results are now on their own page.

Status: Fixed » Closed (fixed)

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