Scenario 1

Your Code

function determineCompletion()
{
var completionThreshold = GetValue( "cmi.
" );
if ( numberOfQuestionsAnswered >= completionThreshold )
{
SetValue( "cmi.completion_status", "
" );
}
else
{
SetValue( "cmi.
", "incomplete" );
}
}

Code Example

function determineCompletion()
{
var completionThreshold = GetValue( "cmi.completion_threshold" );
if ( numberOfQuestionsAnswered >= completionThreshold )
{
SetValue( "cmi.completion_status", "completed" );
}
else
{
SetValue( "cmi.completion_status", "incomplete" );
}
}