Scenario 5 continued

Your Code:
function validate(answer, min, max){
// store the learner´s answer
SetValue ("cmi.interactions.4.
", answer);
//check to see if user's answer is correct
if( answer <= max && answer >= min ){
SetValue("cmi.interactions.4.
", "
");
}
else{
SetValue ("cmi.interactions.4.
", "
");
}
}
Code Example:
function validate(answer, min, max){
// store the learner´s answer
SetValue ("cmi.interactions.4.learner_response", answer);
//check to see if user's answer is correct
if( answer <= max && answer >= min ){
SetValue("cmi.interactions.4.result", "correct");
}
else{
SetValue ("cmi.interactions.4.result", "incorrect");
}
}