H5PPlayerUI: How can I know when a user has completed or finished an H5P content through the onxAPIStatement event? #2451
Replies: 2 comments
-
I haven't done much with the xAPI statements so far. In general the way the H5P content types use xAPI is not very consistent. I think you'll have to figure it out by either looking at the code of the content types or by trying it out. If interactive book emits an xAPI statement when it was completed, you should be able to identify it by the fact that it doesn't have a subcontent id. But as I've said, I don't know if interactive book uses xAPI properly. |
Beta Was this translation helpful? Give feedback.
-
After some research, I found that there is a button on the interactive book summary screen to submit the results, when the user clicks on it, the completion event is fired. I had to customize the library to be able to enable that button because there is no way to show it through the content settings; by default it is hidden. In general, it would be nice to have documentation about the xAPI events for each h5p content type since the behavior is usually different for each library. |
Beta Was this translation helpful? Give feedback.
-
I have reviewed the statements that are issued through the onxAPIStatement method of the H5PPlayerUI component (React). How can I know the final score and the score of the sub-contents of an Interactive Book?
I detected that statements are issued when the sub-contents of an interactive book are completed, sometimes statement.verb.id is equal to http://adlnet.gov/expapi/verbs/answered and sometimes it is equal to http://adlnet.gov /expapi/verbs/completed. In some cases statement.result has a value and in others it doesn't. Is there any documentation I can refer to for this?
How can I know when an interactive book has been completed? I can't catch an event when completing the last content.
Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions