Skip to content

feat: add quiz question deletion - #174

Merged
TheCodeHeist-Coder merged 1 commit into
TheCodeHeist-Coder:mainfrom
Sanjay-07-Sk:fix/122-delete-quiz-question
Oct 19, 2026
Merged

TheCodeHeist-Coder merged 1 commit into
TheCodeHeist-Coder:mainfrom
Sanjay-07-Sk:fix/122-delete-quiz-question

Conversation

@Sanjay-07-Sk

Copy link
Copy Markdown
Contributor

What does this PR do?

This PR adds question deletion functionality to the Quiz Builder.

  • Adds a Delete button for each quiz question.
  • Implements backend question deletion with validation and authorization.
  • Adds a confirmation dialog to prevent accidental deletion.
  • Updates the UI immediately after successful deletion.
  • Handles deletion errors without removing questions from the UI.
  • Supports deleting the last question without breaking the Quiz Builder.
  • Adds tests for the deletion functionality.

Related issue

Closes #122

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Refactoring
  • Performance
  • Tests
  • Build / CI / deployment

Which services does this touch?

  • apps/frontend
  • apps/http-server
  • apps/ws-server
  • apps/genAI
  • packages/db (schema or Prisma changes)
  • Docker / CI

How did you test this?

  • Backend deletion tests: 7/7 passed.
  • Quiz Builder tests: 7/7 passed.
  • AI Quiz Generator tests: 16/16 passed.
  • GenAI API service tests: 6/6 passed.
  • Backend TypeScript check passed.
  • Frontend production build passed.
  • git diff --check passed.

The tests cover successful deletion, invalid and nonexistent question IDs, authorization, quiz association validation, cancellation, UI updates, error handling, and deleting the last question.

Note: An unrelated pre-existing failure was identified in JoinQuiz.test.tsx and was not modified as part of this PR.

Checklist

  • I ran pnpm run lint
  • I ran pnpm run check-types
  • I ran pnpm run build
  • The app still starts with docker-compose up
  • I updated documentation if this changes behaviour or setup
  • I did not commit any .env file, API key or other secret

@Sanjay-07-Sk

Copy link
Copy Markdown
Contributor Author

Hi maintainers! 👋

I’ve implemented the quiz question deletion functionality for Issue #122.

  • Added a Delete button with a confirmation dialog.
  • Implemented backend deletion with validation and authorization.
  • Updated the UI after successful deletion.
  • Added tests for deletion, authorization, and error handling.

I’ve run the relevant tests and verified the build. I’d appreciate your review and feedback.

Thank you! Looking forward to contributing to Nexus Spring of Code. 🚀

@TheCodeHeist-Coder
TheCodeHeist-Coder self-requested a review October 19, 2026 08:05
@TheCodeHeist-Coder

Copy link
Copy Markdown
Owner

@Sanjay-07-Sk looks good . i'll merge it by the end of the day

@TheCodeHeist-Coder
TheCodeHeist-Coder merged commit 9d55bca into TheCodeHeist-Coder:main Oct 19, 2026
9 checks passed
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.

Add delete functionality in Quiz Question

2 participants