FONCTION JAVASCRIPT
Code : Tout sélectionner
function CheckAnswers(){
if (Locked == true){return;}
var Feedback = '';
var AllDone = DragEx.CheckAnswers();
Score = DragEx.Score;
if (Score < 0){Score = 0;}
if (AllDone == true){
Feedback = YourScoreIs + ' ' + Score + '%.<br/>' + CorrectResponse;
}
else {
if (TimeOver == true){
Feedback = YourScoreIs + ' ' + Score + '%.'
}
else{
Feedback = YourScoreIs + ' ' + Score + '%.' + '<br />' + IncorrectResponse;
}
}
ShowMessage(Feedback);
//If the exercise is over, deal with that
if ((AllDone == true)||(TimeOver == true)){
TimeOver = true;
Locked = true;
Finished = true;
WriteToInstructions(Feedback);
}
go();
//The window layout may be affected by the feedback, so
//put the cards in place again.
DragEx.SetInitialPositions(false);
}Code : Tout sélectionner
<button id="CheckButton1" class="FuncButton" style="cursor:pointer;" onclick="CheckAnswers()"> Valider </button>