HD Quiz

Need to send invoices?
Check out my new WordPress plugin HDInvoice
Limited time launch sale

Great plug-in, excellent job, Dylan. Many congratulations…

Published: April 21, 2020
Support status: closed

Great plug-in, excellent job, Dylan. Many congratulations!
As I answer the quiz, my responses must be stored in cache. Could you point me to where these are stored, so I can attempt to write my own code to give weighted scores for now (until your elegant solution comes along, that is) 🙂
Thanks a ton for the help!

This thread has been imported from harmonicdesign.ca/hd-quiz/

thread author: Madhav

Hi Madhav,
Instead of “cache”, I assume you mean “database”?

HD Quiz does not store or save anything a quiz taker submits, but there is the free HD Quiz Save Results Light addon that stores some basic information.

However, updating HD Quiz to be compatible with weighted questions is not something easily done! If you are a developer, I reccomend using the hdq_submit action. What this does, is tell HD Quiz to run a javascript function of the same name as well as send quiz data to wp-ajax.php so you can do whatever you want with it.

Example.

// Tell HD Quiz to send an AJAX request to `hdq_madhav_submit_action()`
// once quiz has been submitted
function hdq_madhav_submit($quizOptions)
{
    array_push($quizOptions->hdq_submit, "hdq_madhav_submit_action");
    return $quizOptions;
}
add_action('hdq_submit', 'hdq_madhav_submit');

// the functon that runs once quiz submitted function hdq_madhav_submit_action($data) { // do something with submitted $data }

I hope hat helps get you started!

21 April 2020 — 10:28 support admin - Dylan

Many thanks, Dylan.
I can get going with this. That is a HUGE help, very very quickly given!!!!
You are amazing!

22 April 2020 — 06:07 Madhav

If you are enjoying HD Quiz please leave a review here on the official WordPress.org page. HD Quiz is developed by me, just some dude, and is supported and available for free. It may seem dumb, but truly nothing makes me happier than knowing that people are using and loving HD Quiz and my hard work.

This thread has either been marked as complete or has been automatically closed due to inactivity.