Totara SCO total time

Sep 01, 2021

Hi all,

We are using Totara v12, and we have a report that shows SCO total time which is super helpful. Most of the records are displaying correctly like 00:08:36.12 meaning the user spent 8 mins and 36.12 seconds. However, there are records like 'PT3M26.36S' I can understand that it is saying 3M (mins) 26.36S (secs) but why these records are displaying in another format with "PT" at the beginning? Anyone has an answer to that?

Thanks

Anthony

7 Replies
Learning Solutions

Hi Renz,

Does it mean the record showing as "00:08:36.12" from the screenshot attached indicates the user was in the package in one session for 8 minutes and 36.12 seconds? And the record showing as "PT2H40M1.73S" indicates the user was in the package multiple sessions for a total of 2 hours 40 mins and 1.73 seconds?

Also, the time showing as cmi.session_time or cmi.core.total_time does not relate to their completion?

Thank you very much!

Best regards

Anthony

Renz Sevilla

Hi Anthony!

Correct, that looks like your LMS is noting the multiple sessions (PT) and totaling them before completion.

The two API values indicate the time for the current attempt/session. Your LMS may interpret the total time as a sum of these or the last total attempts at successful completion. You may confirm with your LMS how these are recorded for completion.

For reference and other users:

cmi.core.total_time
 (CMITimespan, RO) Sum of all of the learner’s session times accumulated in the current learner attempt

cmi.core.session_time (CMITimespan, WO) Amount of time that the learner has spent in the current learner session for this SCO

Andrew Metcalfe

I have a current, related issue while reporting SCO total time across our LMS (Moodle/Totara) which appears to report SCO total time just as the SCO SCORM driver presented it. We have a mixture of SCORM1.2 and SCORM2004 all built with Storyline and Rise. SCORM1.2 SCO total time is recognised as a time format by excel, so can be totalled, pivottabled etc.

However, the SCORM2004 are reported in a distorted version of the SCORM2004 elapsed time format (PTxxHxxMxx.xxS) - see examples below. Clearly, Excel cannot understand this and I'm not entirely sure this format should be externalised by the Storyline driver.

I have a couple of questions. I haven't snooped the browser traffic on this but have the LMS SCO log. Is it absolutely necessary for the Articulate driver to return this format? Wouldn't a conventional hh:mm:ss.0 format make more sense?
If it is absolutely necessary to externalise the SCORM2004 time format, how about a SCORM2004 compatible fixed width format such as xxHxxMxx.xxS, so it can be easily parsed via Excel or other simple tools?

For example - these are SCO total times reported by Storyline SCORM2004 objects:

  • PT34.93S (in my opinion could read PT00H00M34.93S)
  • PT6.78S (in my opinion could read PT00H00M06.78S)
  • PT8M (in my opinion could read PT00H08M00.00S)
  • PT1H30.92S (in my opinion could read PT01H00M30.92S)

If there's a Storytime hidden setting to report SCO2004 time conventionally, please let me know. If somebody has built an Excel formula or VBA to decode this, I'd love a copy please. If I'm incorrect in my assumptions, please also advise.

In a mixed-format LMS scenario, these time format variations are painful. Respectfully, the SCORM2004 format as implemented, compounds that obstruction.

Thank you
-Andrew

Alyssa Gomez
Hi Andrew! 
 
That timestamp is a special SCORM 2004 formatted timestamp, and time intervals must be sent to the LMS that way to meet SCORM 2004 specifications. 
 
However, our team created an Excel formula for you that can parse the timestamp into a "standard" format of XXHXXMXX.XXS! This should make easier to parse time interval data sent from SCORM 2004 content.
 
The attached demo worksheet includes the "Combined" formula that allows for single-cell parsing of SCORM's PT time format to a XXHXXMXX.XXS format. It also splits out the formula into it's component parts, in the event you want to make any adjustments. The entire formula is as follows, with A2 being the cell that contains the PT timestamp.
=CONCATENATE(IF(ISERR(FIND("H",A2)),"00H",IF(FIND("H",A2)-FIND("T",A2)=2,CONCATENATE("0",LEFT(REPLACE(A2,1,2,""),FIND("H",REPLACE(A2,1,2,""),1))),LEFT(REPLACE(A2,1,2,""),FIND("H",REPLACE(A2,1,2,""),1)))),IF(ISERR(FIND("M",A2)),"00M",IF(ISERR(FIND("H",A2)),IF(FIND("M",A2)-FIND("T",A2)=2,CONCATENATE("0",MID(A2,FIND("T",A2)+1,FIND("M",A2)-FIND("T",A2))),MID(A2,FIND("T",A2)+1,FIND("M",A2)-FIND("T",A2))),IF(FIND("M",A2)-FIND("H",A2)=2,CONCATENATE("0",MID(A2,FIND("H",A2)+1,FIND("M",A2)-FIND("H",A2))),MID(A2,FIND("H",A2)+1,FIND("M",A2)-FIND("H",A2))))),IF(ISERR(FIND("M",A2)),IF(LEN(A2)-FIND("T",A2)=2,CONCATENATE("0",RIGHT(A2,LEN(A2)-FIND("T",A2))),RIGHT(A2,LEN(A2)-FIND("T",A2))),IF(LEN(A2)-FIND("M",A2)=2,CONCATENATE("0",RIGHT(A2,LEN(A2)-FIND("M",A2))),RIGHT(A2,LEN(A2)-FIND("M",A2)))))
Andrew Metcalfe

Alyssa, thank you very much, I'll try the excel method asap.

I ended up exporting the mixed report (SCORM1.2 and SCORM2004 format) and processed it with a Python script using regex. If anyone's interested in the regex I used, here they are, one for each SCORM type in my report. The SCORM2004 definition allows for crazy data however the regex is simplified due to Articulate's good sense in using it.

SCORM2004 format issued by articulate
r'P(?:(?P<days>(?:\d+D))?T(?P<hrs>(?:\d+H))?(?P<mins>(?:\d+M))?(?P<secs>(?:\d+(?:\.\d{1,2})?S)?))?'

scorm1.2 format issued by articulate
r'(?:(?P<hrs>(?:\d{2})):(?P<mins>(?:\d{2})):(?P<secs>(?:\d{2}\.\d{2})))'

hrs/mins/secs can then be processed into total seconds or whatever.

Thank you Alyssa!