Skip to content

Conversation

@obiora198
Copy link

Add Submit and Quit Feature

What does this PR do?

  • Adds a "Submit and Quit" button to allow users to end quizzes early
  • Preserves attempted answers and calculates partial scores
  • Includes confirmation dialog to prevent accidental quitting
  • Supports localization for all text elements

Why is this needed?

  • Users may need to exit quizzes prematurely due to time constraints or other reasons
  • Provides better user experience by saving progress instead of losing all data
  • Aligns with common quiz platform functionality

Changes Made

  1. Added handleQuitQuiz function to handle early submission
  2. Implemented confirmation modal component
  3. Added localization support for quit-related text
  4. Updated CSS for new UI elements
  5. Maintained backward compatibility

Screenshots

Screenshot 2025-08-19 122348 Screenshot 2025-08-19 122404

Testing

  • Tested quit functionality with completed questions
  • Tested quit functionality with no questions attempted
  • Verified score calculation accuracy
  • Tested localization support
  • Verified no breaking changes to existing features

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant