Time stamps / Tracking learning Time

Hello,

i develope some e-learning courses by using the different methods of H5P in wordpress.

For our project it is important to track the learning time of each user.

Does anyone has an idea which way / which xAPI Data could be useful? I ve already installed the xAPI Tin can.

I would be happy to hear some ideas or how you track the learning time of your users?

Thanks for your response!
Lisa

Content types: 
otacke's picture

Hi Lisa!

The result property of the xAPI "answered" statements contains a value for the duration (time until the "answered" statement was triggered - see https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Data.md#durations for details.

Best,

Oliver 

Hi Oliver,

thanks for your help!

which statement triggers the "start" of the duration? The "end" time is the "answered" but i dont get whats the start time? (I get for example PT1432.2S -> 23,8minutes bur i only used the H5P modul for 3minutes).

Thank you!

Best, Lisa

otacke's picture

Hi Lisa!

The duration is computed in https://github.com/h5p/h5p-php-library/blob/4599291d7ce0cfb90edd188b181416f31514748e/js/h5p-x-api-event.js#L56 and compares the current time with the time the activity was "started". Here "started" usually means when the content type's view was attached to the DOM. Most question-like content types extend H5P.Question which calls the respective H5P core function to set the start time in https://github.com/h5p/h5p-question/blob/828196caf72241adb83eafb5d9dbd65c27afcbd2/scripts/question.js#L1574. Some content types may call this function on their own.

Best,
Oliver