Support » Plugin: HD Quiz » Can we assign scorecard details

  • Resolved dinkar9852


    First Thanks for Awesome Quiz Plugin.

    I’m using this plug-in for educational purposes if you add score details it’s very useful. I’m sharing some details

    {Total questions}
    {Total attempts}
    {Correct attempts}
    {Wrong attempts}
    {Total marks}
    {Obtained marks}
    {Percentage marks} this facility already in HD Quiz.

    If possible please guide how to add this facility

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


    Hi dinkar9852,
    can you please expand on what each of these would be?

    Total questions is already there as part of the score. If you score 9/10, then that means there were 10 questions.

    Total attempts I assume is how many times the user tried the quiz? Something like this would require user login in order to securely store and retrieve that data and would also need to be disclosed in order to comply with GDPR.

    Correct attempts is how many times the user did the same quiz and passed? If so, then same issues as above.

    Same with Wrong attempts.

    What does total marks mean? And what about obtained? Is this not the same as the actual score of 9/10?

    The more details you can provide on each of these and why you need them, the better I can advise on how to add this in 🙂

    Thread Starter dinkar9852


    No i think Login is not required i visited a website it’s making same scorecard details without login.

    I’m using this plug-in for enterance exam so it’s better that students can found how much i did correct or incorrect.

    I’m not considering all attempted anyone did we only show details of present attempted quiz.

    • This reply was modified 1 month, 2 weeks ago by dinkar9852.
    Plugin Author Harmonic Design


    So you don’t want to see the data yourself, only the quiz taker ever needs to see it?

    Thread Starter dinkar9852


    Yaah I want to show Quiz taker when they completed the quiz and it only showed in results section where already result in showing.

    So it’s Request please how to do this

    Plugin Author Harmonic Design


    OK, this should be possible then.

    Before we begin, this is NOT something I will add to HD Quiz directly because I feel that it is not a feature that most people would want or use (however, if anyone else sees this and would like this as an official feature, let me know!).

    Luckily, HD Quiz is very easy to extend with new functionality because I added in a lot of hooks and filters allowing us to modify or add functionality as needed.

    In our case, we will be doing two things.

    First, we will be telling HD Quiz to run a custom JavaScript function on quiz completion.

    Second, we will use this new function together with localStorage to save some basic information without the need to use cookies.`

    See the full code here:

    This code should be copy/pasted to your theme’s functions.php file. <strong>NOTE:</strong> ALWAYS make a backup of this file in case you make a mistake. The code should be safly pasted at the very end of the file before the closing ?> tag (if the file has one)

    Thread Starter dinkar9852


    Thanks a lot but i found some issue when user repeat one quiz 2 times it’s show details of 1 attempt and 2nd attempt.

    Eg : if there is 30 Questions when user re attempt the quiz results data got the double
    30 questions converted into 60.

    Like above all functions behave same.

    Is it possible to hire a developer to build that facility that work perfectly.

    Plugin Author Harmonic Design


    You can hire a developer to do anything 🙂

    Just give them the code I sent you as a base and they can easily modify it as needed. I think the language barrier between us is too great since what I gave you is exactly what I thought you asked for. Line 138 is where the calculations happen, so that is where your developer will want to modify it to provide whatever information it is that you are looking for.

    Thread Starter dinkar9852


    Thanks for your great support

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.