This repository was archived by the owner on Mar 25, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -94,8 +94,8 @@ public QuestionReponse next() {
94
94
return facade .next (pseudo , idQuestionnaire );
95
95
}
96
96
97
- public void validerQuestion (String reponse ) {
98
- facade .validerQuestion (pseudo , idQuestionnaire , reponse );
97
+ public void validerQuestion (String reponse , int id ) {
98
+ facade .validerQuestion (pseudo , id , reponse );
99
99
}
100
100
101
101
public void goToQuestion () {
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ public class Question {
28
28
public ComboBox <String > listeReponse ;
29
29
30
30
private Controleur monControleur ;
31
+ private int id ;
31
32
32
33
33
34
public static Question creer (Stage laStageUnique ) {
@@ -51,20 +52,29 @@ public void show() {
51
52
}
52
53
53
54
55
+ public int getId () {
56
+ return id ;
57
+ }
58
+
59
+ public void setId (int id ) {
60
+ this .id = id ;
61
+ }
62
+
54
63
public void setMonControleur (Controleur monControleur ) {
55
64
this .monControleur = monControleur ;
56
65
}
57
66
58
67
public void chargerQuestion () {
59
68
QuestionReponse questionReponse = monControleur .next ();
60
69
question .setText (questionReponse .getQuestion ());
70
+ setId (questionReponse .getIdQuestion ());
61
71
numero .setText ("Question " + questionReponse .getIdQuestion ());
62
72
listeReponse .getItems ().clear ();
63
73
listeReponse .getItems ().addAll (questionReponse .getReponsesPossibles ());
64
74
}
65
75
66
76
public void validerReponse (ActionEvent actionEvent ) {
67
- monControleur .validerQuestion (listeReponse .getSelectionModel ().getSelectedItem ());
77
+ monControleur .validerQuestion (listeReponse .getSelectionModel ().getSelectedItem (), id );
68
78
if (monControleur .hasNext ()) {
69
79
chargerQuestion ();
70
80
} else {
You can’t perform that action at this time.
0 commit comments