Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
llillf CreditAttribution: llillf commentedI have the similar issue. does anyone know a possible solution?
Thanks a lot!
Comment #2
drewbe121212 CreditAttribution: drewbe121212 commentedThere 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:
Comment #3
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commentedIt 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 callingdrupal_goto()
.Comment #4
djdevinFixed in 7.x-5.x
The quiz results are now on their own page.