• Resolved josegalib

    (@josegalib)


    Hi!, I need to show personalized results at the end of the quiz, after the user fills the questions, I need to make calculations to place the user in certain ranges, for example: from 1 to 10 show a preset text, then if it is between 10 and 20 show another text and so on, I could create a function in PHP where I can read the answers of the quiz, make calculations and then depending on the percentages show a custom text?

    What do I mean by “from 1 to 10 show a preset text, then if it is between 10 and 20 show another text and so on”, if I have the following three questions:

    1.- Do you use any antivirus in your platform?
    Possible answers and weights:
    a) No, b) Yes, c) I don’t know.
    Weights: No = 0, Yes= 100, Don’t know= 30

    2.- Do you have firewall in your platform?
    Possible answers and weights:
    a) No, b) Yes, c) I don’t know
    Weights: No = 0, Yes= 100, I don’t know= 30

    3.- Do you have protection against denial of service attacks on your platform?
    Possible answers and weights:
    a) No, b) Yes, c) I don’t know.
    Weights: No = 0, Yes= 100, Don’t know= 30

    Answers:
    Question 1 = No
    Question 2 = Yes
    Question 3 = Don’t Know

    Simple average calculation: (0+100+30)/3 = 43.33

    As the answer is between 40 and 50 we give the following pre-determined diagnosis:

    “Your platform is at risk of infection with Malware and the possibility of intruder entry.”

    Can I do this through a hook or put some custom function?

    Regards,

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