I am having trouble creating a view to display current users most recent quiz score on the quiz page.
I create a quiz view and then add context filters assigning the default value equal to the ContentID from the URL. I then add a relationship to the quiz results and a context filter to the UserID from the currently logged in user.
Seems straight forward but I get no results. The culprit seems to be the relationship to the quiz results. I assume the quiz results relationship links to the quiz_node_results table.
Or is there a better way to accomplish the goal? I just want to display the most recent (or best saved) quiz results for the currently logged in user.
Comments
Comment #2
djdevinHi,
I don't believe this is supported in 4.x as the Views integration is not very good.
In 5.x you can create a "Quiz results" view, and use a contextual filter for the user and quiz. Then you can filter/sort on attempt to get the first, last, best attempt etc.
Comment #3
webservant316 CreditAttribution: webservant316 commentedOkay, I am stuck at quiz 4.x until the H5P integration in quiz 5.x is better. Looks like I'll need to hack a script to go get the data for display. I'll post back my solution.
Thanks.
Comment #4
djdevinComment #5
djdevinComment #6
webservant316 CreditAttribution: webservant316 commentedI just enabled the permission 'View own quiz results: Quiz takers can view their own results, also when quiz is not passed.' which makes the information available on a tab. Preference would be to display it on the quiz homepage, but the tab also has the advantage of listing the scores for all prior quiz takes.