Is there a way to see the "cmi.core.total_time" value in a course? Jan 26, 2024 By DIGIK Digital Knowledge Hi, Is there a way to see the "cmi.core.total_time" value in a course? Maybe with javascript? The idea is to create a rule for the course to only execute the trigger complete, after a certain time has pass, for example 1 hour. Plus, it would be great for the time to keep counting while the window is minimized or PC is in screensaver. Thanks
DIGIK Digital Knowledge Author 3 months ago01/31/24 at 3:56 pm (UTC) Ok i figure out how to see the "cmi.core.total_time". var lmsAPI = parent;var Tempo = lmsAPI.GetPreviouslyAccumulatedTime();var player = GetPlayer();player.SetVar('tempo',Tempo); But now i need to see this value update during the course. Any thoughts? I tried to send the lmsAPI.SaveTime during the course and them execute the code above, but is doesn't seem to work. var lmsAPI = parent;var player = GetPlayer();lmsAPI.SaveTime();
DIGIK Digital Knowledge Author 3 months ago01/31/24 at 5:42 pm (UTC) maybe a way to read the cmi.core.session_time?
2 Replies
Ok i figure out how to see the "cmi.core.total_time".
var lmsAPI = parent;
var Tempo = lmsAPI.GetPreviouslyAccumulatedTime();
var player = GetPlayer();
player.SetVar('tempo',Tempo);
But now i need to see this value update during the course.
Any thoughts?
I tried to send the lmsAPI.SaveTime during the course and them execute the code above, but is doesn't seem to work.
var lmsAPI = parent;
var player = GetPlayer();
lmsAPI.SaveTime();
maybe a way to read the cmi.core.session_time?