feat: navigation scope filter for TA with manage-submissions#8046
feat: navigation scope filter for TA with manage-submissions#8046YheChen wants to merge 16 commits into
Conversation
Coverage Report for CI Build 28990118433Coverage increased (+0.01%) to 90.299%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
david-yz-liu
left a comment
There was a problem hiding this comment.
@YheChen nice work, I left a few comments. Also modify the PR description to replace "Closes" with "Ref". This PR alone does not close the issue, as there's two parts involved.
| if (!this.state.prefetchedIds || this.shouldRefetchIds()) { | ||
| this.fetchGroupingIds(); | ||
| } | ||
| this.refreshFilterData(() => { |
There was a problem hiding this comment.
Revert this change, it is not related to this PR
| } | ||
| }; | ||
|
|
||
| normalizeFilterData = filterData => { |
There was a problem hiding this comment.
Revert this change; it's unrelated to this PR
| results | ||
| end | ||
|
|
||
| def filter_to_assigned_groupings?(current_role, filter_data) |
There was a problem hiding this comment.
inline this function. You can also modify the logic to use an allowed_to? with :manage_submissions
| ### 🚨 Breaking changes | ||
|
|
||
| ### ✨ New features and improvements | ||
| - Added a submissions table toggle that lets TAs with manage submissions permission view all submissions or only assigned submissions (#8047) |
There was a problem hiding this comment.
This changelog entry is incorrect
| new webpack.ProvidePlugin({ | ||
| $: "jquery", | ||
| jQuery: "jquery", | ||
| React: "react", |
| add_criterion: Add Criterion Filter | ||
| assigned_submissions_only: Only assigned submissions | ||
| invalid_range: Invalid Range | ||
| navigation_scope: Navigation Scope |
There was a problem hiding this comment.
Rename this to "Submission Scope" (I don't think "Navigation" is helpful here, as the entire filter modal is about modifying navigation)
| <div className={"filter"} data-testid={"assigned-graders-only"}> | ||
| <p>{I18n.t("results.filters.navigation_scope")}</p> | ||
| <div className={"assigned-graders-only-toggle"}> | ||
| <input |
There was a problem hiding this comment.
Rather than have a checkbox, I'd like to see to radio buttons with labels "My assigned submissions" and "All submissions".
Proposed Changes
(Describe your changes here. Also describe the motivation for your changes: what problem do they solve, or how do they improve the application or codebase? If this pull request fixes an open issue, use a keyword to link this pull request to the issue.)
Ref #6424
This PR adds a navigation-scope filter for TAs who have the manage submissions permission.
Previously, result-page navigation for TAs was scoped to their assigned submissions. With this change, TAs who can manage submissions can choose whether result navigation should include:
The new option appears in the result filter modal as “Only assigned submissions” under “Navigation Scope”. It is shown only to TAs with manage-submissions permission. TAs without that permission remain restricted to assigned submissions, and instructors are unaffected.
This PR also:
can_manage_submissionsin result JSON dataScreenshots of your changes (if applicable)
Type of Change
(Write an
Xor a brief description next to the type or types that best describe your changes.)Checklist
(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the
[ ]into a[x]in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)Before opening your pull request:
After opening your pull request:
Questions and Comments
(Include any questions or comments you have regarding your changes.)