1
0
Fork 0
mirror of https://gitlab.com/kauron/jstudy synced 2024-11-13 07:33:44 +01:00

Test: don't show feedback on first question

This commit is contained in:
Carlos Galindo 2016-06-12 17:04:28 +02:00
parent 5d5e714b5e
commit 379505e630
Signed by: kauron
GPG key ID: 83E68706DEE119A3

View file

@ -25,7 +25,7 @@ public class TestController implements Initializable {
private HBox feedback; private HBox feedback;
private List<TestItem> list; private List<TestItem> list;
private int total, current; private int total, current = -1;
private int done = 0, errors = 0; private int done = 0, errors = 0;
@Override @Override
@ -77,6 +77,7 @@ public class TestController implements Initializable {
private void onSkipAction(ActionEvent event) { private void onSkipAction(ActionEvent event) {
feedback.setVisible(AppConfig.showFeedback); feedback.setVisible(AppConfig.showFeedback);
answer.setText(""); answer.setText("");
if (current == -1) feedback.setVisible(false);
int previous = current; int previous = current;
while (list.size() > 1 && current == previous) while (list.size() > 1 && current == previous)
current = (int) (Math.random() * list.size()); current = (int) (Math.random() * list.size());