cmi.core.lesson_status
Syntax: LMSGetValue("cmi.core.lesson_status");
or LMSSetValue("cmi.core.lesson_status","browsed");
Responsibility: Joint between
the SCO and LMS.
Data: CMIVocabulary: must be
one of the following values:
-
passed: Necessary number of objectives in
the SCO were mastered, or the necessary score was achieved. Student
is considered to have completed the SCO and passed.
- completed: The SCO may or may note be passed, but all the elements
in the SCO were experienced by the student. The student is considered
to have completed the SCO. For instance, passing may depend on a certain
score known to the LMS system. The SCO knows the raw score, but not
whether that raw score was high enough to pass.
- failed: The SCO was not passed. All the SCO elements may or
may not have been completed by the student. The student is considered
to have completed the SCO and failed.
- incomplete: The SCO was begun but not finished.
- browsed: The student launched the SCO with a LMS mode of "browse"
on the initial attempt.
- not attempted: Incomplete implies that the student made an
attempt to perform the SCO, but for some reason was unable to finish
it. Not attempted means that the student did not even begin the SCO.
Maybe they just read the table of contents, or SCO abstract and decided
they were not ready. Any algorithm within the SCO may be used to determine
when the SCO moves from "not attempted" to "incomplete".
Description: This is the current
student status as determined by the LMS. Six status values are allowed,
as described above.
Example JavaScript (Write):
The following JavaScript changes the current lesson status to
"passed", if the assessment score is above 70; otherwise
it sets the status to "failed"
<script language="javascript">
if (assessmentScore >= 70) {
LMSSetValue("cmi.core.lesson_status",
"passed" );
}else{
LMSSetValue("cmi.core.lesson_status",
"failed");
}
</Script>
Example JavaScript (Read):
The following JavaScript reads the current lesson status
and the student's first name. If the student has not passed
the course, the student is reminded that they can take
the assessment quiz by clicking on the "please click
here to take the assessment quiz" link.
<script language="javascript">
function getFirstName() {
var studentName = LMSGetValue("cmi.core.student_name");
var nameS = studentName.split(",");
// separate the last and first
names
var lastName = nameS[0];
var firstName = nameS[1];
nameS = firstName.split(" ");
// separate the first name
from the middle initials
firstName = nameS[0];
return firstName;
}
var lessonStatus
= LMSGetValue("cmi.core.lesson_status");
var firstName = getFirstName();
var linkTag = "<a href = “assessment.html”>";
if ( lessonStatus != "passed" ) {
document.write(firstName + linkTag
+ " please click here to take the assessment quiz
</a>");
}else{
document.write(firstName + "
you have passed this lesson.");
}
</Script>
|