Forum Discussion
Is there a way to see the "cmi.core.total_time" value in a course?
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
- FernandoFerroCommunity Member
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(); - FernandoFerroCommunity Member
maybe a way to read the cmi.core.session_time?