cmi.core.exit

Syntax: LMSSetValue("cmi.core.exit","logout");

Responsibility: The SCO has the responsibility for maintaining this item. It indicates to the LMS the reason why the student last left the SCO.

Data: CMIVocabulary: Either "time-out", "logout", "suspend", or and empty string.

Description: An indication of how or why the student left the SCO.

Example Javascript: The following JavaScript sets cmi.core.exit to time-out when the total elapsed time in the current instance of the SCO exceeds 30 minutes.

<script language="javascript">

var sessionTime
= LMSGetValue("cmi.core.session_time");
var splitTime = sessionTime.split(":");
var totalHours = splitTime[0];
var totalMinutes = splitTime[1];
if (totalHours > 0 || totalMinutes > 30) {
    // Student has spent over 30 minutes in this SCO
    alert("You have exceeded the 30 minute time limit for this lesson. You will now be transferred to the next lesson.");
LMSSetValue("cmi.core.exit","time-out");
LMSFinish();
}


</script>