Scenario 2

In this scenario, the project requirements define the following:

A SCO consists of an assessment with five tasks that must be completed in 50 seconds. If the learner does not accurately complete the assessment within the allowable timeframe, then the following message will appear:

You did not accurately complete the order within 50 seconds. Please review how to place an order before attempting this assessment again.

Complete the code below:

    var message=”You did not accurately complete the order within 50 seconds.
                 Please review how to place an order before attempting this
                 assessment again.”;

    function startContent()
    {
       // code to start an internal timer
       startTimer();
       var timeLimitAction = GetValue( "cmi." );

       // currentElapsedTime is a variable that is set during the startTimer() function
       if ( currentElapsedTime > 50 )
       {
          if ( timeLimitAction == ",message" )
          {
             alert( message );
             // exit SCO
          }
       }
    }

Click after you complete this exercise.