Spaces:
Running
Fix for Resolving Skipping Question 1 and Submission Errors in Quiz
This pull request addresses two critical issues in the quiz application:
Skipping Question 1 After Login: The quiz was skipping Question 1 after a user logged in with their Hugging Face account. This was due to the on_user_logged_in function hiding the start button without triggering the display of the first question. This PR fixes this by adding a .then statement at the end of the login_btn.click() to kick off the start button click function, which will cause the first question to show.
Submission Validation Error: The quiz was failing to submit results due to a validation error related to case sensitivity and non-nullable values. This pull request addresses this by intializing the radio button with a non-nullable value and fixing the update values of user_answers after each click by adding a .then and echoing back the value.
With these changes, the quiz now functions correctly, displaying all questions and submitting results successfully.