• Resolved wvdploeg

    (@wvdploeg)


    I embedded an interactive video, but the xapi messages do not show up in the logging.

    Also, in the settings page the checkboxes to activate a specific plugin are read online. Tested it on several browsers.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author otacke

    (@otacke)

    Hi @wvdploeg!

    Where are you embedding the video from? You cannot track xAPI statements from H5P content that’s not hosted by your own WordPress instance. Where are you having a look?

    If you’re including H5P content from your own WordPress instance, please check the Javascript error console for errors – it’s usually opened by pressing F12. Also, you might want to check your server’s PHP error log.

    Best,
    Oliver

    Plugin Author otacke

    (@otacke)

    Hi @wvdploeg

    I’d really love to fix this, but I need some more information. As far as I can see, on your site there are no JavaScript errors. You seem to have activated the debugging option of the plugin, and there’s debug output which tells me that the xAPI statements are in fact caught, but then they must get stuck somewhere in the backend – and I cannot access your PHP error log, of course. Hope you can provide me with more info.

    Best,
    Oliver

    Plugin Author otacke

    (@otacke)

    Hi @wvdploeg

    Do you still require assistance? See post above …

    Best,
    Oliver

    Thread Starter wvdploeg

    (@wvdploeg)

    Yes, sorry, I was busy with a different project…

    The error log does not show anything.

    Next step I’m going to try is to eliminate the possibility it has anything to do with the environment and place the same site on a completely different server.

    The most important thing however what seems to be wrong, is that in the back end the check box for the H5P content is read only. I think this is actually the real cause of the problem

    https://slf.wordxpression.nl/wp-content/uploads/2020/01/h5p-problem.png

    Plugin Author otacke

    (@otacke)

    @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.

    Plugin Author otacke

    (@otacke)

    Hi @wvdploeg

    Just checking up. Have you found some time to try the changes that I suggested above or would you like to wait until I come around to adding a dedicated debug mode for PHP?

    Best,
    Oliver

    Plugin Author otacke

    (@otacke)

    Hi @wvdploeg !

    I just released version 0.4.1. The mechanism itself has not changed, but I made some of the error messages a little more verbose. Maybe that helps.

    Best,
    Oliver

    Plugin Author otacke

    (@otacke)

    Closing this now due to lack of response.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘The messages do not register’ is closed to new replies.