HD Quiz

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

Please Tell me how can I add Auto expire quiz feature to …

Published: April 28, 2021
Support status: closed

Please Tell me how can I add Auto expire quiz feature to the one who attempts it. (for eg. if I attempt it today so I can attempt the quiz for 15 days and after that i could not attempt it Tell me this feature how can i add this feature)

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

thread author: Kush

Hi Kush, this is not built into HD Quiz and likely never will be. If you need something like this, you’ll need to hook into HD Quiz to extend it.

For example, there are two ways you can do this.

The first requires your users to be logged in, and the second requires tracking cookies.

BASIC EXAMPLES:
Use the ‘hdq_init’ action to hide the quiz if you detect if the user has taken the quiz in the past 15 days.

Use the ‘hdq_submit’ action to send custom data to your site backend whenever a quiz has been completed and save this data to the users profile as custom meta data or perhaps save the info as a cookie. Example data to send would be the quiz ID as well as the current datetime. This way using the above hdq_init action you can check, for example, the logged in users metadata for that quiz id and see if the current date is more or less than 15 days.

28 April 2021 — 12:32 support admin - Dylan

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.