Scenario 1 continued

True/False (continued)

4. The following code validates the user´s interaction. Identify the dot-notation for the result:

function validate(answer, correctAnswer){
  // store the learner´s answer
   SetValue ("cmi.interactions.0.", answer);

  //check to see if user's answer is correct
  if( answer == correctAnswer ){
    //store the result, we store that they got this question correct
     SetValue("cmi.interactions.0.", "");
  }
  else{
    // store the result, we only store that they got this question incorrect
     SetValue ("cmi.interactions.0.", "");
  }
}

Click Submit after you complete exercise 4.