Communication with Moodle Gradebook


Hi Guys,

I started to create a own Content-Type with H5P and now i want that this one can store data into the Moodle gradebook. So like the normal multiple choice questions store the result of the students in the Gradebook. But I don't know how the communication between H5P and the Gradebook API from moodle works.

Can somebody help me?


Cheers landa

BV52's picture

Hi Landa,

Welcome to H5P!


H5P emits data in the form of xAPI statements and you will need a plugin or custom code to listen to these statements and a data store such as a learning record store to save them in. Furthermore the H5P contents that are included in courses has a built in code that sends the scores to the Moodle's Gradebook.


I highly recommend looking through these documentation:



Hi BV52,

thank you for helping me. Do you know where the "built in code" that sends the scores to the Moodle's Gradebook is located?
best regards


tim's picture

Hi Landa, 

H5P is completely open source and all our code is hosted under the H5P organization on Github:

Here's the code for the Moodle plugin:

And more specifically, here's the code that connects to the gradebook:

So, Moodle reads and register H5P results through GradeBook. :)