Changed controllers to properly track right and wrong answers.

This commit is contained in:
Brad Corbett 2020-04-29 15:46:30 +01:00
parent cd083bcd1b
commit e670f7ca5c
2 changed files with 6 additions and 4 deletions

View file

@ -143,8 +143,6 @@ public class MatchTheMeaningController implements Initializable{
Question.checkAnswer(answer,listOfAnswers,isEnglish);
CorrectAnswer.setText(Integer.toString(Question.correctAnswers));
WrongAnswer.setText(Integer.toString(Question.wrongAnswers));
answer.clear();
AssessmentGenerator.goToNextQuestion();
@ -156,6 +154,8 @@ public class MatchTheMeaningController implements Initializable{
public void initialize(URL url, ResourceBundle resourceBundle) {
setWords(answer,orderList);
CorrectAnswer.setText(Integer.toString(Question.correctAnswers));
WrongAnswer.setText(Integer.toString(Question.wrongAnswers));
}
}

View file

@ -149,9 +149,7 @@ public class SixMeaningsController implements Initializable {
Question.checkAnswer(wordSet,answer,isEnglish);
correctAnswer.setText(Integer.toString(Question.correctAnswers));
wrongAnswer.setText(Integer.toString(Question.wrongAnswers));
wordSet.clear();
@ -163,6 +161,10 @@ public class SixMeaningsController implements Initializable {
@Override
public void initialize(URL url, ResourceBundle resourceBundle) {
setWords(isEnglish);
correctAnswer.setText(Integer.toString(Question.correctAnswers));
wrongAnswer.setText(Integer.toString(Question.wrongAnswers));
}