IsaacKerson commited on
Commit
42104dc
1 Parent(s): 21872f9

delete form_submit from session when changing pages

Browse files
Files changed (3) hide show
  1. pages/quiz.py +1 -1
  2. pages/upload.py +3 -0
  3. pages/view.py +4 -0
pages/quiz.py CHANGED
@@ -87,5 +87,5 @@ def app():
87
  with st.form("sentence_completion"):
88
  for q in questions:
89
  st.text_input(f'{q[0] + 1}. {q[3]}', key=q[0], placeholder="Type answer here")
90
- submitted = st.form_submit_button(label="Submit", on_click=form_callback, args=(questions,))
91
 
 
87
  with st.form("sentence_completion"):
88
  for q in questions:
89
  st.text_input(f'{q[0] + 1}. {q[3]}', key=q[0], placeholder="Type answer here")
90
+ st.form_submit_button(label="Submit", on_click=form_callback, args=(questions,))
91
 
pages/upload.py CHANGED
@@ -6,6 +6,9 @@ from pages.utils import *
6
 
7
  # @st.cache
8
  def app():
 
 
 
9
  st.markdown("## Upload Data")
10
 
11
  # Code to read a single file
 
6
 
7
  # @st.cache
8
  def app():
9
+ '''delete form_submit to run quiz maker on return to page'''
10
+ del st.session_state.form_submit
11
+
12
  st.markdown("## Upload Data")
13
 
14
  # Code to read a single file
pages/view.py CHANGED
@@ -6,6 +6,10 @@ import sqlite3
6
  from pages.utils import db_connect
7
 
8
  def app():
 
 
 
 
9
  st.markdown("## View Data")
10
 
11
  BASE_DIR = os.path.dirname(os.path.abspath(__file__))
 
6
  from pages.utils import db_connect
7
 
8
  def app():
9
+
10
+ '''delete form_submit to run quiz maker on return to page'''
11
+ del st.session_state.form_submit
12
+
13
  st.markdown("## View Data")
14
 
15
  BASE_DIR = os.path.dirname(os.path.abspath(__file__))