-
Notifications
You must be signed in to change notification settings - Fork 108
[MBL-19300][Teacher] Fix push notification routing to open correct student submission in SpeedGrader #3292
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
[MBL-19300][Teacher] Fix push notification routing to open correct student submission in SpeedGrader #3292
Conversation
…udent submission in SpeedGrader Fixed an issue where tapping a push notification about a student comment would open SpeedGrader with the first submission instead of the corresponding student's submission. Changes: - Added submissionId parameter handling in SpeedGraderViewModel - When submissionIds are empty, fetch all submissions and calculate selectedItem based on the provided submissionId - Updated UI state to reflect the correct selected submission - Added comprehensive unit tests for the new behavior Test plan: Since push notifications only work in production, this can be tested using a deep link to open SpeedGrader with a specific submission ID. Verify that the correct student's submission is displayed (not the first one). refs: MBL-19300 affects: Teacher release note: Fixed an issue where tapping a push notification about a student comment would open SpeedGrader with the first submission instead of the corresponding student's submission.
📊 Code Coverage Report✅ Student
✅ Teacher
✅ Pandautils
📈 Overall Average
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug where tapping push notifications about student comments would incorrectly open SpeedGrader with the first submission instead of the targeted student's submission.
- Added
submissionIdparameter handling to calculate the correct selected item index - Modified submission loading logic to fetch all submissions when
submissionIdsis empty and find the correct position - Updated UI state initialization to use the calculated selected item index
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| SpeedGraderViewModel.kt | Added submissionId parameter handling and logic to calculate correct selectedItem index |
| SpeedGraderScreen.kt | Moved pagerState initialization inside conditional block to use updated selectedItem |
| SpeedGraderViewModelTest.kt | Added comprehensive unit tests for new submission ID routing behavior |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...autils/src/main/java/com/instructure/pandautils/features/speedgrader/SpeedGraderViewModel.kt
Show resolved
Hide resolved
kdeakinstructure
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QA 👍 - We going to check this in production thoroughly
Fixed an issue where tapping a push notification about a student comment would open SpeedGrader with the first submission instead of the corresponding student's submission.
Changes:
Test plan: Since push notifications only work in production, this can be tested using a deep link to open SpeedGrader with a specific submission ID. Verify that the correct student's submission is displayed (not the first one).
refs: MBL-19300
affects: Teacher
release note: Fixed an issue where tapping a push notification about a student comment would open SpeedGrader with the first submission instead of the corresponding student's submission.
Checklist