• Resolved Prabin

    (@prabin04)


    Hello thank you again for this amazing plugin.

    I have another query though.

    Is it possible or is there any code twiks to add Two or more correct answers for a single question ?

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

    (@harmonic_design)

    Hi Lionel!

    I’m sorry to let you know that there would be no ‘simple’ tweak to allow for multiple correct answers to a single question.

    The easiest way I can think of would be for you to add some jQuery to the page with the needed quiz to change the value of one of the options.

    Something like this.

    $("#id").val ="1";

    Where #id is the ID of the answer input you wish to also turn into a correct answer.

    In case you need help, the answer naming mechanism is like this

    qq[question #][answer #]

    So the third answer in the fourth question would have an ID of #qq43 and the jQuery code would look like

    $("#qq43").val ="1";

    Hope this helps!

    Thread Starter Prabin

    (@prabin04)

    Hi @harmonic_design,

    I’m little confused here. If we randomize the question here, then there will be different questions in the fourth number right ?

    So, if we want the two correct answers of the questionPost ID 275, what will be the right way to add our jQuery ?

    Thanks

    Plugin Author Harmonic Design

    (@harmonic_design)

    Hi Lionel,
    unfortunately, it would be much more complex if you need to randomize the question or answer order because the only way to determine which answer to mark as also correct would be to use a find function to search for a string that is unique to that question and answer combo. If you absolutely need to use this on a randomized quiz, then take a look at the :contains selector.

    If you’re not randomizing, then this becomes much simpler. I’m not sure what you mean by Post ID 275 unless you mean that is the post ID of the question – which isn’t needed.

    Using $("#qq275").val ="1"; would be the 27th question on the page, 5th answer for that question.

    Please let me know what your particular use case would be (IE, need randomized questions or not) and I’ll help best I can. HD Quiz was never meant to be able to have multiple correct answers, but worst case scenario I can release an update that will help us accomplish this.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add Two or More Answers for a Single Question’ is closed to new replies.