Skip to content

Rename difficulty to selection_frequency for question display and filters#71

Open
DaiIshida4869 wants to merge 1 commit into
mainfrom
feature/rename-difficulty-to-selection-frequency
Open

Rename difficulty to selection_frequency for question display and filters#71
DaiIshida4869 wants to merge 1 commit into
mainfrom
feature/rename-difficulty-to-selection-frequency

Conversation

@DaiIshida4869
Copy link
Copy Markdown
Contributor

@DaiIshida4869 DaiIshida4869 commented Apr 2, 2026

Issue: #63

  • Rename "Difficulty" to "Correct Answer Rate" using selection_frequency field
  • Fall back to "Difficulty" when selection_frequency is not available

…er rate when selection_frequency is available
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Renames “Difficulty” UI/filtering to “Correct Answer Rate” backed by a new selection_frequency field, while attempting to fall back to Difficulty when the new field isn’t present.

Changes:

  • Update question filter types and query parameter construction to use min_selection_frequency / max_selection_frequency.
  • Add selection_frequency to the Question type and display “Correct Answer Rate” in the list item badge.
  • Update filter UI label and edit page UI to show “Correct Answer Rate” with fallback to Difficulty.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/types/QuestionFilters.ts Renames difficulty filter fields to selection frequency fields.
src/types/Question.ts Adds selection_frequency to the Question model.
src/hooks/useCourseQuestions.ts Switches filter query params from difficulty to selection frequency.
src/components/macfast/questions-item/questions-item.tsx Shows “Correct Answer Rate” badge with fallback to Difficulty.
src/components/macfast/questions-filter.tsx Renames slider/filter UI to “Correct Answer Rate”.
src/app/courses/[courseCode]/question/[questionId]/edit/tabs/question-tab.tsx Shows “Correct Answer Rate” on edit page with fallback to Difficulty.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/types/Question.ts
Comment thread src/components/macfast/questions-item/questions-item.tsx
@LaeekAhmed LaeekAhmed linked an issue Apr 28, 2026 that may be closed by this pull request
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.

Align question difficulty in filter and quesiton item

2 participants