cmi.core._children

Syntax: LMSGetValue("cmi.core._children");

Responsibility: The LMS has the sole responsibility for this item.

Data: CMIString255 - A set of ASCII characters with a maximum length of 255 characters.

Description: The _children keyword is used to determine all of the elements in the core category that are supported by the LMS. If an element has no children, but is supported, an empty string is returned. If an element is not supported, an empty string is returned. A subsequent request for last error can verify that the element is not supported.

Example Javascript: The following JavaScript checks to see whether the optional metadata item "cmi.core.lesson_mode" is available on this LMS. If it is, then lessonMode is set to the value stored on the LMS, which is either "browse" "normal" or "review"; otherwise lessonMode is set to the default value "normal". See cmi.core.lesson_mode for a description of that item.

<script language="javascript">

var lessonMode = "";
var coreItems = LMSGetValue("cmi.core._children");
if (coreItems.indexOf("cmi.core.lesson_mode") != -1) {
    // cmi.core.lesson_mode is an optional metadata item
    // This LMS supports this item
    lessonMode = LMSGetValue("cmi.core.lesson_mode");
}else{
    lessonModel = "normal";
}


</script>