cmi.core.score.raw

Syntax: LMSGetValue("cmi.core.score.raw"); and LMSSetValue("cmi.core.score.raw", "85");

Responsibility: The SCO has the sole responsibility for this item, although initially the LMS should set this to and empty string.

Data: CMIDecimal or CMIBlank.

Description: This item is mandatory. That is, every SCORM LMS must support this item. This provides an indication of the performance of the student during his last attempt on the SCO. This score may be determined and calculated in any manner that makes sense to the SCO designer. For instance, it could reflect the percentage of objectives complete, it could be the raw score on a multiple choice test, or it could indicate the number of correct first responses to embedded questions in a SCO.

When the student is in their first attempt at a SCO, the cmi.core.score.raw should be set to an empty string. For additional attempts the cmi.core.score.raw item reflects what was recorded on the student's last previous attempt. If no cmi.core.score.raw was set in a SCO and a request for the cmi.core.score.raw as made by the SCO, then an empty string should be returned.

Example JavaScript (write): The following JavaScript writes an assessment score to the cmi.core.score.raw item.

<script language="javascript">

var assessmentScore = "100";
var coreItems = LMSGetValue("cmi.core.score._children");
if (coreItems.indexOf("cmi.core.score.raw") != -1) {
    // This LMS supports this item
    LMSSetValue("cmi.core.score.raw", assessmentScore);
}else{
   alert("LMS is not SCORM Complaint. It does not support cmi.core.score.raw.");
}


</script>

Example JavaScript (read): The following JavaScript reads an assessment score from the cmi.core.score.raw item.

<script language="javascript">

var assessmentScore = 0.0;
var emptyString = "";
var scoScore = LMSGetValue("cmi.core.score.raw");
if (scoScore != emptyString) {
    // Not first time in SCO
    var stringScore = LMSGetValue("cmi.core.score.raw");
    assessmentScore = stringScore.valueOf();
}


</script>