@wvdploeg
Nah, the latter is completely fine. Have you tried removing the tick at “Capture the xAPI statements of all H5P content types”? ??
The browser’s part is close to done, so I assume some server side issue is more likely. You could try to replace the function at https://github.com/otacke/h5pxapikatchu/blob/master/js/h5pxapikatchu-listener.js#L37-L46
with
var sendAJAX = function( wpAJAXurl, xapi ) {
H5PxAPIkatchu.jQuery.ajax({
url: wpAJAXurl,
type: 'post',
data: {
action: 'insert_data',
xapi: JSON.stringify( xapi )
},
success: function( data, textStatus, jqXHR ) {
if ( '1' === H5PxAPIkatchu.debugEnabled ) {
console.log('success:', data, textStatus, jqXHR);
}
},
error: function( jqXHR, textStatus, thrown ) {
if ( '1' === H5PxAPIkatchu.debugEnabled ) {
console.log('error:', jqXHR, textStatus, thrown);
}
}
});
};
This might shed some more light onto possible problems with communicating with the server. The JavaScript debug output should now either display a success message or an error message after trying to send the result to the server.
It’s possible of course, that something fails silently on your server. I’ll add some optional PHP debug logging when I come around to it.