Question about Save Results Pro: Can logged-in users view their own quiz history on the front-end?
Hi Dylan,
I hope you are doing well.
I have a question regarding how logged-in users (students) can access their own data. The plugin works perfectly saving all the detailed quiz results in the WordPress dashboard for me as an administrator. However, I would like to know if there is a way (via a shortcode, a function, or a specific setting) to allow logged-in users to see a history of their own past quiz results on the front-end of the website.
Ideally, I want students to be able to log into their account page and see a table with their own scores and completion dates.
Is this feature natively supported by the Pro add-on, or is there any recommended way/workaround to achieve this?
Thank you so much for your time and for maintaining such an awesome plugin.
Best regards,
This is not a native feature of the addon and is not something I will add to the main addon.
HOWEVER, I spent the time to make this for you (and anyone else using Save Results Pro that wants this)
Download: https://hdplugins.com/plugins/hd-quiz/hdq-srp-user-results.zip
This is yet another addon, but this one specfically extends the functionalty of Save Results Pro. I design and build all my plugins to be very extendible so that users can customize to their needs, so this is a perfect use-case for it 🙂
What this addon does is:
- Uses the Save Results Pro action
hdq_srp_after_save_resultto hook into when SRP saves a result. We do this so that we can save the Result ID to the current user’s profile (this is not visible to the user). - We then add a new shortcode
[hdq_srp_user_results]. This shortcode will print a table of the currently logged in user’s saved results, in order from oldest to newest. The table has thee columns: Quiz name, Result (as a percentage), and the date of the result.
HOW TO USE:
I don’t know how your site is setup, but if you can, add the shortcode to user’s profile pages. Then when the user logs in and visits their profile pages, they will be able to see their results in the table. If not you can always create a new page just for this and direct your users to visit it to see their results.
NOTES:
- This will only start capturing NEW results. Existing results will not appear in the table.
- The shortcode will always show the currently logged in user’s results. HOWEVER, if you are logged in as an admin, I created a secret for you. If you append
?hdq_user_id=xxxto the URL, you can replace xxx with the ID of any user. You can use this to view a specific user’s results if you want.
Thank you so much! I really appreciate the time and effort you took to build this custom add-on.
I have already installed it and tested it on my site, and it works flawlessly. It provides exactly the functionality I was looking for, and the secret admin URL parameter to check specific student results is incredibly useful.
Your plugins are amazing, but your customer support is truly outstanding.
Thanks again for everything!
Best regards.