Scenario 2 continued

Multiple Choice (continued)

8. 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.1.", 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.1.", "");
  }
  else{
    // store the result, we only store that they got this question incorrect
     SetValue ("cmi.interactions.1.", "");
  }
}

Click Submit after you complete exercise 8.