Scenario 4

The SCO in this scenario consists of a four-step process for printing a Word document. Once the learner clicks print in Step 3, the SCO is considered passed. If the learner only makes it through Steps 1 and 2, then the SCO Success Status is considered failed.
Complete the dot-notation needed to set the appropriate success status:

//initialize a global variable to track whether the learner has clicked print or not
var printed = false;
//call this function when the print button is pressed
function onPrintClick ()
{
//print the document
printed = true;
SetValue ( "cmi.success_status", "" );
}
//use this function anytime a learner quits the SCO
function onExit()
{
//check to see if they printed the document
if( !printed )
{
SetValue ( "cmi.success_status", "" );
}
}
Click after completing the code.