Scenario 2

Your Code

function determineCompletion( numQuestionsAnswered )
{
var completionThreshold = GetValue( "cmi.
" );
var scaledScore = GetValue( "cmi.score.scaled" );
if ( ( numQuestionsAnswered >= completionThreshold ) && ( scaledScore >= 0.6 ) )
{
SetValue( "cmi.completion_status", "
" );
}
else
{
SetValue( "cmi.
", "incomplete" );
}
}

Code Example

function determineCompletion( numQuestionsAnswered )
{
var completionThreshold = GetValue( "cmi.completion_threshold" );
var scaledScore = GetValue( "cmi.score.scaled" );
if ( ( numQuestionsAnswered >= completionThreshold ) && ( scaledScore >= 0.6 ) )
{
SetValue( "cmi.completion_status", "completed" );
}
else
{
SetValue( "cmi.completion_status", "incomplete" );
}
}