Rename difficulty to selection_frequency for question display and filters#71
Open
DaiIshida4869 wants to merge 1 commit into
Open
Rename difficulty to selection_frequency for question display and filters#71DaiIshida4869 wants to merge 1 commit into
DaiIshida4869 wants to merge 1 commit into
Conversation
…er rate when selection_frequency is available
There was a problem hiding this comment.
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_frequencyto theQuestiontype 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: #63
selection_frequencyfieldselection_frequencyis not available