Sina Media Lab
commited on
Commit
·
0446125
1
Parent(s):
597bdbe
Updates
Browse files
app.py
CHANGED
@@ -187,6 +187,7 @@ if submit_button and st.session_state.button_label == "Submit":
|
|
187 |
|
188 |
# Show correct/incorrect feedback and explanation
|
189 |
st.session_state.button_label = "Next Question"
|
|
|
190 |
|
191 |
# Show correct/incorrect feedback after submission
|
192 |
if current_question.get('answered', False):
|
@@ -206,10 +207,3 @@ if current_question.get('answered', False):
|
|
206 |
|
207 |
# Change the button label immediately after showing the solution
|
208 |
st.session_state.button_label = "Next Question"
|
209 |
-
|
210 |
-
# Handle "Next Question" action after submission
|
211 |
-
if submit_button and st.session_state.button_label == "Next Question":
|
212 |
-
new_question = generate_new_question(selected_module, modules[selected_module])
|
213 |
-
st.session_state.questions.append(new_question)
|
214 |
-
st.session_state.current_index = len(st.session_state.questions) - 1
|
215 |
-
st.session_state.button_label = "Submit"
|
|
|
187 |
|
188 |
# Show correct/incorrect feedback and explanation
|
189 |
st.session_state.button_label = "Next Question"
|
190 |
+
st.experimental_rerun()
|
191 |
|
192 |
# Show correct/incorrect feedback after submission
|
193 |
if current_question.get('answered', False):
|
|
|
207 |
|
208 |
# Change the button label immediately after showing the solution
|
209 |
st.session_state.button_label = "Next Question"
|
|
|
|
|
|
|
|
|
|
|
|
|
|