Skip to content

Conversation

suhaibabsi-inst
Copy link
Contributor

@suhaibabsi-inst suhaibabsi-inst commented Jul 8, 2025

refs: MBL-18890
affects: Teacher
release note: Fixed student ordering in SpeedGrader to match that used in submissions list.

Test Plan

By opening SpeedGrader in Teacher app, either by;

  1. Tapping on SpeedGrader button at the navigation bar of Assignment Details screen
  2. Tapping on any user shown on the submissions lists.

Students order as you navigate through it now must match the order used in Submissions list.

Checklist

  • Follow-up e2e test ticket created
  • A11y checked
  • Tested on phone
  • Tested on tablet
  • Tested in dark mode
  • Tested in light mode
  • Approve from product

refs: MBL-18890
affects: Teacher
release note: Fixed student ordering in SpeedGrader to match that used in submissions list.
@suhaibabsi-inst suhaibabsi-inst self-assigned this Jul 8, 2025
@inst-danger
Copy link
Contributor

inst-danger commented Jul 8, 2025

Teacher Build QR Code:

@inst-danger
Copy link
Contributor

inst-danger commented Jul 8, 2025

Warnings
⚠️ One or more files are below the minimum test coverage 50%

Release Note:

Fixed student ordering in SpeedGrader to match that used in submissions list.

Affected Apps: Teacher

MBL-18890

Coverage New % Master % Delta
Canvas iOS 91.39% 91.39% 0.01%
Core/Core/Common/CommonUI/CoreWebView/View/CoreWebViewAccessibilityHelper.swift 0% 0% 0%
Student/Student/WidgetRouting/WidgetRouter+GradeListWidget.swift 0% 0% 0%

Generated by 🚫 dangerJS against 95b0999

@suhaibabsi-inst suhaibabsi-inst marked this pull request as ready for review July 8, 2025 09:10
@@ -182,16 +182,30 @@ public enum SpeedGraderUserInfoKey {
private extension SpeedGraderInteractorLive {

static let needsGradingFirstSortingStrategy: (Submission, Submission) -> Bool = { sub1, sub2 in
Copy link
Contributor

Choose a reason for hiding this comment

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

We had a discussion on this with @vargaat and would it be possible to extract this strategy somewhere and use that as the single source of truth for grouping and ordering both in SubmissionList and in SpeedGrader?
Please put the extension Submission: Comparable logic there as well to have all related logic in one place.
That strategy could handle the grouping, so SubmissionList could use that for it's sections, and SpeedGrader could use its flatmapped version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rh12 We need to keep Submission conformance to Comparable in Core as this is considered more safe according to Swift. Not complying with that will produce this warning:

Extension declares a conformance of imported type 'Submission' to imported protocol 'Comparable'; this will not behave correctly if the owners of 'Core' introduce this conformance in the future.
- Add '@retrospective' to silence the warning.

Comment on lines 209 to 211
let sortNeedsGradingFirst = (
userInfo?[SpeedGraderUserInfoKey.sortNeedsGradingSubmissionsFirst] as? Bool
) ?? false
Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed with product:
The SubmissionList ordering should be applied to all entry points (not just Submission List & AssignmentDetails SG button). It should be fixed to the currently used logic (grouped by status and alphabetical within each group)
Could you please remove the parameter and condition from the code?

@suhaibabsi-inst suhaibabsi-inst requested a review from rh12 July 13, 2025 23:08
Copy link
Collaborator

@vargaat vargaat left a comment

Choose a reason for hiding this comment

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

QA+1

Copy link
Contributor

@rh12 rh12 left a comment

Choose a reason for hiding this comment

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

QA + 1

Thanks for the changes!

@suhaibabsi-inst suhaibabsi-inst merged commit 4dd4abc into master Jul 16, 2025
4 checks passed
@suhaibabsi-inst suhaibabsi-inst deleted the bugfix/MBL-18890-SpeedGrader-SubmissionsList-Order-Sync branch July 16, 2025 11:34
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