Scenario 3

In this scenario, the project requirements define the following:

A SCO consists of an assessment with seven tasks that must be completed in two minutes. If the learners do not accurately complete the assessment within the allowable timeframe, then they will not have successfully completed the assessment. However, they will be permitted to continue through the assessment for practice. Once two minutes have been reached, the following message will appear:

You did not successfully complete the tasks within two minutes. Please continue through the assessment to practice the process.

Complete the code below:

    var message = "You did not successfully complete the tasks
                   within two minutes.  Please continue through
                   the assessment to practice the process.";

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

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

Click after you complete this exercise.