From 2f6d083c98a209dd5738290a8554c52c528136d9 Mon Sep 17 00:00:00 2001 From: Tamas Kozmer Date: Tue, 8 Feb 2022 11:30:27 +0100 Subject: [PATCH 1/2] Updated version code. --- apps/student/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/student/build.gradle b/apps/student/build.gradle index aebd319158..86998006cc 100644 --- a/apps/student/build.gradle +++ b/apps/student/build.gradle @@ -59,8 +59,8 @@ android { applicationId "com.instructure.candroid" minSdkVersion Versions.MIN_SDK targetSdkVersion Versions.TARGET_SDK - versionCode = 234 - versionName = '6.16.0' + versionCode = 235 + versionName = '6.16.1' vectorDrawables.useSupportLibrary = true multiDexEnabled = true From dc035a08ca82bedccfb454c46c5ce1d353251b4a Mon Sep 17 00:00:00 2001 From: Tamas Kozmer <72397075+tamaskozmer@users.noreply.github.com> Date: Wed, 9 Feb 2022 11:03:06 +0100 Subject: [PATCH 2/2] [Student][MBL-15895] K5 Grades not showing correct values refs: MBL-15895 affects: Student release note: Fixed a bug where grades where shown for the wrong grading period on the homeroom grades screen. --- .../pandautils/features/elementary/grades/GradesViewModel.kt | 5 +++-- .../features/elementary/grades/GradesViewModelTest.kt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/pandautils/src/main/java/com/instructure/pandautils/features/elementary/grades/GradesViewModel.kt b/libs/pandautils/src/main/java/com/instructure/pandautils/features/elementary/grades/GradesViewModel.kt index afb6cd97b9..6d36482488 100644 --- a/libs/pandautils/src/main/java/com/instructure/pandautils/features/elementary/grades/GradesViewModel.kt +++ b/libs/pandautils/src/main/java/com/instructure/pandautils/features/elementary/grades/GradesViewModel.kt @@ -124,14 +124,15 @@ class GradesViewModel @Inject constructor( return courses .map { val enrollment = it.enrollments?.first() + val grades = it.getCourseGrade(false) GradeRowItemViewModel(resources, GradeRowViewData( it.id, it.name, getCourseColor(it), it.imageUrl ?: "", - if (it.hideFinalGrades) 0.0 else enrollment?.computedCurrentScore, - createGradeText(enrollment?.computedCurrentScore, enrollment?.computedCurrentGrade, it.hideFinalGrades, enrollment?.currentGradingPeriodId ?: 0L != 0L)) + if (it.hideFinalGrades) 0.0 else grades?.currentScore, + createGradeText(grades?.currentScore, grades?.currentGrade, it.hideFinalGrades, enrollment?.currentGradingPeriodId ?: 0L != 0L)) ) { gradeRowClicked(it) } } } diff --git a/libs/pandautils/src/test/java/com/instructure/pandautils/features/elementary/grades/GradesViewModelTest.kt b/libs/pandautils/src/test/java/com/instructure/pandautils/features/elementary/grades/GradesViewModelTest.kt index baebb2a4f3..7c734cf7ce 100644 --- a/libs/pandautils/src/test/java/com/instructure/pandautils/features/elementary/grades/GradesViewModelTest.kt +++ b/libs/pandautils/src/test/java/com/instructure/pandautils/features/elementary/grades/GradesViewModelTest.kt @@ -351,7 +351,7 @@ class GradesViewModelTest { gradingPeriods: List? = null, hideFinalGrades: Boolean = false ): Course { - val enrollment = Enrollment(id = 123, computedCurrentScore = score, computedCurrentGrade = grade) + val enrollment = Enrollment(id = 123, computedCurrentScore = score, computedCurrentGrade = grade, type = Enrollment.EnrollmentType.Student) return Course( id = id, name = name,