Scenario 4


Your Code
// hasPrinted is initially set to false, when the user
// presses the Print button the variable is set to true.
var hasPrinted = false;

function setStatus(hasPrinted)
{
if(hasPrinted)
{
SetValue( "cmi.completion_status", " ");
}
else
{
SetValue("cmi.completion_status", " ");
}
}

Code Example
// hasPrinted is initially set to false, when the user
// presses the Print button the variable is set to true.
var hasPrinted = false;

function setStatus(hasPrinted)
{
if(hasPrinted)
{
SetValue( "cmi.completion_status", "completed");
}
else
{
SetValue("cmi.completion_status", "unknown");
}
}