Spaces:
Sleeping
Sleeping
Mandatory test
Browse files
app.py
CHANGED
@@ -15,11 +15,12 @@ test = Test()
|
|
15 |
|
16 |
|
17 |
def question_interface(question_state, answer):
|
18 |
-
question_state["value"]
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
question_state["responses"].append(answer)
|
|
|
23 |
|
24 |
# Check if all questions have been answered
|
25 |
if current_question_index == len(test):
|
|
|
15 |
|
16 |
|
17 |
def question_interface(question_state, answer):
|
18 |
+
if (question_state["value"] == -1):
|
19 |
+
question_state["value"] += 1
|
20 |
+
elif (answer is not None):
|
21 |
+
question_state["value"] += 1
|
22 |
question_state["responses"].append(answer)
|
23 |
+
current_question_index = question_state["value"]
|
24 |
|
25 |
# Check if all questions have been answered
|
26 |
if current_question_index == len(test):
|