Time stamps / Tracking learning Time
Submitted by lsuesslin on Fri, 05/21/2021 - 12:24
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!
Fri, 05/21/2021 - 20:27
Hi Lisa!The result property
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.
Tue, 05/25/2021 - 09:28
Hi Oliver,thanks for your
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).
Tue, 05/25/2021 - 10:43
Hi Lisa!The duration is
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.