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?

Comments

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

Thanks a lot!

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:

<?php
function mymodule_quiz_finished($quiz, $score, $rid)
{
  
drupal_goto('/node/' . $quiz->nid . '/results/' . $rid);
}
?>

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().