Scenario 4

Your Code

var obj1Desc = GetValue( "cmi.objectives.0.
" );
var obj2Desc = GetValue( "cmi.objectives.1.
" );
var obj1Status = GetValue( "cmi.
.0.success_status" );
var obj2Status = GetValue( "cmi.objectives.1.
" );
if ( obj1Status == "failed" )
{
alert( "You did not master Objective 1: " +
);
}
else if ( obj1Status == "passed" )
{
alert( "You did master Objective 1: " + obj1Desc );
}
if ( obj2Status == "failed" )
{
alert( "You did not master Objective 2: " + obj2Desc );
}
else if ( obj2Status == "passed" )
{
alert( "You did master Objective 2: " + obj2Desc );
}

Code Example

var obj1Desc = GetValue( "cmi.objectives.0.description" );
var obj2Desc = GetValue( "cmi.objectives.1.description" );
var obj1Status = GetValue( "cmi.objectives.0.success_status" );
var obj2Status = GetValue( "cmi.objectives.1.success_status" );
if ( obj1Status == "failed" )
{
alert( "You did not master Objective 1: " + obj1Desc );
}
else if ( obj1Status == "passed" )
{
alert( "You did master Objective 1: " + obj1Desc );
}
if ( obj2Status == "failed" )
{
alert( "You did not master Objective 2: " + obj2Desc );
}
else if ( obj2Status == "passed" )
{
alert( "You did master Objective 2: " + obj2Desc );
}