I am programming a SCORM 2004 product.
I can update the session_time, it works.
I can set the status (passed, failed, etc…)
I also can get the cmi.location time. No problems !
But I don’t succeed to get the total time ! (cmi.total_time).
I have tested on 2 LMS :
-
On Ganesha the API.GetValue(‘cmi.total_time’) is an empty string.
-
On Moodle the API.GetValue(‘cmi.total_time’) is just a “P”.
However i do have the correct logs with correct session times.
Anybody have an idea ?
Thank you !
EDIT.
I also try on cloud.scorm.com and cmi.total_time returns each time PT0H0M0S.
EDIT2. Ooops I deleted Donal’s edit.
Based upon the information you’ve provided, I’m guessing that you’re trying to set
cmi.session_timeand getcmi.total_timein the same learner session, which wouldn’t give the response you’re expecting.cmi.total_timecontains the total duration of all learner sessions prior to the current one, meaning that it won’t contain the value you’d expect it to have until the second learner session.Once you’ve set
cmi.session_time, close the current learner session by leaving the SCO you’re on, and then coming back to it. You should then see thatcmi.total_timeis now populated with a valid value.Good Luck!