Scenario 2

Your Code

    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( "cmi.
    " );

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

Code Example

    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( "cmi.time_limit_action" );

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