setting actor in a xApi statement
Submitted by alaskTester on Mon, 08/15/2016 - 11:50
Hello,
we have an own developed LMS and want make use of h5p controls. We host h5p on an external wordpress server. Our students will click on these external links. How can we tell h5p to take the user account of our students in the xApi statement?
Best regards
thomasmars
Tue, 08/16/2016 - 09:20
Permalink
Hi,
The H5P plugin on your wordpress server will automatically set actor as current user on the wordpress server, so if the students are logged in on the wordpress server the actor should be correct without any changes. If this is not the case, one way to make sure that the actor is correct, is to intercept the xAPI statement before sending it to the LMS, then change the actor to the correct student object, before finally sending it off to the LMS. Let me know how this works out for you
Best regards, Thomas
thomasmars
Tue, 08/16/2016 - 09:20
Permalink
If you want to have a look at
If you want to have a look at how this is done in the H5P core, check out https://github.com/h5p/h5p-php-library/blob/master/js/h5p-x-api-event.js#L181
alaskTester
Tue, 08/16/2016 - 12:48
Permalink
Thank you Thomas.Our student
Thank you Thomas.
Our student don't have wordpress account, so an idea would be to send the student id as request paramter of the wordpress url and then extend the h5p js code to use the studentID to set localStorage.H5PUserUUID
Best regards