From 2dea9ee610a09176cfcc69ef8c90f210d95901bd Mon Sep 17 00:00:00 2001 From: Akos Hermann <72087159+hermannakos@users.noreply.github.com> Date: Mon, 2 Sep 2024 11:18:14 +0200 Subject: [PATCH] [MBL-17822][Teacher] Filtering submissions by section doesn't open the correct students submission (#2545) refs: MBL-17822 affects: Teacher release note: Fixed a bug, where the incorrect student's submission was opened in SpeedGrader in some cases. * fix selection * fix clearing section filter --- .../submission/AssignmentSubmissionListFragment.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/teacher/src/main/java/com/instructure/teacher/features/assignment/submission/AssignmentSubmissionListFragment.kt b/apps/teacher/src/main/java/com/instructure/teacher/features/assignment/submission/AssignmentSubmissionListFragment.kt index 76788bdb47..abb5c9ee44 100644 --- a/apps/teacher/src/main/java/com/instructure/teacher/features/assignment/submission/AssignmentSubmissionListFragment.kt +++ b/apps/teacher/src/main/java/com/instructure/teacher/features/assignment/submission/AssignmentSubmissionListFragment.kt @@ -156,7 +156,8 @@ class AssignmentSubmissionListFragment : BaseSyncFragment< selectedIdx = selectedIdx, anonymousGrading = assignment.anonymousGrading, filter = presenter.getFilter(), - filterValue = presenter.getFilterPoints() + filterValue = presenter.getFilterPoints(), + filteredSubmissionIds = filteredSubmissions.map { it.id }.toLongArray(), ) RouteMatcher.route(requireActivity(), Route(bundle, RouteContext.SPEED_GRADER)) } @@ -206,8 +207,8 @@ class AssignmentSubmissionListFragment : BaseSyncFragment< private fun setupListeners() = with(binding) { clearFilterTextView.setOnClickListener { - presenter.setFilter(SubmissionListFilter.ALL) presenter.clearFilterList() + presenter.setFilter(SubmissionListFilter.ALL) filterTitle.setText(R.string.all_submissions) clearFilterTextView.setGone() }