Question about H5P Scoring


Hi, I'm working on a gamification project and am considering changing to h5p on WordPress by refactoring my existing games into h5p content packages. I have a couple questions about the scoring system of h5p, namely:

1. After the user finishes a question or the whole h5p game, how do I submit the scores to the server? Does h5p come with an xAPI verb that I can call? I may have overlooked but I can't find relevant information in the documentation.

2. Is it possible to record both the number of correct answers (i.e. number of questions/stages in a question set) and the number of retries, and then send them to the server? I would like to keep track of both so that for each of my games I can compute the average score for a user and even setup leaderboards based on this average.

Any help will be greatly appreciated! Please also let me know if you would like me to clarify things.

otacke's picture

1) The verb is usually "answered", but it could as well be "completed" if that better describes what the user experienced/did. The important part is the xAPI statement's result property.

2) You can extend xAPI statements with whatever properties and values you need, but your server endpoint/reporting feature/LRS will need to know how to process them in order to make use of them. The more you extend xAPI statements beyond the standard, the more effort it requires to make full use of them.

A LRS would not expect those two values to be put in extensions, but for computing the average simply retrieve the maximum possible score from the `result` property of an activity and divide it by the number of `answered` statements that it has recorded for an activity and user.