HD Quiz

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

Addon/Feature Request: Multiple Question Banks and Custom Quiz Composition

Published: June 18, 2023
Support status: comment

Dear HD Quiz Team,

I am writing to request an enhancement to the existing HD Quiz plugin that would greatly improve its functionality. The feature I am seeking to add involves the introduction of multiple question banks and the ability to create custom quizzes from these banks.

Currently, the HD Quiz plugin allows users to add questions and specify the number of questions to be randomly selected for each quiz. However, I believe that expanding this capability to include multiple question banks (for example, categorized by difficulty levels such as easy, medium, and hard) would greatly enhance the quiz creation process.

Here’s how the feature would work:

Multiple Question Banks: Users would have the ability to create separate question banks for different difficulty levels. For instance, they could have an “Easy Questions” bank, a “Medium Questions” bank, and a “Hard Questions” bank.

Custom Quiz Composition: Once the question banks are created, users would be able to specify the number of questions to be chosen from each bank when composing a quiz. This would enable the creation of diverse quizzes with varying difficulty levels. For example, a user might choose to include 10 questions from the “Easy Questions” bank, 15 questions from the “Medium Questions” bank, and 10 questions from the “Hard Questions” bank, resulting in a comprehensive quiz/test consisting of 35 questions in total.

By implementing this feature, the HD Quiz plugin would offer users more flexibility and customization options, allowing for more tailored and engaging quizzes.

I believe that this enhancement would greatly benefit both individual users and organizations utilizing the HD Quiz plugin for educational or assessment purposes. It would provide a more comprehensive testing experience and enable the creation of quizzes that cater to different skill levels.

Thank you for considering this feature request. I appreciate your attention to improving the HD Quiz plugin and look forward to the possibility of seeing this feature implemented in future updates.


thread author: Johnny

Hi Johnny,
first, I just want to say thank you for taking the time to write this out, and second, thanks for actually providing a detailed example of how you would see this feature working!

There is already something similar to this built in, but it is missing a key ingredient in that it does not allow you to separate the different “banks” and would instead “combine” them in a random order.

Think of Quizzes as Categories, and Questions as Posts. Just like you can write a post and attach it to multiple categories, you can create a question and add it to multiple quizzes. One of the quickest ways to do this is via the “Bulk Modify Questions” button found on the main HD Quiz page.

So how would this work?

To start, create your new quiz. Then go to the Bulk Modify Questions page and select all questions that you want to include (questions from each “bank” in this new quiz). Now enable the Pool Of Questions feature on this new quiz, and BAM! You now have a new quiz that will randomly draw from that pool of pre-existing quizzes.

Of course the downside is that there would be no way to say “get 10 from quiz A, 20 from quiz B, 8 from quiz C, etc. It would combine all of the questions into a pool and then randomly pick from them.

To get the feature the way that you want it

(note: this section is as much for me to get my thoughts down as it is informative for you)

The hardest part of all of this would be designing and creating an interface to allow you (the quiz creator) to choose the list of quizzes you want to draw from, and how many questions to draw from each quiz.

IMO one of the best things about HD Quiz is how powerful and feature rich it is, without being clunky or cumbersome in its user interface. So if I ever add a feature like this, it will almost certainly have to be as part of an addon so that the main HD Quiz interface can remain simple for the majority of people.

I would also need to create an entire new template for this type of quiz, which before now, all quizzes and types were addressed with a single template.

And finally, the feature I’ve regretted since the start, WP Pagination, would be impossible to make compatible with this since each “bank” we pull from would require a separate query.


  • Great feature idea.
  • Thanks for providing an example.
  • I’ll think about adding this in.
  • If I add it, it won’t be anytime soon.
  • If I add it, it will probably be as part of an addon.
20 June 2023 — 11:59 support admin - Dylan

Hi there,

Thanks for the quick prompt and for taking the time to explain the current solution. I appreciate your detailed response.

I’m glad to hear that my feature request was helpful and that you were able to understand it easily.

I do see a potential issue with the current solution. Since it combines questions from different “banks” in a random order, it could result in inconsistent quiz compositions for different students. For example, one student might receive 20 easy questions, 1 hard question, and 9 medium questions, while another student might get 2 easy questions, 18 hard questions, and 10 medium questions. This might not provide a fair and balanced quiz experience.

On a related note, I wanted to let you know that I’m actually working on adding this feature myself. I believe it would greatly enhance the functionality of the quiz. If you’re interested, I can provide more information about my progress and discuss potential collaboration. Feel free to reach out anytime.

Thanks again for considering my feature request.

22 June 2023 — 04:39 thread author - Johnny

Some helpful advice.

I would hold off until I release 1.9.0 (maybe late next month) as it is a large update that will introduce two relevant things.

First, the template.php is completely redone in order to make it easier to both work with and extend. This will be particularly important to you, as most of your changes will need to be to this file.

Second, a new experimental ajax feature that will load the quizzes using ajax. Especially useful for those using page caching and features like random question order.

Some useful hooks/actions/filters

// Add a new field to quiz settings
function hdq_add_quiz_meta_example($fields)
    $field = array(
        "type" => "text",
        "name" => "text_id",
        "value" => "",
        "label" => "Text field label"       
    array_push($fields["advanced"], $field);
    return $fields;
add_filter("hdq_add_quiz_meta", "hdq_add_quiz_meta_example", 10, 1);

You can take a look at ./hd-quiz/includes/fields/ to see what fields can be added this way. There are also some others such as action, col-1-1, heading, hr, and content. I’d imagine that col-1-1 will be useful to create an interface for this (quiz name|pool).

You can get question saved data by using get_hdq_question($question_ID)

Hope this helps!

22 June 2023 — 12:22 support admin - Dylan

Respond to thread

You can also upload images to imgur and paste the links here. Just make sure that your images don't include any sensitive information.