exam_kiosk_v1 / pages /4_View_Result.py
louiecerv
First Save
9c3ca76
raw
history blame
893 Bytes
import streamlit as st
def main():
st.title("View Results")
if not st.session_state.exam_completed:
st.error("No completed exam results available.")
else:
st.write("Displaying results...")
if st.button("Retake Exam"):
st.session_state.exam_completed = False
st.session_state.exam_loaded = True
st.session_state.page_access["Take Exam"] = True
st.session_state.page_access["View Results"] = False
st.success("You can retake the exam.")
elif st.button("Load Another Exam"):
st.session_state.exam_loaded = False
st.session_state.exam_completed = False
st.session_state.page_access = {"About": True, "Load Exam": True, "Take Exam": False, "View Results": False}
st.success("Ready to load another exam.")
if __name__ == "__main__":
main()