Support » Plugin: HD Quiz » Question about ‘Select All That Apply’

  • Resolved monzab



    I have a question in my quiz that requires the user to select two correct answers out of four that are provided.
    In the ‘Main’ tab, I used ‘Select All That Apply’ and marked two answers as correct.
    If the user selects two answers, regardless if they are right or wrong, or just one is wrong and the other is correct, everything is fine.
    My problem is that when a user selects just one answer and presses the ‘Next’ button, he is able to go to the next question without seeing whether he/she was right or wrong with the one selected answer.
    I would like the question to be blocked until the user selects another answer because then the correct answers will be highlighted.
    Can it be done by a code or is this option already built in the present plugin but I don’t know how to use it?
    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Harmonic Design


    Hi again monzab,
    I think you’ve finally asked for something that I cannot readily provide a solution to.

    The reason that the “Select all that apply” works the way it does is to stop an unfair advantage. The user does not know how many of the answers are the correct ones, so if we forcing them to select would give an unfair advantage.

    For example, if I have a question “Select all that apply” with 10 possible answers and three of them being correct – the user needs to correctly select the three to have answered the question “correct”. The key is that the user doesn’t know that three answers are needed – they might only answer two of them thinking they got them all. If you force them to make three selections then its kind of like giving them a major hint.

    I understand that the reason you want to do this is so that if they select 2 correct answers and ignore the third, due to using WP Pagination on your site, they could go to the next page without seeing the question marking. Unfortunatly, this is just one of many disadvantages of using WP Pagination (If you used normal pagination then they could simply see their markings once the quiz was completed).

    In order to do what you want, you’d need to add some custom code that will load on quiz_init and check the page for any questions that are the data-type select_all_apply_text. If it finds one, it then needs to A) check the answers to see how many are correct, B) disable the next/finish button, C) add event listeners for the answers so we know each time an answer has been made, D) on that event listener see if the total selected answers === total correct answers E) if D === true, re-enable the next/finish buttons.

    Thread Starter monzab



    Thank you for your answer. I understand now what the problem is.
    I think about the changes in my quiz to deal with the issue I am facing.
    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Question about ‘Select All That Apply’’ is closed to new replies.