using xAPI in Moodle
Submitted by ririgg12345 on Sat, 05/22/2021 - 17:48
Forums:
Hello, I wrote a library for my own content type, I have not used any other libraries, but I have a problem connecting my own content type in Moodle. My content type started successfully, but I would like to receive the results of the assignments and display them in Moodle in the list with grades. As I understand it, xAPI is used for this.
Initially, to work with xAPI, I inherited the event dispatcher, and added a listener for my library in the following way:
let self = this; EventDispatcher.call(self); self.on('xAPI', function(event) { console.log(event.data.statement); });also i added triggerXAPIScored to set the result:
self.triggerXAPIScored(5, 10, "success", true, true); But I don't know what to do next, how to transfer student achievement data to Moodle from my h5p. Do I need to install any plugins to work with xAPI in Moodle?
otacke
Mon, 05/24/2021 - 09:42
Permalink
Hi!You'll have to implement
Hi!
You'll have to implement the getXAPIData function described at https://h5p.org/documentation/developers/contracts in order to add reporting beyond just the score.
Best,
Oliver