Scenario 3

Your Code
// currentSection - string. It holds the name of the section the learner is currently viewing
// animationFinished - boolean. It´s default value is set to false. It is set to true when the animation finishes playing
function setStatus( currentSection, animationFinished)
{
if( currentSection == "introduction" )
{
SetValue( "cmi.completion_status", "
" );
}
else if( currentSection == "animation" && !animiationFinished )
{
SetValue( "cmi.
", "
" );
}
else if( currentSection == "summary" || animationFinished )
{
SetValue( "cmi.
", "
" );
}
}
Code Example
// currentSection - string. It holds the name of the section the learner is currently viewing
// animationFinished - boolean. It´s default value is set to false. It is set to true when the animation finishes playing
function setStatus( currentSection, animationFinished)
{
if( currentSection == "introduction" )
{
SetValue( "cmi.completion_status", "not attempted" );
}
else if( currentSection == "animation" && !animiationFinished )
{
SetValue( "cmi.completion_status", "incomplete" );
}
else if( currentSection == "summary" || animationFinished )
{
SetValue( "cmi.completion_status", "completed" );
}
}