< Previous | Contents | Next >
4.2.21. Session Time
The cmi.session_time data model element is the amount of time that the learner has spent in the current learner session for this SCO. If no learner session is in progress, then the session time is the time the learner spent in the last learner session for this SCO [1].
If the SCO is going to track cmi.session_time, the SCO determines the value and meaning of cmi.session_time. Examples:
1. The SCO may not start recording session time until after it has initialized a media segment.
2. If the learner takes a break in the learner session, then the break time may or may not be included in the reported cmi.session_time [1].
The SCO should be responsible for tracking any and all times. This includes implementations of internal time clocks for recording such times.
Table 4.2.21a: Dot-notation Binding for the Session Time Data Model Element
Dot-Notation Binding | Details |
cmi.session_time | Data Model Element Implementation Requirements: Data Type: timeinterval (second,10,2) - a time interval with resolution to 0.01 seconds Format: Refer to Section 4.1.1.7: Data Types for more information on the requirements for the format of the timeinterval (second,10,2) data type. LMS Behavior Requirements: The data model element is mandatory and shall be implemented by an LMS as write-only. Since this data model element is implemented by the LMS as write-only, the LMS is not responsible for initializing this data model element. It is the responsibility of the SCO to manage this value. The LMS is only responsible for accepting a SetValue() call to this data model element and perform the accumulation with cmi.total_time. Since a SCO is not required to set a value for this data model element (not required to keep track of the session time), an LMS shall keep track of session time from the time the LMS launches the SCO. If the SCO reports a different session time, then the LMS shall use the session time as reported by the SCO instead of the session time as measured by the LMS. If there are additional learner sessions within a learner attempt, the cmi.session_time becomes uninitialized at the beginning of each additional learner session within the learner attempt. SCO Behavior Requirements: The data model element is required to be implemented by the LMS as write- only. The SCO is only permitted to store the value of the cmi.session_time data model element. |
Dot-Notation Binding | Details |
A SCO is permitted, in a single communication session, to perform multiple sets of session time (cmi.session_time). SCO developers should be aware of the fact that when the SCO issues the Terminate(“”) or the user navigates away, the LMS shall take the last cmi.session_time that the SCO set (if there was one set) and accumulate this time to the cmi.total_time. API Implementation Requirements: GetValue(): If the SCO invokes a request to get the cmi.session_time, then the LMS shall set the error code to 405 – Data Model Element Is Write Only and return and empty characterstring (“”). SetValue(): This request sets the cmi.session_time to the supplied value. The supplied value shall meet the Data Model Element Implementation Requirements defined above. If the supplied value is correctly formulated, then the LMS shall set the value, return “true” and set the error code to 0 - No Error. o If the supplied value does not meet the Data Model Element Implementation Requirements identified above, then the LMS shall set the error code to 406 - Data Model Element Type Mismatch and return “false”. The LMS shall not alter the state of the data model element based on the request. Additional Behavior Requirements: This value is used to keep track of the time spent in a SCO for a learner session. The LMS shall use this value in determining the cmi.total_time. A SCO is able, in a single learner session, to perform multiple sets (SetValue()) of the cmi.session_time. When the SCO issues the Terminate(“”) or the user navigates away, the LMS shall take the last cmi.session_time that the SCO set (if there was a set) and accumulate this time to the cmi.total_time. Upon subsequent launch of the SCO in the same learner attempt, and a GetValue() call for cmi.total_time, the LMS shall return the accumulated time. LMSs shall not accumulate the multiple session times sent via the SetValue() request. If multiple calls to SetValue() for cmi.session_time are made, then the LMS shall internally keep track of the various session times and only use the last value set when persisting the cmi.session_time. Example: SetValue(“cmi.session_time”,”PT1H5M”) |