Cmi.total_time parameter returns nothing

I am programming a SCORM 2004 product. I can update session_time, it works. I can set the status (passed, failed, etc.) I can also get cmi.location time. No problems!

But I can’t get the total time! (Cmi.total_time). I tested 2 LMS:

  • In Ganesha, API.GetValue ('cmi.total_time') is an empty string.

  • In the Moodle API.GetValue ('cmi.total_time') is just a "P".

However, I have the correct logs with the correct session time.

Does anyone have an idea?

Thanks!

EDIT. I also try on cloud.scorm.com and cmi.total_time returns PT0H0M0S every time. EDIT2. Ooops I deleted the editing of Donal.

+4
source share
2 answers

Based on the information you provided, I assume that you are trying to set cmi.session_time and get cmi.total_time in the same student session that would not give the answer you are expecting.

cmi.total_time contains the total duration of all student sessions until the current one , which means that it will not contain the value that you expect from it until the second lesson.

After you set cmi.session_time , close the current student session, leaving SCO where you are, and then return to it. Then you should see that cmi.total_time now filled with a valid value.

Good luck

+3
source

When you resume the second session and try to get the total time, can you get the value that you saved for cmi.location in the first session? If not, then you probably are not pausing the session. For the data to be available in the next run, you need to install cmi.exit to pause until the end of the first session.

Mike

0
source

Source: https://habr.com/ru/post/1312094/


All Articles