Skip to content

feat: Add sessionStorage persistence for filter options and current page in grading menu #4293

Description

@ewonglh

Feature

Is your feature request related to a problem? Please describe.
When grading, I'm filtering specifically for the assignment I want to grade. However, when refreshing the page/returning to the grading page from an assignment, my filter options, current page, and search options are gone! How unfortunate. Now, I have to apply all the filters and type in the search terms again. This gets troublesome if I have many assignments to grade, especially because I'm trying to help out with the grading of M1 Rune Trials.

This would be helpful for graders who are taking over the workload of another grader as well, because this lets them persist the filter by Group and search term for assignment name.

Describe the solution you'd like
There should be some way to persist the user's filter options and current page locally. Maybe this can be stored in sessionStorage on each query? This allows for pagination filter options to persist on the same tab, but other tabs won't be affected. Then, when the Grading page is opened on a tab, the GET request to api.sourceacademy.nus.edu.sg/v2/courses/(course_id)/admin/grading should use the filters in sessionStorage if available, and none if not available.

The current behaviour is that all filters are cleared upon tab refresh. If using sessionStorage, either maintain this behaviour, or allow filters to persist on refresh but add a "Clear all" button to clear sessionStorage filters.

Checklist

  • I checked the requested feature does not already exist
  • I checked to make sure that this issue has not already been filed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions