otacke / h5pxapikatchu

WordPress plugin to store xAPI statements emitted by H5P
MIT License
10 stars 6 forks source link

Export in JSON format #19

Closed lwbaqueros closed 3 years ago

lwbaqueros commented 3 years ago

Hi Is it possible to export the data in a JSON file instead of CSV file?

otacke commented 3 years ago

@lwbaqueros Currently not, but you can use the h5pxapikatchu_insert_data_xapi filter to retrieve the xAPI statement (which is a JSON object) and process it further.

lwbaqueros commented 3 years ago

Thanks, @otacke, for your response and plugin. If I understood correctly, I have to check this option: image and then I can use the data displayed in the xAPI column (in the csv file), which will contain the info in the JSON format.

By the way, and sorry to ask by this means, but It seems that WP does not support more the plugin you recommended for sending the xAPI statements to an LRS WP-H5P-xAPI. do you know another way to accomplish it?

otacke commented 3 years ago

@lwbaqueros That's one way, yes. But I was referring to the action/filter system that WordPress provides. It allows you to hook into function performed by plugins and process and do your own things without the need to change the original code. Some people do that to get the data directly instead of downloading them via the export button. Please cmp. https://github.com/otacke/h5pxapikatchu/pull/14 for instance.

The wp-h5p-xapi plugin can still be obtained from https://github.com/tunapanda/wp-h5p-xapi, but it doesn't seem to be maintained anymore (despite some flaws) and that's why it was unlisted from the WordPress plugin repository.

lwbaqueros commented 3 years ago

Thanks. I think that is what I need.