Skip to content

Add option to delete individual quizzes from history.#569

Open
Adilkhan6465 wants to merge 3 commits intoAOSSIE-Org:mainfrom
Adilkhan6465:feature/delete-single-quiz
Open

Add option to delete individual quizzes from history.#569
Adilkhan6465 wants to merge 3 commits intoAOSSIE-Org:mainfrom
Adilkhan6465:feature/delete-single-quiz

Conversation

@Adilkhan6465
Copy link
Copy Markdown
Contributor

@Adilkhan6465 Adilkhan6465 commented Mar 14, 2026

Addressed Issues:

Fixes #568

Feature: Delete Individual Quiz from History

This PR adds the ability to delete individual quizzes from the quiz history page.

Changes

  • Added delete button for each quiz entry
  • Implemented "handleDeleteQuiz" function to update localStorage and UI

Testing

  • Generated multiple quizzes
  • Verified that individual quizzes can be removed
  • Confirmed remaining quizzes persist correctly

Screenshots/Recordings:

delete-quiz-demo.mp4.mp4

AI Usage Disclosure:

We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact. AI slop is strongly discouraged and may lead to banning and blocking. Do not spam our repos with AI slop.

Check one of the checkboxes below:

  • This PR does not contain AI-generated code at all.
  • This PR contains AI-generated code. I have read the AI Usage Policy and this PR complies with this policy. I have tested the code locally and I am responsible for it.

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions
  • If applicable, I have made corresponding changes or additions to the documentation
  • If applicable, I have made corresponding changes or additions to tests
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contribution Guidelines
  • Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.
  • I have filled this PR template completely and carefully, and I understand that my PR may be closed without review otherwise.

Summary by CodeRabbit

  • New Features
    • Quiz list items now show a delete (trash) button instead of a navigation arrow.
    • Users can delete individual quizzes from their history; deletions update saved quiz list.
    • Deleting a quiz won’t trigger opening its details—row click still opens the quiz.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 14, 2026

Warning

Rate limit exceeded

@Adilkhan6465 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 0 minutes and 42 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0cc2c088-491b-40ae-aa9c-92507fb3fd7a

📥 Commits

Reviewing files that changed from the base of the PR and between 6f2fa36 and 0ce0546.

📒 Files selected for processing (1)
  • eduaid_web/src/pages/Previous.jsx
📝 Walkthrough

Walkthrough

Replaces the per-row navigation icon with a trash button and adds a handler that removes a quiz by index from localStorage ("last5Quizzes") and component state; the trash button stops event propagation to preserve existing row click behavior.

Changes

Cohort / File(s) Summary
Quiz History Deletion
eduaid_web/src/pages/Previous.jsx
Replaced FaArrowRight icon with FaTrash; added handleDeleteQuiz(index) to filter out a quiz and update localStorage and state; added trash button per item that stops event propagation to keep row click navigation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A tiny trash, a nimble paw,
Tap once and watch a quiz withdraw,
Local history tidied, neat and sly,
One less score beneath the sky,
Hopped away — a clean-up sigh.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title directly matches the main change—adding delete functionality for individual quizzes from history.
Linked Issues check ✅ Passed The code changes implement the exact feature requested in #568: a per-item delete control (trash icon) and logic to remove individual quizzes.
Out of Scope Changes check ✅ Passed All changes are directly related to the requested feature; only modifications to Previous.jsx support delete functionality with no unrelated alterations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can approve the review once all CodeRabbit's comments are resolved.

Enable the reviews.request_changes_workflow setting to automatically approve the review once all CodeRabbit's comments are resolved.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@eduaid_web/src/pages/Previous.jsx`:
- Around line 93-100: The delete button is icon-only and lacks an accessible
name; update the button that calls handleDeleteQuiz(index) (the button wrapping
the FaTrash icon) to provide an accessible label by adding an aria-label (e.g.,
aria-label="Delete quiz") or include visually hidden text inside the button so
screen readers announce its purpose while keeping the FaTrash icon visible.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 08506ea9-cb3b-4e7a-9421-991d29340ec5

📥 Commits

Reviewing files that changed from the base of the PR and between fc3bf1a and 9992f9a.

📒 Files selected for processing (1)
  • eduaid_web/src/pages/Previous.jsx

Comment thread eduaid_web/src/pages/Previous.jsx
@Adilkhan6465
Copy link
Copy Markdown
Contributor Author

Hi @yatikakain @Aditya062003 ,

I have addressed the CodeRabbit review comments and updated the implementation accordingly.
Please let me know if any further changes are required. Thank you!

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.

[FEATURE]: Allow deleting individual quizzes from quiz history

1 participant