Skip to content

Conversation

@RichDom2185
Copy link
Member

Description

Somewhat part of #2665. The following bug was reported by @lizchow:

Accessing the grading dashboard will default to showing "my groups" for staff, but after refreshing the page, it defaults back to all groups.

The cause was that although the current user and their role is persisted in the browser, the same is not the case for the user's group. As our check involves showing all groups for admins or those without a group, the bug occurs upon the browser refresh.

Solution is simply to persist the group data together with the rest of current user information.

Sorry it took a while, thanks for reporting!


This PR also replaced deprecated interfaces with their replacements.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Code quality improvements

Checklist

  • I have tested this code
  • I have updated the documentation

@RichDom2185 RichDom2185 requested a review from sayomaki November 4, 2023 02:33
@RichDom2185 RichDom2185 self-assigned this Nov 4, 2023
@RichDom2185 RichDom2185 enabled auto-merge (squash) November 4, 2023 02:33
@coveralls
Copy link

Pull Request Test Coverage Report for Build 6752262108

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 37.154%

Totals Coverage Status
Change from base Build 6735695179: 0.0%
Covered Lines: 5707
Relevant Lines: 14431

💛 - Coveralls

Copy link
Contributor

@sayomaki sayomaki left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@RichDom2185 RichDom2185 merged commit a35b239 into master Nov 4, 2023
@RichDom2185 RichDom2185 deleted the persist-group branch November 4, 2023 08:07
RichDom2185 added a commit to NUS-CS1101S/cadet-frontend that referenced this pull request Nov 4, 2023
* Persist current user's group in local storage

* Remove deprecated API
RichDom2185 added a commit to NUS-CS1101S/cadet-frontend that referenced this pull request Nov 4, 2023
* Persist current user's group in local storage

* Remove deprecated API
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