Which function is called when a personality quiz is submitted, how it calculates the personality

Forums: 

Please help.

I need to know Which function is called when a personality quiz is submitted, how it calculated the personality. I am working on the one API where the question and answers will come as a request and I need to evealuate them and calculate the personality and return the personality on the front end.

 

I have retireved the questions, personality name and answers but how i do calculate the personality please let me know as there can be multiple personality wid the answer.

otacke's picture

Hi!

Personality Quiz does not report results. You'd have to implement the xAPI messaging. The source code is available at https://github.com/LumeniaAS/h5p-personality-quiz

Best,
Oliver

Hi Oliver

 

I didn't get your answer neither the link which you have shared. 

 

I want to know how personality quiz calculates it's output. Is it basis on the count ? What's the logic and which function of h5p is getting called

otacke's picture

Hi mohitbansal623!

There is no function that is called when completing a personality quiz. For retrieving the score automatically, you would need to use H5P's xAPI messaging system. Many content types use it to send the results (e.g. scores) to the host system (WordPress, moodle, etc.). However, the Personality Quiz doesn't support xAPI yet. You would have to add the required code.

If you want to find out how Personality Quiz computes the results, you would have to look at the source code. That's the link I sent you: https://github.com/LumeniaAS/h5p-personality-quiz.

Best,
Oliver

Thanks Oliver