Skip to content

Commit

Permalink
Merge pull request #1485 from instructure/release/student-6.16.1-235
Browse files Browse the repository at this point in the history
Release Student 6.16.1 (235)
  • Loading branch information
tamaskozmer authored Feb 9, 2022
2 parents 98efbbb + dc035a0 commit 396685a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions apps/student/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ class GradesViewModelTest {
gradingPeriods: List<GradingPeriod>? = 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,
Expand Down

0 comments on commit 396685a

Please sign in to comment.