• Resolved robustsofetch

    (@robustsofetch)


    Hi,

    Thanks for this great plugin. I just wanted to add two new things in this plugin.
    1. I want the negative marking for the wrong answer
    2. If user wants to go back to the previous answer and change the option.

    How can i do these two things. Can you please suggest me.

    Thanks in advance!!!
    Looking forward to hear from you.

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

    (@harmonic_design)

    Hello robustsofetch,
    Negative marking is not something I would ever likely include as a core feature of HD Quiz, but you can always hook into HD Quiz to achieve this yourself. Let me know if you’d like me to point you in the correct direction to do this, but note that you’d need to fully code it yourself, or hire someone to do it for you.

    As for some kind of “back” or “previous” button, this is something I’m actively looking into adding at some point but is not being developed yet.

    Can you please give me a correct direction for this

    Plugin Author Harmonic Design

    (@harmonic_design)

    Sure, I’ll see if I can send something today

    Plugin Author Harmonic Design

    (@harmonic_design)

    Please note that you will need to edit the plugin in order to make this change. This means that every time you update HD Quiz, the update will override this change. So please remember to do this every time you update HD Quiz. Luckily, it’s a quick change to make.

    Edit ./includes/js/hdq_script.js and on line 157, you will see the comment // get score with the following function.

    
            jQuery("#hdq_" + hdq_form_id + " .hdq_option").each(function() {
                if (jQuery(this).val() == 1 && jQuery(this).prop("checked")) {
                    total_score = parseInt(total_score) + 1;
                }
            });
    

    You will need to update that function to look like this instead:

    
            jQuery("#hdq_" + hdq_form_id + " .hdq_option").each(function() {
                if (jQuery(this).val() == 1 && jQuery(this).prop("checked")) {
                    total_score = parseInt(total_score) + 1;
                } else if (jQuery(this).prop("checked")){
                    total_score = parseInt(total_score) - 1;
                }
            });
    
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Negative Marking’ is closed to new replies.