Skip to content

Add delete functionality in Quiz Question #122

@TheCodeHeist-Coder

Description

@TheCodeHeist-Coder

Feature: Add Delete Question Functionality in Quiz Builder

📌 Description

Currently, in the Quiz Builder page, users can create questions but there is no option to delete them after creation. This limits usability and makes editing quizzes difficult.

We need to implement a feature that allows users to delete previously created questions.


## 📂 Relevant Files

  • Backend: /apps/http-server/routes/quiz.ts
  • Frontend: /apps/frontend/src/screens/QuizBuilder.tsx

🎯 Requirements

Frontend

  • Add a Delete button/icon for each question in the Quiz Builder UI
  • Ensure proper UI/UX (confirmation optional but recommended)
  • Update state after deletion so UI reflects changes instantly

Backend

  • Add an API endpoint (if not already present) to handle question deletion
  • Ensure proper validation:
    • Question exists
    • Proper authorization (if applicable)
  • Return appropriate success/error responses

Expected Outcome

  • Users can delete any question they created
  • UI updates immediately after deletion
  • Backend properly removes the question from the database

Additional Notes

  • Follow existing code structure and conventions
  • Ensure the feature does not break existing functionality
  • Handle edge cases:
    • Deleting the last question
    • Invalid question ID

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions