Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter Modal #6642

Merged
merged 196 commits into from
Jul 28, 2023
Merged

Filter Modal #6642

merged 196 commits into from
Jul 28, 2023

Conversation

DanielDervishi
Copy link
Contributor

@DanielDervishi DanielDervishi commented Jun 28, 2023

Motivation and Context

The following changes are applicable when navigating submissions:
image

  • This PR allows graders to filter the next/previous results according Marking State, Tags, Section, Annotation, Total mark and Total Extra Mark
  • Instructors can filter results by TAs assigned to grade the result
  • The next and previous results can now be ordered by group name as well as submission date (In both ascending and descending order)

Your Changes

Description:

  • Added a new button responsible for opening the filter modal:
image
  • Created a filter modal:
Screenshot 2023-07-17 at 1 32 13 PM image
  • After saving their selections, a grader can click the next/previous submission buttons, sending the filter data to the server along with the original request
  • Updated the show route in the results_controller to include all sections in a course in order to populate the filterModal
  • Updated the get_next_grouping method in grouping.rb to use the user's filterData to filter and order submissions
  • Updated the review? method in result_policy responsible for authorization of the next_grouping results_controller route to assure that students are not authorized to provide filterData

Type of change (select all that apply):

  • New feature (non-breaking change which adds functionality)

Testing

Frontend Tests:

Filter Modal Tests

  • Tested that making a selection in each of the single select and multiselect dropdowns properly updates the selection displayed above the dropdown.
  • Tested that clicking clear all in the filterModal resets all textboxes, inputs and single select and multiselect dropdowns as well as the ascending/descending radio buttons
  • Tested that clicking the clear selection (x) button indeed clears the selection for single select and multiselect dropdowns
  • Tested that all dropdowns were populated with the correct data
  • Tested that Invalid Range message is displayed for invalid inputs for all Range Components

Single Select Dropdown Tests

  • Tested that a single select dropdown is not expanded before being clicked
  • Checked that a down arrow is rendered within a single select dropdown that isn't expanded
  • Tested that a single select dropdown that is clicked is expanded with the correct options on click
  • Tested that a single select dropdown with no options shows a no options message when clicked
  • Tested that an upwards arrow is rendered within a single select dropdown that is expanded
  • Tested that a single select dropdown is closed when clicked again

Multi Select Dropdown Tests

  • Tested that a multi select dropdown is rendered correctly
  • Tested that a multi select dropdown that is clicked is expanded with the correct options on click
  • Tested that a multi select dropdown with no options shows a no options message when clicked
  • Tested that a single select dropdown is closed when clicked again or when on click outside

Backend Tests:

  • Tested ordering by submission date and group name (in ascending/descending order)
  • Tested filtering by section, marking state, annotation, Tags, Tas, Total Mark, Total Extra Mark

Questions and Comments (if applicable)

Checklist

  • I have performed a self-review of my own code.
  • I have verified that the pre-commit.ci checks have passed.
  • I have verified that the CI tests have passed.
  • I have reviewed the test coverage changes reported on Coveralls.
  • I have added tests for my changes.
  • I have updated the Changelog.md file.

@david-yz-liu david-yz-liu merged commit 18ce242 into MarkUsProject:master Jul 28, 2023
2 checks passed
@david-yz-liu
Copy link
Contributor

@DanielDervishi @khushiagl great work!

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.

4 participants