Spaces:
Sleeping
Sleeping
import streamlit as st | |
def main(): | |
st.title("Take Exam") | |
if not st.session_state.exam_loaded: | |
st.error("Please load an exam first!") | |
else: | |
st.write("Start taking the exam.") | |
if st.button("Finish Exam"): | |
st.session_state.exam_completed = True | |
st.session_state.page_access["View Results"] = True | |
st.session_state.page_access["Take Exam"] = False | |
st.success("Exam completed successfully!") | |
elif st.button("End Exam Early"): | |
st.session_state.page_access["View Results"] = True | |
st.session_state.page_access["Take Exam"] = False | |
st.warning("Exam ended early.") | |
if __name__ == "__main__": | |
main() |